Commit 4bd06ce3 authored by lee_mingzhu's avatar lee_mingzhu

allow update userDetail info

parent cc697919
...@@ -106,7 +106,7 @@ public class InnerController { ...@@ -106,7 +106,7 @@ public class InnerController {
*/ */
@RequestMapping("/user_detail/save") @RequestMapping("/user_detail/save")
public JsonResult saveUserDetail(Long userId, String phoneNo, String name, String idNo, public JsonResult saveUserDetail(Long userId, String phoneNo, String name, String idNo,
String email){ String email, Long id){
//参数验证 //参数验证
if(userId == null || userId == 0L){ if(userId == null || userId == 0L){
return JsonResult.buildErrorStateResult("用户id为空.", null); return JsonResult.buildErrorStateResult("用户id为空.", null);
...@@ -121,6 +121,9 @@ public class InnerController { ...@@ -121,6 +121,9 @@ public class InnerController {
return JsonResult.buildErrorStateResult("用户身份证为空.", null); return JsonResult.buildErrorStateResult("用户身份证为空.", null);
} }
UserDetail userDetail = new UserDetail(); UserDetail userDetail = new UserDetail();
if(id != null && id > 0){
userDetail.setId(id);
}
userDetail.setUserId(userId); userDetail.setUserId(userId);
userDetail.setName(name); userDetail.setName(name);
userDetail.setPhoneNo(phoneNo); userDetail.setPhoneNo(phoneNo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment