Przeglądaj źródła

[bug] message:1.租户id取值错误;2.获取海报悄悄话增加状态字段查询条件

kelei 5 miesięcy temu
rodzic
commit
ab47905dfd

+ 1 - 1
admin/src/main/java/com/flyer/foster/service/impl/ScoreServiceImpl.java

@@ -34,7 +34,7 @@ public class ScoreServiceImpl extends ServiceImpl<IScoreMapper, Score> implement
     @Transactional
     @Override
     public boolean addScore(AppScoreAddDTO addDTO) {
-        int tenantId = StpAppUtil.getLoginIdAsInt();
+        int tenantId = StpAppUtil.getTokenSession().getInt("tenantId");
         // 根据用户id查询积分数据是否存在
         Score entity = new Score();
         AppScoreRespDTO score = baseMapper.isExist(addDTO);

+ 3 - 0
admin/src/main/java/com/flyer/foster/service/impl/TreePosterContentServiceImpl.java

@@ -62,6 +62,7 @@ public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContent
                     .eq(TreePosterContent::getPosterLibId, posterLib.getId())
                     .eq(TreePosterContent::getAppUserId, addDTO.getAppUserId())
                     .eq(TreePosterContent::getTreeId, addDTO.getTreeId())
+                    .eq(TreePosterContent::getStatus, 1)
                     .one();
             if (treePosterContent == null) {
                 // 2.获取悄悄话,取最新一条记录
@@ -99,6 +100,7 @@ public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContent
         IPage<TreePosterContent> pageInfo = this.lambdaQuery()
                 .eq(TreePosterContent::getAppUserId, queryDTO.getAppUserId())
                 .eq(TreePosterContent::getTreeId, queryDTO.getTreeId())
+                .eq(TreePosterContent::getStatus, 1)
                 .orderByDesc(TreePosterContent::getCreatedTime)
                 .page(page);
         List<AppTreePosterContentRespDTO> list = new ArrayList<>();
@@ -132,6 +134,7 @@ public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContent
 
         List<TreePosterContent> treePosterContentList = this.lambdaQuery()
                 .eq(TreePosterContent::getTreeId, queryDTO.getTreeId())
+                .eq(TreePosterContent::getStatus, 1)
                 .between(TreePosterContent::getCreatedTime, min, max)
                 .orderByDesc(TreePosterContent::getCreatedTime)
                 .list();