新用户校验
This commit is contained in:
@@ -126,7 +126,9 @@ public class MkConsumeCashbackServiceImpl extends ServiceImpl<MkConsumeCashbackM
|
|||||||
if ("new".equals(config.getApplicableUser())) {
|
if ("new".equals(config.getApplicableUser())) {
|
||||||
long count = orderInfoService.count(new QueryWrapper().eq(OrderInfo::getUserId, shopUser.getUserId())
|
long count = orderInfoService.count(new QueryWrapper().eq(OrderInfo::getUserId, shopUser.getUserId())
|
||||||
.eq(OrderInfo::getShopId, shopId).eq(OrderInfo::getStatus, OrderStatusEnums.DONE));
|
.eq(OrderInfo::getShopId, shopId).eq(OrderInfo::getStatus, OrderStatusEnums.DONE));
|
||||||
if (count > 0) {
|
log.info("消费返现 new用户校验1, orderId: {}, count: {}", orderId, count);
|
||||||
|
if (count > 0L) {
|
||||||
|
log.info("消费返现 new用户校验2, orderId: {}, count: {}", orderId, count);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if ("vip".equals(config.getApplicableUser()) && shopUser.getIsVip() != 1) {
|
} else if ("vip".equals(config.getApplicableUser()) && shopUser.getIsVip() != 1) {
|
||||||
@@ -165,4 +167,11 @@ public class MkConsumeCashbackServiceImpl extends ServiceImpl<MkConsumeCashbackM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
long count = 15L;
|
||||||
|
if (count > 0) {
|
||||||
|
System.out.println(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user