手机号在同一企业内唯一
parent
0f6ecbd809
commit
b38c52c2c2
|
|
@ -201,6 +201,7 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
||||||
Map<String, Object> verifyParam = new HashMap<>();
|
Map<String, Object> verifyParam = new HashMap<>();
|
||||||
verifyParam.put("phone", params.get("phone"));
|
verifyParam.put("phone", params.get("phone"));
|
||||||
verifyParam.put("id", params.get("id"));
|
verifyParam.put("id", params.get("id"));
|
||||||
|
verifyParam.put("corpinfoId", AuthContext.getTenantId());
|
||||||
Integer count = userMapper.countUser(verifyParam);
|
Integer count = userMapper.countUser(verifyParam);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Response.buildFailure("手机号已经存在,请联系管理员");
|
return Response.buildFailure("手机号已经存在,请联系管理员");
|
||||||
|
|
|
||||||
|
|
@ -273,6 +273,9 @@
|
||||||
<if test="params.phone != null">
|
<if test="params.phone != null">
|
||||||
and phone = #{params.phone}
|
and phone = #{params.phone}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.corpinfoId != null">
|
||||||
|
and corpinfo_id = #{params.corpinfoId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue