称重 向下取整
会员活动
This commit is contained in:
@@ -81,11 +81,11 @@ public class ShopActivateServiceImpl extends ServiceImpl<ShopActivateMapper, Sho
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giveActivate(ShopUser shopUser, BigDecimal memAmount, Long relationId) {
|
||||
ShopActivate activate = queryChain().select().eq(ShopActivate::getShopId, shopUser.getShopId())
|
||||
.le(ShopActivate::getAmount, memAmount)
|
||||
.orderBy(ShopActivate::getGiftAmount, false)
|
||||
.one();
|
||||
public void giveActivate(ShopUser shopUser, BigDecimal memAmount, Long activateId, Long relationId) {
|
||||
if (activateId == null) {
|
||||
return;
|
||||
}
|
||||
ShopActivate activate = getById(activateId);
|
||||
if (ObjectUtil.isNull(activate)) {
|
||||
return;
|
||||
}
|
||||
@@ -164,7 +164,8 @@ public class ShopActivateServiceImpl extends ServiceImpl<ShopActivateMapper, Sho
|
||||
private List<ShopCoupon> getCoupons(String couponJson) {
|
||||
Map<String, Integer> couponMap;
|
||||
try {
|
||||
couponMap = JSONObject.parseObject(couponJson, new TypeReference<>() {});
|
||||
couponMap = JSONObject.parseObject(couponJson, new TypeReference<>() {
|
||||
});
|
||||
} catch (Exception e) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user