Yansen vor 2 Jahren
Ursprung
Commit
32e1eb98aa
24 geänderte Dateien mit 594 neuen und 80 gelöschten Zeilen
  1. 114
    52
      db/.back_文明创办/文明创办-backup-2023131111551.pdma.json
  2. 107
    11
      db/文明创办.pdma.json
  3. 2
    2
      src/main/java/com/example/civilizedcity/common/Constants.java
  4. 4
    0
      src/main/java/com/example/civilizedcity/config/WxMaUitl.java
  5. 1
    1
      src/main/java/com/example/civilizedcity/controller/StatController.java
  6. 1
    0
      src/main/java/com/example/civilizedcity/controller/SysUserController.java
  7. 101
    0
      src/main/java/com/example/civilizedcity/controller/TaFeedbackController.java
  8. 3
    1
      src/main/java/com/example/civilizedcity/controller/TdQuestionController.java
  9. 5
    3
      src/main/java/com/example/civilizedcity/controller/WxMaController.java
  10. 3
    0
      src/main/java/com/example/civilizedcity/entity/SysUser.java
  11. 69
    0
      src/main/java/com/example/civilizedcity/entity/TaFeedback.java
  12. 4
    1
      src/main/java/com/example/civilizedcity/mapper/SysUserMapper.java
  13. 23
    0
      src/main/java/com/example/civilizedcity/mapper/TaFeedbackMapper.java
  14. 6
    1
      src/main/java/com/example/civilizedcity/service/SysLoginService.java
  15. 13
    0
      src/main/java/com/example/civilizedcity/service/TaFeedbackService.java
  16. 2
    1
      src/main/java/com/example/civilizedcity/service/TaIssueService.java
  17. 58
    0
      src/main/java/com/example/civilizedcity/service/impl/SysLoginServiceImpl.java
  18. 16
    0
      src/main/java/com/example/civilizedcity/service/impl/TaFeedbackServiceImpl.java
  19. 12
    4
      src/main/java/com/example/civilizedcity/service/impl/TaIssueServiceImpl.java
  20. 9
    0
      src/main/resources/application.yml
  21. 10
    1
      src/main/resources/mapper/SysUserMapper.xml
  22. 30
    0
      src/main/resources/mapper/TaFeedbackMapper.xml
  23. 0
    1
      src/main/resources/mapper/TaIssueMapper.xml
  24. 1
    1
      src/main/resources/mapper/TaOrgIssueMapper.xml

db/.back_文明创办/文明创办-backup-2023129082004.pdma.json → db/.back_文明创办/文明创办-backup-2023131111551.pdma.json Datei anzeigen

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-1-29 08:17:44",
7
+  "updatedTime": "2023-1-31 11:14:31",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -1204,6 +1204,23 @@
1204 1204
           "uiHint": "",
1205 1205
           "id": "C3E43687-58A1-4E99-AE11-085F9B6688D7"
1206 1206
         },
1207
+        {
1208
+          "defKey": "is_user",
1209
+          "defName": "是否系统用户",
1210
+          "comment": "0市民,1系统用户",
1211
+          "type": "",
1212
+          "len": "",
1213
+          "scale": "",
1214
+          "primaryKey": false,
1215
+          "notNull": false,
1216
+          "autoIncrement": false,
1217
+          "defaultValue": "",
1218
+          "hideInGraph": false,
1219
+          "refDict": "",
1220
+          "extProps": {},
1221
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1222
+          "id": "D1C0A2CD-89DB-44DF-918F-EA536E39761F"
1223
+        },
1207 1224
         {
1208 1225
           "defKey": "create_user",
1209 1226
           "defName": "创建人",
@@ -6921,9 +6938,32 @@
6921 6938
       "id": "EF3D4E17-6CE0-4944-B1DC-40280B2B689F",
6922 6939
       "env": {
6923 6940
         "base": {
6924
-          "nameSpace": "",
6925
-          "codeRoot": ""
6926
-        }
6941
+          "nameSpace": "com.example.civilizedcity",
6942
+          "codeRoot": "TaFeedback"
6943
+        },
6944
+        "template": {
6945
+          "JavaMybatisPlus": {
6946
+            "Controller": {
6947
+              "suffix": "controller/{{=it.codeRoot}}Controller.java"
6948
+            },
6949
+            "Service": {
6950
+              "suffix": "service/{{=it.codeRoot}}Service.java"
6951
+            },
6952
+            "ServiceImpl": {
6953
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java"
6954
+            },
6955
+            "Mapper": {
6956
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java"
6957
+            },
6958
+            "Mapper.xml": {
6959
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml"
6960
+            },
6961
+            "Entity": {
6962
+              "suffix": "entity/{{=it.codeRoot}}.java"
6963
+            }
6964
+          }
6965
+        },
6966
+        "custom": {}
6927 6967
       },
6928 6968
       "defKey": "ta_feedback",
6929 6969
       "defName": "反馈表",
@@ -7006,7 +7046,7 @@
7006 7046
           "scale": "",
7007 7047
           "primaryKey": true,
7008 7048
           "notNull": true,
7009
-          "autoIncrement": true,
7049
+          "autoIncrement": false,
7010 7050
           "defaultValue": "",
7011 7051
           "hideInGraph": true,
7012 7052
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -7048,6 +7088,39 @@
7048 7088
           "domain": "",
7049 7089
           "id": "2B36F8F1-9C06-434F-B4D5-0A28D587BA24"
7050 7090
         },
7091
+        {
7092
+          "defKey": "location",
7093
+          "defName": "定位",
7094
+          "comment": "",
7095
+          "type": "VARCHAR",
7096
+          "len": 32,
7097
+          "scale": "",
7098
+          "primaryKey": false,
7099
+          "notNull": false,
7100
+          "autoIncrement": false,
7101
+          "defaultValue": "",
7102
+          "hideInGraph": false,
7103
+          "refDict": "",
7104
+          "extProps": {},
7105
+          "id": "2D8D31C7-FD0E-48DB-9538-FCF3B79E93AB"
7106
+        },
7107
+        {
7108
+          "defKey": "addr",
7109
+          "defName": "具体位置",
7110
+          "comment": "",
7111
+          "type": "",
7112
+          "len": "",
7113
+          "scale": "",
7114
+          "primaryKey": false,
7115
+          "notNull": false,
7116
+          "autoIncrement": false,
7117
+          "defaultValue": "",
7118
+          "hideInGraph": false,
7119
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7120
+          "refDict": "",
7121
+          "extProps": {},
7122
+          "id": "215DDE0F-97A2-4DBC-99D5-31C8AF2768E9"
7123
+        },
7051 7124
         {
7052 7125
           "defKey": "person_id",
7053 7126
           "defName": "反馈人ID",
@@ -7102,18 +7175,18 @@
7102 7175
         {
7103 7176
           "defKey": "verify_status",
7104 7177
           "defName": "审核状态",
7105
-          "comment": "0未审,1通过,2驳回",
7178
+          "comment": "null未审,pass通过,reject驳回",
7106 7179
           "type": "",
7107 7180
           "len": "",
7108 7181
           "scale": "",
7109 7182
           "primaryKey": false,
7110 7183
           "notNull": false,
7111 7184
           "autoIncrement": false,
7112
-          "defaultValue": "0",
7185
+          "defaultValue": "",
7113 7186
           "hideInGraph": false,
7114 7187
           "refDict": "",
7115 7188
           "extProps": {},
7116
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
7189
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
7117 7190
           "id": "90567F1C-10F8-4BB2-9F32-B92B7077091B"
7118 7191
         },
7119 7192
         {
@@ -8371,9 +8444,32 @@
8371 8444
       "id": "38420D50-01AB-4E31-84D3-20192D26E25F",
8372 8445
       "env": {
8373 8446
         "base": {
8374
-          "nameSpace": "",
8375
-          "codeRoot": ""
8376
-        }
8447
+          "nameSpace": "com.example.civilizedcity",
8448
+          "codeRoot": "TaCheckStand"
8449
+        },
8450
+        "template": {
8451
+          "JavaMybatisPlus": {
8452
+            "Controller": {
8453
+              "suffix": "controller/{{=it.codeRoot}}Controller.java"
8454
+            },
8455
+            "Service": {
8456
+              "suffix": "service/{{=it.codeRoot}}Service.java"
8457
+            },
8458
+            "ServiceImpl": {
8459
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java"
8460
+            },
8461
+            "Mapper": {
8462
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java"
8463
+            },
8464
+            "Mapper.xml": {
8465
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml"
8466
+            },
8467
+            "Entity": {
8468
+              "suffix": "entity/{{=it.codeRoot}}.java"
8469
+            }
8470
+          }
8471
+        },
8472
+        "custom": {}
8377 8473
       },
8378 8474
       "defKey": "ta_check_stand",
8379 8475
       "defName": "测评标准",
@@ -8448,8 +8544,8 @@
8448 8544
       ],
8449 8545
       "fields": [
8450 8546
         {
8451
-          "defKey": "id",
8452
-          "defName": "ID",
8547
+          "defKey": "statnd_id",
8548
+          "defName": "标准ID",
8453 8549
           "comment": "",
8454 8550
           "type": "",
8455 8551
           "len": 32,
@@ -8465,11 +8561,11 @@
8465 8561
           "id": "219A66C3-6D3F-4F1E-A572-9E5294556142"
8466 8562
         },
8467 8563
         {
8468
-          "defKey": "org_id",
8469
-          "defName": "机构ID",
8564
+          "defKey": "content",
8565
+          "defName": "测评标准",
8470 8566
           "comment": "",
8471
-          "type": "",
8472
-          "len": "",
8567
+          "type": "TEXT",
8568
+          "len": 0,
8473 8569
           "scale": "",
8474 8570
           "primaryKey": false,
8475 8571
           "notNull": false,
@@ -8477,7 +8573,7 @@
8477 8573
           "defaultValue": "",
8478 8574
           "hideInGraph": false,
8479 8575
           "refDict": "",
8480
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8576
+          "domain": "",
8481 8577
           "id": "30776463-B5E8-44DB-B5B6-45817A48E59F",
8482 8578
           "uiHint": ""
8483 8579
         },
@@ -8531,40 +8627,6 @@
8531 8627
           "refDict": "",
8532 8628
           "uiHint": "",
8533 8629
           "id": "DED8CFDE-66A8-4460-A94A-2AAA1D169C5D"
8534
-        },
8535
-        {
8536
-          "defKey": "update_user",
8537
-          "defName": "更新人",
8538
-          "comment": "",
8539
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8540
-          "type": "",
8541
-          "len": 32,
8542
-          "scale": "",
8543
-          "primaryKey": false,
8544
-          "notNull": false,
8545
-          "autoIncrement": false,
8546
-          "defaultValue": "",
8547
-          "hideInGraph": true,
8548
-          "refDict": "",
8549
-          "uiHint": "",
8550
-          "id": "06EC3E88-DE3F-43F9-A155-D2454F4D8C4E"
8551
-        },
8552
-        {
8553
-          "defKey": "update_date",
8554
-          "defName": "更新时间",
8555
-          "comment": "",
8556
-          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
8557
-          "type": "",
8558
-          "len": "",
8559
-          "scale": "",
8560
-          "primaryKey": false,
8561
-          "notNull": false,
8562
-          "autoIncrement": false,
8563
-          "defaultValue": "",
8564
-          "hideInGraph": true,
8565
-          "refDict": "",
8566
-          "uiHint": "",
8567
-          "id": "4C2C2D21-B0E0-4279-AD8B-F7359B17B7AB"
8568 8630
         }
8569 8631
       ],
8570 8632
       "correlations": [],

+ 107
- 11
db/文明创办.pdma.json Datei anzeigen

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-1-29 08:20:04",
7
+  "updatedTime": "2023-1-31 11:15:51",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -1204,6 +1204,23 @@
1204 1204
           "uiHint": "",
1205 1205
           "id": "C3E43687-58A1-4E99-AE11-085F9B6688D7"
1206 1206
         },
1207
+        {
1208
+          "defKey": "is_user",
1209
+          "defName": "是否系统用户",
1210
+          "comment": "0市民,1系统用户",
1211
+          "type": "",
1212
+          "len": "",
1213
+          "scale": "",
1214
+          "primaryKey": false,
1215
+          "notNull": false,
1216
+          "autoIncrement": false,
1217
+          "defaultValue": "1",
1218
+          "hideInGraph": false,
1219
+          "refDict": "",
1220
+          "extProps": {},
1221
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1222
+          "id": "D1C0A2CD-89DB-44DF-918F-EA536E39761F"
1223
+        },
1207 1224
         {
1208 1225
           "defKey": "create_user",
1209 1226
           "defName": "创建人",
@@ -6921,9 +6938,32 @@
6921 6938
       "id": "EF3D4E17-6CE0-4944-B1DC-40280B2B689F",
6922 6939
       "env": {
6923 6940
         "base": {
6924
-          "nameSpace": "",
6925
-          "codeRoot": ""
6926
-        }
6941
+          "nameSpace": "com.example.civilizedcity",
6942
+          "codeRoot": "TaFeedback"
6943
+        },
6944
+        "template": {
6945
+          "JavaMybatisPlus": {
6946
+            "Controller": {
6947
+              "suffix": "controller/{{=it.codeRoot}}Controller.java"
6948
+            },
6949
+            "Service": {
6950
+              "suffix": "service/{{=it.codeRoot}}Service.java"
6951
+            },
6952
+            "ServiceImpl": {
6953
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java"
6954
+            },
6955
+            "Mapper": {
6956
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java"
6957
+            },
6958
+            "Mapper.xml": {
6959
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml"
6960
+            },
6961
+            "Entity": {
6962
+              "suffix": "entity/{{=it.codeRoot}}.java"
6963
+            }
6964
+          }
6965
+        },
6966
+        "custom": {}
6927 6967
       },
6928 6968
       "defKey": "ta_feedback",
6929 6969
       "defName": "反馈表",
@@ -7006,7 +7046,7 @@
7006 7046
           "scale": "",
7007 7047
           "primaryKey": true,
7008 7048
           "notNull": true,
7009
-          "autoIncrement": true,
7049
+          "autoIncrement": false,
7010 7050
           "defaultValue": "",
7011 7051
           "hideInGraph": true,
7012 7052
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -7048,6 +7088,39 @@
7048 7088
           "domain": "",
7049 7089
           "id": "2B36F8F1-9C06-434F-B4D5-0A28D587BA24"
7050 7090
         },
7091
+        {
7092
+          "defKey": "location",
7093
+          "defName": "定位",
7094
+          "comment": "",
7095
+          "type": "VARCHAR",
7096
+          "len": 32,
7097
+          "scale": "",
7098
+          "primaryKey": false,
7099
+          "notNull": false,
7100
+          "autoIncrement": false,
7101
+          "defaultValue": "",
7102
+          "hideInGraph": false,
7103
+          "refDict": "",
7104
+          "extProps": {},
7105
+          "id": "2D8D31C7-FD0E-48DB-9538-FCF3B79E93AB"
7106
+        },
7107
+        {
7108
+          "defKey": "addr",
7109
+          "defName": "具体位置",
7110
+          "comment": "",
7111
+          "type": "",
7112
+          "len": "",
7113
+          "scale": "",
7114
+          "primaryKey": false,
7115
+          "notNull": false,
7116
+          "autoIncrement": false,
7117
+          "defaultValue": "",
7118
+          "hideInGraph": false,
7119
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7120
+          "refDict": "",
7121
+          "extProps": {},
7122
+          "id": "215DDE0F-97A2-4DBC-99D5-31C8AF2768E9"
7123
+        },
7051 7124
         {
7052 7125
           "defKey": "person_id",
7053 7126
           "defName": "反馈人ID",
@@ -7102,18 +7175,18 @@
7102 7175
         {
7103 7176
           "defKey": "verify_status",
7104 7177
           "defName": "审核状态",
7105
-          "comment": "0未审,1通过,2驳回",
7178
+          "comment": "null未审,pass通过,reject驳回",
7106 7179
           "type": "",
7107 7180
           "len": "",
7108 7181
           "scale": "",
7109 7182
           "primaryKey": false,
7110 7183
           "notNull": false,
7111 7184
           "autoIncrement": false,
7112
-          "defaultValue": "0",
7185
+          "defaultValue": "",
7113 7186
           "hideInGraph": false,
7114 7187
           "refDict": "",
7115 7188
           "extProps": {},
7116
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
7189
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
7117 7190
           "id": "90567F1C-10F8-4BB2-9F32-B92B7077091B"
7118 7191
         },
7119 7192
         {
@@ -8371,9 +8444,32 @@
8371 8444
       "id": "38420D50-01AB-4E31-84D3-20192D26E25F",
8372 8445
       "env": {
8373 8446
         "base": {
8374
-          "nameSpace": "",
8375
-          "codeRoot": ""
8376
-        }
8447
+          "nameSpace": "com.example.civilizedcity",
8448
+          "codeRoot": "TaCheckStand"
8449
+        },
8450
+        "template": {
8451
+          "JavaMybatisPlus": {
8452
+            "Controller": {
8453
+              "suffix": "controller/{{=it.codeRoot}}Controller.java"
8454
+            },
8455
+            "Service": {
8456
+              "suffix": "service/{{=it.codeRoot}}Service.java"
8457
+            },
8458
+            "ServiceImpl": {
8459
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java"
8460
+            },
8461
+            "Mapper": {
8462
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java"
8463
+            },
8464
+            "Mapper.xml": {
8465
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml"
8466
+            },
8467
+            "Entity": {
8468
+              "suffix": "entity/{{=it.codeRoot}}.java"
8469
+            }
8470
+          }
8471
+        },
8472
+        "custom": {}
8377 8473
       },
8378 8474
       "defKey": "ta_check_stand",
8379 8475
       "defName": "测评标准",

+ 2
- 2
src/main/java/com/example/civilizedcity/common/Constants.java Datei anzeigen

@@ -57,8 +57,8 @@ public class Constants {
57 57
 
58 58
     // 流程起始: 待交办
59 59
     public final static String PROCESS_START = "start";
60
-    // 流程: 被打回 - 市民提交
61
-    public final static String PROCESS_REJECT = "reject";
60
+    // 流程: 被打回 - 市民提交 - 算办结
61
+//    public final static String PROCESS_REJECT = "reject";
62 62
 
63 63
     // 审核
64 64
     public final static String PROCESS_VERIFY = "verify";

+ 4
- 0
src/main/java/com/example/civilizedcity/config/WxMaUitl.java Datei anzeigen

@@ -41,6 +41,10 @@ public class WxMaUitl {
41 41
         return service.getUserService().getPhoneNoInfo(param.getSessionKey(), param.getEncryptedData(), param.getIv());
42 42
     }
43 43
 
44
+    public WxMaPhoneNumberInfo getPhoneNoInfo(String code) throws WxErrorException {
45
+        return service.getUserService().getNewPhoneNoInfo(code);
46
+    }
47
+
44 48
     @Data
45 49
     public static class AuthParam {
46 50
         String signature;

+ 1
- 1
src/main/java/com/example/civilizedcity/controller/StatController.java Datei anzeigen

@@ -41,7 +41,7 @@ public class StatController extends BaseController {
41 41
             //
42 42
         }
43 43
 
44
-        List<StatVo> result = taIssueService.statMaIndex(user, duty);
44
+        List<StatVo> result = taIssueService.statMaIndex(user, person, duty);
45 45
 
46 46
         return ResponseBean.success(result);
47 47
     }

+ 1
- 0
src/main/java/com/example/civilizedcity/controller/SysUserController.java Datei anzeigen

@@ -107,6 +107,7 @@ public class SysUserController extends BaseController {
107 107
         queryWrapper.like(!StringUtils.isEmpty(name), "name", name);
108 108
         queryWrapper.eq(!StringUtils.isEmpty(orgId), "org_id", orgId);
109 109
         queryWrapper.like(!StringUtils.isEmpty(phone), "phone", phone);
110
+        queryWrapper.eq("is_user", 1);
110 111
         queryWrapper.gt("status", Constants.STATUS_DELETE);
111 112
         queryWrapper.ne("user_id", Constants.ROOT_ID);
112 113
         queryWrapper.orderByDesc("create_date");

+ 101
- 0
src/main/java/com/example/civilizedcity/controller/TaFeedbackController.java Datei anzeigen

@@ -0,0 +1,101 @@
1
+package com.example.civilizedcity.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.example.civilizedcity.entity.TaFeedback;
15
+import com.example.civilizedcity.service.TaFeedbackService;
16
+
17
+ /**
18
+ * 反馈表;(ta_feedback)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2023-1-30
21
+ */
22
+@Api(tags = "反馈表对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaFeedbackController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaFeedbackService taFeedbackService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param feedbackId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taFeedback/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taFeedbackService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taFeedback")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaFeedback> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaFeedback> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaFeedback> result = taFeedbackService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taFeedback 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taFeedback")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaFeedback taFeedback) throws Exception {
71
+        taFeedbackService.save(taFeedback);
72
+        return ResponseBean.success(taFeedback);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taFeedback 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taFeedback/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaFeedback taFeedback,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taFeedbackService.updateById(taFeedback);
86
+        return ResponseBean.success(taFeedback);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param feedbackId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taFeedback/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taFeedbackService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 3
- 1
src/main/java/com/example/civilizedcity/controller/TdQuestionController.java Datei anzeigen

@@ -60,11 +60,13 @@ public class TdQuestionController extends BaseController {
60 60
     @GetMapping("/tdQuestion")
61 61
     public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
62 62
                              @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
63
-                             @ApiParam("标题") @RequestParam(value = "title", required = false) String title) throws Exception {
63
+                             @ApiParam("标题") @RequestParam(value = "title", required = false) String title,
64
+                             @ApiParam("问题类型") @RequestParam(value = "quType", required = false) String quType) throws Exception {
64 65
 
65 66
         IPage<TdQuestion> pg = new Page<>(pageNum, pageSize);
66 67
         QueryWrapper<TdQuestion> queryWrapper = new QueryWrapper<>();
67 68
         queryWrapper.like(!StringUtils.isEmpty(title), "title", title);
69
+        queryWrapper.eq(!StringUtils.isEmpty(quType), "qu_type", quType);
68 70
         queryWrapper.gt("status", Constants.STATUS_DELETE);
69 71
         queryWrapper.orderByDesc("create_date");
70 72
         IPage<TdQuestion> result = tdQuestionService.page(pg, queryWrapper);

+ 5
- 3
src/main/java/com/example/civilizedcity/controller/WxMaController.java Datei anzeigen

@@ -172,10 +172,10 @@ public class WxMaController extends BaseController {
172 172
 
173 173
     @ApiOperation(value="授权手机", notes = "授权手机", httpMethod = "PUT", response = TaPerson.class)
174 174
     @PutMapping("/auth-phone")
175
-    public ResponseBean updateUserPhone(@ApiParam("授权手机的参数") @RequestBody WxMaUitl.AuthParam param) throws Exception {
175
+    public ResponseBean updateUserPhone(@ApiParam("授权手机的Code") @RequestParam String code) throws Exception {
176 176
 
177 177
         // 解密
178
-        WxMaPhoneNumberInfo phoneNoInfo = wxMaUitl.getPhoneNoInfo(param);
178
+        WxMaPhoneNumberInfo phoneNoInfo = wxMaUitl.getPhoneNoInfo(code);
179 179
 
180 180
         TaPerson taPerson = currentPerson();
181 181
         if (null == taPerson) {
@@ -185,7 +185,9 @@ public class WxMaController extends BaseController {
185 185
         taPerson.setPhone(phoneNoInfo.getPhoneNumber());
186 186
         taPersonService.updateById(taPerson);
187 187
 
188
-        return ResponseBean.success(taPerson);
188
+        Map<String, Object> res = sysLoginService.loginByPerson(taPerson);
189
+
190
+        return ResponseBean.success(res);
189 191
     }
190 192
 
191 193
     @PostMapping("/change-password")

+ 3
- 0
src/main/java/com/example/civilizedcity/entity/SysUser.java Datei anzeigen

@@ -45,6 +45,9 @@ public class SysUser implements Serializable,Cloneable{
45 45
     /** 机构ID */
46 46
     @ApiModelProperty(name = "机构ID",notes = "")
47 47
     private String orgId ;
48
+     /** 是否系统用户 */
49
+     @ApiModelProperty(name = "是否系统用户",notes = "")
50
+     private Boolean isUser ;
48 51
     /** 状态 */
49 52
     @ApiModelProperty(name = "状态",notes = "")
50 53
     private Integer status ;

+ 69
- 0
src/main/java/com/example/civilizedcity/entity/TaFeedback.java Datei anzeigen

@@ -0,0 +1,69 @@
1
+package com.example.civilizedcity.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 反馈表;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2023-1-30
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "反馈表",description = "")
23
+@TableName("ta_feedback")
24
+public class TaFeedback implements Serializable,Cloneable{
25
+    /** 反馈ID */
26
+    @ApiModelProperty(name = "反馈ID",notes = "")
27
+    @TableId(value = "feedback_id", type = IdType.ASSIGN_UUID)
28
+    private String feedbackId ;
29
+    /** 反馈标题 */
30
+    @ApiModelProperty(name = "反馈标题",notes = "")
31
+    private String title ;
32
+    /** 详情 */
33
+    @ApiModelProperty(name = "详情",notes = "")
34
+    private String content ;
35
+    /** 定位 */
36
+    @ApiModelProperty(name = "定位",notes = "")
37
+    private String location ;
38
+    /** 具体位置 */
39
+    @ApiModelProperty(name = "具体位置",notes = "")
40
+    private String addr ;
41
+    /** 反馈人ID */
42
+    @ApiModelProperty(name = "反馈人ID",notes = "")
43
+    private String personId ;
44
+    /** 反馈人姓名 */
45
+    @ApiModelProperty(name = "反馈人姓名",notes = "")
46
+    private String name ;
47
+    /** 联系电话 */
48
+    @ApiModelProperty(name = "联系电话",notes = "")
49
+    private String phone ;
50
+    /** 审核状态;0未审,1通过,2驳回 */
51
+    @ApiModelProperty(name = "审核状态",notes = "null未审,pass通过,reject驳回")
52
+    private String verifyStatus ;
53
+    /** 审核意见 */
54
+    @ApiModelProperty(name = "审核意见",notes = "")
55
+    private String verifyDesc ;
56
+    /** 关联问题单 */
57
+    @ApiModelProperty(name = "关联问题单",notes = "")
58
+    private String issueId ;
59
+    /** 机构ID */
60
+    @ApiModelProperty(name = "机构ID",notes = "")
61
+    private String orgId ;
62
+    /** 状态 */
63
+    @ApiModelProperty(name = "状态",notes = "")
64
+    private Integer status ;
65
+    /** 创建时间 */
66
+    @ApiModelProperty(name = "创建时间",notes = "")
67
+    private LocalDateTime createDate ;
68
+
69
+}

+ 4
- 1
src/main/java/com/example/civilizedcity/mapper/SysUserMapper.java Datei anzeigen

@@ -5,11 +5,14 @@ import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6 6
 import com.example.civilizedcity.entity.SysUser;
7 7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9 11
  * 用户表;(sys_user)表数据库访问层
10 12
  * @author : http://njyunzhi.com
11 13
  * @date : 2022-12-12
12 14
  */
13 15
 @Mapper
14 16
 public interface SysUserMapper  extends BaseMapper<SysUser>{
17
+     List<SysUser> getListByPhone(@Param("phone") String phone);
15 18
  }

+ 23
- 0
src/main/java/com/example/civilizedcity/mapper/TaFeedbackMapper.java Datei anzeigen

@@ -0,0 +1,23 @@
1
+package com.example.civilizedcity.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.MapKey;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import com.example.civilizedcity.entity.TaFeedback;
8
+
9
+import java.util.Map;
10
+
11
+/**
12
+ * 反馈表;(ta_feedback)表数据库访问层
13
+ * @author : http://njyunzhi.com
14
+ * @date : 2023-1-30
15
+ */
16
+@Mapper
17
+public interface TaFeedbackMapper  extends BaseMapper<TaFeedback>{
18
+
19
+     long countByVerifyStatus(@Param("personId") String personId, @Param("verifyStatus") String verifyStatus);
20
+
21
+     @MapKey("id")
22
+     Map<String, Object> statMaIndex(@Param("personId") String personId);
23
+ }

+ 6
- 1
src/main/java/com/example/civilizedcity/service/SysLoginService.java Datei anzeigen

@@ -3,8 +3,11 @@ package com.example.civilizedcity.service;
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.example.civilizedcity.entity.SysLogin;
5 5
 import com.example.civilizedcity.entity.SysUser;
6
+import com.example.civilizedcity.entity.TaPerson;
6 7
 import com.example.civilizedcity.vo.WxChangePwd;
7 8
 
9
+import java.util.Map;
10
+
8 11
 /**
9 12
  * 系统账户表;(sys_login)表服务接口
10 13
  * @author : http://njyunzhi.com
@@ -13,4 +16,6 @@ import com.example.civilizedcity.vo.WxChangePwd;
13 16
 public interface SysLoginService extends IBaseService<SysLogin> {
14 17
 
15 18
      boolean changePassword(SysUser user, WxChangePwd wxChangePwd);
16
- }
19
+
20
+    Map<String, Object> loginByPerson(TaPerson taPerson);
21
+}

+ 13
- 0
src/main/java/com/example/civilizedcity/service/TaFeedbackService.java Datei anzeigen

@@ -0,0 +1,13 @@
1
+package com.example.civilizedcity.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.example.civilizedcity.entity.TaFeedback;
5
+
6
+ /**
7
+ * 反馈表;(ta_feedback)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2023-1-30
10
+ */
11
+public interface TaFeedbackService extends IBaseService<TaFeedback> {
12
+    
13
+}

+ 2
- 1
src/main/java/com/example/civilizedcity/service/TaIssueService.java Datei anzeigen

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
4 4
 import com.baomidou.mybatisplus.extension.service.IService;
5 5
 import com.example.civilizedcity.entity.SysUser;
6 6
 import com.example.civilizedcity.entity.TaIssue;
7
+import com.example.civilizedcity.entity.TaPerson;
7 8
 import com.example.civilizedcity.vo.StatVo;
8 9
 
9 10
 import java.util.List;
@@ -21,5 +22,5 @@ public interface TaIssueService extends IBaseService<TaIssue> {
21 22
 
22 23
      void updateApply(Integer issueId, String applyType, Integer applyId);
23 24
 
24
-     List<StatVo> statMaIndex(SysUser user, String duty);
25
+     List<StatVo> statMaIndex(SysUser user, TaPerson person, String duty);
25 26
  }

+ 58
- 0
src/main/java/com/example/civilizedcity/service/impl/SysLoginServiceImpl.java Datei anzeigen

@@ -1,7 +1,12 @@
1 1
 package com.example.civilizedcity.service.impl;
2 2
 
3
+import cn.dev33.satoken.stp.StpUtil;
4
+import com.example.civilizedcity.common.Constants;
3 5
 import com.example.civilizedcity.common.EncryptUtils;
4 6
 import com.example.civilizedcity.entity.SysUser;
7
+import com.example.civilizedcity.entity.TaPerson;
8
+import com.example.civilizedcity.mapper.SysUserDutyMapper;
9
+import com.example.civilizedcity.mapper.SysUserMapper;
5 10
 import com.example.civilizedcity.vo.WxChangePwd;
6 11
 import org.springframework.beans.factory.annotation.Autowired;
7 12
 import org.springframework.stereotype.Service;
@@ -9,6 +14,12 @@ import com.example.civilizedcity.entity.SysLogin;
9 14
 import com.example.civilizedcity.mapper.SysLoginMapper;
10 15
 import com.example.civilizedcity.service.SysLoginService;
11 16
 
17
+import java.time.LocalDateTime;
18
+import java.util.ArrayList;
19
+import java.util.HashMap;
20
+import java.util.List;
21
+import java.util.Map;
22
+
12 23
 /**
13 24
  * 系统账户表;(sys_login)表服务实现类
14 25
  *
@@ -18,6 +29,12 @@ import com.example.civilizedcity.service.SysLoginService;
18 29
 @Service
19 30
 public class SysLoginServiceImpl extends BaseServiceImpl<SysLoginMapper, SysLogin> implements SysLoginService {
20 31
 
32
+    @Autowired
33
+    SysUserMapper sysUserMapper;
34
+
35
+    @Autowired
36
+    SysUserDutyMapper sysUserDutyMapper;
37
+
21 38
     @Override
22 39
     public boolean changePassword(SysUser user, WxChangePwd wxChangePwd) {
23 40
 
@@ -26,4 +43,45 @@ public class SysLoginServiceImpl extends BaseServiceImpl<SysLoginMapper, SysLogi
26 43
 
27 44
         return false;
28 45
     }
46
+
47
+    @Override
48
+    public Map<String, Object> loginByPerson(TaPerson taPerson) {
49
+        Map<String, Object> res = new HashMap<>();
50
+        SysUser user = null;
51
+
52
+                List<SysUser> sysUserList = sysUserMapper.getListByPhone(taPerson.getPhone());
53
+        if (null == sysUserList || sysUserList.size() < 1) {
54
+            user = new SysUser();
55
+            user.setPhone(taPerson.getPhone());
56
+            user.setIsUser(false);
57
+            user.setOrgId(taPerson.getPersonId()); // 机构ID 使用用户ID , 目前没有使用到
58
+            user.setStatus(Constants.STATUS_NORMAL);
59
+            user.setCreateDate(LocalDateTime.now());
60
+            sysUserMapper.insert(user);
61
+
62
+            if (null == sysUserList) {
63
+                sysUserList = new ArrayList<>();
64
+            }
65
+
66
+            sysUserList.add(user);
67
+        } else {
68
+            if (sysUserList.size() == 1) {
69
+                user = sysUserList.get(0);
70
+            } else {
71
+                user = sysUserList.stream().filter(x -> x.getIsUser()).findFirst().get();
72
+            }
73
+        }
74
+
75
+        // 获取人员身份
76
+        List<String> dutyList = sysUserDutyMapper.getListByUser(user.getUserId());
77
+        user.setDutyList(dutyList);
78
+
79
+        // 登录新用户
80
+        StpUtil.login(user.getUserId(), "miniapp");
81
+        res.put("user", user);
82
+        res.put("person", taPerson);
83
+        res.put("token", StpUtil.getTokenValue());
84
+
85
+        return res;
86
+    }
29 87
 }

+ 16
- 0
src/main/java/com/example/civilizedcity/service/impl/TaFeedbackServiceImpl.java Datei anzeigen

@@ -0,0 +1,16 @@
1
+package com.example.civilizedcity.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.example.civilizedcity.entity.TaFeedback;
6
+import com.example.civilizedcity.mapper.TaFeedbackMapper;
7
+import com.example.civilizedcity.service.TaFeedbackService;
8
+ /**
9
+ * 反馈表;(ta_feedback)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2023-1-30
12
+ */
13
+@Service
14
+public class TaFeedbackServiceImpl extends BaseServiceImpl<TaFeedbackMapper, TaFeedback> implements TaFeedbackService {
15
+    
16
+}

+ 12
- 4
src/main/java/com/example/civilizedcity/service/impl/TaIssueServiceImpl.java Datei anzeigen

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
4 4
 import com.example.civilizedcity.common.Constants;
5 5
 import com.example.civilizedcity.common.StringUtils;
6 6
 import com.example.civilizedcity.entity.SysUser;
7
+import com.example.civilizedcity.entity.TaPerson;
8
+import com.example.civilizedcity.mapper.TaFeedbackMapper;
7 9
 import com.example.civilizedcity.mapper.TaOrgIssueMapper;
8 10
 import com.example.civilizedcity.vo.StatVo;
9 11
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +30,9 @@ public class TaIssueServiceImpl extends BaseServiceImpl<TaIssueMapper, TaIssue>
28 30
     @Autowired
29 31
     TaOrgIssueMapper taOrgIssueMapper;
30 32
 
33
+    @Autowired
34
+    TaFeedbackMapper taFeedbackMapper;
35
+
31 36
     @Override
32 37
     public IPage<TaIssue> getPageBy(IPage<TaIssue> pg, String orgId) {
33 38
         if (null == orgId) {
@@ -49,7 +54,7 @@ public class TaIssueServiceImpl extends BaseServiceImpl<TaIssueMapper, TaIssue>
49 54
     }
50 55
 
51 56
     @Override
52
-    public List<StatVo> statMaIndex(SysUser user, String duty) {
57
+    public List<StatVo> statMaIndex(SysUser user, TaPerson person, String duty) {
53 58
         List<StatVo> result = new ArrayList<>();
54 59
 
55 60
         // 督察员
@@ -63,7 +68,7 @@ public class TaIssueServiceImpl extends BaseServiceImpl<TaIssueMapper, TaIssue>
63 68
         // 管理员
64 69
         else if (Constants.DUTY_MANAGER.equals(duty)) {
65 70
             Map<String, Object> res = baseMapper.statMaIndex(null);
66
-            result.add(new StatVo().setName("未处理").setValue(getStatValueBy(res.get("unassigned_num"), 0)));
71
+            result.add(new StatVo().setName("待交办").setValue(getStatValueBy(res.get("unassigned_num"), 0)));
67 72
             result.add(new StatVo().setName("已交办").setValue(getStatValueBy(res.get("assigned_num"), 0)));
68 73
             result.add(new StatVo().setName("已办结").setValue(getStatValueBy(res.get("end_num"), 0)));
69 74
         }
@@ -80,13 +85,16 @@ public class TaIssueServiceImpl extends BaseServiceImpl<TaIssueMapper, TaIssue>
80 85
         else if (Constants.DUTY_QUERY_PERSON.equals(duty)) {
81 86
             Map<String, Object> res = baseMapper.statMaIndex(null);
82 87
             result.add(new StatVo().setName("未处理").setValue(getStatValueBy(res.get("unassigned_num"), 0)));
83
-            result.add(new StatVo().setName("处理").setValue(getStatValueBy(res.get("assigned_num"), 0)));
88
+            result.add(new StatVo().setName("处理").setValue(getStatValueBy(res.get("assigned_num"), 0)));
84 89
             result.add(new StatVo().setName("已办结").setValue(getStatValueBy(res.get("end_num"), 0)));
85 90
         }
86 91
 
87 92
         // 市民
88 93
         else {
89
-
94
+            Map<String, Object> res = taFeedbackMapper.statMaIndex(person.getPersonId());
95
+            result.add(new StatVo().setName("未处理").setValue(getStatValueBy(res.get("unassigned_num"), 0)));
96
+            result.add(new StatVo().setName("已处理").setValue(getStatValueBy(res.get("assigned_num"), 0) + getStatValueBy(res.get("end_num"), 0)));
97
+            result.add(new StatVo().setName("已打回").setValue(getStatValueBy(res.get("reject_num"), 0)));
90 98
         }
91 99
 
92 100
         return result;

+ 9
- 0
src/main/resources/application.yml Datei anzeigen

@@ -8,6 +8,14 @@ spring:
8 8
     url: jdbc:mysql://110.40.183.156:3306/civilizedcity?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
9 9
     username: civilizedcity
10 10
     password: civilizedcity@ABCD1234
11
+#    max-idle: 10
12
+#    max-wait: 10000
13
+#    min-idle: 5
14
+#    initial-size: 5
15
+#    validation-query: SELECT 1
16
+#    test-on-borrow: false
17
+#    test-while-idle: true
18
+#    time-between-eviction-runs-millis: 18800
11 19
   mvc:
12 20
     pathmatch:
13 21
       matching-strategy: ANT_PATH_MATCHER
@@ -33,6 +41,7 @@ yz:
33 41
       - "/**/signin"
34 42
       - "/ma/captcha"
35 43
       - "/ma/change-password"
44
+      - "/ma/auth-phone"
36 45
 
37 46
 wx:
38 47
   miniapp:

+ 10
- 1
src/main/resources/mapper/SysUserMapper.xml Datei anzeigen

@@ -2,5 +2,14 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.SysUserMapper">
5
-    
5
+
6
+    <select id="getListByPhone" resultType="com.example.civilizedcity.entity.SysUser">
7
+        SELECT
8
+            *
9
+        FROM
10
+            sys_user t
11
+        WHERE
12
+            t.phone = #{phone}
13
+          AND t.`status` &gt; -1
14
+    </select>
6 15
 </mapper>

+ 30
- 0
src/main/resources/mapper/TaFeedbackMapper.xml Datei anzeigen

@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+
4
+<mapper namespace="com.example.civilizedcity.mapper.TaFeedbackMapper">
5
+
6
+    <select id="countByVerifyStatus" resultType="java.lang.Long">
7
+        SELECT
8
+            count( * )
9
+        FROM
10
+            ta_feedback t
11
+        WHERE
12
+            t.person_id = #{personId}
13
+          AND t.verify_status = #{verifyStatus}
14
+          AND t.`status` &gt; -1
15
+    </select>
16
+    <select id="statMaIndex" resultType="java.util.Map">
17
+        SELECT
18
+            UUID_SHORT() as id,
19
+            sum(IF(s.process_node = 'start', 1, 0)) as unassigned_num,
20
+            sum(IF(s.process_node = 'assigned', 1, 0)) as assigned_num,
21
+            sum(IF(s.process_node = 'end', 1, 0)) as end_num,
22
+            sum(IF(t.verify_status = 'reject', 1, 0)) as reject_num
23
+        FROM
24
+            ta_feedback t
25
+                JOIN ta_issue s ON t.issue_id = s.issue_id
26
+        WHERE
27
+            t.person_id = #{personId}
28
+          AND t.`status` &gt; -1
29
+    </select>
30
+</mapper>

+ 0
- 1
src/main/resources/mapper/TaIssueMapper.xml Datei anzeigen

@@ -51,7 +51,6 @@
51 51
             count(*) as published_num,
52 52
             sum(IF(t.process_node = 'start', 1, 0)) as unassigned_num,
53 53
             sum(IF(t.process_node = 'assigned', 1, 0)) as assigned_num,
54
-            sum(IF(t.process_node = 'reject', 1, 0)) as reject_num,
55 54
             sum(IF(t.process_node = 'end', 1, 0)) as end_num
56 55
         FROM
57 56
             ta_issue t

+ 1
- 1
src/main/resources/mapper/TaOrgIssueMapper.xml Datei anzeigen

@@ -53,7 +53,7 @@
53 53
             SUM(s.process_node == 'end', 1, 0) as end_num,
54 54
             SUM(s.process_node != 'end', 1, 0) as doing_num
55 55
         from ta_org_issue t
56
-                 INNER JOIN ta_issue s on t.issue_id = s.issue_id
56
+                 INNER JOIN ta_issue s on t.issue_id = s.issue_id AND t.org_id = s.org_id
57 57
         where t.org_id = #{orgId}
58 58
           and t.`status` &gt; -1
59 59
           and s.`status` &gt; -1