diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java index f5a3e3a5..df26ce83 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.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()); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java index 860b4254..cc457746 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java @@ -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 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, "未找到订单");