修改:

1.放行爬大哥登录接口
2.添加 redis 持久化登录 token
3.修改排序名称字段注解信息
4.修改筛选大哥控制类方法名
This commit is contained in:
2025-06-25 21:55:49 +08:00
parent 43ddab223c
commit 273db0b8a1
7 changed files with 30 additions and 9 deletions

View File

@@ -44,7 +44,8 @@ public class SaTokenConfigure implements WebMvcConfigurer {
"/favicon.ico",
// 你的其他放行路径,例如登录接口
"/user/doLogin",
"/tenant/get-id-by-name"
"/tenant/get-id-by-name",
"/user/bigbrother-doLogin"
};
}

View File

@@ -3,11 +3,8 @@ package com.yupi.springbootinit.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.springbootinit.common.BaseResponse;
import com.yupi.springbootinit.common.ResultUtils;
import com.yupi.springbootinit.model.dto.host.HostInfoDTO;
import com.yupi.springbootinit.model.dto.host.ServerBigBrotherDTO;
import com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO;
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
import com.yupi.springbootinit.service.HostInfoService;
import com.yupi.springbootinit.service.ServerBigBrotherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -29,7 +26,7 @@ public class BigBrotherController {
private ServerBigBrotherService bigBrotherService;
@PostMapping("page")
public BaseResponse<Page<ServerBigBrotherVO>> hostsInfo(@RequestBody ServerBigBrotherDTO serverBigBrotherDTO){
public BaseResponse<Page<ServerBigBrotherVO>> getBigBrotherPage(@RequestBody ServerBigBrotherDTO serverBigBrotherDTO){
Page<ServerBigBrotherVO> conditionHosts = bigBrotherService.getConditionHosts(serverBigBrotherDTO);
return ResultUtils.success(conditionHosts);
}

View File

@@ -55,7 +55,7 @@ public class UserController {
SystemUsersVO systemUsersVO = new SystemUsersVO();
BeanUtil.copyProperties(user, systemUsersVO);
// 赋予用户 Id
StpUtil.login(user.getId());
StpUtil.login(user.getId(),"host");
// 设置 token 有效期为当前日期和套餐有效期的差值
StpUtil.renewTimeout(second);
systemUsersVO.setTokenName(StpUtil.getTokenName());
@@ -87,7 +87,7 @@ public class UserController {
SystemUsersVO systemUsersVO = new SystemUsersVO();
BeanUtil.copyProperties(user, systemUsersVO);
// 赋予用户 Id
StpUtil.login(user.getId());
StpUtil.login(user.getId(),"bigbrother");
// 设置 token 有效期为当前日期和套餐有效期的差值
StpUtil.renewTimeout(second);
systemUsersVO.setTokenName(StpUtil.getTokenName());

View File

@@ -126,7 +126,7 @@ public class ServerBigBrotherDTO extends PageRequest implements Serializable {
/**
* 按照何种业务排序
*/
@ApiModelProperty(value = "排序字段(createTime/hostsCoins/fans等)", example = "hostsCoins")
@ApiModelProperty(value = "排序字段(historicHighCoins/totalGiftCoins/level等)", example = "hostsCoins")
private String sortName;