emis-service/emis-biz/src/main/resources/mapper/EmisWaybillProblemFaqMapper.xml
2024-06-09 01:41:54 +08:00

130 lines
8.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.xdadan.erp.emis.mapper.EmisWaybillProblemFaqMapper">
<resultMap type="EmisWaybillProblemFaq" id="EmisWaybillProblemFaqResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
<result property="id" column="id" />
<result property="probId" column="prob_id" />
<result property="billCode" column="bill_code" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="status" column="status" />
<result property="dealResult" column="deal_result" />
<result property="showFlag" column="show_flag" />
<result property="replayId" column="replay_id" />
</resultMap>
<sql id="selectEmisWaybillProblemFaqVo">
select id, prob_id, bill_code, title, content, status, deal_result, show_flag, replay_id, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_waybill_problem_faq
</sql>
<select id="selectEmisWaybillProblemFaqList" parameterType="EmisWaybillProblemFaq" resultMap="EmisWaybillProblemFaqResult">
<include refid="selectEmisWaybillProblemFaqVo"/>
<where>
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="probId != null "> and prob_id = #{probId}</if>
<if test="billCode != null and billCode != ''"> and bill_code like concat('%', #{billCode}, '%')</if>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="content != null and content != ''"> and content like concat('%', #{content}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="dealResult != null and dealResult != ''"> and deal_result like concat('%', #{dealResult}, '%')</if>
<if test="showFlag != null and showFlag != ''"> and show_flag like concat('%', #{showFlag}, '%')</if>
<if test="replayId != null "> and replay_id = #{replayId}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisWaybillProblemFaqById" parameterType="Long" resultMap="EmisWaybillProblemFaqResult">
select id, prob_id, bill_code, title, content, status, deal_result, show_flag, replay_id, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
from emis_waybill_problem_faq a
where a.id = #{id}
</select>
<insert id="insertEmisWaybillProblemFaq" parameterType="EmisWaybillProblemFaq" useGeneratedKeys="true" keyProperty="id">
insert into emis_waybill_problem_faq
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="probId != null">prob_id,</if>
<if test="billCode != null and billCode != ''">bill_code,</if>
<if test="title != null and title != ''">title,</if>
<if test="content != null and content != ''">content,</if>
<if test="status != null">status,</if>
<if test="dealResult != null and dealResult != ''">deal_result,</if>
<if test="showFlag != null and showFlag != ''">show_flag,</if>
<if test="replayId != null">replay_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</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="remark != null and remark != ''">remark,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="probId != null">#{probId},</if>
<if test="billCode != null and billCode != ''">#{billCode},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="status != null">#{status},</if>
<if test="dealResult != null and dealResult != ''">#{dealResult},</if>
<if test="showFlag != null and showFlag != ''">#{showFlag},</if>
<if test="replayId != null">#{replayId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</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="remark != null and remark != ''">#{remark},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisWaybillProblemFaq" parameterType="EmisWaybillProblemFaq">
update emis_waybill_problem_faq
<trim prefix="SET" suffixOverrides=",">
<if test="probId != null">prob_id = #{probId},</if>
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="status != null">status = #{status},</if>
<if test="dealResult != null and dealResult != ''">deal_result = #{dealResult},</if>
<if test="showFlag != null and showFlag != ''">show_flag = #{showFlag},</if>
<if test="replayId != null">replay_id = #{replayId},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</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="remark != null and remark != ''">remark = #{remark},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisWaybillProblemFaqById" parameterType="Long">
update emis_waybill_problem_faq set del_flag='1' where id = #{id}
</delete>
<delete id="deleteEmisWaybillProblemFaqByIds" parameterType="String">
update emis_waybill_problem_faq set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>