glj-代码提交
This commit is contained in:
parent
688595e8c8
commit
278c6f7f20
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue