代码优化
This commit is contained in:
parent
42941d9e8a
commit
057a45d065
@ -5,6 +5,7 @@ import com.cdzy.common.enums.Code;
|
||||
import com.cdzy.common.ex.EbikeException;
|
||||
import com.cdzy.common.model.dto.ResGPSDto;
|
||||
import com.cdzy.common.model.request.PageParam;
|
||||
import com.cdzy.common.model.response.CommonEbikeRole;
|
||||
import com.cdzy.common.model.response.CommonStaffInfo;
|
||||
import com.cdzy.common.model.response.JsonResult;
|
||||
import com.cdzy.operations.model.dto.EbikeCloseOrderDto;
|
||||
@ -133,7 +134,7 @@ public class EbikeStatisticsController {
|
||||
boolean isSuperAdmin = Optional.ofNullable(staffInfo.getRoles())
|
||||
.orElse(Collections.emptyList())
|
||||
.stream()
|
||||
.anyMatch(role -> "super_admin".equals(role.getRoleCode()));
|
||||
.anyMatch(CommonEbikeRole::getSysAdmin);
|
||||
// 判断是否超级管理员
|
||||
if (!isSuperAdmin) {
|
||||
dto.setOperatorId(staffInfo.getOperatorId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user