|
@@ -7,7 +7,9 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.pj.api.client.level_one_server.LevelOneServerInterface;
|
|
import com.pj.api.dto.AppUserDto;
|
|
import com.pj.api.dto.AppUserDto;
|
|
|
|
+import com.pj.api.dto.PeopleDto;
|
|
import com.pj.common.core.exception.ServiceException;
|
|
import com.pj.common.core.exception.ServiceException;
|
|
import com.pj.current.dto.APPLoginUserInfo;
|
|
import com.pj.current.dto.APPLoginUserInfo;
|
|
import com.pj.current.satoken.StpAPPUserUtil;
|
|
import com.pj.current.satoken.StpAPPUserUtil;
|
|
@@ -54,6 +56,8 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
/** 阿里云验证码 */
|
|
/** 阿里云验证码 */
|
|
@Autowired
|
|
@Autowired
|
|
private SmsRetryService smsRetryService;
|
|
private SmsRetryService smsRetryService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private LevelOneServerInterface levelOneServerInterface;
|
|
/** 验证码前缀 */
|
|
/** 验证码前缀 */
|
|
String PREFIX = "app_user:phone:sms_code:";
|
|
String PREFIX = "app_user:phone:sms_code:";
|
|
|
|
|
|
@@ -187,6 +191,7 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
appUser.setLastLoginTime(new Date());
|
|
appUser.setLastLoginTime(new Date());
|
|
//保存
|
|
//保存
|
|
appUserMapper.updateById(appUser);
|
|
appUserMapper.updateById(appUser);
|
|
|
|
+
|
|
//开始执行登录
|
|
//开始执行登录
|
|
StpAPPUserUtil.login(appUser.getId());
|
|
StpAPPUserUtil.login(appUser.getId());
|
|
// 组织返回参数,直接拿过来用的,然后自己改吧改吧
|
|
// 组织返回参数,直接拿过来用的,然后自己改吧改吧
|
|
@@ -205,6 +210,9 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
map.put("tokenInfo", StpAPPUserUtil.getTokenInfo());
|
|
map.put("tokenInfo", StpAPPUserUtil.getTokenInfo());
|
|
// StpAPPUserUtil.cachePerList(per_list);
|
|
// StpAPPUserUtil.cachePerList(per_list);
|
|
APPLoginUserInfo info=new APPLoginUserInfo();
|
|
APPLoginUserInfo info=new APPLoginUserInfo();
|
|
|
|
+ //获取区域
|
|
|
|
+ PeopleDto rpcById = levelOneServerInterface.getRpcById(appUser.getFkId());
|
|
|
|
+ if(rpcById != null) info.setTradeAreaId(rpcById.getTradeAreaId());
|
|
info.setLoginId(appUser.getId());
|
|
info.setLoginId(appUser.getId());
|
|
info.setLoginName(appUser.getName());
|
|
info.setLoginName(appUser.getName());
|
|
info.setFk(appUser.getFkId());
|
|
info.setFk(appUser.getFkId());
|