|
@@ -16,6 +16,8 @@ import com.pj.common.core.exception.ServiceException;
|
|
|
import com.pj.current.dto.APPLoginUserInfo;
|
|
|
import com.pj.current.satoken.StpAPPUserUtil;
|
|
|
import com.pj.enummj.*;
|
|
|
+import com.pj.tb_enterprise.TbEnterprise;
|
|
|
+import com.pj.tb_enterprise.TbEnterpriseMapper;
|
|
|
import com.pj.tb_goods_transit.TbGoodsTransit;
|
|
|
import com.pj.tb_goods_transit.TbGoodsTransitMapper;
|
|
|
import com.pj.tb_goods_transit.TbGoodsTransitService;
|
|
@@ -55,6 +57,8 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
private TbGoodsTransitService tbGoodsTransitService;
|
|
|
@Autowired
|
|
|
private LevelOneServerInterface levelOneServerInterface;
|
|
|
+ @Autowired
|
|
|
+ private TbEnterpriseMapper tbEnterpriseMapper;
|
|
|
|
|
|
/**
|
|
|
* 远程调用
|
|
@@ -141,6 +145,13 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
//查询订单
|
|
|
TbOrder tbOrder = tbOrderMapper.selectById(orderId);
|
|
|
if(tbOrder == null)throw new ServiceException("订单状态异常!");
|
|
|
+ //如果该订单商户已叫车则无法进行取消
|
|
|
+ if(tbOrder.getCallCarStatus() == 1 || tbOrder.getCallCarStatus() == 2){
|
|
|
+ TbEnterprise enterprise = tbEnterpriseMapper.selectById(appLoginInfo.getFk());
|
|
|
+ String phone = null;
|
|
|
+ if(enterprise != null)phone = enterprise.getContact();
|
|
|
+ throw new ServiceException("您的订单单号为[ " + tbOrder.getTradeNo() + " ]商户已叫车,无法进行取消,请联系商户电话[ " + phone + " ]进行取消。");
|
|
|
+ }
|
|
|
//将状态设置已取消
|
|
|
tbOrder.setCancelPeople(1);
|
|
|
//执行保存
|