'修复已知问题'

dev-discount
= 4 years ago
parent 9bb30f4c53
commit 19408e8ae5
  1. 3
      hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java
  2. 6
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java

@ -9,6 +9,7 @@ import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.*;
import com.hai.common.utils.IDGenerator;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighUser;
import com.hai.model.HighUserModel;
@ -63,7 +64,7 @@ public class HighUserCommonController {
HighUser user = highUserService.findByPhone(phone);
if(user == null) {
user = new HighUser();
user.setName("用户" + System.currentTimeMillis());
user.setName("用户" + IDGenerator.nextId(5));
user.setPhone(phone);
user.setGold(0);
user.setRegTime(new Date());

@ -131,7 +131,7 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
userCoupon.setConsumeTime(new Date());
userCoupon.setStatus(2); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponService.updateUserCoupon(userCoupon);
highOrderService.childOrderComplete(order.getId());
//highOrderService.childOrderComplete(order.getId());
}
}
@ -165,12 +165,12 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
userCoupon.setStatus(2); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponService.updateUserCoupon(userCoupon);
HighChildOrderExample example = new HighChildOrderExample();
/* HighChildOrderExample example = new HighChildOrderExample();
example.createCriteria().andMemIdEqualTo(userCoupon.getUserId()).andGoodsTypeEqualTo(1).andGoodsIdEqualTo(userCoupon.getCouponId()).andChildOrdeStatusEqualTo(2);
List<HighChildOrder> childOrderList = highChildOrderMapper.selectByExample(example);
if (childOrderList.size() > 0) {
highOrderService.childOrderComplete(childOrderList.get(0).getId());
}
}*/
/*HighChildOrder order = highOrderService.getChildOrderByUserGoods(userCoupon.getUserId(), 1, userCoupon.getCouponId());
if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到订单");

Loading…
Cancel
Save