mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 18:19:36 +08:00
117 lines
6.2 KiB
XML
117 lines
6.2 KiB
XML
![]() |
<?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.ics.admin.mapper.IcsCustomerStaffMapper">
|
||
|
|
||
|
<resultMap type="com.ics.admin.domain.IcsCustomerStaff" id="IcsCustomerStaffResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="username" column="username" />
|
||
|
<result property="mobile" column="mobile" />
|
||
|
<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="deleteFlag" column="delete_flag" />
|
||
|
<result property="icsCustomerId" column="ics_customer_id" />
|
||
|
<result property="openid" column="openid" />
|
||
|
<result property="avatar" column="avatar" />
|
||
|
<result property="gender" column="gender" />
|
||
|
<result property="status" column="status" />
|
||
|
<result property="parkId" column="park_id" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectIcsCustomerStaffVo">
|
||
|
SELECT id, username, mobile, create_by, create_time, update_by, update_time, delete_flag, ics_customer_id, openid, avatar, gender, status, park_id FROM ics_customer_staff
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectIcsCustomerStaffList" parameterType="IcsCustomerStaff" resultMap="IcsCustomerStaffResult">
|
||
|
<include refid="selectIcsCustomerStaffVo"/>
|
||
|
<where>
|
||
|
<if test="username != null and username != ''"> AND username LIKE CONCAT('%', #{username}, '%') </if>
|
||
|
<if test="icsCustomerId != null and icsCustomerId != ''"> AND ics_customer_id = #{icsCustomerId} </if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectIcsCustomerStaffById" parameterType="Long" resultMap="IcsCustomerStaffResult">
|
||
|
<include refid="selectIcsCustomerStaffVo"/>
|
||
|
WHERE id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertIcsCustomerStaff" parameterType="IcsCustomerStaff">
|
||
|
INSERT INTO ics_customer_staff
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null ">id,</if>
|
||
|
<if test="username != null and username != ''">username,</if>
|
||
|
<if test="mobile != null and mobile != ''">mobile,</if>
|
||
|
<if test="password != null and password != ''">password,</if>
|
||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||
|
<if test="createTime != null ">create_time,</if>
|
||
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||
|
<if test="updateTime != null ">update_time,</if>
|
||
|
<if test="deleteFlag != null ">delete_flag,</if>
|
||
|
<if test="icsCustomerId != null ">ics_customer_id,</if>
|
||
|
<if test="openid != null and openid != ''">openid,</if>
|
||
|
<if test="avatar != null and avatar != ''">avatar,</if>
|
||
|
<if test="gender != null and gender != ''">gender,</if>
|
||
|
<if test="status != null and status != ''">status,</if>
|
||
|
<if test="parkId != null ">park_id,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null ">#{id},</if>
|
||
|
<if test="username != null and username != ''">#{username},</if>
|
||
|
<if test="mobile != null and mobile != ''">#{mobile},</if>
|
||
|
<if test="password != null and password != ''">#{password},</if>
|
||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||
|
<if test="createTime != null ">#{createTime},</if>
|
||
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||
|
<if test="updateTime != null ">#{updateTime},</if>
|
||
|
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||
|
<if test="icsCustomerId != null ">#{icsCustomerId},</if>
|
||
|
<if test="openid != null and openid != ''">#{openid},</if>
|
||
|
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||
|
<if test="gender != null and gender != ''">#{gender},</if>
|
||
|
<if test="status != null and status != ''">#{status},</if>
|
||
|
<if test="parkId != null ">#{parkId},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateIcsCustomerStaff" parameterType="IcsCustomerStaff">
|
||
|
UPDATE ics_customer_staff
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="username != null and username != ''">username = #{username},</if>
|
||
|
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
|
||
|
<if test="password != null and password != ''">password = #{password},</if>
|
||
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||
|
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||
|
<if test="icsCustomerId != null ">ics_customer_id = #{icsCustomerId},</if>
|
||
|
<if test="openid != null and openid != ''">openid = #{openid},</if>
|
||
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||
|
<if test="gender != null and gender != ''">gender = #{gender},</if>
|
||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||
|
<if test="parkId != null ">park_id = #{parkId},</if>
|
||
|
</trim>
|
||
|
WHERE id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteIcsCustomerStaffById" parameterType="Long">
|
||
|
DELETE FROM ics_customer_staff WHERE id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteIcsCustomerStaffByIds" parameterType="String">
|
||
|
DELETE FROM ics_customer_staff where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
<select id="checkPhoneUnique" parameterType="String" resultType="IcsCustomerStaff">
|
||
|
<include refid="selectIcsCustomerStaffVo"/>
|
||
|
WHERE mobile=#{mobile}
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|