|
|
|
@ -9,8 +9,11 @@ import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @auther River |
|
|
|
|
* @auther River |
|
|
|
|
* @date 2020/9/22 15:27 |
|
|
|
|
*/ |
|
|
|
|
@RestController |
|
|
|
@ -34,7 +37,7 @@ public class UserLoginController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@PostMapping("/getBackPwd") |
|
|
|
|
public ResponseResult getBackPwd(@RequestBody UserLoginRequest user){ |
|
|
|
|
public ResponseResult getBackPwd(@RequestBody @Valid UserLoginRequest user){ |
|
|
|
|
boolean result = userLoginService.getBackPwd(user); |
|
|
|
|
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL(); |
|
|
|
|
} |
|
|
|
@ -42,17 +45,17 @@ public class UserLoginController { |
|
|
|
|
@PostMapping(value = "/login") |
|
|
|
|
@ApiOperation(value = "用户登录") |
|
|
|
|
public ResponseResult login( |
|
|
|
|
//@RequestBody LoginRequest loginRequest
|
|
|
|
|
@RequestParam("password") String password, @RequestParam("phone") String phone, |
|
|
|
|
@RequestBody LoginRequest loginRequest |
|
|
|
|
/* @RequestParam("password") String password, @RequestParam("phone") String phone, |
|
|
|
|
@RequestParam("type")int type, @RequestParam("wechatId") String wechatId, |
|
|
|
|
@RequestParam("tenDayEffective") int tenDayEffective |
|
|
|
|
@RequestParam("tenDayEffective") int tenDayEffective*/ |
|
|
|
|
){ |
|
|
|
|
LoginRequest loginRequest = new LoginRequest(); |
|
|
|
|
/* LoginRequest loginRequest = new LoginRequest(); |
|
|
|
|
loginRequest.setTenDayEffective(tenDayEffective); |
|
|
|
|
loginRequest.setType(type); |
|
|
|
|
loginRequest.setWechatId(wechatId); |
|
|
|
|
loginRequest.setPassword(password); |
|
|
|
|
loginRequest.setPhone(phone); |
|
|
|
|
loginRequest.setPhone(phone);*/ |
|
|
|
|
return userLoginService.login(loginRequest); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|