Merge remote-tracking branch 'origin/master'

This commit is contained in:
2025-07-01 17:04:22 +08:00
3 changed files with 29 additions and 27 deletions

View File

@@ -60,7 +60,7 @@ public class ConfigProperties {
/** /**
* token过期时间, 单位秒 * token过期时间, 单位秒
*/ */
private Long tokenExpireTime = 60 * 60 * 30 * 24L; private Long tokenExpireTime = 60 * 60 * 365 * 24L;
/** /**
* token快要过期自动刷新时间, 单位分钟 * token快要过期自动刷新时间, 单位分钟

View File

@@ -145,7 +145,9 @@ public class UserRefereeController extends BaseController {
final UserReferee referee = userRefereeService.getOne(new LambdaQueryWrapper<UserReferee>() final UserReferee referee = userRefereeService.getOne(new LambdaQueryWrapper<UserReferee>()
.eq(UserReferee::getUserId, id) .eq(UserReferee::getUserId, id)
.eq(UserReferee::getDeleted, 0)); .eq(UserReferee::getDeleted, 0)
.last("limit 1")
);
if (ObjectUtil.isEmpty(referee)) { if (ObjectUtil.isEmpty(referee)) {
return fail("查询失败", null); return fail("查询失败", null);

View File

@@ -114,7 +114,7 @@ public class WxLoginController extends BaseController {
// 查询是否存在 // 查询是否存在
User user = userService.getByPhone(phone); User user = userService.getByPhone(phone);
// 超级管理员验证 // 超级管理员验证
if(userParam.getIsSuperAdmin() != null){ if (userParam.getIsSuperAdmin() != null) {
final LoginParam loginParam = new LoginParam(); final LoginParam loginParam = new LoginParam();
loginParam.setIsAdmin(true); loginParam.setIsAdmin(true);
loginParam.setPhone(phone); loginParam.setPhone(phone);
@@ -137,7 +137,7 @@ public class WxLoginController extends BaseController {
userParam.setPhone(phone); userParam.setPhone(phone);
user = addUser(userParam); user = addUser(userParam);
user.setRecommend(1); user.setRecommend(1);
}else { } else {
// 存在则检查绑定上级 // 存在则检查绑定上级
if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null && userParam.getRefereeId() != 0) { if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null && userParam.getRefereeId() != 0) {
UserReferee check = userRefereeService.check(user.getUserId(), userParam.getRefereeId()); UserReferee check = userRefereeService.check(user.getUserId(), userParam.getRefereeId());
@@ -437,7 +437,7 @@ public class WxLoginController extends BaseController {
@ApiOperation("openid无感登录") @ApiOperation("openid无感登录")
@PostMapping("/loginByOpenId") @PostMapping("/loginByOpenId")
public ApiResult<?> loginByOpenId(@RequestBody Mp mp,HttpServletRequest request) { public ApiResult<?> loginByOpenId(@RequestBody Mp mp, HttpServletRequest request) {
// 获取小程序配置信息 // 获取小程序配置信息
String key1 = "AppId:".concat(mp.getTenantId().toString()); String key1 = "AppId:".concat(mp.getTenantId().toString());
String key2 = "AppSecret:".concat(mp.getTenantId().toString()); String key2 = "AppSecret:".concat(mp.getTenantId().toString());