支付
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhwl.user.mapper.ZdyUserMapper">
|
||||
|
||||
<resultMap type="ZdyUser" id="ZdyUserResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="nickname" column="nickname"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="mobile" column="mobile"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="birthday" column="birthday"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="openId" column="open_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="province" column="province"/>
|
||||
<result property="city" column="city"/>
|
||||
<result property="area" column="area"/>
|
||||
<result property="isBlack" column="is_black"/>
|
||||
<result property="vipLevelName" column="vip_level_name"/>
|
||||
<result property="vipLevelImage1" column="vip_level_image1"/>
|
||||
<result property="vipLevelImage2" column="vip_level_image2"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyUserVo">
|
||||
select id,
|
||||
open_id,
|
||||
avatar,
|
||||
nickname,
|
||||
name,
|
||||
mobile,
|
||||
status,
|
||||
id_card,
|
||||
sex,
|
||||
birthday,
|
||||
email,
|
||||
password,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark,
|
||||
province,
|
||||
city,
|
||||
area,
|
||||
is_black
|
||||
from zdy_user
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyUserList" parameterType="ZdyUser" resultMap="ZdyUserResult">
|
||||
<include refid="selectZdyUserVo"/>
|
||||
<where>
|
||||
<if test="avatar != null and avatar != ''">and avatar = #{avatar}</if>
|
||||
<if test="nickname != null and nickname != ''">and nickname like concat('%', #{nickname}, '%')</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="mobile != null and mobile != ''">and mobile = #{mobile}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
|
||||
<if test="sex != null and sex != ''">and sex = #{sex}</if>
|
||||
<if test="birthday != null ">and birthday = #{birthday}</if>
|
||||
<if test="openId != null and openId != ''">and openId = #{openId}</if>
|
||||
<if test="isBlack != null">and is_black = #{isBlack}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyUserListByNameAndMobile" parameterType="String" resultMap="ZdyUserResult">
|
||||
<include refid="selectZdyUserVo"/>
|
||||
where name = #{name} and mobile = #{mobile}
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyUserById" parameterType="Long" resultMap="ZdyUserResult">
|
||||
select u.id,
|
||||
u.open_id,
|
||||
u.avatar,
|
||||
u.nickname,
|
||||
u.name,
|
||||
u.mobile,
|
||||
u.status,
|
||||
u.id_card,
|
||||
u.sex,
|
||||
u.birthday,
|
||||
u.email,
|
||||
u.password,
|
||||
u.create_by,
|
||||
u.create_time,
|
||||
u.update_by,
|
||||
u.update_time,
|
||||
u.remark,
|
||||
u.province,
|
||||
u.city,
|
||||
u.area,
|
||||
u.is_black,
|
||||
vl.name vip_level_name,
|
||||
vl.image1 vip_level_image1,
|
||||
vl.image2 vip_level_image2
|
||||
from zdy_user u
|
||||
left join zdy_vip_user vu
|
||||
on u.id = vu.mini_program_user_id
|
||||
left join zdy_vip_level vl on vu.level_id = vl.id
|
||||
where u.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyUser" parameterType="ZdyUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zdy_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="avatar != null">avatar,</if>
|
||||
<if test="nickname != null">nickname,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="mobile != null">mobile,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="idCard != null">id_card,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="password != null">password,</if>
|
||||
<if test="openId != null and openId != ''">open_id,</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="province != null">province,
|
||||
</if>
|
||||
<if test="city != null">city,
|
||||
</if>
|
||||
<if test="area != null">area,
|
||||
</if>
|
||||
<if test="isBlack != null">is_black,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="avatar != null">#{avatar},</if>
|
||||
<if test="nickname != null">#{nickname},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="mobile != null">#{mobile},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="idCard != null">#{idCard},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
<if test="openId != null and openId != ''">#{openId},</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="province != null">#{province},
|
||||
</if>
|
||||
<if test="city != null">#{city},
|
||||
</if>
|
||||
<if test="area != null">#{area},
|
||||
</if>
|
||||
<if test="isBlack != null">#{isBlack},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyUser" parameterType="ZdyUser">
|
||||
update zdy_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="avatar != null">avatar = #{avatar},</if>
|
||||
<if test="nickname != null">nickname = #{nickname},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="mobile != null">mobile = #{mobile},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
<if test="openId != null and openId != ''">open_id = #{openId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="province != null">province =
|
||||
#{province},
|
||||
</if>
|
||||
<if test="city != null">city =
|
||||
#{city},
|
||||
</if>
|
||||
<if test="area != null">area =
|
||||
#{area},
|
||||
</if>
|
||||
<if test="isBlack != null">is_black =
|
||||
#{isBlack},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyUserById" parameterType="Long">
|
||||
delete
|
||||
from zdy_user
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyUserByIds" parameterType="String">
|
||||
delete from zdy_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectZdyUserByOpenId" parameterType="String" resultMap="ZdyUserResult">
|
||||
<include refid="selectZdyUserVo"/>
|
||||
where open_id = #{openId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectZdyUserByMobile" parameterType="String" resultMap="ZdyUserResult">
|
||||
<include refid="selectZdyUserVo"/>
|
||||
where mobile = #{mobile} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,502 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhwl.user.mapper.ZdyUserTouristMapper">
|
||||
|
||||
<resultMap type="ZdyUserTourist" id="ZdyUserTouristResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="mobile" column="mobile"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="userAvatar" column="userAvatar"/>
|
||||
<result property="userMobile" column="userMobile"/>
|
||||
<result property="bornDay" column="born_day"/>
|
||||
<result property="certAddress" column="cert_address"/>
|
||||
<result property="certNumber" column="cert_number"/>
|
||||
<result property="certOrg" column="cert_org"/>
|
||||
<result property="certType" column="cert_type"/>
|
||||
<result property="effDate" column="eff_date"/>
|
||||
<result property="expDate" column="exp_date"/>
|
||||
<result property="gender" column="gender"/>
|
||||
<result property="identityPic" column="identity_pic"/>
|
||||
<result property="nation" column="nation"/>
|
||||
<result property="partyName" column="party_name"/>
|
||||
<result property="nationCode" column="nation_code"/>
|
||||
<result property="faceId" column="face_id"/>
|
||||
<result property="faceGroupId" column="face_group_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyUserTouristVo">
|
||||
SELECT tou.id,
|
||||
tou.user_id,
|
||||
tou.NAME,
|
||||
tou.mobile,
|
||||
tou.image,
|
||||
tou.STATUS,
|
||||
tou.id_card,
|
||||
tou.create_time,
|
||||
tou.create_by,
|
||||
tou.update_time,
|
||||
tou.update_by,
|
||||
tou.remark,
|
||||
CASE
|
||||
WHEN (u.`name` IS NOT NULL AND u.`name` != '') THEN
|
||||
u.`name`
|
||||
ELSE u.nickname
|
||||
END AS userName,
|
||||
u.avatar as userAvatar,
|
||||
u.mobile as userMobile,
|
||||
tou.born_day,
|
||||
tou.cert_address,
|
||||
tou.cert_number,
|
||||
tou.cert_org,
|
||||
tou.cert_type,
|
||||
tou.eff_date,
|
||||
tou.exp_date,
|
||||
tou.gender,
|
||||
tou.identity_pic,
|
||||
tou.nation,
|
||||
tou.party_name,
|
||||
tou.nation_code,
|
||||
tou.face_id,
|
||||
tou.face_group_id
|
||||
FROM zdy_user_tourist tou
|
||||
LEFT JOIN zdy_user u ON u.id = tou.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyUserTouristList" parameterType="ZdyUserTourist" resultMap="ZdyUserTouristResult">
|
||||
<include refid="selectZdyUserTouristVo"/>
|
||||
<where>
|
||||
<if test="userId != null ">
|
||||
and tou.user_id = #{userId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and tou.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="mobile != null and mobile != ''">
|
||||
and tou.mobile = #{mobile}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and tou.status = #{status}
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and tou.id_card = #{idCard}
|
||||
</if>
|
||||
<if test="faceId !=null">
|
||||
and tou.face_id = #{faceId}
|
||||
</if>
|
||||
</where>
|
||||
order by tou.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyUserTouristById" parameterType="Long"
|
||||
resultMap="ZdyUserTouristResult">
|
||||
<include refid="selectZdyUserTouristVo"/>
|
||||
where tou.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectZdyUserTouristByIds" resultMap="ZdyUserTouristResult">
|
||||
SELECT tou.id,
|
||||
tou.user_id,
|
||||
tou.NAME,
|
||||
tou.mobile,
|
||||
tou.image,
|
||||
tou.STATUS,
|
||||
tou.id_card,
|
||||
tou.create_time,
|
||||
tou.create_by,
|
||||
tou.update_time,
|
||||
tou.update_by,
|
||||
tou.remark,
|
||||
tou.born_day,
|
||||
tou.cert_address,
|
||||
tou.cert_number,
|
||||
tou.cert_org,
|
||||
tou.cert_type,
|
||||
tou.eff_date,
|
||||
tou.exp_date,
|
||||
tou.gender,
|
||||
tou.identity_pic,
|
||||
tou.nation,
|
||||
tou.party_name,
|
||||
tou.nation_code,
|
||||
tou.face_id,
|
||||
tou.face_group_id
|
||||
FROM zdy_user_tourist tou
|
||||
where tou.id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyUserTourist" parameterType="ZdyUserTourist" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_user_tourist
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,
|
||||
</if>
|
||||
<if test="name != null">name,
|
||||
</if>
|
||||
<if test="mobile != null">mobile,
|
||||
</if>
|
||||
<if test="image != null">image,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="idCard != null">id_card,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="bornDay != null">born_day,
|
||||
</if>
|
||||
<if test="certAddress != null">cert_address,
|
||||
</if>
|
||||
<if test="certNumber != null">cert_number,
|
||||
</if>
|
||||
<if test="certOrg != null">cert_org,
|
||||
</if>
|
||||
<if test="certType != null">cert_type,
|
||||
</if>
|
||||
<if test="effDate != null">eff_date,
|
||||
</if>
|
||||
<if test="expDate != null">exp_date,
|
||||
</if>
|
||||
<if test="gender != null">gender,
|
||||
</if>
|
||||
<if test="identityPic != null">identity_pic,
|
||||
</if>
|
||||
<if test="nation != null">nation,
|
||||
</if>
|
||||
<if test="partyName != null">party_name,
|
||||
</if>
|
||||
<if test="nationCode != null">nation_code,
|
||||
</if>
|
||||
<if test="faceId != null">face_id,
|
||||
</if>
|
||||
<if test="faceGroupId != null">face_group_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},
|
||||
</if>
|
||||
<if test="name != null">#{name},
|
||||
</if>
|
||||
<if test="mobile != null">#{mobile},
|
||||
</if>
|
||||
<if test="image != null">#{image},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="idCard != null">#{idCard},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="bornDay != null">#{bornDay},
|
||||
</if>
|
||||
<if test="certAddress != null">#{certAddress},
|
||||
</if>
|
||||
<if test="certNumber != null">#{certNumber},
|
||||
</if>
|
||||
<if test="certOrg != null">#{certOrg},
|
||||
</if>
|
||||
<if test="certType != null">#{certType},
|
||||
</if>
|
||||
<if test="effDate != null">#{effDate},
|
||||
</if>
|
||||
<if test="expDate != null">#{expDate},
|
||||
</if>
|
||||
<if test="gender != null">#{gender},
|
||||
</if>
|
||||
<if test="identityPic != null">#{identityPic},
|
||||
</if>
|
||||
<if test="nation != null">#{nation},
|
||||
</if>
|
||||
<if test="partyName != null">#{partyName},
|
||||
</if>
|
||||
<if test="nationCode != null">#{nationCode},
|
||||
</if>
|
||||
<if test="faceId != null">#{faceId},
|
||||
</if>
|
||||
<if test="faceGroupId != null">#{faceGroupId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyUserTourist" parameterType="ZdyUserTourist">
|
||||
update zdy_user_tourist
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id =
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="mobile != null">mobile =
|
||||
#{mobile},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="idCard != null">id_card =
|
||||
#{idCard},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="bornDay != null">born_day =
|
||||
#{bornDay},
|
||||
</if>
|
||||
<if test="certAddress != null">cert_address =
|
||||
#{certAddress},
|
||||
</if>
|
||||
<if test="certNumber != null">cert_number =
|
||||
#{certNumber},
|
||||
</if>
|
||||
<if test="certOrg != null">cert_org =
|
||||
#{certOrg},
|
||||
</if>
|
||||
<if test="certType != null">cert_type =
|
||||
#{certType},
|
||||
</if>
|
||||
<if test="effDate != null">eff_date =
|
||||
#{effDate},
|
||||
</if>
|
||||
<if test="expDate != null">exp_date =
|
||||
#{expDate},
|
||||
</if>
|
||||
<if test="gender != null">gender =
|
||||
#{gender},
|
||||
</if>
|
||||
<if test="identityPic != null">identity_pic =
|
||||
#{identityPic},
|
||||
</if>
|
||||
<if test="nation != null">nation =
|
||||
#{nation},
|
||||
</if>
|
||||
<if test="partyName != null">party_name =
|
||||
#{partyName},
|
||||
</if>
|
||||
<if test="nationCode != null">nation_code =
|
||||
#{nationCode},
|
||||
</if>
|
||||
<if test="faceId != null">face_id =
|
||||
#{faceId},
|
||||
</if>
|
||||
<if test="faceGroupId != null">face_group_id =
|
||||
#{faceGroupId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyUserTouristById" parameterType="Long">
|
||||
delete
|
||||
from zdy_user_tourist
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyUserTouristByIds" parameterType="String">
|
||||
delete from zdy_user_tourist where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectZdyUserTouristByIdCard" parameterType="String"
|
||||
resultMap="ZdyUserTouristResult">
|
||||
<include refid="selectZdyUserTouristVo"/>
|
||||
where tou.id_card = #{idCard}
|
||||
</select>
|
||||
<select id="selectZdyUserTouristByUser" parameterType="Long" resultType="Boolean">
|
||||
SELECT EXISTS
|
||||
(
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
zdy_user_tourist
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
)
|
||||
</select>
|
||||
|
||||
<update id="updateZdyUserTouristByUserId" parameterType="ZdyUserTourist">
|
||||
update zdy_user_tourist
|
||||
set status = 0
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<select id="selectZdyUserTouristByIdCardAndName" resultMap="ZdyUserTouristResult">
|
||||
SELECT tou.id,
|
||||
tou.user_id,
|
||||
tou.NAME,
|
||||
tou.mobile,
|
||||
tou.image,
|
||||
tou.STATUS,
|
||||
tou.id_card,
|
||||
tou.create_time,
|
||||
tou.create_by,
|
||||
tou.update_time,
|
||||
tou.update_by,
|
||||
tou.remark,
|
||||
tou.born_day,
|
||||
tou.cert_address,
|
||||
tou.cert_number,
|
||||
tou.cert_org,
|
||||
tou.cert_type,
|
||||
tou.eff_date,
|
||||
tou.exp_date,
|
||||
tou.gender,
|
||||
tou.identity_pic,
|
||||
tou.nation,
|
||||
tou.party_name,
|
||||
tou.nation_code,
|
||||
tou.face_id,
|
||||
tou.face_group_id
|
||||
FROM zdy_user_tourist tou
|
||||
where tou.id_card = #{idCard} and tou.name = #{name} limit 1
|
||||
</select>
|
||||
<select id="selectUserTouristIsOrder" parameterType="Long" resultType="int">
|
||||
SELECT
|
||||
count( 1 )
|
||||
FROM
|
||||
zdy_ticket_order_item toi
|
||||
LEFT JOIN zdy_ticket_order_detail tod ON tod.order_item_id = toi.id
|
||||
WHERE
|
||||
( tod.user_tourist_id = #{touristId} OR toi.tour_id = #{touristId} )
|
||||
AND toi.classify = 5
|
||||
AND toi.payment_type = 200
|
||||
AND tod.refund_status != 200
|
||||
</select>
|
||||
<select id="selectTouristByUserIdAndIdCardAndName" resultMap="ZdyUserTouristResult">
|
||||
SELECT tou.id,
|
||||
tou.user_id,
|
||||
tou.NAME,
|
||||
tou.mobile,
|
||||
tou.image,
|
||||
tou.STATUS,
|
||||
tou.id_card,
|
||||
tou.create_time,
|
||||
tou.create_by,
|
||||
tou.update_time,
|
||||
tou.update_by,
|
||||
tou.remark,
|
||||
tou.born_day,
|
||||
tou.cert_address,
|
||||
tou.cert_number,
|
||||
tou.cert_org,
|
||||
tou.cert_type,
|
||||
tou.eff_date,
|
||||
tou.exp_date,
|
||||
tou.gender,
|
||||
tou.identity_pic,
|
||||
tou.nation,
|
||||
tou.party_name,
|
||||
tou.nation_code,
|
||||
tou.face_id,
|
||||
tou.face_group_id
|
||||
FROM zdy_user_tourist tou
|
||||
where tou.id_card = #{idCard} and tou.name = #{name} and tou.user_id = #{userId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getByIdentityAndName" resultMap="ZdyUserTouristResult">
|
||||
SELECT tou.id,
|
||||
tou.user_id,
|
||||
tou.NAME,
|
||||
tou.mobile,
|
||||
tou.STATUS,
|
||||
tou.id_card,
|
||||
tou.create_time,
|
||||
tou.create_by,
|
||||
tou.update_time,
|
||||
tou.update_by,
|
||||
tou.remark,
|
||||
tou.born_day,
|
||||
tou.cert_address,
|
||||
tou.cert_number,
|
||||
tou.cert_org,
|
||||
tou.cert_type,
|
||||
tou.eff_date,
|
||||
tou.exp_date,
|
||||
tou.gender,
|
||||
tou.identity_pic,
|
||||
tou.nation,
|
||||
tou.party_name,
|
||||
tou.nation_code
|
||||
FROM zdy_user_tourist tou
|
||||
where tou.id_card = #{idCard}
|
||||
and tou.name = #{name}
|
||||
and tou.cert_type = #{cert_type}
|
||||
and tou.user_id = 0
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectZdyUserTouristByUserId" resultMap="ZdyUserTouristResult">
|
||||
SELECT id,
|
||||
user_id,
|
||||
NAME,
|
||||
mobile,
|
||||
STATUS,
|
||||
id_card,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
remark,
|
||||
born_day,
|
||||
cert_address,
|
||||
cert_number,
|
||||
cert_org,
|
||||
cert_type,
|
||||
eff_date,
|
||||
exp_date,
|
||||
gender,
|
||||
identity_pic,
|
||||
nation,
|
||||
party_name,
|
||||
nation_code
|
||||
FROM zdy_user_tourist
|
||||
where user_id = #{userId} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user