6aeceb8c 刘嘉

1.菠萝派接口-发货验证该订单是否存在

1 个父辈 643aa698
......@@ -7,6 +7,7 @@ import com.sibu.orderHelper.common.util.StringUtil;
import com.sibu.orderHelper.enums.PineappleEnum;
import com.sibu.orderHelper.enums.PineappleMethodsEnum;
import com.sibu.orderHelper.integral.dao.PineappleDao;
import com.sibu.orderHelper.integral.model.IMDoingOrderBean;
import com.sibu.orderHelper.integral.pineapple.exception.BizException;
import com.sibu.orderHelper.integral.pineapple.request.CallRequest;
import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse;
......@@ -30,11 +31,6 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS
UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse();
Map<String,Object> params = new HashMap<>();
String redisMysqlDbConfig = "";
//订单号不符合
if (StringUtil.isNull(DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()))) {
log.error(String.format("订单号:%s不符合,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey()));
throw new BizException(String.format("订单号:%s不符合,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey()));
}
Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(callRequest.getBizModel().getPlatOrderNo());
String tableIndex = DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo());
params.put("doingOrderTable","im_doing_order_" + tableIndex);
......@@ -43,6 +39,12 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS
params.put("supplierId",callRequest.getSupplier().getId());
redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue());
DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源
IMDoingOrderBean iMDoingOrderBean = pineappleDao.getOrderListByMap(params);
if(StringUtil.isNull(iMDoingOrderBean)){
log.error("获取订单数据业务异常");
throw new BizException("获取订单数据业务异常");
}
DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源
pineappleDao.updateSelle(params);
UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode());
UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg());
......