|
|
|
@ -12,11 +12,13 @@ import com.supervision.pojo.vo.UserInfoReqVo;
|
|
|
|
|
import com.supervision.pojo.vo.UserInfoResVo;
|
|
|
|
|
import com.supervision.service.UserManageService;
|
|
|
|
|
import com.supervision.service.UserService;
|
|
|
|
|
import com.supervision.usermanage.UserResourceCheck;
|
|
|
|
|
import com.supervision.util.TokenUtil;
|
|
|
|
|
import com.supervision.util.UserUtil;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
@ -35,6 +37,8 @@ public class UserController {
|
|
|
|
|
|
|
|
|
|
private final UserManageService userManageService;
|
|
|
|
|
|
|
|
|
|
private final UserResourceCheck userResourceCheck;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("登录")
|
|
|
|
|
@PostMapping("login")
|
|
|
|
@ -62,6 +66,11 @@ public class UserController {
|
|
|
|
|
redisTemplate.convertAndSend(UserTokenConstant.KICK_CHANNEL, userId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("查看资源是否有剩余")
|
|
|
|
|
@GetMapping("resourceIsFree")
|
|
|
|
|
public boolean resourceIsFree(){
|
|
|
|
|
return userResourceCheck.achieveDiagnoseResource();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("修改用户信息")
|
|
|
|
|
@PutMapping("updateUserInfo")
|
|
|
|
|