glj-代码提交

This commit is contained in:
glj 2023-05-08 14:11:58 +08:00
parent 688595e8c8
commit 278c6f7f20
2 changed files with 10 additions and 4 deletions

View File

@ -81,9 +81,17 @@ public class DisasterInfoController {
public R<IPage<CallForHelpVo>> list(CallForHelpVo CallForHelpVo, Query query) {
CallForHelpVo userRole = disasterInfoService.getByNameRole("admin");
String userRole1 = AuthUtil.getUserRole();
if (CallForHelpVo.getChiefIdEquals()!=null){
if (userRole1.equals("TENANT_ADMIN") && !CallForHelpVo.getChiefIdEquals().equals(userRole.getRoleId())){
CallForHelpVo.setChiefIdEquals(null);
}
}else {
if (userRole1.equals("TENANT_ADMIN")){
CallForHelpVo.setChiefIdEquals(null);
}
}
IPage<CallForHelpVo> pages = disasterInfoService.page(Condition.getPage(query), CallForHelpVo);
return R.data(pages);
}

View File

@ -153,8 +153,6 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
@Override
public IPage<CallForHelpVo> page(IPage<CallForHelpVo> page, CallForHelpVo callForHelpVo) {
return page.setRecords(this.baseMapper.page(page, callForHelpVo));
}