diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/AppArticleController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/AppArticleController.java index 534e82ff3..5acb43cfe 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/AppArticleController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/article/AppArticleController.java @@ -56,13 +56,11 @@ public class AppArticleController { return success(ArticleConvert.INSTANCE.convert01(articleService.getArticle(id))); } - // TODO @puhui999:add-browse-count 噢;前端 uniapp 也要接下;就是打开文章的时候,调用下这个接口; - @PutMapping("/add-browseCount") + @PutMapping("/add-browse-count") @Operation(summary = "增加文章浏览量") @Parameter(name = "id", description = "文章编号", example = "1024") public CommonResult addBrowseCount(@RequestParam("id") Long id) { - // TODO @puhui999:addArticleBrowseCount - articleService.addBrowseCount(id); + articleService.addArticleBrowseCount(id); return success(true); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/bargain/BargainActivityMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/bargain/BargainActivityMapper.java index fd5466648..72d604e77 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/bargain/BargainActivityMapper.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/bargain/BargainActivityMapper.java @@ -86,7 +86,6 @@ public interface BargainActivityMapper extends BaseMapperX { .last("LIMIT " + count)); } - // TODO @puhui999:是不是返回 BargainActivityDO 更干净哈?分组后返回 DO 的话需要联表查询 /** * 查询出指定 spuId 的 spu 参加的活动最接近现在的一条记录。多个的话,一个 spuId 对应一个最近的活动编号 * @@ -102,7 +101,6 @@ public interface BargainActivityMapper extends BaseMapperX { .groupBy("spu_id")); } - // TODO @puhui999:是不是只要 endTime 小于就可以啦; /** * 获取指定活动编号的活动列表且 * 开始时间和结束时间小于给定时间 dateTime 的活动列表 @@ -115,7 +113,7 @@ public interface BargainActivityMapper extends BaseMapperX { return selectList(new LambdaQueryWrapperX() .in(BargainActivityDO::getId, ids) .lt(BargainActivityDO::getStartTime, dateTime) - .lt(BargainActivityDO::getEndTime, dateTime) + .gt(BargainActivityDO::getEndTime, dateTime)// 开始时间 < 指定时间 < 结束时间,也就是说获取指定时间段的活动 .orderByDesc(BargainActivityDO::getCreateTime)); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/combination/CombinationActivityMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/combination/CombinationActivityMapper.java index 530478e69..55e975c45 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/combination/CombinationActivityMapper.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/combination/CombinationActivityMapper.java @@ -71,7 +71,7 @@ public interface CombinationActivityMapper extends BaseMapperX() .in(CombinationActivityDO::getId, ids) .lt(CombinationActivityDO::getStartTime, dateTime) - .lt(CombinationActivityDO::getEndTime, dateTime) + .gt(CombinationActivityDO::getEndTime, dateTime)// 开始时间 < 指定时间 < 结束时间,也就是说获取指定时间段的活动 .orderByDesc(CombinationActivityDO::getCreateTime)); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/seckill/seckillactivity/SeckillActivityMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/seckill/seckillactivity/SeckillActivityMapper.java index 82fbafecd..ca40e7602 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/seckill/seckillactivity/SeckillActivityMapper.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/seckill/seckillactivity/SeckillActivityMapper.java @@ -103,7 +103,7 @@ public interface SeckillActivityMapper extends BaseMapperX { return selectList(new LambdaQueryWrapperX() .in(SeckillActivityDO::getId, ids) .lt(SeckillActivityDO::getStartTime, dateTime) - .lt(SeckillActivityDO::getEndTime, dateTime) + .gt(SeckillActivityDO::getEndTime, dateTime)// 开始时间 < 指定时间 < 结束时间,也就是说获取指定时间段的活动 .orderByDesc(SeckillActivityDO::getCreateTime)); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleService.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleService.java index 81b463373..4188cc681 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleService.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleService.java @@ -93,6 +93,6 @@ public interface ArticleService { * * @param id 文章编号 */ - void addBrowseCount(Long id); + void addArticleBrowseCount(Long id); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java index 47e614057..7a4e69a6e 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java @@ -111,7 +111,7 @@ public class ArticleServiceImpl implements ArticleService { } @Override - public void addBrowseCount(Long id) { + public void addArticleBrowseCount(Long id) { // 校验文章是否存在 validateArticleExists(id); // 增加浏览次数 diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java index db4197f52..f5b78ab13 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java @@ -369,8 +369,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService { keyValue.setValue(keyValue.getValue() + 1); } } catch (Exception ignored) { // 处理异常继续循环 - // TODO @puhui999:拼团过期 or 虚拟成团 可以改成 expireCombinationRecord;因为找方法更容易一些; - log.error("[拼团过期 or 虚拟成团][record({}) 处理异常,请进行处理!record 数据是:{}]", + log.error("[expireCombinationRecord][record({}) 处理异常,请进行处理!record 数据是:{}]", record.getId(), JsonUtils.toJsonString(record)); } }