|
@@ -77,29 +77,7 @@ public class PeopleListController {
|
|
|
@ApiOperation("添加people_list")
|
|
|
@CommonLog("添加people_list")
|
|
|
@PostMapping("/biz/nongke/add")
|
|
|
- public CommonResult<String> add(@RequestParam(name = "userName") String userName,
|
|
|
- @RequestParam(name = "nickName") String nickName,
|
|
|
- @RequestParam(name = "sex") Integer sex,
|
|
|
- @RequestParam(name = "phone") String phone,
|
|
|
- @RequestParam(name = "img") MultipartFile img,
|
|
|
- @RequestParam(name = "manageArea") String manageArea,
|
|
|
- @RequestParam(name = "orgId") String orgId) throws IOException {
|
|
|
- PeopleListAddParam peopleListAddParam = new PeopleListAddParam();
|
|
|
- String imageCom = "";
|
|
|
- if (ObjectUtil.isNotEmpty(img)) {
|
|
|
- if (uploadImage.getImageCom(img).equals("上传失败")) {
|
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return new CommonResult(500, "图片上传失败", false);
|
|
|
- }
|
|
|
- imageCom = uploadImage.getImageCom(img);
|
|
|
- peopleListAddParam.setImg(imageCom);
|
|
|
- }
|
|
|
- peopleListAddParam.setUserName(userName);
|
|
|
- peopleListAddParam.setManageArea(manageArea);
|
|
|
- peopleListAddParam.setSex(sex);
|
|
|
- peopleListAddParam.setPhone(phone);
|
|
|
- peopleListAddParam.setNickName(nickName);
|
|
|
- peopleListAddParam.setOrgId(orgId);
|
|
|
+ public CommonResult<String> add(@RequestBody @Valid PeopleListAddParam peopleListAddParam) throws IOException {
|
|
|
return peopleListService.add(peopleListAddParam);
|
|
|
}
|
|
|
|