diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index 0629b37..935dac7 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -1299,6 +1299,9 @@ public class PayService { orderInfo.setPaidTime(System.currentTimeMillis()); tbOrderInfoMapper.updateByPrimaryKeySelective(orderInfo); + // 消费送积分 + tbMemberPointsService.consumeAwardPoints(Long.valueOf(orderInfo.getMemberId()), Long.valueOf(orderInfo.getId())); + JSONObject jsonObject = new JSONObject(); jsonObject.put("token", 0); jsonObject.put("type", "wxcreate"); diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java index 8d5a312..e0fb5dc 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java @@ -257,7 +257,12 @@ public class ProductService { //热销 TbProductGroup hot = new TbProductGroup(); hot.setName("热销"); - List hots = tbProductMapper.selectHot(shopId,proSets); + List hots = null; + if (proSets.isEmpty()) { + hots = new ArrayList<>(); + }else { + hots = tbProductMapper.selectHot(shopId,proSets); + } hot.setProducts(handleDate(hots,true,1,false, shopInfo)); groupList.add(0, hot);