2 次程式碼提交

共有 2 個檔案被更改,包括 38 行新增6 行删除
分割檢視
  1. +12
    -6
      mztb/src/main/java/cc/smtweb/biz/mztb/web/controller/MztbController.java
  2. +26
    -0
      mztb/src/main/java/cc/smtweb/biz/mztb/web/task/FlushRedisTask.java

+ 12
- 6
mztb/src/main/java/cc/smtweb/biz/mztb/web/controller/MztbController.java 查看文件

@@ -203,12 +203,18 @@ public class MztbController {
+ " SET srg_party_id = CONCAT(srg_party_id,',' ,'" + String.join(",", ptIdList) + "') where srg_id = ? ", 927515588790587392L); // 角色组填报员
}
// 将机构、用户信息放入缓存,或者刷新缓存
PartyCache.getInstance().putList(sysPartyList);
UserCache.getInstance().putList(userList);
UserPartyCache.getInstance().putList(userPartyList);
DeptCache.getInstance().putList(deptList);
UserRoleCache.getInstance().putList(userRoleList);
UserStatuCache.getInstance().putList(userStatuList);
// PartyCache.getInstance().putList(sysPartyList);
PartyCache.getInstance().refresh();
// UserCache.getInstance().putList(userList);
UserCache.getInstance().refresh();
// UserPartyCache.getInstance().putList(userPartyList);
UserPartyCache.getInstance().refresh();
// DeptCache.getInstance().putList(deptList);
DeptCache.getInstance().refresh();
// UserRoleCache.getInstance().putList(userRoleList);
UserRoleCache.getInstance().refresh();
// UserStatuCache.getInstance().putList(userStatuList);
UserStatuCache.getInstance().refresh();
RoleGroupCache.getInstance().refresh();
log.debug("机构缓存刷新完成!");
});


+ 26
- 0
mztb/src/main/java/cc/smtweb/biz/mztb/web/task/FlushRedisTask.java 查看文件

@@ -0,0 +1,26 @@
package cc.smtweb.biz.mztb.web.task;

import cc.smtweb.system.bpm.util.UtilLogger;
import cc.smtweb.system.bpm.web.sys.base.job.BaseJob;
import cc.smtweb.system.bpm.web.sys.user.dept.DeptCache;
import cc.smtweb.system.bpm.web.sys.user.party.PartyCache;
import cc.smtweb.system.bpm.web.sys.user.role.group.RoleGroupCache;
import cc.smtweb.system.bpm.web.sys.user.user.UserCache;
import cc.smtweb.system.bpm.web.sys.user.user.UserPartyCache;
import cc.smtweb.system.bpm.web.sys.user.user.UserRoleCache;
import cc.smtweb.system.bpm.web.sys.user.user.UserStatuCache;

public class FlushRedisTask extends BaseJob {
@Override
protected String work() {
PartyCache.getInstance().refresh();
UserCache.getInstance().refresh();
UserPartyCache.getInstance().refresh();
DeptCache.getInstance().refresh();
UserRoleCache.getInstance().refresh();
UserStatuCache.getInstance().refresh();
RoleGroupCache.getInstance().refresh();
UtilLogger.info("定时任务刷新缓存完成。。");
return null;
}
}

Loading…
取消
儲存