Browse Source

更新参团bug

release_toaliyun_real
xiaohanzi 6 years ago
parent
commit
be5e2398fc
1 changed files with 13 additions and 5 deletions
  1. +13
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java

+ 13
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java View File

@@ -234,11 +234,19 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
WxOrder orderParams = new WxOrder();
orderParams.setOrderGroupId(order.getOrderGroupId());
orderParams.setCUserId(user.getId());
//orderParams.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING.getCode());
int count = wxOrderMapper.selectCount(new QueryWrapper(orderParams));
if (count > 0) {
logger.error("重复的拼团>>>" + order);
throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_ATTEND);
List<WxOrder> olist = wxOrderMapper.findList(orderParams);
if (olist == null || olist.size() <=0 ) {
throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD.getCode(),"未查询到参团订单[user:"+user.getId()+",groupId:"+order.getOrderGroupId()+"]");
}
if (olist.size() != 1) {
throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD.getCode(),"参团订单多条[user:"+user.getId()+",groupId:"+order.getOrderGroupId()+"]");
}
WxOrder orderq = olist.get(0);
if (null == orderq) {
throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD.getCode(),"未查询到参团订单[user:"+user.getId()+",groupId:"+order.getOrderGroupId()+"]");
}
if (orderq.getOrderStatus()==EnumOrderStatus.ORDER_STATUS_COOPERATING.getCode()) {
throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_ATTEND.getCode(),"不能重复参团订单[user:"+user.getId()+",groupId:"+order.getOrderGroupId()+"]");
}
}



Loading…
Cancel
Save