Commit 1165f57b authored by 朱晨阳's avatar 朱晨阳

经销商注册auth_login_info 表有数据,业务表没有数据,审核报手机号重复

parent 323ff25b
......@@ -38,4 +38,6 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
Integer getUserListPauCount(String phone, String userName);
Integer getUserListSubCount(String phone, String userName);
Integer getUserListAliCount(String phone, String userName);
}
......@@ -163,4 +163,17 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
</where>
</select>
<select id="getUserListAliCount" resultType="integer">
select count(*) from auth_login_info
<where>
IS_DELETED = 0
<if test="phone != null and phone !=''">
and LOGIN_ID = #{phone}
</if>
<if test="userName != null and userName !=''">
and LOGIN_ID = #{userName}
</if>
</where>
</select>
</mapper>
......@@ -1061,12 +1061,13 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
Integer userListHuiCount = unitInfoMapper.getUserListHuiCount(phone, userName);
Integer userListPauCount = unitInfoMapper.getUserListPauCount(phone, userName);
Integer userListSubCount = unitInfoMapper.getUserListSubCount(phone, userName);
Integer userListAliCount = unitInfoMapper.getUserListAliCount(phone, userName);
if((userListHuiCount != 0 || userListPauCount != 0 || userListSubCount != 0) && phone != null) {
if((userListHuiCount != 0 || userListPauCount != 0 || userListSubCount != 0 || userListAliCount !=0) && phone != null) {
throw new BadRequest("该手机号已经注册");
}
if((userListHuiCount != 0 || userListPauCount != 0 || userListSubCount != 0) && userName != null) {
if((userListHuiCount != 0 || userListPauCount != 0 || userListSubCount != 0 || userListAliCount !=0) && userName != null) {
throw new BadRequest("该用户名已经注册");
}
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment