Browse Source

app消息展示

luowei 2 years ago
parent
commit
4b7285de22

+ 5 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java

@@ -157,6 +157,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
         SysOrg org = new SysOrg();
         org.setType(3);
         org.setPath(topOrg.getPath());
+        //查询符合的机构,需求是先把行社加入
         List<SysOrg> list = remoteOrgService.listByParentIdAndType(org, SecurityConstants.INNER);
         Integer i = ZERO;
         List<TMonitoringRetrievalPlan> tMonitoringRetrievalPlans = new ArrayList<>();
@@ -183,6 +184,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
             monitoringRetrievalPlan.setParentId(tMonitoringRetrievalPlan.getId());
             monitoringRetrievalPlan.setIsDistribute("1");
             i = tMonitoringRetrievalPlanMapper.insert(monitoringRetrievalPlan);
+            //如果是行社直接新增,如果不是就要查询下面的机构
             if (tMonitoringRetrievalPlan.getOrgType().equals("3")) {
                 tMonitoringRetrievalPlans.add(monitoringRetrievalPlan);
             } else {
@@ -210,7 +212,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                     plan.setDescription(tMonitoringRetrievalPlan.getDescription());
                     plan.setCreateType(1);
                     plan.setId(IdWorker.getId());
-                    plan.setParentId(monitoringRetrievalPlan.getId());
+                    plan.setParentId(tMonitoringRetrievalPlan.getId());
                     plan.setIsDistribute("1");
                     i = tMonitoringRetrievalPlanMapper.insert(plan);
                     tMonitoringRetrievalPlans.add(plan);
@@ -361,6 +363,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                         CoreMonitoringRetrievalTask coreMonitoringRetrievalTask = new CoreMonitoringRetrievalTask();
                         coreMonitoringRetrievalTask.setPlanId(p.getId());
                         coreMonitoringRetrievalTask.setStatus("0");
+                        //根据计划查询未完成的任务
                         List<CoreMonitoringRetrievalTask> coreMonitoringRetrievalTasks = iCoreMonitoringRetrievalTaskService.selectCoreMonitoringRetrievalTaskList(coreMonitoringRetrievalTask);
                         List<Long> collect = coreMonitoringRetrievalTasks.stream().map(CoreMonitoringRetrievalTask::getId).distinct().collect(Collectors.toList());
                         if (CollectionUtils.isNotEmpty(collect)) {
@@ -369,7 +372,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                             iCoreMonitoringRetrievalTaskService.deleteCoreMonitoringRetrievalTaskByIds(arr);
                         }
                         //删除带调阅任务
-                        iCoreMonitoringRetrievalTaskService.deleteWaitTaskByPlanId(p.getId());
+                       // iCoreMonitoringRetrievalTaskService.deleteWaitTaskByPlanId(p.getId());
                         p.setIsDeleted(2L);
                         i = tMonitoringRetrievalPlanMapper.updateTMonitoringRetrievalPlan(p);
                         if (i < 1) {

+ 2 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/controller/CoreMessageCenterController.java

@@ -10,6 +10,7 @@ import com.xunmei.common.security.annotation.RequiresPermissions;
 import com.xunmei.core.information.domain.CoreMessageCenter;
 import com.xunmei.core.information.dto.CoreMessageCenterDTO;
 import com.xunmei.core.information.service.ICoreMessageCenterService;
+import com.xunmei.core.information.vo.CoreMessageCenterVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,7 +36,7 @@ public class CoreMessageCenterController extends BaseController {
 @ApiOperation(value = "查询消息列表")
 @RequiresPermissions("system:center:list")
 @GetMapping("/messageList")
-public TableDataInfo<CoreMessageCenter> list(CoreMessageCenterDTO coreMessageCenter) {
+public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageCenter) {
     if (null==coreMessageCenter.getType()){
         coreMessageCenter.setType("3");
     }

+ 2 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/mapper/CoreMessageCenterMapper.java

@@ -7,6 +7,7 @@ import com.xunmei.common.core.domain.retrieval.domain.CoreMonitoringRetrievalTas
 import com.xunmei.core.access.dto.CoreMonitoringTaskRegistrationDTO;
 import com.xunmei.core.information.domain.CoreMessageCenter;
 import com.xunmei.core.information.dto.CoreMessageCenterDTO;
+import com.xunmei.core.information.vo.CoreMessageCenterVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -21,7 +22,7 @@ import java.util.List;
 @Mapper
 public interface CoreMessageCenterMapper extends BaseMapper<CoreMessageCenter> {
 
-    Page<CoreMessageCenter> selectByPage(Page<CoreMessageCenter> page, @Param("request") CoreMessageCenterDTO request);
+    Page<CoreMessageCenterVO> selectByPage(Page<CoreMessageCenter> page, @Param("request") CoreMessageCenterDTO request);
     /**
      * 查询消息中心
      *

+ 2 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/service/impl/CoreMessageCenterServiceImpl.java

@@ -11,6 +11,7 @@ import com.xunmei.core.information.domain.CoreMessageCenter;
 import com.xunmei.core.information.dto.CoreMessageCenterDTO;
 import com.xunmei.core.information.mapper.CoreMessageCenterMapper;
 import com.xunmei.core.information.service.ICoreMessageCenterService;
+import com.xunmei.core.information.vo.CoreMessageCenterVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -52,7 +53,7 @@ public class CoreMessageCenterServiceImpl extends ServiceImpl<CoreMessageCenterM
 
     @Override
     public TableDataInfo selectByPage(CoreMessageCenterDTO coreMessageCenterDTO) {
-        Page<CoreMessageCenter> coreMessageCenterPage = coreMessageCenterMapper.selectByPage(coreMessageCenterDTO.getPageRequest(), coreMessageCenterDTO);
+        Page<CoreMessageCenterVO> coreMessageCenterPage = coreMessageCenterMapper.selectByPage(coreMessageCenterDTO.getPageRequest(), coreMessageCenterDTO);
         TableDataInfo<CoreMessageCenter> tableDataInfo = new TableDataInfo();
         tableDataInfo.setMsg("操作成功");
         tableDataInfo.setCode(200);

+ 15 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/vo/CoreMessageCenterVO.java

@@ -0,0 +1,15 @@
+package com.xunmei.core.information.vo;
+
+import com.xunmei.common.core.domain.message.vo.MessageAppPageVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/9/25
+ */
+@Data
+public class CoreMessageCenterVO extends MessageAppPageVo {
+    @ApiModelProperty(value = "1公告通知2业务提醒3消息")
+    private String type;
+}

+ 7 - 2
soc-modules/soc-modules-core/src/main/resources/mapper/information/CoreMessageCenterMapper.xml

@@ -55,9 +55,14 @@
         <include refid="selectCoreMessageCenterVo"/>
         where id = #{id}
     </select>
-    <select id="selectByPage" resultType="com.xunmei.core.information.domain.CoreMessageCenter">
+    <select id="selectByPage" resultType="com.xunmei.core.information.vo.CoreMessageCenterVO">
         SELECT
-        *
+        id AS id,
+        type AS type,
+        title AS title,
+        is_read AS isRead,
+        content AS content,
+        create_time AS publishTime
         FROM
         core_message_center
         WHERE