12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?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.fs.his.mapper.FsInquiryOrderMsgMapper">
- <resultMap type="FsInquiryOrderMsg" id="FsInquiryOrderMsgResult">
- <result property="msgId" column="msg_id" />
- <result property="msgType" column="msg_type" />
- <result property="fromAccount" column="from_account" />
- <result property="toAccount" column="to_account" />
- <result property="content" column="content" />
- <result property="createTime" column="create_time" />
- <result property="orderId" column="order_id" />
- <result property="msgContentType" column="msg_content_type" />
- <result property="msgKey" column="msg_key" />
- </resultMap>
- <sql id="selectFsInquiryOrderMsgVo">
- select msg_id, msg_type, from_account, to_account, content, create_time, order_id,msg_content_type,msg_key from fs_inquiry_order_msg
- </sql>
- <select id="selectFsInquiryOrderMsgList" parameterType="FsInquiryOrderMsg" resultMap="FsInquiryOrderMsgResult">
- <include refid="selectFsInquiryOrderMsgVo"/>
- <where>
- <if test="msgType != null and msgType != ''"> and msg_type = #{msgType}</if>
- <if test="fromAccount != null and fromAccount != ''"> and from_account = #{fromAccount}</if>
- <if test="toAccount != null and toAccount != ''"> and to_account = #{toAccount}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="orderId != null "> and order_id = #{orderId}</if>
- </where>
- </select>
- <select id="selectFsInquiryOrderMsgByMsgId" parameterType="Long" resultMap="FsInquiryOrderMsgResult">
- <include refid="selectFsInquiryOrderMsgVo"/>
- where msg_id = #{msgId}
- </select>
- <insert id="insertFsInquiryOrderMsg" parameterType="FsInquiryOrderMsg" useGeneratedKeys="true" keyProperty="msgId">
- insert into fs_inquiry_order_msg
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="msgType != null">msg_type,</if>
- <if test="fromAccount != null">from_account,</if>
- <if test="toAccount != null">to_account,</if>
- <if test="content != null">content,</if>
- <if test="createTime != null">create_time,</if>
- <if test="orderId != null">order_id,</if>
- <if test="msgContentType != null">msg_content_type,</if>
- <if test="msgKey != null">msg_key,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="msgType != null">#{msgType},</if>
- <if test="fromAccount != null">#{fromAccount},</if>
- <if test="toAccount != null">#{toAccount},</if>
- <if test="content != null">#{content},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="orderId != null">#{orderId},</if>
- <if test="msgContentType != null">#{msgContentType},</if>
- <if test="msgKey != null">#{msgKey},</if>
- </trim>
- </insert>
- <update id="updateFsInquiryOrderMsg" parameterType="FsInquiryOrderMsg">
- update fs_inquiry_order_msg
- <trim prefix="SET" suffixOverrides=",">
- <if test="msgType != null">msg_type = #{msgType},</if>
- <if test="fromAccount != null">from_account = #{fromAccount},</if>
- <if test="toAccount != null">to_account = #{toAccount},</if>
- <if test="content != null">content = #{content},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="orderId != null">order_id = #{orderId},</if>
- <if test="msgContentType != null">msg_content_type = #{msgContentType},</if>
- <if test="msgKey != null">msg_key = #{msgKey},</if>
- </trim>
- where msg_id = #{msgId}
- </update>
- <delete id="deleteFsInquiryOrderMsgByMsgId" parameterType="Long">
- delete from fs_inquiry_order_msg where msg_id = #{msgId}
- </delete>
- <delete id="deleteFsInquiryOrderMsgByMsgIds" parameterType="String">
- delete from fs_inquiry_order_msg where msg_id in
- <foreach item="msgId" collection="array" open="(" separator="," close=")">
- #{msgId}
- </foreach>
- </delete>
- </mapper>
|