fix (farm): 用户同步
- 绕过token验证
This commit is contained in:
@@ -209,13 +209,14 @@ public class AuthController {
|
||||
return success(authService.socialLogin(reqVO));
|
||||
}
|
||||
|
||||
|
||||
@PermitAll
|
||||
@PostMapping("/api/user-add")
|
||||
@Operation(summary = "同步用户")
|
||||
public CommonResult<Boolean> synchronize(@RequestBody @Valid UserReqVO reqVO) {
|
||||
return success(authService.synchronize(reqVO));
|
||||
}
|
||||
|
||||
@PermitAll
|
||||
@PostMapping("/api/user-info")
|
||||
@Operation(summary = "手机号获取token")
|
||||
public CommonResult<AuthLoginRespVO> getUserInfo(@RequestBody @Valid UserReqVO reqVO) {
|
||||
|
||||
@@ -20,4 +20,8 @@ public class UserReqVO {
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private Long tenantId;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
|
||||
adminUserDO.setStatus(CommonStatusEnum.DISABLE.getStatus());
|
||||
adminUserDO.setPassword("123456");
|
||||
adminUserDO.setIsSynchronize(1);
|
||||
adminUserDO.setTenantId(1L);
|
||||
adminUserDO.setTenantId(reqVO.getTenantId());
|
||||
userService.createUser(adminUserDO);
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user