Browse Source

客户端wbs树排序缓存

liuyc 1 year ago
parent
commit
c2b9e31ba5

+ 7 - 3
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1355,10 +1355,14 @@ public class InformationWriteQueryController extends BladeController {
     public R<Boolean> diySort(@RequestBody DiySortVO vo) {
         List<String> sortLists = vo.getSortList();
         boolean b = wbsTreeContractClient.diySort(sortLists);
-        if (sortLists != null) {
-            WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(sortLists.get(0));
+        if (sortLists != null && b) {
             //获取父节点信息
-            informationQueryService.AsyncWbsTree(needCopyNode.getParentId() + "", needCopyNode.getParentId() + "", needCopyNode.getContractId(), "", "1");
+            WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(sortLists.get(0));
+
+            //更新Redis缓存
+            if (needCopyNode != null && ObjectUtil.isNotEmpty(needCopyNode.getContractId())) {
+                informationQueryService.delAsyncWbsTree(needCopyNode.getContractId());
+            }
         }
         return R.status(b);
     }