This commit is contained in:
邱贞招 2024-11-09 09:37:47 +08:00
parent 46d41a305d
commit 1210a63f15
8 changed files with 8 additions and 19 deletions

View File

@ -2,7 +2,6 @@ package com.ruoyi.web.controller.rl;
import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.ServiceConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.RlUser;
@ -17,11 +16,10 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.agent.RlAgentVO;
import com.ruoyi.system.domain.userExt.RlUserExt;
import com.ruoyi.system.domain.userWithdraw.RlUserWithdraw;
import com.ruoyi.system.domain.vo.RlUserQuery;
import com.ruoyi.system.domain.RlUserQuery;
import com.ruoyi.system.service.*;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

View File

@ -8,7 +8,6 @@ import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

View File

@ -507,6 +507,7 @@ public class SysLoginService
} finally {
AuthenticationContextHolder.clearContext();
}
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
recordAppLoginInfo(loginUser.getUserId()); //修改rl_user最近登录IP和登录时间
// 生成token

View File

@ -36,9 +36,6 @@ public class UserDetailsServiceImpl implements UserDetailsService
@Autowired
private IRlUserService userService;
@Resource
private IRlUserService asUserService;
@Autowired
private SysPasswordService passwordService;
@ -64,7 +61,7 @@ public class UserDetailsServiceImpl implements UserDetailsService
user = userService.selectUserByUserName(username, appletType);
}else if(Constants.USER_TYPE_APP.equals(userType)){
// app用户登录 如果是app用户则用openid查询
user = asUserService.selectUserByWxopenid(username);
user = userService.selectUserByWxopenid(username);
}else{
// app用户登录短信登录 如果是app用户则用手机号
user = userService.selectUserByUserName(username, appletType);
@ -73,7 +70,7 @@ public class UserDetailsServiceImpl implements UserDetailsService
if(StrUtil.isBlank(user.getPassword())){
String password = authentication.getCredentials().toString();
String newPassword = SecurityUtils.encryptPassword(password);
asUserService.updateUserPwd(user.getUserId(), newPassword);
userService.updateUserPwd(user.getUserId(), newPassword);
}else{
passwordService.validate2(user);
}

View File

@ -1,4 +1,4 @@
package com.ruoyi.system.domain.vo;
package com.ruoyi.system.domain;
import com.ruoyi.common.core.domain.entity.RlUser;
import lombok.Data;

View File

@ -3,7 +3,7 @@ package com.ruoyi.system.mapper;
import com.ruoyi.common.core.domain.entity.RlUser;
import com.ruoyi.common.core.domain.entity.RlUserVO;
import com.ruoyi.common.core.domain.vo.LabelVo;
import com.ruoyi.system.domain.vo.RlUserQuery;
import com.ruoyi.system.domain.RlUserQuery;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;

View File

@ -5,8 +5,7 @@ import com.ruoyi.common.core.domain.entity.RlUserVO;
import com.ruoyi.system.domain.changeBalance.RlChangeBalance;
import com.ruoyi.system.domain.changeBalance.RlChangeBalanceQuery;
import com.ruoyi.system.domain.query.AuthenticationQuery;
import com.ruoyi.system.domain.vo.RlUserQuery;
import com.ruoyi.system.domain.withdraw.RlWithdraw;
import com.ruoyi.system.domain.RlUserQuery;
import com.ruoyi.system.domain.withdraw.RlWithdrawQuery;
import java.math.BigDecimal;

View File

@ -1,7 +1,6 @@
package com.ruoyi.system.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
@ -9,7 +8,6 @@ import com.aliyuncs.exceptions.ClientException;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.ServiceConstants;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.ChangeBalanceInterface;
import com.ruoyi.common.core.domain.entity.RlUser;
import com.ruoyi.common.core.domain.entity.RlUserVO;
import com.ruoyi.common.exception.ServiceException;
@ -20,15 +18,12 @@ import com.ruoyi.common.utils.verify.VerifyIdentityUtil;
import com.ruoyi.system.domain.RlMsgLog;
import com.ruoyi.system.domain.SysUserPost;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.domain.agent.RlAgentVO;
import com.ruoyi.system.domain.changeBalance.RlChangeBalance;
import com.ruoyi.system.domain.changeBalance.RlChangeBalanceQuery;
import com.ruoyi.system.domain.channel.ChannelVO;
import com.ruoyi.system.domain.channelWithdraw.ChannelWithdrawVO;
import com.ruoyi.system.domain.query.AuthenticationQuery;
import com.ruoyi.system.domain.userExt.RlUserExt;
import com.ruoyi.system.domain.userWithdraw.RlUserWithdraw;
import com.ruoyi.system.domain.vo.RlUserQuery;
import com.ruoyi.system.domain.RlUserQuery;
import com.ruoyi.system.domain.withdraw.RlWithdraw;
import com.ruoyi.system.domain.withdraw.RlWithdrawQuery;
import com.ruoyi.system.mapper.RlUserMapper;