satoken修改

This commit is contained in:
张松
2025-02-17 17:25:12 +08:00
parent bd64722905
commit 763faa6f84
11 changed files with 916 additions and 47 deletions

View File

@@ -1,10 +1,12 @@
package com.czg.service.account.service.impl;
import cn.hutool.core.date.DateUtil;
import com.czg.account.dto.ShopCouponDTO;
import com.czg.account.entity.ShopActivateInRecord;
import com.czg.account.entity.ShopActivateOutRecord;
import com.czg.account.service.ShopActivateInRecordService;
import com.czg.account.service.ShopActivateOutRecordService;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.czg.account.entity.ShopCoupon;
import com.czg.account.service.ShopCouponService;
@@ -30,8 +32,31 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
private ShopActivateOutRecordService outService;
@Override
public List<ShopCouponDTO> getList(ShopCouponDTO couponDTO) {
return null;
public List<ShopCouponDTO> getList(Long shopId, Integer status) {
QueryWrapper queryWrapper = new QueryWrapper();
if (shopId != null) {
if (status == 1) {
queryWrapper.eq(ShopActivateOutRecord::getShopId, shopId);
}else {
queryWrapper.eq(ShopActivateInRecord::getShopId, shopId);
}
}
return switch (status) {
case -1 -> {
queryWrapper.ge(ShopActivateInRecord::getUseEndTime, DateUtil.date());
// yield list(queryWrapper);
yield null;
}
case 0 -> {
yield null;
}
case 1 -> {
yield null;
}
default -> throw new IllegalStateException("Unexpected value: " + status);
};
}
@Override