代码优化!
This commit is contained in:
parent
38a308bca9
commit
969018bafd
|
|
@ -54,7 +54,7 @@ public class BssEmployeeController {
|
|||
|
||||
User user = ShiroUtil.getSubject();
|
||||
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());
|
||||
}
|
||||
Page<BssEmployee> list = bssEmployeeService.getPageList(bssDepts,bssEmployee);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class UserServiceImpl implements UserService {
|
|||
preList.add(in);
|
||||
}
|
||||
// 1 为财务帮平台超级账号
|
||||
if (AdminConst.ADMIN_PLATFORM_ID != user.getBssPlatform().getId()) {
|
||||
if (AdminConst.ADMIN_PLATFORM_ID.equals(user.getBssPlatform().getId())) {
|
||||
BssPlatform bssPlatform = user.getBssPlatform();
|
||||
Join<User, BssPlatform> join = root.join("bssPlatform", JoinType.INNER);
|
||||
Predicate eq = cb.equal(join.get("id").as(Long.class),bssPlatform.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue