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