mirror of https://github.com/elunez/eladmin
暂时先去除登陆验证码验证
parent
79c1bd01fc
commit
5b5e494524
|
@ -59,16 +59,16 @@ public class AuthenticationController {
|
||||||
@PostMapping(value = "${jwt.auth.path}")
|
@PostMapping(value = "${jwt.auth.path}")
|
||||||
public ResponseEntity login(@Validated @RequestBody AuthorizationUser authorizationUser){
|
public ResponseEntity login(@Validated @RequestBody AuthorizationUser authorizationUser){
|
||||||
|
|
||||||
// 查询验证码
|
// // 查询验证码
|
||||||
String code = redisService.getCodeVal(authorizationUser.getUuid());
|
// String code = redisService.getCodeVal(authorizationUser.getUuid());
|
||||||
// 清除验证码
|
// // 清除验证码
|
||||||
redisService.delete(authorizationUser.getUuid());
|
// redisService.delete(authorizationUser.getUuid());
|
||||||
if (StringUtils.isBlank(code)) {
|
// if (StringUtils.isBlank(code)) {
|
||||||
throw new BadRequestException("验证码已过期");
|
// throw new BadRequestException("验证码已过期");
|
||||||
}
|
// }
|
||||||
if (StringUtils.isBlank(authorizationUser.getCode()) || !authorizationUser.getCode().equalsIgnoreCase(code)) {
|
// if (StringUtils.isBlank(authorizationUser.getCode()) || !authorizationUser.getCode().equalsIgnoreCase(code)) {
|
||||||
throw new BadRequestException("验证码错误");
|
// throw new BadRequestException("验证码错误");
|
||||||
}
|
// }
|
||||||
final JwtUser jwtUser = (JwtUser) userDetailsService.loadUserByUsername(authorizationUser.getUsername());
|
final JwtUser jwtUser = (JwtUser) userDetailsService.loadUserByUsername(authorizationUser.getUsername());
|
||||||
|
|
||||||
if(!jwtUser.getPassword().equals(EncryptUtils.encryptPassword(authorizationUser.getPassword()))){
|
if(!jwtUser.getPassword().equals(EncryptUtils.encryptPassword(authorizationUser.getPassword()))){
|
||||||
|
|
|
@ -57,8 +57,8 @@ public class SupplierInfoController {
|
||||||
return new ResponseEntity(supplierInfoService.queryAll(criteria),HttpStatus.OK);
|
return new ResponseEntity(supplierInfoService.queryAll(criteria),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("查询供应商资料列表")
|
@Log("查看供应商详情")
|
||||||
@ApiOperation(value = "分页查询供应商资料列表")
|
@ApiOperation(value = "查看供应商详情")
|
||||||
@GetMapping(value = "/supplierInfo/{id}")
|
@GetMapping(value = "/supplierInfo/{id}")
|
||||||
@PreAuthorize("hasAnyRole('ADMIN','BDSUPPLIERINFO_ALL','BDSUPPLIERINFO_SELECT')")
|
@PreAuthorize("hasAnyRole('ADMIN','BDSUPPLIERINFO_ALL','BDSUPPLIERINFO_SELECT')")
|
||||||
public ResponseEntity findSupplierInfo(@PathVariable("id") Long id){
|
public ResponseEntity findSupplierInfo(@PathVariable("id") Long id){
|
||||||
|
@ -75,7 +75,7 @@ public class SupplierInfoController {
|
||||||
|
|
||||||
@Log("修改供应商资料")
|
@Log("修改供应商资料")
|
||||||
@ApiOperation(value = "修改供应商资料")
|
@ApiOperation(value = "修改供应商资料")
|
||||||
@PostMapping(value = "/updateSupplierInfo")
|
@PutMapping(value = "/updateSupplierInfo")
|
||||||
@PreAuthorize("hasAnyRole('ADMIN','BDSUPPLIERINFO_ALL','BDSUPPLIERINFO_EDIT')")
|
@PreAuthorize("hasAnyRole('ADMIN','BDSUPPLIERINFO_ALL','BDSUPPLIERINFO_EDIT')")
|
||||||
public ResponseEntity updateSupplierInfo(@RequestBody UpdateSupplierInfoRequest updateSupplierInfoRequest){
|
public ResponseEntity updateSupplierInfo(@RequestBody UpdateSupplierInfoRequest updateSupplierInfoRequest){
|
||||||
supplierInfoService.updateSupplierInfo(updateSupplierInfoRequest);
|
supplierInfoService.updateSupplierInfo(updateSupplierInfoRequest);
|
||||||
|
|
Loading…
Reference in New Issue