|
@@ -89,16 +89,10 @@ public class GameAuthRoleServiceImpl extends ServiceImpl<GameAuthRoleMapper, Gam
|
|
|
|
|
|
@Override
|
|
|
public boolean isCustomer() {
|
|
|
- //开后门, 开发调试问题的时候用
|
|
|
- if (SecurityUtil.isAdmin()) {
|
|
|
- List<Long> backDoorIds = Arrays.asList(123L, 220L);
|
|
|
- if (backDoorIds.contains(SecurityUtil.getUserId())) {
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
- }
|
|
|
return super.count(new LambdaQueryWrapper<GameAuthRole>()
|
|
|
- .eq(GameAuthRole::getAuthType, GameAuthEnum.CUSTOMER.getValue())
|
|
|
.eq(GameAuthRole::getUserId, SecurityUtil.getUserId())
|
|
|
+ .and(qw -> qw.eq(GameAuthRole::getAuthType, GameAuthEnum.CUSTOMER.getValue())
|
|
|
+ .or().eq(GameAuthRole::getCustomerPower, Boolean.TRUE))
|
|
|
) > 0;
|
|
|
}
|
|
|
|