Your Name hace 2 años
padre
commit
0a43754c89

db/.back_文明创办/文明创办-backup-202312152442.pdma.json → db/.back_文明创办/文明创办-backup-202312223659.pdma.json Ver fichero

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.2.0",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-1-2 14:06:29",
7
+  "updatedTime": "2023-1-2 20:52:56",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -3711,7 +3711,7 @@
3711 3711
         {
3712 3712
           "defKey": "validate_status",
3713 3713
           "defName": "审核状态",
3714
-          "comment": "0未审核,1审核通过,2审核不通过",
3714
+          "comment": "0未审核,1审核提交,2审核通过,3审核不通过",
3715 3715
           "type": "",
3716 3716
           "len": "",
3717 3717
           "scale": "",
@@ -7980,6 +7980,290 @@
7980 7980
       ],
7981 7981
       "correlations": [],
7982 7982
       "indexes": []
7983
+    },
7984
+    {
7985
+      "id": "430EE745-314D-48CE-A20B-ED2C4D79BC92",
7986
+      "env": {
7987
+        "base": {
7988
+          "nameSpace": "com.example.civilizedcity",
7989
+          "codeRoot": "TaMessage"
7990
+        },
7991
+        "template": {
7992
+          "JavaMybatisPlus": {
7993
+            "Controller": {
7994
+              "suffix": "controller/{{=it.codeRoot}}Controller.java",
7995
+              "enable": true
7996
+            },
7997
+            "Service": {
7998
+              "suffix": "service/{{=it.codeRoot}}Service.java",
7999
+              "enable": true
8000
+            },
8001
+            "ServiceImpl": {
8002
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java",
8003
+              "enable": true
8004
+            },
8005
+            "Mapper": {
8006
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java",
8007
+              "enable": true
8008
+            },
8009
+            "Mapper.xml": {
8010
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml",
8011
+              "enable": true
8012
+            },
8013
+            "Entity": {
8014
+              "suffix": "entity/{{=it.codeRoot}}.java",
8015
+              "enable": true
8016
+            }
8017
+          }
8018
+        },
8019
+        "custom": {}
8020
+      },
8021
+      "defKey": "ta_message",
8022
+      "defName": "消息通知",
8023
+      "comment": "",
8024
+      "properties": {},
8025
+      "nameTemplate": "{defKey}[{defName}]",
8026
+      "notes": {},
8027
+      "headers": [
8028
+        {
8029
+          "refKey": "hideInGraph",
8030
+          "hideInGraph": true
8031
+        },
8032
+        {
8033
+          "refKey": "defKey",
8034
+          "hideInGraph": false
8035
+        },
8036
+        {
8037
+          "refKey": "defName",
8038
+          "hideInGraph": false
8039
+        },
8040
+        {
8041
+          "refKey": "primaryKey",
8042
+          "hideInGraph": false
8043
+        },
8044
+        {
8045
+          "refKey": "notNull",
8046
+          "hideInGraph": true
8047
+        },
8048
+        {
8049
+          "refKey": "autoIncrement",
8050
+          "hideInGraph": true
8051
+        },
8052
+        {
8053
+          "refKey": "domain",
8054
+          "hideInGraph": true
8055
+        },
8056
+        {
8057
+          "refKey": "type",
8058
+          "hideInGraph": false
8059
+        },
8060
+        {
8061
+          "refKey": "len",
8062
+          "hideInGraph": false
8063
+        },
8064
+        {
8065
+          "refKey": "scale",
8066
+          "hideInGraph": false
8067
+        },
8068
+        {
8069
+          "refKey": "comment",
8070
+          "hideInGraph": true
8071
+        },
8072
+        {
8073
+          "refKey": "refDict",
8074
+          "hideInGraph": true
8075
+        },
8076
+        {
8077
+          "refKey": "defaultValue",
8078
+          "hideInGraph": true
8079
+        },
8080
+        {
8081
+          "refKey": "isStandard",
8082
+          "hideInGraph": false
8083
+        },
8084
+        {
8085
+          "refKey": "uiHint",
8086
+          "hideInGraph": true
8087
+        },
8088
+        {
8089
+          "refKey": "extProps",
8090
+          "hideInGraph": true
8091
+        }
8092
+      ],
8093
+      "fields": [
8094
+        {
8095
+          "defKey": "msg_id",
8096
+          "defName": "ID",
8097
+          "comment": "",
8098
+          "type": "",
8099
+          "len": "",
8100
+          "scale": "",
8101
+          "primaryKey": true,
8102
+          "notNull": true,
8103
+          "autoIncrement": true,
8104
+          "defaultValue": "",
8105
+          "hideInGraph": true,
8106
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
8107
+          "refDict": "",
8108
+          "uiHint": "",
8109
+          "id": "FC7B9B05-7D57-4818-8266-F8A4D62DB212"
8110
+        },
8111
+        {
8112
+          "defKey": "title",
8113
+          "defName": "消息标题",
8114
+          "comment": "",
8115
+          "type": "",
8116
+          "len": "",
8117
+          "scale": "",
8118
+          "primaryKey": false,
8119
+          "notNull": false,
8120
+          "autoIncrement": false,
8121
+          "defaultValue": "",
8122
+          "hideInGraph": false,
8123
+          "refDict": "",
8124
+          "extProps": {},
8125
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
8126
+          "id": "CBA249ED-8EBD-4352-843D-7F6593CFE0CA"
8127
+        },
8128
+        {
8129
+          "defKey": "content",
8130
+          "defName": "消息内容",
8131
+          "comment": "",
8132
+          "type": "TEXT",
8133
+          "len": 0,
8134
+          "scale": "",
8135
+          "primaryKey": false,
8136
+          "notNull": false,
8137
+          "autoIncrement": false,
8138
+          "defaultValue": "",
8139
+          "hideInGraph": false,
8140
+          "refDict": "",
8141
+          "extProps": {},
8142
+          "domain": "",
8143
+          "id": "C333DA5B-4402-4455-BC1A-156E0F7171CE"
8144
+        },
8145
+        {
8146
+          "defKey": "target_type",
8147
+          "defName": "关联内容",
8148
+          "comment": "",
8149
+          "type": "",
8150
+          "len": "",
8151
+          "scale": "",
8152
+          "primaryKey": false,
8153
+          "notNull": false,
8154
+          "autoIncrement": false,
8155
+          "defaultValue": "",
8156
+          "hideInGraph": false,
8157
+          "refDict": "",
8158
+          "extProps": {},
8159
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
8160
+          "id": "402577E1-743E-42F4-976B-984FEEBAF594"
8161
+        },
8162
+        {
8163
+          "defKey": "target_id",
8164
+          "defName": "关联内容ID",
8165
+          "comment": "",
8166
+          "type": "",
8167
+          "len": "",
8168
+          "scale": "",
8169
+          "primaryKey": false,
8170
+          "notNull": false,
8171
+          "autoIncrement": false,
8172
+          "defaultValue": "",
8173
+          "hideInGraph": false,
8174
+          "refDict": "",
8175
+          "extProps": {},
8176
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8177
+          "id": "D67DAC89-0B94-42B6-AB35-C048092E53BC"
8178
+        },
8179
+        {
8180
+          "defKey": "receive_user",
8181
+          "defName": "接收人员",
8182
+          "comment": "",
8183
+          "type": "",
8184
+          "len": "",
8185
+          "scale": "",
8186
+          "primaryKey": false,
8187
+          "notNull": false,
8188
+          "autoIncrement": false,
8189
+          "defaultValue": "",
8190
+          "hideInGraph": false,
8191
+          "refDict": "",
8192
+          "extProps": {},
8193
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8194
+          "id": "BA7C44C3-6332-4808-B8A1-9CA4A0230B8C"
8195
+        },
8196
+        {
8197
+          "defKey": "org_id",
8198
+          "defName": "机构ID",
8199
+          "comment": "",
8200
+          "type": "",
8201
+          "len": "",
8202
+          "scale": "",
8203
+          "primaryKey": false,
8204
+          "notNull": false,
8205
+          "autoIncrement": false,
8206
+          "defaultValue": "",
8207
+          "hideInGraph": false,
8208
+          "refDict": "",
8209
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8210
+          "id": "FBCA3E18-1ABB-4B48-8370-9A9FB679B5A7",
8211
+          "uiHint": ""
8212
+        },
8213
+        {
8214
+          "defKey": "status",
8215
+          "defName": "状态",
8216
+          "comment": "",
8217
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
8218
+          "type": "",
8219
+          "len": "",
8220
+          "scale": "",
8221
+          "primaryKey": false,
8222
+          "notNull": false,
8223
+          "autoIncrement": false,
8224
+          "defaultValue": "1",
8225
+          "hideInGraph": true,
8226
+          "refDict": "",
8227
+          "uiHint": "",
8228
+          "id": "E1646EEB-D7B3-4C90-91B1-C5D45348549C"
8229
+        },
8230
+        {
8231
+          "defKey": "create_user",
8232
+          "defName": "创建人",
8233
+          "comment": "",
8234
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8235
+          "type": "",
8236
+          "len": "",
8237
+          "scale": "",
8238
+          "primaryKey": false,
8239
+          "notNull": false,
8240
+          "autoIncrement": false,
8241
+          "defaultValue": "",
8242
+          "hideInGraph": true,
8243
+          "refDict": "",
8244
+          "uiHint": "",
8245
+          "id": "210ABBCB-0350-4D79-B4E4-92543A825036"
8246
+        },
8247
+        {
8248
+          "defKey": "create_date",
8249
+          "defName": "创建时间",
8250
+          "comment": "",
8251
+          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
8252
+          "type": "",
8253
+          "len": "",
8254
+          "scale": "",
8255
+          "primaryKey": false,
8256
+          "notNull": false,
8257
+          "autoIncrement": false,
8258
+          "defaultValue": "CURRENT_TIMESTAMP",
8259
+          "hideInGraph": true,
8260
+          "refDict": "",
8261
+          "uiHint": "",
8262
+          "id": "5BCAB4B5-D041-4F14-8AC8-991595EB1EA5"
8263
+        }
8264
+      ],
8265
+      "correlations": [],
8266
+      "indexes": []
7983 8267
     }
7984 8268
   ],
7985 8269
   "views": [],
@@ -8407,7 +8691,8 @@
8407 8691
         "3B58B8CA-AF26-40FE-907A-A34523419478",
8408 8692
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
8409 8693
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F",
8410
-        "5BEE62BD-F04C-49E8-A65A-32A11B093E7B"
8694
+        "5BEE62BD-F04C-49E8-A65A-32A11B093E7B",
8695
+        "430EE745-314D-48CE-A20B-ED2C4D79BC92"
8411 8696
       ],
8412 8697
       "refViews": [],
8413 8698
       "refDiagrams": [],

+ 50
- 4
db/文明创办.pdma.json Ver fichero

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.2.0",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-1-2 20:52:56",
7
+  "updatedTime": "2023-1-2 22:36:59",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -7985,9 +7985,38 @@
7985 7985
       "id": "430EE745-314D-48CE-A20B-ED2C4D79BC92",
7986 7986
       "env": {
7987 7987
         "base": {
7988
-          "nameSpace": "",
7989
-          "codeRoot": ""
7990
-        }
7988
+          "nameSpace": "com.example.civilizedcity",
7989
+          "codeRoot": "TaMessage"
7990
+        },
7991
+        "template": {
7992
+          "JavaMybatisPlus": {
7993
+            "Controller": {
7994
+              "suffix": "controller/{{=it.codeRoot}}Controller.java",
7995
+              "enable": true
7996
+            },
7997
+            "Service": {
7998
+              "suffix": "service/{{=it.codeRoot}}Service.java",
7999
+              "enable": true
8000
+            },
8001
+            "ServiceImpl": {
8002
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java",
8003
+              "enable": true
8004
+            },
8005
+            "Mapper": {
8006
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java",
8007
+              "enable": true
8008
+            },
8009
+            "Mapper.xml": {
8010
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml",
8011
+              "enable": true
8012
+            },
8013
+            "Entity": {
8014
+              "suffix": "entity/{{=it.codeRoot}}.java",
8015
+              "enable": true
8016
+            }
8017
+          }
8018
+        },
8019
+        "custom": {}
7991 8020
       },
7992 8021
       "defKey": "ta_message",
7993 8022
       "defName": "消息通知",
@@ -8079,6 +8108,23 @@
8079 8108
           "uiHint": "",
8080 8109
           "id": "FC7B9B05-7D57-4818-8266-F8A4D62DB212"
8081 8110
         },
8111
+        {
8112
+          "defKey": "msg_type",
8113
+          "defName": "消息类型",
8114
+          "comment": "",
8115
+          "type": "",
8116
+          "len": "",
8117
+          "scale": "",
8118
+          "primaryKey": false,
8119
+          "notNull": false,
8120
+          "autoIncrement": false,
8121
+          "defaultValue": "",
8122
+          "hideInGraph": false,
8123
+          "refDict": "",
8124
+          "extProps": {},
8125
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
8126
+          "id": "92ACF22A-5638-4B62-9656-71D9089F7D7E"
8127
+        },
8082 8128
         {
8083 8129
           "defKey": "title",
8084 8130
           "defName": "消息标题",

+ 8
- 0
src/main/java/com/example/civilizedcity/controller/TaIssueApplyController.java Ver fichero

@@ -12,11 +12,13 @@ import java.util.List;
12 12
 
13 13
 import com.example.civilizedcity.common.StringUtils;
14 14
 import com.example.civilizedcity.entity.SysUser;
15
+import com.example.civilizedcity.event.MessagEvent;
15 16
 import com.example.civilizedcity.service.TaIssueService;
16 17
 import io.swagger.annotations.Api;
17 18
 import io.swagger.annotations.ApiOperation;
18 19
 import io.swagger.annotations.ApiParam;
19 20
 import org.springframework.beans.factory.annotation.Autowired;
21
+import org.springframework.context.ApplicationEventPublisher;
20 22
 import org.springframework.web.bind.annotation.*;
21 23
 import com.example.civilizedcity.entity.TaIssueApply;
22 24
 import com.example.civilizedcity.service.TaIssueApplyService;
@@ -38,6 +40,9 @@ public class TaIssueApplyController extends BaseController {
38 40
     @Autowired
39 41
     private TaIssueService taIssueService;
40 42
 
43
+    @Autowired
44
+    ApplicationEventPublisher applicationEventPublisher;
45
+
41 46
     /**
42 47
      * 通过ID查询单条数据
43 48
      *
@@ -153,6 +158,9 @@ public class TaIssueApplyController extends BaseController {
153 158
 //            taIssueService.updateValidateStatus(taIssueApply.getIssueId(), validateStatus);
154 159
 //        }
155 160
 
161
+
162
+        applicationEventPublisher.publishEvent(new MessagEvent(this, origin));
163
+
156 164
         return ResponseBean.success(origin);
157 165
     }
158 166
 

+ 57
- 22
src/main/java/com/example/civilizedcity/controller/TaMessageController.java Ver fichero

@@ -4,8 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7 8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.util.ArrayList;
8 11
 import java.util.List;
12
+
13
+import com.example.civilizedcity.entity.SysUser;
14
+import com.example.civilizedcity.service.SysUserDutyService;
9 15
 import io.swagger.annotations.Api;
10 16
 import io.swagger.annotations.ApiOperation;
11 17
 import io.swagger.annotations.ApiParam;
@@ -14,8 +20,9 @@ import org.springframework.web.bind.annotation.*;
14 20
 import com.example.civilizedcity.entity.TaMessage;
15 21
 import com.example.civilizedcity.service.TaMessageService;
16 22
 
17
- /**
23
+/**
18 24
  * 消息通知;(ta_message)表控制层
25
+ *
19 26
  * @author : http://njyunzhi.com
20 27
  * @date : 2023-1-2
21 28
  */
@@ -23,12 +30,15 @@ import com.example.civilizedcity.service.TaMessageService;
23 30
 @RestController
24 31
 @RequestMapping("/")
25 32
 public class TaMessageController extends BaseController {
26
-    
33
+
27 34
     @Autowired
28 35
     private TaMessageService taMessageService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
36
+
37
+    @Autowired
38
+    private SysUserDutyService sysUserDutyService;
39
+
40
+    /**
41
+     * 通过ID查询单条数据
32 42
      *
33 43
      * @param msgId 主键
34 44
      * @return 实例对象
@@ -38,28 +48,53 @@ public class TaMessageController extends BaseController {
38 48
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable Integer id) throws Exception {
39 49
         return ResponseBean.success(taMessageService.getById(id));
40 50
     }
41
-    
42
-    /** 
51
+
52
+    /**
43 53
      * 分页查询
44 54
      *
45
-     * @param pageNum 当前页码
55
+     * @param pageNum  当前页码
46 56
      * @param pageSize 每页条数
47 57
      * @return 查询结果
48 58
      */
49 59
     @ApiOperation("分页查询")
50 60
     @GetMapping("/taMessage")
51
-    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
-        
61
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
62
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
63
+
64
+        SysUser sysUser = currentUser();
65
+        List<String> dutyList = sysUserDutyService.getListByUser(sysUser.getUserId());
66
+        if (null == dutyList) {
67
+            dutyList = new ArrayList<>();
68
+        }
69
+
54 70
         IPage<TaMessage> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<TaMessage> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
71
+        QueryWrapper<TaMessage> queryWrapper = new QueryWrapper<>();
72
+
73
+        // 如果是管理员
74
+        if (dutyList.contains(Constants.DUTY_MANAGER)) {
75
+            // 可以查询当前单位以及给自己的
76
+            queryWrapper.nested(q -> q.eq("org_id", Constants.ROOT_ORG).or().eq("receive_user", sysUser.getUserId()));
77
+        } else if (dutyList.contains(Constants.DUTY_INSPECTOR)) {
78
+            // 督察员只能查询给自己的
79
+            queryWrapper.eq("receive_user", sysUser.getUserId());
80
+        } else if (dutyList.contains(Constants.DUTY_ORG_USER)) {
81
+            // 交办单位的,可以查询给本单位的
82
+            queryWrapper.eq("org_id", sysUser.getOrgId());
83
+            queryWrapper.ne("msg_type", "apply-verify");
84
+        } else if (dutyList.contains(Constants.DUTY_ORG_MANAGER)) {
85
+            // 交办单位管理员, 只能查询 问题单提审 类型的消息
86
+            queryWrapper.eq("org_id", sysUser.getOrgId());
87
+            queryWrapper.eq("msg_type", "apply-verify");
88
+        }
89
+
90
+        queryWrapper.eq("status", Constants.STATUS_NORMAL);
91
+        queryWrapper.orderByDesc("create_date");
57 92
         IPage<TaMessage> result = taMessageService.page(pg);
58
-        
93
+
59 94
         return ResponseBean.success(result);
60 95
     }
61
-    
62
-    /** 
96
+
97
+    /**
63 98
      * 新增数据
64 99
      *
65 100
      * @param taMessage 实例对象
@@ -71,8 +106,8 @@ public class TaMessageController extends BaseController {
71 106
         taMessageService.save(taMessage);
72 107
         return ResponseBean.success(taMessage);
73 108
     }
74
-    
75
-    /** 
109
+
110
+    /**
76 111
      * 更新数据
77 112
      *
78 113
      * @param taMessage 实例对象
@@ -81,12 +116,12 @@ public class TaMessageController extends BaseController {
81 116
     @ApiOperation("更新数据")
82 117
     @PutMapping("/taMessage/{id}")
83 118
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaMessage taMessage,
84
-                            @ApiParam("对象ID") @PathVariable Integer id ) throws Exception {
119
+                             @ApiParam("对象ID") @PathVariable Integer id) throws Exception {
85 120
         taMessageService.updateById(taMessage);
86 121
         return ResponseBean.success(taMessage);
87 122
     }
88
-    
89
-    /** 
123
+
124
+    /**
90 125
      * 通过主键删除数据
91 126
      *
92 127
      * @param msgId 主键
@@ -94,7 +129,7 @@ public class TaMessageController extends BaseController {
94 129
      */
95 130
     @ApiOperation("通过主键删除数据")
96 131
     @DeleteMapping("/taMessage/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable Integer id){
132
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable Integer id) {
98 133
         taMessageService.removeLogicById(id);
99 134
         return ResponseBean.success("success");
100 135
     }

+ 4
- 1
src/main/java/com/example/civilizedcity/entity/TaMessage.java Ver fichero

@@ -24,8 +24,11 @@ import lombok.experimental.Accessors;
24 24
 public class TaMessage implements Serializable,Cloneable{
25 25
     /** ID */
26 26
     @ApiModelProperty(name = "ID",notes = "")
27
-    @TableId(value = "msg_id", type = IdType.ASSIGN_UUID)
27
+    @TableId(value = "msg_id", type = IdType.AUTO)
28 28
     private Integer msgId ;
29
+     /** 消息类型 */
30
+     @ApiModelProperty(name = "消息类型",notes = "")
31
+     private String msgType ;
29 32
     /** 消息标题 */
30 33
     @ApiModelProperty(name = "消息标题",notes = "")
31 34
     private String title ;

+ 4
- 0
src/main/java/com/example/civilizedcity/service/impl/TaMessageServiceImpl.java Ver fichero

@@ -32,6 +32,7 @@ public class TaMessageServiceImpl extends BaseServiceImpl<TaMessageMapper, TaMes
32 32
 
33 33
         // 问题单驳回
34 34
         if (Constants.PROCESS_START.equals(taIssue.getProcessNode()) && Constants.PROCESS_STATUS_REJECT.equals(taIssue.getProcessStatus())) {
35
+            taMessage.setMsgType("issue-reject");
35 36
             taMessage.setTitle("问题单被驳回");
36 37
             taMessage.setTargetType(Constants.MESSAGE_TARGET_ISSUE);
37 38
             taMessage.setTargetId(taIssue.getIssueId().toString());
@@ -65,6 +66,8 @@ public class TaMessageServiceImpl extends BaseServiceImpl<TaMessageMapper, TaMes
65 66
         taMessage.setCreateDate(LocalDateTime.now());
66 67
 
67 68
         if (isApply) {
69
+            taMessage.setMsgType("apply-" + taIssueApply.getApplyType());
70
+
68 71
             switch (taIssueApply.getApplyType()) {
69 72
                 case Constants.APPLY_DELAY:
70 73
                     taMessage.setTitle("延期申请");
@@ -97,6 +100,7 @@ public class TaMessageServiceImpl extends BaseServiceImpl<TaMessageMapper, TaMes
97 100
                     break;
98 101
             }
99 102
         } else {
103
+            taMessage.setMsgType("verify-" + taIssueApply.getApplyType());
100 104
             taMessage.setContent("审核结果: " + (Constants.APPLY_STATUS_PASS.equals(taIssueApply.getVerifyStatus()) ? "通过" : "不通过"));
101 105
             taMessage.setReceiveUser(null);
102 106
             taMessage.setOrgId(taIssueApply.getOrgId());

+ 1
- 0
src/main/resources/mapper/TaIssueApplyMapper.xml Ver fichero

@@ -26,6 +26,7 @@
26 26
             AND s.source_type != 'feedback'
27 27
         </if>
28 28
         ORDER BY
29
+            IFNULL(t.verify_status, -1) ASC,
29 30
             t.create_date DESC
30 31
     </select>
31 32
 </mapper>