|
@@ -9,7 +9,6 @@ import com.google.gson.reflect.TypeToken;
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
-//import com.qmth.boot.core.cache.service.CacheService;
|
|
|
|
import com.qmth.sop.business.bean.dto.*;
|
|
import com.qmth.sop.business.bean.dto.*;
|
|
import com.qmth.sop.business.bean.params.LoginParam;
|
|
import com.qmth.sop.business.bean.params.LoginParam;
|
|
import com.qmth.sop.business.bean.result.*;
|
|
import com.qmth.sop.business.bean.result.*;
|
|
@@ -82,8 +81,8 @@ public class SysController {
|
|
@Resource
|
|
@Resource
|
|
SysRoleService sysRoleService;
|
|
SysRoleService sysRoleService;
|
|
|
|
|
|
-// @Resource
|
|
|
|
-// CacheService cacheService;
|
|
|
|
|
|
+ // @Resource
|
|
|
|
+ // CacheService cacheService;
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
TBServiceService tbServiceService;
|
|
TBServiceService tbServiceService;
|
|
@@ -484,25 +483,25 @@ public class SysController {
|
|
@ApiResponses({ @ApiResponse(code = 200, message = "返回信息", response = Object.class) })
|
|
@ApiResponses({ @ApiResponse(code = 200, message = "返回信息", response = Object.class) })
|
|
public Result cacheClear(@ApiParam(value = "缓存值") @RequestParam(required = false) String endpoint,
|
|
public Result cacheClear(@ApiParam(value = "缓存值") @RequestParam(required = false) String endpoint,
|
|
@ApiParam(value = "缓存key") @RequestParam(required = false) String key) {
|
|
@ApiParam(value = "缓存key") @RequestParam(required = false) String key) {
|
|
-// if (Objects.nonNull(endpoint) && Objects.nonNull(key)) {
|
|
|
|
-// cacheService.evict(endpoint, key);
|
|
|
|
-// } else if (Objects.nonNull(endpoint)) {
|
|
|
|
-// cacheService.clear(endpoint);
|
|
|
|
-// } else {
|
|
|
|
-// cacheService.clear(SystemConstant.USER_ACCOUNT_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.SYS_CONFIG_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.USER_OAUTH_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.ORG_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.PRIVILEGE_URL_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.ROLE_PRIVILEGE_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.USER_ROLE_PRIVILEGE_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.FORM_WIDGET_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.TABLE_PROP_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.ROLE_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.USER_MENU_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.SCHOOL_CACHE);
|
|
|
|
-// cacheService.clear(SystemConstant.SCHOOL_CODE_CACHE);
|
|
|
|
-// }
|
|
|
|
|
|
+ // if (Objects.nonNull(endpoint) && Objects.nonNull(key)) {
|
|
|
|
+ // cacheService.evict(endpoint, key);
|
|
|
|
+ // } else if (Objects.nonNull(endpoint)) {
|
|
|
|
+ // cacheService.clear(endpoint);
|
|
|
|
+ // } else {
|
|
|
|
+ // cacheService.clear(SystemConstant.USER_ACCOUNT_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.SYS_CONFIG_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.USER_OAUTH_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.ORG_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.PRIVILEGE_URL_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.ROLE_PRIVILEGE_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.USER_ROLE_PRIVILEGE_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.FORM_WIDGET_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.TABLE_PROP_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.ROLE_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.USER_MENU_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.SCHOOL_CACHE);
|
|
|
|
+ // cacheService.clear(SystemConstant.SCHOOL_CODE_CACHE);
|
|
|
|
+ // }
|
|
return ResultUtil.ok(true);
|
|
return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -665,6 +664,16 @@ public class SysController {
|
|
@ApiParam(value = "服务单元名称") @RequestParam(required = false) String name) {
|
|
@ApiParam(value = "服务单元名称") @RequestParam(required = false) String name) {
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(requestUser.getId());
|
|
|
|
+ //TODO 财务角色暂时处理
|
|
|
|
+ List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(requestUser.getId());
|
|
|
|
+ if (!CollectionUtils.isEmpty(sysRoleList)) {
|
|
|
|
+ List<SysRole> sysRoleTempList = sysRoleList.stream()
|
|
|
|
+ .filter(s -> Objects.nonNull(s.getName()) && s.getName().trim().contains("财务"))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ if (!CollectionUtils.isEmpty(sysRoleTempList)) {
|
|
|
|
+ dpr.setHasAdmin(true);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return ResultUtil.ok(tbServiceService.queryServiceUnit(type, statusList, name, dpr));
|
|
return ResultUtil.ok(tbServiceService.queryServiceUnit(type, statusList, name, dpr));
|
|
}
|
|
}
|
|
|
|
|