|
|
@ -108,6 +108,10 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco |
|
|
|
if (!userAccount.getIsEnable()){ |
|
|
|
if (!userAccount.getIsEnable()){ |
|
|
|
throw new CustomException(ExceptionEnum.ACCOUNT_DISABLED); |
|
|
|
throw new CustomException(ExceptionEnum.ACCOUNT_DISABLED); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (userAccount.getPhone()== null){ |
|
|
|
|
|
|
|
//登录更新手机号
|
|
|
|
|
|
|
|
baseMapper.updateAccountPhone(appletCallbackReq.getPhone(),userAccount.getId()); |
|
|
|
|
|
|
|
} |
|
|
|
//更新登录时间
|
|
|
|
//更新登录时间
|
|
|
|
baseMapper.updateUserInfo(userAccount.getUserId()); |
|
|
|
baseMapper.updateUserInfo(userAccount.getUserId()); |
|
|
|
data.put("state", "login"); |
|
|
|
data.put("state", "login"); |
|
|
@ -151,11 +155,16 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R kindergartenWeChatApplication(AppletCallbackReq appletCallbackReq) { |
|
|
|
public R kindergartenWeChatApplication(AppletCallbackReq appletCallbackReq) { |
|
|
|
UserAccount userAccount = baseMapper.selectAccountByOpenId(appletCallbackReq.getOpenId(), appletCallbackReq.getPlatformId()); |
|
|
|
UserAccount userAccount = baseMapper.selectAccountByOpenId(appletCallbackReq.getOpenId(), appletCallbackReq.getPlatformId()); |
|
|
|
//根据手机号查询用户
|
|
|
|
if (userAccount != null){ |
|
|
|
UserAccount userAccountByPhone = baseMapper.selectAccount(appletCallbackReq.getPhone(),appletCallbackReq.getPlatformId().toString()); |
|
|
|
|
|
|
|
if (userAccount != null || userAccountByPhone!= null){ |
|
|
|
|
|
|
|
return R.error("该用户已存在"); |
|
|
|
return R.error("该用户已存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (appletCallbackReq.getPhone()!= null){ |
|
|
|
|
|
|
|
UserAccount userAccountByPhone = baseMapper.selectAccount(appletCallbackReq.getPhone(),appletCallbackReq.getPlatformId().toString()); |
|
|
|
|
|
|
|
//根据手机号查询用户
|
|
|
|
|
|
|
|
if (userAccountByPhone != null){ |
|
|
|
|
|
|
|
return R.error("该用户已存在"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> data = new HashedMap<String, Object>(); |
|
|
|
Map<String, Object> data = new HashedMap<String, Object>(); |
|
|
|
String randomNumbers = cn.hutool.core.util.RandomUtil.randomNumbers(6); |
|
|
|
String randomNumbers = cn.hutool.core.util.RandomUtil.randomNumbers(6); |
|
|
|