#4 添加面登录免接口初始化

Merged
tangzp merged 1 commits from dev into master 8 months ago
  1. +1
    -1
      mztb/src/main/java/cc/smtweb/biz/mztb/web/MztbStartedListener.java
  2. +4
    -0
      mztb/src/main/java/cc/smtweb/biz/mztb/web/controller/MztbController.java

+ 1
- 1
mztb/src/main/java/cc/smtweb/biz/mztb/web/MztbStartedListener.java View File

@@ -26,7 +26,7 @@ public class MztbStartedListener implements IStartListener {
SwConsts.SysParam.RUN_PROJECTS = "bpm,mztb"; SwConsts.SysParam.RUN_PROJECTS = "bpm,mztb";
SwConsts.SysParam.SYS_DEBUG = false; SwConsts.SysParam.SYS_DEBUG = false;
SwConsts.SysParam.ENABLE_TRANSPORT_ENCRYPT =false; SwConsts.SysParam.ENABLE_TRANSPORT_ENCRYPT =false;
MztbNoLogin.init();
SessionUtil.addNoLoginUri("/mztb/*");


} }




+ 4
- 0
mztb/src/main/java/cc/smtweb/biz/mztb/web/controller/MztbController.java View File

@@ -52,6 +52,7 @@ public class MztbController {
log.info("请求携带需要更新的机构数据为空!"); log.info("请求携带需要更新的机构数据为空!");
return R.success(); return R.success();
} }
log.debug("获取到数据:"+updatePartyList.size()+"条,准备处理机构数据。。。。。");


// 批量处理的数据 // 批量处理的数据
List<PartyInfo> partysUpdateList = new ArrayList<>(); List<PartyInfo> partysUpdateList = new ArrayList<>();
@@ -178,6 +179,7 @@ public class MztbController {
userStatuList.removeAll(userStatuListExist); userStatuList.removeAll(userStatuListExist);
ptIdList.removeAll(ptIdListExist); ptIdList.removeAll(ptIdListExist);


log.debug("数据构建完成,向数据库写入数据");
instance.doTrans(() -> { instance.doTrans(() -> {
// 处理新增或者修改的数据 // 处理新增或者修改的数据
instance.findDao(PartyInfo.class).batchInsertEntity(partysInsertList); instance.findDao(PartyInfo.class).batchInsertEntity(partysInsertList);
@@ -188,6 +190,7 @@ public class MztbController {
instance.findDao(Dept.class).batchInsertEntity(deptList); instance.findDao(Dept.class).batchInsertEntity(deptList);
instance.findDao(UserRole.class).batchInsertEntity(userRoleList); instance.findDao(UserRole.class).batchInsertEntity(userRoleList);
instance.findDao(UserStatu.class).batchInsertEntity(userStatuList); instance.findDao(UserStatu.class).batchInsertEntity(userStatuList);
log.debug("数据写入完成-----");


// 将新增的机构 加入角色组的 机构字段 // 将新增的机构 加入角色组的 机构字段
if (ptIdList.size() > 0) { if (ptIdList.size() > 0) {
@@ -202,6 +205,7 @@ public class MztbController {
UserRoleCache.getInstance().putList(userRoleList); UserRoleCache.getInstance().putList(userRoleList);
UserStatuCache.getInstance().putList(userStatuList); UserStatuCache.getInstance().putList(userStatuList);
RoleGroupCache.getInstance().refresh(); RoleGroupCache.getInstance().refresh();
log.debug("机构缓存刷新完成!");
}); });
return R.success(); return R.success();
} }


Loading…
Cancel
Save