Commit a7252639efe250f6de9cd326da15d1bf998f529a
Merge remote-tracking branch 'origin/dev' into dev
Showing
6 changed files
with
40 additions
and
0 deletions
urbanops-module-workorder/pom.xml
| ... | ... | @@ -143,6 +143,10 @@ |
| 143 | 143 | <version>${revision}</version> |
| 144 | 144 | <scope>compile</scope> |
| 145 | 145 | </dependency> |
| 146 | + <dependency> | |
| 147 | + <groupId>com.zteits.boot</groupId> | |
| 148 | + <artifactId>urbanops-spring-boot-starter-protection</artifactId> | |
| 149 | + </dependency> | |
| 146 | 150 | </dependencies> |
| 147 | 151 | |
| 148 | 152 | </project> | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderAIController.java
| ... | ... | @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.workorder.controller.app.garden; |
| 2 | 2 | |
| 3 | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.util.object.ObjectUtils; |
| 5 | +import com.zteits.urbanops.framework.idempotent.core.annotation.Idempotent; | |
| 6 | +import com.zteits.urbanops.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; | |
| 5 | 7 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 6 | 8 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderAIBuzStatus; |
| 7 | 9 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderInspectorBuzStatus; |
| ... | ... | @@ -77,6 +79,11 @@ public class AppGardenWorkOrderAIController { |
| 77 | 79 | @PostMapping("/universalApproval") |
| 78 | 80 | @AutoUpdateWorkerOrderAIBuzStatus |
| 79 | 81 | @Transactional(rollbackFor = Exception.class) |
| 82 | + @Idempotent( | |
| 83 | + timeout = 5, | |
| 84 | + message = "请勿重复提交!", | |
| 85 | + keyResolver = DefaultIdempotentKeyResolver.class | |
| 86 | + ) | |
| 80 | 87 | //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:update')") |
| 81 | 88 | public CommonResult<Boolean> universalApproval(@Valid @RequestBody AppUniversalApprovalReqVO reqVO) { |
| 82 | 89 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderController.java
| ... | ... | @@ -4,6 +4,8 @@ import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 6 | 6 | import com.zteits.urbanops.framework.common.util.object.ObjectUtils; |
| 7 | +import com.zteits.urbanops.framework.idempotent.core.annotation.Idempotent; | |
| 8 | +import com.zteits.urbanops.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; | |
| 7 | 9 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; |
| 8 | 10 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 9 | 11 | import com.zteits.urbanops.module.garden.dto.road.RoadReqDTO; |
| ... | ... | @@ -35,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional; |
| 35 | 37 | import org.springframework.web.bind.annotation.*; |
| 36 | 38 | |
| 37 | 39 | import java.util.List; |
| 40 | +import java.util.concurrent.TimeUnit; | |
| 38 | 41 | |
| 39 | 42 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 40 | 43 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; |
| ... | ... | @@ -252,6 +255,11 @@ public class AppGardenWorkOrderController { |
| 252 | 255 | @PostMapping("/universalApproval") |
| 253 | 256 | @AutoUpdateWorkerOrderBuzStatus |
| 254 | 257 | @Transactional(rollbackFor = Exception.class) |
| 258 | + @Idempotent( | |
| 259 | + timeout = 5, | |
| 260 | + message = "请勿重复提交!", | |
| 261 | + keyResolver = DefaultIdempotentKeyResolver.class | |
| 262 | + ) | |
| 255 | 263 | //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:update')") |
| 256 | 264 | public CommonResult<Boolean> universalApproval(@Valid @RequestBody AppUniversalApprovalReqVO reqVO) { |
| 257 | 265 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderInspectorController.java
| ... | ... | @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.workorder.controller.app.garden; |
| 2 | 2 | |
| 3 | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.util.object.ObjectUtils; |
| 5 | +import com.zteits.urbanops.framework.idempotent.core.annotation.Idempotent; | |
| 6 | +import com.zteits.urbanops.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; | |
| 5 | 7 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 6 | 8 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderInspectorBuzStatus; |
| 7 | 9 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderUniversalBuzStatus; |
| ... | ... | @@ -78,6 +80,11 @@ public class AppGardenWorkOrderInspectorController { |
| 78 | 80 | @PostMapping("/universalApproval") |
| 79 | 81 | @AutoUpdateWorkerOrderInspectorBuzStatus |
| 80 | 82 | @Transactional(rollbackFor = Exception.class) |
| 83 | + @Idempotent( | |
| 84 | + timeout = 5, | |
| 85 | + message = "请勿重复提交!", | |
| 86 | + keyResolver = DefaultIdempotentKeyResolver.class | |
| 87 | + ) | |
| 81 | 88 | //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:update')") |
| 82 | 89 | public CommonResult<Boolean> universalApproval(@Valid @RequestBody AppUniversalApprovalReqVO reqVO) { |
| 83 | 90 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderRegionMgrController.java
| ... | ... | @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.workorder.controller.app.garden; |
| 2 | 2 | |
| 3 | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.util.object.ObjectUtils; |
| 5 | +import com.zteits.urbanops.framework.idempotent.core.annotation.Idempotent; | |
| 6 | +import com.zteits.urbanops.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; | |
| 5 | 7 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 6 | 8 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderBuzStatus; |
| 7 | 9 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.common.AppUniversalApprovalReqVO; |
| ... | ... | @@ -73,6 +75,11 @@ public class AppGardenWorkOrderRegionMgrController { |
| 73 | 75 | @PostMapping("/universalApproval") |
| 74 | 76 | @AutoUpdateWorkerOrderBuzStatus |
| 75 | 77 | @Transactional(rollbackFor = Exception.class) |
| 78 | + @Idempotent( | |
| 79 | + timeout = 5, | |
| 80 | + message = "请勿重复提交!", | |
| 81 | + keyResolver = DefaultIdempotentKeyResolver.class | |
| 82 | + ) | |
| 76 | 83 | //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:update')") |
| 77 | 84 | public CommonResult<Boolean> universalApproval(@Valid @RequestBody AppUniversalApprovalReqVO reqVO) { |
| 78 | 85 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderUniversalController.java
| ... | ... | @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.workorder.controller.app.garden; |
| 2 | 2 | |
| 3 | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.util.object.ObjectUtils; |
| 5 | +import com.zteits.urbanops.framework.idempotent.core.annotation.Idempotent; | |
| 6 | +import com.zteits.urbanops.framework.idempotent.core.keyresolver.impl.DefaultIdempotentKeyResolver; | |
| 5 | 7 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 6 | 8 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderBuzStatus; |
| 7 | 9 | import com.zteits.urbanops.module.workorder.annotation.AutoUpdateWorkerOrderUniversalBuzStatus; |
| ... | ... | @@ -74,6 +76,11 @@ public class AppGardenWorkOrderUniversalController { |
| 74 | 76 | @PostMapping("/universalApproval") |
| 75 | 77 | @AutoUpdateWorkerOrderUniversalBuzStatus |
| 76 | 78 | @Transactional(rollbackFor = Exception.class) |
| 79 | + @Idempotent( | |
| 80 | + timeout = 5, | |
| 81 | + message = "请勿重复提交!", | |
| 82 | + keyResolver = DefaultIdempotentKeyResolver.class | |
| 83 | + ) | |
| 77 | 84 | //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:update')") |
| 78 | 85 | public CommonResult<Boolean> universalApproval(@Valid @RequestBody AppUniversalApprovalReqVO reqVO) { |
| 79 | 86 | ... | ... |