125 lines
7.0 KiB
XML
125 lines
7.0 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.bonus.material.back.mapper.BackApplyInfoMapper">
|
||
|
|
<resultMap type="com.bonus.material.back.domain.BackApplyInfo" id="BackApplyInfoResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="code" column="code" />
|
||
|
|
<result property="taskId" column="task_id" />
|
||
|
|
<result property="backPerson" column="back_person" />
|
||
|
|
<result property="phone" column="phone" />
|
||
|
|
<result property="directAuditBy" column="direct_audit_by" />
|
||
|
|
<result property="directAuditTime" column="direct_audit_time" />
|
||
|
|
<result property="directAuditRemark" column="direct_audit_remark" />
|
||
|
|
<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="companyId" column="company_id" />
|
||
|
|
<result property="backTime" column="back_time" />
|
||
|
|
<result property="status" column="status" />
|
||
|
|
<result property="directId" column="direct_id" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectBackApplyInfoVo">
|
||
|
|
select id, code, task_id, back_person, phone, direct_audit_by, direct_audit_time, direct_audit_remark, create_by, create_time, update_by, update_time, remark, company_id, back_time, status, direct_id from back_apply_info
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectBackApplyInfoList" parameterType="com.bonus.material.back.domain.BackApplyInfo" resultMap="BackApplyInfoResult">
|
||
|
|
<include refid="selectBackApplyInfoVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
||
|
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||
|
|
<if test="backPerson != null and backPerson != ''"> and back_person = #{backPerson}</if>
|
||
|
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||
|
|
<if test="directAuditBy != null "> and direct_audit_by = #{directAuditBy}</if>
|
||
|
|
<if test="directAuditTime != null "> and direct_audit_time = #{directAuditTime}</if>
|
||
|
|
<if test="directAuditRemark != null and directAuditRemark != ''"> and direct_audit_remark = #{directAuditRemark}</if>
|
||
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||
|
|
<if test="backTime != null "> and back_time = #{backTime}</if>
|
||
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||
|
|
<if test="directId != null "> and direct_id = #{directId}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectBackApplyInfoById" parameterType="Long" resultMap="BackApplyInfoResult">
|
||
|
|
<include refid="selectBackApplyInfoVo"/>
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertBackApplyInfo" parameterType="com.bonus.material.back.domain.BackApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into back_apply_info
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="code != null">code,</if>
|
||
|
|
<if test="taskId != null">task_id,</if>
|
||
|
|
<if test="backPerson != null">back_person,</if>
|
||
|
|
<if test="phone != null">phone,</if>
|
||
|
|
<if test="directAuditBy != null">direct_audit_by,</if>
|
||
|
|
<if test="directAuditTime != null">direct_audit_time,</if>
|
||
|
|
<if test="directAuditRemark != null">direct_audit_remark,</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="companyId != null">company_id,</if>
|
||
|
|
<if test="backTime != null">back_time,</if>
|
||
|
|
<if test="status != null">status,</if>
|
||
|
|
<if test="directId != null">direct_id,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="code != null">#{code},</if>
|
||
|
|
<if test="taskId != null">#{taskId},</if>
|
||
|
|
<if test="backPerson != null">#{backPerson},</if>
|
||
|
|
<if test="phone != null">#{phone},</if>
|
||
|
|
<if test="directAuditBy != null">#{directAuditBy},</if>
|
||
|
|
<if test="directAuditTime != null">#{directAuditTime},</if>
|
||
|
|
<if test="directAuditRemark != null">#{directAuditRemark},</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="companyId != null">#{companyId},</if>
|
||
|
|
<if test="backTime != null">#{backTime},</if>
|
||
|
|
<if test="status != null">#{status},</if>
|
||
|
|
<if test="directId != null">#{directId},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateBackApplyInfo" parameterType="com.bonus.material.back.domain.BackApplyInfo">
|
||
|
|
update back_apply_info
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="code != null">code = #{code},</if>
|
||
|
|
<if test="taskId != null">task_id = #{taskId},</if>
|
||
|
|
<if test="backPerson != null">back_person = #{backPerson},</if>
|
||
|
|
<if test="phone != null">phone = #{phone},</if>
|
||
|
|
<if test="directAuditBy != null">direct_audit_by = #{directAuditBy},</if>
|
||
|
|
<if test="directAuditTime != null">direct_audit_time = #{directAuditTime},</if>
|
||
|
|
<if test="directAuditRemark != null">direct_audit_remark = #{directAuditRemark},</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="companyId != null">company_id = #{companyId},</if>
|
||
|
|
<if test="backTime != null">back_time = #{backTime},</if>
|
||
|
|
<if test="status != null">status = #{status},</if>
|
||
|
|
<if test="directId != null">direct_id = #{directId},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteBackApplyInfoById" parameterType="Long">
|
||
|
|
delete from back_apply_info where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteBackApplyInfoByIds" parameterType="String">
|
||
|
|
delete from back_apply_info where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|