Browse Source

修改bug

zhonghui 3 years ago
parent
commit
f8e9876d43

+ 14 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/MessageMapper.java

@@ -84,6 +84,15 @@ public interface MessageMapper {
     @UpdateProvider(type = MessageMapper.SqlProvider.class, method = "updateMessageSituationStatus")
     int updateMessageSituationStatus(@Param("dataId") Long dataId);
 
+    /**
+     * {@link MessageMapper.SqlProvider#deleteReceive(Map)}
+     *
+     * @param messageId
+     * @return
+     */
+    @UpdateProvider(type = MessageMapper.SqlProvider.class, method = "deleteReceive")
+    int deleteReceive(@Param("messageId") Long messageId);
+
     class SqlProvider {
 
         public String countByCondition(Map<String, Object> para) {
@@ -126,5 +135,10 @@ public interface MessageMapper {
             String sql = "update boman_message set message_situation = '2' where id = " + para.get("dataId");
             return sql;
         }
+
+        public String deleteReceive(Map<String, Object> para) {
+            String sql = "update boman_message_receive set is_del = 'Y' where message_id = " + para.get("messageId");
+            return sql;
+        }
     }
 }

+ 6 - 1
boman-web-core/src/main/java/com/boman/web/core/service/TableServiceCmdService.java

@@ -30,6 +30,7 @@ import com.boman.web.core.domain.RowResult;
 import com.boman.web.core.domain.TableContext;
 import com.boman.web.core.service.common.ICommonService;
 import com.boman.web.core.service.delete.IBaseDeleteService;
+import com.boman.web.core.service.message.MessageService;
 import com.boman.web.core.service.save.IBaseSaveService;
 import com.boman.web.core.service.select.IBaseSelectService;
 import com.boman.web.core.service.submit.IBaseSubmitService;
@@ -101,6 +102,8 @@ public class TableServiceCmdService {
     private RemoteJflowProcessService remoteJflowProcessService;
     @Resource
     private RemoteWechatService remoteWechatService;
+    @Resource
+    private MessageService messageService;
 
 
     private static final Logger LOGGER = LoggerFactory.getLogger(TableServiceCmdService.class);
@@ -370,7 +373,9 @@ public class TableServiceCmdService {
                 processDto.setHardShut(Boolean.TRUE);
                 remoteJflowProcessService.shut(processDto);
             }
-
+            if(tableName.equals("boman_message")) {
+                messageService.deleteReceive(id);
+            }
             result.add(rowResult);
         }
 

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/service/message/MessageService.java

@@ -50,4 +50,6 @@ public interface MessageService {
      * @return
      */
     AjaxResult receiveMessage(MessageDto dto);
+
+    AjaxResult deleteReceive(Long id);
 }

+ 6 - 0
boman-web-core/src/main/java/com/boman/web/core/service/message/MessageServiceImpl.java

@@ -156,4 +156,10 @@ public class MessageServiceImpl implements MessageService {
         }
         return AjaxResult.success(updates);
     }
+
+    public AjaxResult deleteReceive(Long id) {
+        // 第一步修改收文时间和状态
+        Integer updates = messageMapper.deleteReceive(id);
+        return AjaxResult.success(updates);
+    }
 }

+ 1 - 0
ruoyi-ui/src/views/index.vue

@@ -132,6 +132,7 @@ export default {
         fixedData:{
           condition:{
             visible :'Y',
+            is_del: 'N',
             receive_user_id:'0',
             // notice_type:1,
             status:'Y'