代码优化!

This commit is contained in:
易焱 2019-08-07 19:54:41 +08:00
parent 38a308bca9
commit 969018bafd
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ public class BssEmployeeController {
User user = ShiroUtil.getSubject(); User user = ShiroUtil.getSubject();
List<BssDept> bssDepts = null; List<BssDept> bssDepts = null;
if (AdminConst.ADMIN_PLATFORM_ID != user.getBssPlatform().getId()) { if (AdminConst.ADMIN_PLATFORM_ID.equals(user.getBssPlatform().getId())) {
bssDepts = bssDeptService.findBssDeptByBssPlatformAndId(user.getBssPlatform()); bssDepts = bssDeptService.findBssDeptByBssPlatformAndId(user.getBssPlatform());
} }
Page<BssEmployee> list = bssEmployeeService.getPageList(bssDepts,bssEmployee); Page<BssEmployee> list = bssEmployeeService.getPageList(bssDepts,bssEmployee);

View File

@ -111,7 +111,7 @@ public class UserServiceImpl implements UserService {
preList.add(in); preList.add(in);
} }
// 1 为财务帮平台超级账号 // 1 为财务帮平台超级账号
if (AdminConst.ADMIN_PLATFORM_ID != user.getBssPlatform().getId()) { if (AdminConst.ADMIN_PLATFORM_ID.equals(user.getBssPlatform().getId())) {
BssPlatform bssPlatform = user.getBssPlatform(); BssPlatform bssPlatform = user.getBssPlatform();
Join<User, BssPlatform> join = root.join("bssPlatform", JoinType.INNER); Join<User, BssPlatform> join = root.join("bssPlatform", JoinType.INNER);
Predicate eq = cb.equal(join.get("id").as(Long.class),bssPlatform.getId()); Predicate eq = cb.equal(join.get("id").as(Long.class),bssPlatform.getId());