生日有礼问题

This commit is contained in:
2025-12-12 15:43:05 +08:00
parent 6b9b48da1c
commit 19cf560476
2 changed files with 57 additions and 64 deletions

View File

@@ -27,12 +27,6 @@ public class BirthdayGiftController {
@Resource @Resource
private MkBirthdayGiftService service; private MkBirthdayGiftService service;
@GetMapping("/test")
public CzgResult<String> test() {
service.deliver();
return CzgResult.success();
}
/** /**
* 配置信息获取 * 配置信息获取
* 权限标识: activate:list * 权限标识: activate:list

View File

@@ -104,7 +104,8 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
@Override @Override
public Page<MkBirthdayGiftRecordVO> getRecord(Long shopId, String key, LocalDateTime dateTime) { public Page<MkBirthdayGiftRecordVO> getRecord(Long shopId, String key, LocalDateTime dateTime) {
QueryWrapper queryWrapper = new QueryWrapper().select() QueryWrapper queryWrapper = new MyQueryWrapper()
.selectAll(MkBirthdayGiftRecord.class)
.select(ShopUser::getNickName, ShopUser::getPhone) .select(ShopUser::getNickName, ShopUser::getPhone)
.eq(MkBirthdayGiftRecord::getMainShopId, shopId) .eq(MkBirthdayGiftRecord::getMainShopId, shopId)
.leftJoin(ShopUser.class).on(ShopUser::getId, MkBirthdayGiftRecord::getShopUserId); .leftJoin(ShopUser.class).on(ShopUser::getId, MkBirthdayGiftRecord::getShopUserId);
@@ -165,8 +166,7 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
shopTemplate = null; shopTemplate = null;
} }
ShopInfo shopInfo = shopInfoService.getById(birthdayGift.getMainShopId()); ShopInfo shopInfo = shopInfoService.getById(birthdayGift.getMainShopId());
FunUtils.safeRunVoid(() -> { FunUtils.safeRunVoid(() -> JSONArray.parseArray(birthdayGift.getConfigList()).toJavaList(MkBirthdayGiftConfig.class).forEach(config -> {
JSONArray.parseArray(birthdayGift.getConfigList()).toJavaList(MkBirthdayGiftConfig.class).forEach(config -> {
LocalDate current = DateUtil.date().toLocalDateTime().toLocalDate(); LocalDate current = DateUtil.date().toLocalDateTime().toLocalDate();
if ("day".equals(config.getDeliverDate())) { if ("day".equals(config.getDeliverDate())) {
if (config.getDeliverTime() != 1) { if (config.getDeliverTime() != 1) {
@@ -223,8 +223,7 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
}); });
} }
} }
}); }));
});
} }