|
|
@@ -61,7 +61,13 @@ public class NewRoleApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","角色已存在"));
|
|
|
return res;
|
|
|
}
|
|
|
- }
|
|
|
+ }else{
|
|
|
+ String newid=roleMapper.selectIdByNamei(records);
|
|
|
+ if(newid!=null){
|
|
|
+ res.getError().add(buildError("","角色已存在,请更换名称"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ }
|
|
|
res.setData(newRoleService.insert(records, permisionIds));
|
|
|
} else {
|
|
|
res.getError().add(buildError("", "参数格式不正确"));
|