子单超时状态变更
This commit is contained in:
parent
7062b7dd52
commit
68661072ce
|
|
@ -41,6 +41,7 @@ import com.ghy.worker.service.WorkerService;
|
||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -104,6 +105,8 @@ public class OrderDetailController extends BaseController {
|
||||||
private IWxMsgService wxMsgService;
|
private IWxMsgService wxMsgService;
|
||||||
@Resource
|
@Resource
|
||||||
private ThreadPoolTaskExecutor executor;
|
private ThreadPoolTaskExecutor executor;
|
||||||
|
@Autowired
|
||||||
|
private IOrderCallRecordService orderCallRecordService;
|
||||||
|
|
||||||
@RequiresPermissions("order:detail:view")
|
@RequiresPermissions("order:detail:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
@ -877,6 +880,29 @@ public class OrderDetailController extends BaseController {
|
||||||
return rejectDetailOrder(orderDetail);
|
return rejectDetailOrder(orderDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/callCustomer")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult callCustomer(@RequestBody OrderDetail orderDetail) {
|
||||||
|
try {
|
||||||
|
OrderDetail result = orderDetailService.selectById(orderDetail.getId());
|
||||||
|
if (result.getTimeout() == 1 && OrderStatus.PLAIN.code() == result.getOrderStatus()) {
|
||||||
|
orderDetail.setTimeout(0);
|
||||||
|
}
|
||||||
|
int i = orderDetailService.updateOrderDetail(orderDetail);
|
||||||
|
if(i > 0){
|
||||||
|
OrderCallRecord param = new OrderCallRecord();
|
||||||
|
param.setOrderId(orderDetail.getId());
|
||||||
|
param.setCallTime(new Date());
|
||||||
|
param.setOrderType("01");
|
||||||
|
orderCallRecordService.insertOrderCallRecord(param);
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拒绝订单
|
* 拒绝订单
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue