|
@@ -52,7 +52,6 @@ public class AppUserServiceImpl extends ServiceImpl<IAppUserMapper, AppUser> imp
|
|
String openid = code2Session.getOpenid();
|
|
String openid = code2Session.getOpenid();
|
|
// 查找用户信息,存在更新,不存在新增
|
|
// 查找用户信息,存在更新,不存在新增
|
|
AppUser appUser = iAppUserService.lambdaQuery().eq(AppUser::getOpenId, openid).one();
|
|
AppUser appUser = iAppUserService.lambdaQuery().eq(AppUser::getOpenId, openid).one();
|
|
- StpAppUtil.login(openid, LoginDevice.APP);
|
|
|
|
if (appUser == null) {
|
|
if (appUser == null) {
|
|
// 存入用户信息
|
|
// 存入用户信息
|
|
appUser = new AppUser();
|
|
appUser = new AppUser();
|
|
@@ -67,6 +66,7 @@ public class AppUserServiceImpl extends ServiceImpl<IAppUserMapper, AppUser> imp
|
|
appUser.setGardenId(dto.getGardenId());
|
|
appUser.setGardenId(dto.getGardenId());
|
|
this.save(appUser);
|
|
this.save(appUser);
|
|
}
|
|
}
|
|
|
|
+ StpAppUtil.login(appUser.getId(), LoginDevice.APP);
|
|
AppUserRespDTO respDTO = new AppUserRespDTO();
|
|
AppUserRespDTO respDTO = new AppUserRespDTO();
|
|
BeanUtil.copyProperties(appUser, respDTO);
|
|
BeanUtil.copyProperties(appUser, respDTO);
|
|
respDTO.setToken(StpAppUtil.getTokenValue());
|
|
respDTO.setToken(StpAppUtil.getTokenValue());
|