用户管理增加认证字段

This commit is contained in:
19173159168
2025-08-19 00:29:09 +08:00
parent d25251405c
commit 3de561a277
4 changed files with 84 additions and 9 deletions

View File

@ -56,6 +56,15 @@ public class ZcBaseUser extends BaseEntity
@Excel(name = "是否认证",dictType = "key_base_user_authed")
private Long authed;
@Excel(name = "身份证")
private String idNo;
@Excel(name = "真实姓名")
private String realName;
@Excel(name = "身份证正面")
private String frontPhoto;
@Excel(name = "身份证反面")
private String backPhoto;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@ -200,6 +209,38 @@ public class ZcBaseUser extends BaseEntity
this.storeId = storeId;
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public String getFrontPhoto() {
return frontPhoto;
}
public void setFrontPhoto(String frontPhoto) {
this.frontPhoto = frontPhoto;
}
public String getBackPhoto() {
return backPhoto;
}
public void setBackPhoto(String backPhoto) {
this.backPhoto = backPhoto;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -16,6 +16,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="wechatOpenid" column="wechat_openid" />
<result property="alipayUserid" column="alipay_userid" />
<result property="authed" column="authed" />
<result property="idNo" column="id_no" />
<result property="realName" column="real_name" />
<result property="frontPhoto" column="front_photo" />
<result property="backPhoto" column="back_photo" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
@ -40,12 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectZcBaseUserVo">
select id, user_name, avatar_url, password, phone_number, role_id, is_store, nick_name, wechat_openid, alipay_userid, authed, del_flag, create_time, update_time from zc_base_user
select id, user_name, avatar_url, password, phone_number, role_id, is_store, nick_name, wechat_openid, alipay_userid, authed, id_no, real_name, front_photo, back_photo, del_flag, create_time, update_time from zc_base_user
</sql>
<select id="selectZcBaseUserList" parameterType="ZcBaseUser" resultMap="ZcBaseUserZcBaseUserStoreResult">
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.del_flag, a.create_time, a.update_time,
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.id_no, a.real_name, a.front_photo, a.back_photo, a.del_flag, a.create_time, a.update_time,
b.id as sub_id, b.user_id as sub_user_id, b.operator_id as sub_operator_id, b.store_id as sub_store_id, b.create_time as sub_create_time
from zc_base_user a
left join zc_base_user_store b on b.user_id = a.id
@ -58,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roleId != null "> and a.role_id = #{roleId}</if>
<if test="isStore != null "> and a.is_store = #{isStore}</if>
<if test="authed != null "> and a.authed = #{authed}</if>
<if test="idNo != null and idNo != ''"> and a.id_no = #{idNo}</if>
<if test="realName != null and realName != '' "> and a.real_name = #{realName}</if>
<if test="nickName != null and nickName != ''"> and a.nick_name like concat('%', #{nickName}, '%')</if>
<if test="wechatOpenid != null and wechatOpenid != ''"> and a.wechat_openid = #{wechatOpenid}</if>
<if test="alipayUserid != null and alipayUserid != ''"> and a.alipay_userid = #{alipayUserid}</if>
@ -67,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectZcBaseUserByStoreId" parameterType="Long" resultMap="ZcBaseUserZcBaseUserStoreResult">
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.del_flag, a.create_time, a.update_time,
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.id_no, a.real_name, a.front_photo, a.back_photo, a.del_flag, a.create_time, a.update_time,
b.id as sub_id, b.user_id as sub_user_id, b.operator_id as sub_operator_id, b.store_id as sub_store_id, b.create_time as sub_create_time
from zc_base_user a
left join zc_base_user_store b on b.user_id = a.id
@ -77,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectZcBaseUserById" parameterType="Long" resultMap="ZcBaseUserZcBaseUserStoreResult">
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.del_flag, a.create_time, a.update_time,
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.id_no, a.real_name, a.front_photo, a.back_photo, a.del_flag, a.create_time, a.update_time,
b.id as sub_id, b.user_id as sub_user_id, b.operator_id as sub_operator_id, b.store_id as sub_store_id, b.create_time as sub_create_time,
c.name as sub_store_name, d.company_name as sub_operator_name
from zc_base_user a
@ -87,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.del_flag = '0' and a.id = #{id}
</select>
<select id="selectZcBaseUserByPhone" resultMap="ZcBaseUserResult">
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.del_flag, a.create_time, a.update_time
select a.id, a.user_name, a.avatar_url, a.password, a.phone_number, a.role_id, a.is_store, a.nick_name, a.wechat_openid, a.alipay_userid, a.authed, a.id_no, a.real_name, a.front_photo, a.back_photo, a.del_flag, a.create_time, a.update_time
from zc_base_user a
where a.del_flag = '0' and a.phone_number = #{phoneNumber}
</select>
@ -137,6 +143,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="wechatOpenid != null">wechat_openid = #{wechatOpenid},</if>
<if test="alipayUserid != null">alipay_userid = #{alipayUserid},</if>
<if test="authed != null">authed = #{authed},</if>
<if test="idNo != null and idNo != ''">id_no = #{idNo},</if>
<if test="realName != null and realName != '' ">real_name = #{realName},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>

View File

@ -21,7 +21,18 @@
<input name="phoneNumber" th:field="*{phoneNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">真实姓名:</label>
<div class="col-sm-8">
<input name="realName" th:field="*{realName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">身份证号:</label>
<div class="col-sm-8">
<input name="idNo" th:field="*{idNo}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">昵称:</label>
<div class="col-sm-8">
@ -45,13 +56,13 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信小程序openid</label>
<label class="col-sm-3 control-label">微信小程序OpenId</label>
<div class="col-sm-8">
<input name="wechatOpenid" th:field="*{wechatOpenid}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝小程序userid</label>
<label class="col-sm-3 control-label">支付宝小程序UserId</label>
<div class="col-sm-8">
<input name="alipayUserid" th:field="*{alipayUserid}" class="form-control" type="text">
</div>

View File

@ -19,7 +19,14 @@
<label>手机号:</label>
<input type="text" name="phoneNumber"/>
</li>
<li>
<label>真实姓名:</label>
<input type="text" name="realName"/>
</li>
<li>
<label>身份证号:</label>
<input type="text" name="idNo"/>
</li>
<li>
<label>门店用户:</label>
<select name="roleId" th:with="type=${@dict.getType('key_yes_no')}">
@ -101,6 +108,14 @@
field: 'phoneNumber',
title: '手机号'
},
{
field: 'realName',
title: '真实姓名'
},
{
field: 'idNo',
title: '身份证号'
},
{
field: 'nickName',
title: '昵称'