Commit 0ce00b1d by wangjf

fix userName to username

parent 32d77411
...@@ -132,7 +132,7 @@ public class UserController { ...@@ -132,7 +132,7 @@ public class UserController {
@PostMapping("/user/exit") @PostMapping("/user/exit")
@ResponseBody @ResponseBody
boolean exit(@RequestParam(name = "userName") String username) { boolean exit(@RequestParam(name = "username") String username) {
// 存在,不通过,false // 存在,不通过,false
return !userService.exit(username); return !userService.exit(username);
} }
......
...@@ -26,8 +26,8 @@ public class UserServiceImpl implements UserService { ...@@ -26,8 +26,8 @@ public class UserServiceImpl implements UserService {
@Override @Override
public boolean createUser(Map<String, Object> uMap, String userId) { public boolean createUser(Map<String, Object> uMap, String userId) {
User user = new User(); User user = new User();
user.setUserId(uMap.get("userName").toString()); user.setUserId(uMap.get("username").toString());
user.setUserName(uMap.get("userName").toString()); user.setUserName(uMap.get("username").toString());
try { try {
user.setPassword(MD5Util.getMD5Str(uMap.get("password").toString())); user.setPassword(MD5Util.getMD5Str(uMap.get("password").toString()));
} catch (Exception e) { } catch (Exception e) {
......
...@@ -49,7 +49,7 @@ function validateRule() { ...@@ -49,7 +49,7 @@ function validateRule() {
type : "post", // 数据发送方式 type : "post", // 数据发送方式
dataType : "json", // 接受数据格式 dataType : "json", // 接受数据格式
data : { // 要传递的数据 data : { // 要传递的数据
userName : function() { username : function() {
return $("#username").val(); return $("#username").val();
} }
} }
......
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