|
|
@@ -135,6 +135,7 @@ public class AdminSuperviseApiController extends CertifyApiController {
|
|
|
/**
|
|
|
* 修改管理员信息
|
|
|
*/
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/updateAdmin", method = RequestMethod.POST)
|
|
|
public Result updateAdmin(@RequestParam(value = "roles[]", required = false) String[] roleIds, String data) {
|
|
|
Result res = new Result();
|
|
|
@@ -171,13 +172,18 @@ public class AdminSuperviseApiController extends CertifyApiController {
|
|
|
}
|
|
|
Admin ad = new Admin();
|
|
|
BeanUtils.copyProperties(admin, ad);
|
|
|
+ res = disposeAdminLocationList(res, jo, ad);
|
|
|
+ if (!res.getError().isEmpty()) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ List<AdminLocation> adminLocationList = (List<AdminLocation>) res.getData();
|
|
|
List<String> roles = new ArrayList<String>();
|
|
|
if (roleIds != null && roleIds.length > 0) {
|
|
|
for (String role : roleIds) {
|
|
|
roles.add(role);
|
|
|
}
|
|
|
}
|
|
|
- res.setData(adminService.updateByPrimaryKeySelective(ad, roles));
|
|
|
+ res.setData(adminService.updateByPrimaryKeySelective(ad, roles, adminLocationList));
|
|
|
}
|
|
|
return res;
|
|
|
}
|