|
|
|
@ -18,8 +18,10 @@ import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.annotation.AnnoIgnoreLog;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseThreadLocal;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
@ -27,6 +29,7 @@ import cn.estsh.i3plus.pojo.model.common.CloudPagerModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.common.ImppSmsContent;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.license.ImppLicense;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.SysLoginModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.SysRoleModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.UserDetailModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.UserDetailPagerModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
@ -60,6 +63,7 @@ import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
@ -162,6 +166,9 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysSmsSendRecordController smsSendRecordController;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysRoleService sysRoleService;
|
|
|
|
|
|
|
|
|
|
private Cache<String, Integer> unsavedLocaleResSwitch = CacheBuilder.newBuilder()
|
|
|
|
|
.maximumSize(1)
|
|
|
|
|
.expireAfterWrite(1, TimeUnit.MINUTES)
|
|
|
|
@ -910,4 +917,36 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
public ResultBean sendSms(@RequestBody ImppSmsContent imppSmsContent){
|
|
|
|
|
return smsSendRecordController.send(imppSmsContent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/queryAllRoleRefUser")
|
|
|
|
|
@ApiOperation(value = "在所有角色中查询角色及关联的人员信息", notes = "查询角色及关联的人员信息")
|
|
|
|
|
public BaseResultBean queryAllRoleRefUser(@RequestBody SysRoleModel sysRoleModel) {
|
|
|
|
|
try {
|
|
|
|
|
ListPager result = null;
|
|
|
|
|
List<SysRole> roleList = null;
|
|
|
|
|
SysRole sysRole = sysRoleModel.getSysRole();
|
|
|
|
|
Pager pager = sysRoleModel.getPager();
|
|
|
|
|
if (ObjectUtils.isEmpty(sysRole)) {
|
|
|
|
|
sysRole = new SysRole();
|
|
|
|
|
}
|
|
|
|
|
if (ObjectUtils.isEmpty(pager)) {
|
|
|
|
|
pager = new Pager();
|
|
|
|
|
}
|
|
|
|
|
//过滤SysRefUserRole
|
|
|
|
|
roleList = sysRoleService.findAllByRoleProperty(sysRole);
|
|
|
|
|
if (ObjectUtils.isEmpty(roleList)){
|
|
|
|
|
return ResultBean.success("操作成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<Long> roleIdList = roleList.stream().map(el -> el.getId()).collect(Collectors.toList());
|
|
|
|
|
result = personnelService.findSysRefUserRoleByRoleIds(roleIdList, pager);
|
|
|
|
|
return ResultBean.success("操作成功").setListPager(result).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|