Yansen 2 år sedan
förälder
incheckning
dcf698e11b

+ 17
- 0
src/main/java/com/example/civilizedcity/common/BaseController.java Visa fil

3
 import cn.dev33.satoken.stp.StpUtil;
3
 import cn.dev33.satoken.stp.StpUtil;
4
 import com.example.civilizedcity.entity.SysUser;
4
 import com.example.civilizedcity.entity.SysUser;
5
 import com.example.civilizedcity.entity.TaPerson;
5
 import com.example.civilizedcity.entity.TaPerson;
6
+import com.example.civilizedcity.service.SysUserDutyService;
6
 import com.example.civilizedcity.service.SysUserService;
7
 import com.example.civilizedcity.service.SysUserService;
7
 import com.example.civilizedcity.service.TaPersonService;
8
 import com.example.civilizedcity.service.TaPersonService;
8
 import org.springframework.beans.factory.annotation.Autowired;
9
 import org.springframework.beans.factory.annotation.Autowired;
10
 
11
 
11
 import javax.annotation.Resource;
12
 import javax.annotation.Resource;
12
 import javax.servlet.http.HttpServletRequest;
13
 import javax.servlet.http.HttpServletRequest;
14
+import java.util.List;
13
 
15
 
14
 @Component
16
 @Component
15
 public class BaseController {
17
 public class BaseController {
23
     @Autowired
25
     @Autowired
24
     protected TaPersonService taPersonService;
26
     protected TaPersonService taPersonService;
25
 
27
 
28
+    @Autowired
29
+    protected SysUserDutyService sysUserDutyService;
30
+
26
     public SysUser currentUser() throws Exception {
31
     public SysUser currentUser() throws Exception {
27
         String loginId = StpUtil.getLoginIdAsString();
32
         String loginId = StpUtil.getLoginIdAsString();
28
         if (StringUtils.isEmpty(loginId)) {
33
         if (StringUtils.isEmpty(loginId)) {
52
 
57
 
53
         return taPerson;
58
         return taPerson;
54
     }
59
     }
60
+
61
+    public boolean isManager(SysUser sysUser) throws Exception {
62
+        if (Constants.ROOT_ORG.equals(sysUser.getOrgId())) return true;
63
+
64
+        List<String> dutyList = sysUserDutyService.getListByUser(sysUser.getUserId());
65
+        sysUser.setDutyList(dutyList);  // 添加了一点副作用
66
+        if (null != dutyList && (dutyList.contains(Constants.DUTY_MANAGER) || dutyList.contains(Constants.DUTY_QUERY_PERSON))) {
67
+            return true;
68
+        }
69
+
70
+        return false;
71
+    }
55
 }
72
 }

+ 17
- 1
src/main/java/com/example/civilizedcity/controller/SysOrgController.java Visa fil

12
 
12
 
13
 import com.example.civilizedcity.common.StringUtils;
13
 import com.example.civilizedcity.common.StringUtils;
14
 import com.example.civilizedcity.entity.SysRole;
14
 import com.example.civilizedcity.entity.SysRole;
15
+import com.example.civilizedcity.entity.SysUser;
15
 import io.swagger.annotations.Api;
16
 import io.swagger.annotations.Api;
16
 import io.swagger.annotations.ApiOperation;
17
 import io.swagger.annotations.ApiOperation;
17
 import io.swagger.annotations.ApiParam;
18
 import io.swagger.annotations.ApiParam;
145
      */
146
      */
146
     @ApiOperation("通过主键删除数据")
147
     @ApiOperation("通过主键删除数据")
147
     @DeleteMapping("/sysOrg/{id}")
148
     @DeleteMapping("/sysOrg/{id}")
148
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) {
149
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
150
+        SysUser sysUser = currentUser();
151
+
152
+        if (Constants.ROOT_ID.equals(id)) {
153
+            return ResponseBean.error("系统机构, 禁止删除");
154
+        }
155
+
156
+        long count = sysOrgService.countBy("org_p_id", id, true);
157
+        if (count > 0) {
158
+            return ResponseBean.error("请先删除子级单位");
159
+        }
160
+
161
+        if (!Constants.ROOT_ORG.equals(sysUser.getOrgId())) {
162
+            return ResponseBean.error("暂无权限");
163
+        }
164
+
149
         sysOrgService.removeLogicById(id);
165
         sysOrgService.removeLogicById(id);
150
         return ResponseBean.success("success");
166
         return ResponseBean.success("success");
151
     }
167
     }

+ 20
- 4
src/main/java/com/example/civilizedcity/controller/TaIssueApplyController.java Visa fil

13
 import com.example.civilizedcity.common.StringUtils;
13
 import com.example.civilizedcity.common.StringUtils;
14
 import com.example.civilizedcity.entity.SysUser;
14
 import com.example.civilizedcity.entity.SysUser;
15
 import com.example.civilizedcity.event.MessagEvent;
15
 import com.example.civilizedcity.event.MessagEvent;
16
+import com.example.civilizedcity.service.SysUserDutyService;
16
 import com.example.civilizedcity.service.TaIssueService;
17
 import com.example.civilizedcity.service.TaIssueService;
17
 import io.swagger.annotations.Api;
18
 import io.swagger.annotations.Api;
18
 import io.swagger.annotations.ApiOperation;
19
 import io.swagger.annotations.ApiOperation;
40
     @Autowired
41
     @Autowired
41
     private TaIssueService taIssueService;
42
     private TaIssueService taIssueService;
42
 
43
 
44
+    @Autowired
45
+    private SysUserDutyService sysUserDutyService;
46
+
43
     @Autowired
47
     @Autowired
44
     ApplicationEventPublisher applicationEventPublisher;
48
     ApplicationEventPublisher applicationEventPublisher;
45
 
49
 
66
                                        @ApiParam("申请类型") @RequestParam("applyType") String applyType) throws Exception {
70
                                        @ApiParam("申请类型") @RequestParam("applyType") String applyType) throws Exception {
67
 
71
 
68
         SysUser sysUser = currentUser();
72
         SysUser sysUser = currentUser();
73
+        boolean isManager = isManager(sysUser);
69
 
74
 
70
         QueryWrapper<TaIssueApply> queryWrapper = new QueryWrapper<>();
75
         QueryWrapper<TaIssueApply> queryWrapper = new QueryWrapper<>();
71
         queryWrapper.eq("issue_id", issueId);
76
         queryWrapper.eq("issue_id", issueId);
72
         queryWrapper.eq("apply_type", applyType);
77
         queryWrapper.eq("apply_type", applyType);
73
-        queryWrapper.eq("org_id", sysUser.getOrgId());
78
+        if (!isManager) {
79
+            queryWrapper.eq("org_id", sysUser.getOrgId());
80
+        }
74
         queryWrapper.gt("status", Constants.STATUS_DELETE);
81
         queryWrapper.gt("status", Constants.STATUS_DELETE);
75
         queryWrapper.orderByDesc("create_date");
82
         queryWrapper.orderByDesc("create_date");
76
         queryWrapper.last("limit 1");
83
         queryWrapper.last("limit 1");
91
     @GetMapping("/taIssueApply")
98
     @GetMapping("/taIssueApply")
92
     public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
99
     public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
93
                              @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
100
                              @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
101
+                             @ApiParam("问题单ID") @RequestParam(value = "issueId", required = false) Integer issueId,
94
                              @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType,
102
                              @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType,
95
                              @ApiParam("问题单来源") @RequestParam(value = "sourceType", required = false) String sourceType) throws Exception {
103
                              @ApiParam("问题单来源") @RequestParam(value = "sourceType", required = false) String sourceType) throws Exception {
96
 
104
 
97
         SysUser sysUser = currentUser();
105
         SysUser sysUser = currentUser();
98
-        String orgId = Constants.ROOT_ORG.equals(sysUser.getOrgId()) ? null : sysUser.getOrgId();
106
+        String orgId = isManager(sysUser) ? null : sysUser.getOrgId();
99
 
107
 
100
         IPage<TaIssueApply> pg = new Page<>(pageNum, pageSize);
108
         IPage<TaIssueApply> pg = new Page<>(pageNum, pageSize);
101
-        IPage<TaIssueApply> result = taIssueApplyService.getPageBy(pg, applyType, orgId, sourceType);
109
+        IPage<TaIssueApply> result = taIssueApplyService.getPageBy(pg, issueId, applyType, orgId, sourceType);
102
 
110
 
103
         return ResponseBean.success(result);
111
         return ResponseBean.success(result);
104
     }
112
     }
150
 
158
 
151
         taIssueApplyService.updateById(origin);
159
         taIssueApplyService.updateById(origin);
152
 
160
 
153
-        // 清空当前申请 - 表示申请流程已走完
161
+        //
154
         taIssueService.updateApply(taIssueApply.getIssueId(), null, null);
162
         taIssueService.updateApply(taIssueApply.getIssueId(), null, null);
155
 
163
 
164
+        // 如果是销单申请
165
+        if (Constants.APPLY_END.equals(origin.getApplyType())) {
166
+            if (Constants.APPLY_STATUS_PASS.equals(taIssueApply.getVerifyStatus())) {
167
+                // 如果通过
168
+                taIssueService.updateEnd(sysUser, taIssueApply.getOrgId(), taIssueApply.getIssueId());
169
+            }
170
+        }
171
+
156
 //        if (Constants.APPLY_VERIFY.equals(origin.getApplyType())) {
172
 //        if (Constants.APPLY_VERIFY.equals(origin.getApplyType())) {
157
 //            int validateStatus = Constants.APPLY_STATUS_REJECT.equals(taIssueApply.getVerifyStatus()) ? Constants.VERIFY_REJECT : Constants.VERIFY_PASS;
173
 //            int validateStatus = Constants.APPLY_STATUS_REJECT.equals(taIssueApply.getVerifyStatus()) ? Constants.VERIFY_REJECT : Constants.VERIFY_PASS;
158
 //            taIssueService.updateValidateStatus(taIssueApply.getIssueId(), validateStatus);
174
 //            taIssueService.updateValidateStatus(taIssueApply.getIssueId(), validateStatus);

+ 1
- 0
src/main/java/com/example/civilizedcity/controller/TaIssueProcessController.java Visa fil

74
         IPage<TaIssueProcess> pg = new Page<>(pageNum, pageSize);
74
         IPage<TaIssueProcess> pg = new Page<>(pageNum, pageSize);
75
         QueryWrapper<TaIssueProcess> queryWrapper = new QueryWrapper<>();
75
         QueryWrapper<TaIssueProcess> queryWrapper = new QueryWrapper<>();
76
         queryWrapper.eq("issue_id", issueId);
76
         queryWrapper.eq("issue_id", issueId);
77
+        queryWrapper.gt("status", Constants.STATUS_DELETE);
77
         queryWrapper.orderByDesc("create_date");
78
         queryWrapper.orderByDesc("create_date");
78
         IPage<TaIssueProcess> result = taIssueProcessService.page(pg, queryWrapper);
79
         IPage<TaIssueProcess> result = taIssueProcessService.page(pg, queryWrapper);
79
 
80
 

+ 1
- 0
src/main/java/com/example/civilizedcity/mapper/TaIssueApplyMapper.java Visa fil

15
 public interface TaIssueApplyMapper  extends BaseMapper<TaIssueApply>{
15
 public interface TaIssueApplyMapper  extends BaseMapper<TaIssueApply>{
16
 
16
 
17
      IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg,
17
      IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg,
18
+                                   @Param("issueId") Integer issueId,
18
                                    @Param("applyType") String applyType,
19
                                    @Param("applyType") String applyType,
19
                                    @Param("orgId") String orgId,
20
                                    @Param("orgId") String orgId,
20
                                    @Param("sourceType") String sourceType);
21
                                    @Param("sourceType") String sourceType);

+ 5
- 1
src/main/java/com/example/civilizedcity/mapper/TaIssueMapper.java Visa fil

3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.example.civilizedcity.vo.StatVo;
5
 import com.example.civilizedcity.vo.StatVo;
6
-import org.apache.ibatis.annotations.MapKey;
7
 import org.apache.ibatis.annotations.Mapper;
6
 import org.apache.ibatis.annotations.Mapper;
8
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
9
 import com.example.civilizedcity.entity.TaIssue;
8
 import com.example.civilizedcity.entity.TaIssue;
34
      Map<String, Object> statIssueOrg(@Param("orgId") String orgId);
33
      Map<String, Object> statIssueOrg(@Param("orgId") String orgId);
35
 
34
 
36
      List<StatVo> statIssueType();
35
      List<StatVo> statIssueType();
36
+
37
+    int updateProcess(@Param("issueId") Integer issueId,
38
+                      @Param("userId") String userId,
39
+                      @Param("processNode") String processNode,
40
+                      @Param("processStatus") String processStatus);
37
 }
41
 }

+ 3
- 1
src/main/java/com/example/civilizedcity/mapper/TaOrgIssueMapper.java Visa fil

28
      TaOrgIssue getByIssueAndOrg(@Param("issueId") Integer issueId, @Param("orgId") String orgId);
28
      TaOrgIssue getByIssueAndOrg(@Param("issueId") Integer issueId, @Param("orgId") String orgId);
29
 
29
 
30
      Map<String, Object> statMaIndex(@Param("orgId") String orgId);
30
      Map<String, Object> statMaIndex(@Param("orgId") String orgId);
31
- }
31
+
32
+    int updateProcess(@Param("issueId") Integer issueId,@Param("orgId") String orgId,@Param("processStatus") String processStatus);
33
+}

+ 1
- 1
src/main/java/com/example/civilizedcity/service/TaIssueApplyService.java Visa fil

14
 
14
 
15
      void createNewApply(TaIssueApply taIssueApply, SysUser sysUser) throws Exception;
15
      void createNewApply(TaIssueApply taIssueApply, SysUser sysUser) throws Exception;
16
 
16
 
17
-     IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg, String applyType, String orgId, String sourceType);
17
+     IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg, Integer issueId, String applyType, String orgId, String sourceType);
18
  }
18
  }

+ 3
- 2
src/main/java/com/example/civilizedcity/service/TaIssueService.java Visa fil

1
 package com.example.civilizedcity.service;
1
 package com.example.civilizedcity.service;
2
 
2
 
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
-import com.baomidou.mybatisplus.extension.service.IService;
5
 import com.example.civilizedcity.entity.SysUser;
4
 import com.example.civilizedcity.entity.SysUser;
6
 import com.example.civilizedcity.entity.TaIssue;
5
 import com.example.civilizedcity.entity.TaIssue;
7
 import com.example.civilizedcity.entity.TaPerson;
6
 import com.example.civilizedcity.entity.TaPerson;
23
      void updateApply(Integer issueId, String applyType, Integer applyId);
22
      void updateApply(Integer issueId, String applyType, Integer applyId);
24
 
23
 
25
      List<StatVo> statMaIndex(SysUser user, TaPerson person, String duty);
24
      List<StatVo> statMaIndex(SysUser user, TaPerson person, String duty);
26
- }
25
+
26
+    void updateEnd(SysUser sysUser, String orgId, Integer issueId);
27
+}

+ 1
- 1
src/main/java/com/example/civilizedcity/service/impl/SysResourceServiceImpl.java Visa fil

20
 
20
 
21
     @Override
21
     @Override
22
     public List<SysResource> getByUser(String userId) {
22
     public List<SysResource> getByUser(String userId) {
23
-        if (userId == Constants.ROOT_ID) {
23
+        if (Constants.ROOT_ID.equals(userId)) {
24
             QueryWrapper<SysResource> queryWrapper = new QueryWrapper<>();
24
             QueryWrapper<SysResource> queryWrapper = new QueryWrapper<>();
25
             queryWrapper.gt("status", Constants.STATUS_DELETE);
25
             queryWrapper.gt("status", Constants.STATUS_DELETE);
26
             return list(queryWrapper);
26
             return list(queryWrapper);

+ 1
- 1
src/main/java/com/example/civilizedcity/service/impl/SysRoleServiceImpl.java Visa fil

21
 
21
 
22
     @Override
22
     @Override
23
     public List<SysRole> getByUser(String userId) {
23
     public List<SysRole> getByUser(String userId) {
24
-        if (userId == Constants.ROOT_ID) {
24
+        if (Constants.ROOT_ID.equals(userId)) {
25
             QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
25
             QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
26
             queryWrapper.gt("status", Constants.STATUS_DELETE);
26
             queryWrapper.gt("status", Constants.STATUS_DELETE);
27
             return list(queryWrapper);
27
             return list(queryWrapper);

+ 1
- 0
src/main/java/com/example/civilizedcity/service/impl/SysUserDutyServiceImpl.java Visa fil

1
 package com.example.civilizedcity.service.impl;
1
 package com.example.civilizedcity.service.impl;
2
 
2
 
3
+import com.example.civilizedcity.common.Constants;
3
 import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.stereotype.Service;
5
 import org.springframework.stereotype.Service;
5
 import com.example.civilizedcity.entity.SysUserDuty;
6
 import com.example.civilizedcity.entity.SysUserDuty;

+ 2
- 4
src/main/java/com/example/civilizedcity/service/impl/TaIssueApplyServiceImpl.java Visa fil

49
                 throw new Exception("未找到交办单位问题单");
49
                 throw new Exception("未找到交办单位问题单");
50
             }
50
             }
51
 
51
 
52
-            // 标记在申请中
53
-            taOrgIssue.setResult(taIssueApply.getApplyType());
54
             taOrgIssueMapper.updateById(taOrgIssue);
52
             taOrgIssueMapper.updateById(taOrgIssue);
55
         }
53
         }
56
 
54
 
73
     }
71
     }
74
 
72
 
75
     @Override
73
     @Override
76
-    public IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg, String applyType, String orgId, String sourceType) {
77
-        return baseMapper.getPageBy(pg, applyType, orgId, sourceType);
74
+    public IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg, Integer issueId, String applyType, String orgId, String sourceType) {
75
+        return baseMapper.getPageBy(pg, issueId, applyType, orgId, sourceType);
78
     }
76
     }
79
 }
77
 }

+ 27
- 1
src/main/java/com/example/civilizedcity/service/impl/TaIssueServiceImpl.java Visa fil

2
 
2
 
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.example.civilizedcity.common.Constants;
4
 import com.example.civilizedcity.common.Constants;
5
-import com.example.civilizedcity.common.StringUtils;
6
 import com.example.civilizedcity.entity.SysUser;
5
 import com.example.civilizedcity.entity.SysUser;
6
+import com.example.civilizedcity.entity.TaIssueProcess;
7
 import com.example.civilizedcity.entity.TaPerson;
7
 import com.example.civilizedcity.entity.TaPerson;
8
 import com.example.civilizedcity.mapper.TaFeedbackMapper;
8
 import com.example.civilizedcity.mapper.TaFeedbackMapper;
9
+import com.example.civilizedcity.mapper.TaIssueProcessMapper;
9
 import com.example.civilizedcity.mapper.TaOrgIssueMapper;
10
 import com.example.civilizedcity.mapper.TaOrgIssueMapper;
10
 import com.example.civilizedcity.vo.StatVo;
11
 import com.example.civilizedcity.vo.StatVo;
11
 import org.springframework.beans.factory.annotation.Autowired;
12
 import org.springframework.beans.factory.annotation.Autowired;
14
 import com.example.civilizedcity.mapper.TaIssueMapper;
15
 import com.example.civilizedcity.mapper.TaIssueMapper;
15
 import com.example.civilizedcity.service.TaIssueService;
16
 import com.example.civilizedcity.service.TaIssueService;
16
 
17
 
18
+import java.time.LocalDateTime;
17
 import java.util.ArrayList;
19
 import java.util.ArrayList;
18
 import java.util.List;
20
 import java.util.List;
19
 import java.util.Map;
21
 import java.util.Map;
33
     @Autowired
35
     @Autowired
34
     TaFeedbackMapper taFeedbackMapper;
36
     TaFeedbackMapper taFeedbackMapper;
35
 
37
 
38
+    @Autowired
39
+    TaIssueProcessMapper taIssueProcessMapper;
40
+
36
     @Override
41
     @Override
37
     public IPage<TaIssue> getPageBy(IPage<TaIssue> pg, String orgId) {
42
     public IPage<TaIssue> getPageBy(IPage<TaIssue> pg, String orgId) {
38
         if (null == orgId) {
43
         if (null == orgId) {
100
         return result;
105
         return result;
101
     }
106
     }
102
 
107
 
108
+    @Override
109
+    public void updateEnd(SysUser sysUser, String orgId, Integer issueId) {
110
+        // 问题单完成
111
+        baseMapper.updateProcess(issueId, sysUser.getUserId(), Constants.PROCESS_END, Constants.PROCESS_END);
112
+
113
+        // 机构问题单完成
114
+        taOrgIssueMapper.updateProcess(issueId, orgId, Constants.PROCESS_END);
115
+
116
+        // 流程完成
117
+        TaIssueProcess taIssueProcess = new TaIssueProcess();
118
+        taIssueProcess.setIssueId(issueId);
119
+        taIssueProcess.setOrgId(orgId);
120
+        taIssueProcess.setProcessNode(Constants.PROCESS_END);
121
+        taIssueProcess.setProcessStatus(Constants.PROCESS_END);
122
+        taIssueProcess.setCreateUser(sysUser.getUserId());
123
+        taIssueProcess.setCreateDate(LocalDateTime.now());
124
+        taIssueProcess.setStatus(Constants.STATUS_NORMAL);
125
+        taIssueProcessMapper.insert(taIssueProcess);
126
+
127
+    }
128
+
103
     Integer getStatValueBy(Object v, Integer def) {
129
     Integer getStatValueBy(Object v, Integer def) {
104
         if (null == v) return def;
130
         if (null == v) return def;
105
         return Integer.valueOf(v.toString());
131
         return Integer.valueOf(v.toString());

+ 3
- 0
src/main/resources/mapper/TaIssueApplyMapper.xml Visa fil

13
                 INNER JOIN ta_issue s ON t.issue_id = s.issue_id
13
                 INNER JOIN ta_issue s ON t.issue_id = s.issue_id
14
         WHERE
14
         WHERE
15
             t.`status` &gt; -1
15
             t.`status` &gt; -1
16
+        <if test="issueId != null">
17
+            AND t.issue_id = #{issueId}
18
+        </if>
16
         <if test="applyType != null and applyType != ''">
19
         <if test="applyType != null and applyType != ''">
17
             AND t.apply_type = #{applyType}
20
             AND t.apply_type = #{applyType}
18
         </if>
21
         </if>

+ 9
- 0
src/main/resources/mapper/TaIssueMapper.xml Visa fil

15
         WHERE
15
         WHERE
16
             t.issue_id = #{issueId}
16
             t.issue_id = #{issueId}
17
     </update>
17
     </update>
18
+    <update id="updateProcess">
19
+        UPDATE ta_issue t
20
+        SET t.process_node = #{processNode},
21
+            t.process_status = #{processStatus},
22
+            t.update_user = #{userId},
23
+            t.update_date = now( )
24
+        WHERE
25
+            t.issue_id = #{issueId}
26
+    </update>
18
 
27
 
19
     <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaIssue">
28
     <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaIssue">
20
         SELECT
29
         SELECT

+ 7
- 0
src/main/resources/mapper/TaOrgIssueMapper.xml Visa fil

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 
3
 
4
 <mapper namespace="com.example.civilizedcity.mapper.TaOrgIssueMapper">
4
 <mapper namespace="com.example.civilizedcity.mapper.TaOrgIssueMapper">
5
+    <update id="updateProcess">
6
+        UPDATE ta_org_issue t
7
+        SET t.process_status = #{processStatus}
8
+        WHERE
9
+            t.org_id = #{orgId}
10
+          AND t.issue_id = #{issueId}
11
+    </update>
5
 
12
 
6
     <select id="getIssuePageBy" resultType="com.example.civilizedcity.entity.TaIssue">
13
     <select id="getIssuePageBy" resultType="com.example.civilizedcity.entity.TaIssue">
7
         SELECT
14
         SELECT