Browse Source

:feat:消息任务列表增加任务状态筛选条件

zhangxianyu 11 months ago
parent
commit
074ada29d1

+ 4 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/MsgTaskDTO.java

@@ -1,6 +1,7 @@
 package com.zanxiang.game.data.serve.pojo.dto;
 
 import com.zanxiang.game.data.serve.pojo.base.BasePage;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -15,4 +16,7 @@ public class MsgTaskDTO extends BasePage {
     @ApiModelProperty(value = "游戏id")
     private Long gameId;
 
+    @ApiModelProperty(value = "任务状态")
+    private String taskType;
+
 }

+ 1 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -765,6 +765,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
         try {
             SendMsgTaskParam sendMsgTaskParam = new SendMsgTaskParam();
             sendMsgTaskParam.setGameId(dto.getGameId());
+            sendMsgTaskParam.setTaskType(dto.getTaskType());
             sendMsgTaskParam.setPageNum(dto.getPageNum());
             sendMsgTaskParam.setPageSize(dto.getPageSize());
             PageUtil<SendMsgVO> sendMsgTaskList = sendMsgRpc.getSendMsgTaskList(sendMsgTaskParam);

+ 4 - 0
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/params/SendMsgTaskParam.java

@@ -18,5 +18,9 @@ public class SendMsgTaskParam extends BaseListDTO implements Serializable {
      * 游戏id
      */
     private Long gameId;
+    /**
+     * 任务状态
+     */
+    private String taskType;
 
 }

+ 2 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/CPSendMsgTaskServiceImpl.java

@@ -16,6 +16,7 @@ import com.zanxiang.game.module.mybatis.mapper.CpSendMsgTaskMapper;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.pojo.ResultVO;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
@@ -61,6 +62,7 @@ public class CPSendMsgTaskServiceImpl extends ServiceImpl<CpSendMsgTaskMapper, C
         Page<CpSendMsgTask> page = sendMsgTaskService.page(new Page<>(param.getPageNum(), param.getPageSize()),
                 new LambdaQueryWrapper<CpSendMsgTask>()
                         .eq(param.getGameId() != null, CpSendMsgTask::getGameId, param.getGameId())
+                        .eq(StringUtils.isNotEmpty(param.getTaskType()), CpSendMsgTask::getType, param.getTaskType())
                         .orderByDesc(CpSendMsgTask::getCreateTime));
         List<CpSendMsgTask> cpSendMsgTasks = page.getRecords();
         List<SendMsgVO> sendMsgVos = toVo(cpSendMsgTasks);