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