超时状态变更 + 退款未退加价
This commit is contained in:
parent
2ebe61813d
commit
7062b7dd52
|
|
@ -41,6 +41,7 @@ import com.ghy.worker.service.WorkerService;
|
|||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.ModelMap;
|
||||
|
|
@ -101,6 +102,8 @@ public class OrderDetailController extends BaseController {
|
|||
private OrderBehaviorService orderBehaviorService;
|
||||
@Resource
|
||||
private IWxMsgService wxMsgService;
|
||||
@Resource
|
||||
private ThreadPoolTaskExecutor executor;
|
||||
|
||||
@RequiresPermissions("order:detail:view")
|
||||
@GetMapping()
|
||||
|
|
@ -895,6 +898,14 @@ public class OrderDetailController extends BaseController {
|
|||
financialMasterService.updateFinancialMaster(financialMaster);
|
||||
// 删除子财务单
|
||||
financialDetailService.deleteFinancialDetailByOrderDetailId(orderDetail.getId());
|
||||
// 退换加价费用
|
||||
List<FinancialChangeRecord> fcrList = financialChangeRecordService.selectByDetailIds(orderDetail.getId().toString());
|
||||
// 先把这个子单的加价单全退了
|
||||
for (FinancialChangeRecord fcr : fcrList) {
|
||||
if (PayStatus.PAID.getCode().equals(fcr.getPayStatus()) || PayStatus.PAYED_ADD.getCode().equals(fcr.getPayStatus())) {
|
||||
executor.execute(() -> financialChangeRecordService.refund(om.getDeptId(), fcr.getId()));
|
||||
}
|
||||
}
|
||||
// 退回旧商品
|
||||
// List<OrderGoods> goodsList = orderGoodsService.selectByOrderDetailId(orderDetail.getId());
|
||||
// goodsList.forEach(orderGoods -> {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.ghy.common.core.page.TableDataInfo;
|
|||
import com.ghy.common.core.page.TableSupport;
|
||||
import com.ghy.common.enums.BusinessType;
|
||||
import com.ghy.common.enums.ImgType;
|
||||
import com.ghy.common.enums.OrderStatus;
|
||||
import com.ghy.common.utils.ExceptionUtil;
|
||||
import com.ghy.common.utils.StringUtils;
|
||||
import com.ghy.common.utils.poi.ExcelUtil;
|
||||
|
|
@ -752,6 +753,10 @@ public class OrderMasterController extends BaseController {
|
|||
@ResponseBody
|
||||
public AjaxResult callCustomer(@RequestBody OrderMaster orderMaster) {
|
||||
try {
|
||||
OrderMaster result = orderMasterService.selectById(orderMaster.getId());
|
||||
if (result.getTimeout() == 1 && OrderStatus.PLAIN.code() == result.getOrderStatus()) {
|
||||
orderMaster.setTimeout(0);
|
||||
}
|
||||
int i = orderMasterService.updateOrderMaster(orderMaster);
|
||||
if(i > 0){
|
||||
OrderCallRecord param = new OrderCallRecord();
|
||||
|
|
|
|||
Loading…
Reference in New Issue