From 19408e8ae599dfb080d3835119f0a60add27f3bd Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 7 Jun 2021 23:40:37 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cweb/controller/HighUserCommonController.java | 3 ++- .../com/hai/service/impl/HighCouponCodeServiceImpl.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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, "未找到订单");