Parcourir la source

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

wutt il y a 5 ans
Parent
commit
d08d7bc2cc

+ 5 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java

@@ -1,7 +1,6 @@
 package com.management.platform.controller;
 
 
-import com.management.platform.entity.User;
 import com.management.platform.service.UserService;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,12 +26,13 @@ public class UserController {
     /**
      * 管理员登录网页端
      *
-     * 用户名 phone
-     * 密码 password
+     * @param username  用户名
+     * @param password  密码
+     * @return
      */
     @RequestMapping("/login")
-    public HttpRespMsg login(User user){
-        return userService.login(user.getPhone(), user.getPassword());
+    public HttpRespMsg login(@RequestParam String username, @RequestParam String password){
+        return userService.login(username, password);
     }
 }
 

+ 0 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -36,10 +36,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     @Override
     public HttpRespMsg login(String username, String password) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
-        if(username == null || password == null){
-            httpRespMsg.setError("请填写完整信息");
-            return httpRespMsg;
-        }
         //根据电话号码获取账号信息
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("phone", username));
         if (userList.size() == 0) {