1.菠萝派接口-发货验证该订单是否存在
正在显示
1 个修改的文件
包含
7 行增加
和
5 行删除
... | @@ -7,6 +7,7 @@ import com.sibu.orderHelper.common.util.StringUtil; | ... | @@ -7,6 +7,7 @@ import com.sibu.orderHelper.common.util.StringUtil; |
7 | import com.sibu.orderHelper.enums.PineappleEnum; | 7 | import com.sibu.orderHelper.enums.PineappleEnum; |
8 | import com.sibu.orderHelper.enums.PineappleMethodsEnum; | 8 | import com.sibu.orderHelper.enums.PineappleMethodsEnum; |
9 | import com.sibu.orderHelper.integral.dao.PineappleDao; | 9 | import com.sibu.orderHelper.integral.dao.PineappleDao; |
10 | import com.sibu.orderHelper.integral.model.IMDoingOrderBean; | ||
10 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 11 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
11 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 12 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
12 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; | 13 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; |
... | @@ -30,11 +31,6 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS | ... | @@ -30,11 +31,6 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS |
30 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); | 31 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); |
31 | Map<String,Object> params = new HashMap<>(); | 32 | Map<String,Object> params = new HashMap<>(); |
32 | String redisMysqlDbConfig = ""; | 33 | String redisMysqlDbConfig = ""; |
33 | //订单号不符合 | ||
34 | if (StringUtil.isNull(DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()))) { | ||
35 | log.error(String.format("订单号:%s不符合,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); | ||
36 | throw new BizException(String.format("订单号:%s不符合,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); | ||
37 | } | ||
38 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(callRequest.getBizModel().getPlatOrderNo()); | 34 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(callRequest.getBizModel().getPlatOrderNo()); |
39 | String tableIndex = DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()); | 35 | String tableIndex = DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()); |
40 | params.put("doingOrderTable","im_doing_order_" + tableIndex); | 36 | params.put("doingOrderTable","im_doing_order_" + tableIndex); |
... | @@ -43,6 +39,12 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS | ... | @@ -43,6 +39,12 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS |
43 | params.put("supplierId",callRequest.getSupplier().getId()); | 39 | params.put("supplierId",callRequest.getSupplier().getId()); |
44 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); | 40 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); |
45 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | 41 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 |
42 | IMDoingOrderBean iMDoingOrderBean = pineappleDao.getOrderListByMap(params); | ||
43 | if(StringUtil.isNull(iMDoingOrderBean)){ | ||
44 | log.error("获取订单数据业务异常"); | ||
45 | throw new BizException("获取订单数据业务异常"); | ||
46 | } | ||
47 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | ||
46 | pineappleDao.updateSelle(params); | 48 | pineappleDao.updateSelle(params); |
47 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 49 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
48 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 50 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | ... | ... |
-
请 注册 或 登录 后发表评论