fix findAccountByPhone查到多条记录

master
luoyang 5 years ago
parent 6006720ada
commit 3e9d5827f4

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.69</version>
<version>1.2.70</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.6.1</jib-maven-plugin.version>

@ -2195,7 +2195,7 @@ public class RetailAppServiceImp implements RetailAppService {
if (!StringUtils.equals(captcha, params.getString("captcha"))) {
throw new BadRequestException("Verification code is wrong");
}
JSONObject account = clientAccountMapper.findByPhone(contactPhone, "+" + nationCode);
List<JSONObject> account = clientAccountMapper.findByPhone(contactPhone, "+" + nationCode);
if (account != null) {
throw new BadRequestException("Mobile phone number has been bound to other users, please unbind it before binding");
}

@ -280,7 +280,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
if (!nation_code.startsWith("+")) {
nation_code = "+" + nation_code;
}
JSONObject account = clientAccountMapper.findByPhone(contact_phone, nation_code);
List<JSONObject> account = clientAccountMapper.findByPhone(contact_phone, nation_code);
if (account != null) {
throw new ForbiddenException("用户名已被注册");
}
@ -598,7 +598,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
}
JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
JSONObject account = clientAccountMapper.findByPhone(apply.getString("contact_phone"), "+61");
List<JSONObject> account = clientAccountMapper.findByPhone(apply.getString("contact_phone"), "+61");
if (account != null) {
throw new ForbiddenException("The user name has been registered");
}

@ -28,7 +28,7 @@ public interface ClientAccountMapper {
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
JSONObject findByPhone(@Param("contact_phone") String contact_phone,@Param("nation_code")String nation_code);
List<JSONObject> findByPhone(@Param("contact_phone") String contact_phone,@Param("nation_code")String nation_code);
@AutoSql(type = SqlType.SELECT)
JSONObject findDetail(@Param("account_id") String accountId);

@ -1582,7 +1582,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (clientAccountMapper.findByPhone(account.getContactPhone(), "+" + account.getNation_code()) != null) {
throw new BadRequestException("Mobile phone number has been bound to other accounts");
}
;
}
@Override

Loading…
Cancel
Save