|
@@ -44,13 +44,16 @@ public class UserRoleController extends BaseLoginController {
|
|
|
* @throws Exception
|
|
* @throws Exception
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
|
- public BaseResultDto addRoleInfo(@RequestBody @Valid UserRoleAddEntity userRoleAddEntity) throws Exception {
|
|
|
|
|
|
|
+ public BaseResultDto addRoleInfo(@RequestBody @Valid UserRoleAddEntity userRoleAddEntity,InfoEntity infoEntity) throws Exception {
|
|
|
|
|
|
|
|
if (ManagerConstant.ROLE_CODE_SYSTEM.equals(userRoleAddEntity.getCode())) {
|
|
if (ManagerConstant.ROLE_CODE_SYSTEM.equals(userRoleAddEntity.getCode())) {
|
|
|
return BaseResultDto.error(Constants.NOT_PERMIT);
|
|
return BaseResultDto.error(Constants.NOT_PERMIT);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String roleCode = getRoleCode(userRoleAddEntity.getDepartmentId());
|
|
String roleCode = getRoleCode(userRoleAddEntity.getDepartmentId());
|
|
|
|
|
+ if(userRoleAddEntity.getMerchantId() == null){
|
|
|
|
|
+ userRoleAddEntity.setMerchantId(infoEntity.getIbInfo().getMerchantId());
|
|
|
|
|
+ }
|
|
|
userRoleAddEntity.setCode(roleCode);
|
|
userRoleAddEntity.setCode(roleCode);
|
|
|
roleInfoService.addRoleInfo(userRoleAddEntity);
|
|
roleInfoService.addRoleInfo(userRoleAddEntity);
|
|
|
|
|
|