活动 优惠券问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.czg.service.account.service.impl;
|
package com.czg.service.account.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -163,6 +164,9 @@ public class ShopActivateServiceImpl extends ServiceImpl<ShopActivateMapper, Sho
|
|||||||
private List<ShopCoupon> getCoupons(String couponJson) {
|
private List<ShopCoupon> getCoupons(String couponJson) {
|
||||||
Map<String, Integer> couponMap = JSONObject.parseObject(couponJson, new TypeReference<>() {
|
Map<String, Integer> couponMap = JSONObject.parseObject(couponJson, new TypeReference<>() {
|
||||||
});
|
});
|
||||||
|
if (couponMap.isEmpty()) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
List<ShopCoupon> list = couponService.queryChain()
|
List<ShopCoupon> list = couponService.queryChain()
|
||||||
.select(ShopCoupon::getId, ShopCoupon::getTitle, ShopCoupon::getLeftNumber)
|
.select(ShopCoupon::getId, ShopCoupon::getTitle, ShopCoupon::getLeftNumber)
|
||||||
.in(ShopCoupon::getId, couponMap.keySet())
|
.in(ShopCoupon::getId, couponMap.keySet())
|
||||||
|
|||||||
Reference in New Issue
Block a user