|  | @@ -0,0 +1,127 @@
 | 
	
		
			
				|  |  | +<?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.ruoyi.sim.mapper.SimMsgMapper">
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <resultMap type="SimMsg" id="SimMsgResult">
 | 
	
		
			
				|  |  | +        <result property="simMsgId" column="sim_msg_id"/>
 | 
	
		
			
				|  |  | +        <result property="simId" column="sim_id"/>
 | 
	
		
			
				|  |  | +        <result property="state" column="state"/>
 | 
	
		
			
				|  |  | +        <result property="priority" column="priority"/>
 | 
	
		
			
				|  |  | +        <result property="sendMsg" column="send_msg"/>
 | 
	
		
			
				|  |  | +        <result property="sendTime" column="send_time"/>
 | 
	
		
			
				|  |  | +        <result property="receiveMsg" column="receive_msg"/>
 | 
	
		
			
				|  |  | +        <result property="receiveTime" column="receive_time"/>
 | 
	
		
			
				|  |  | +        <result property="retryCount" column="retry_count"/>
 | 
	
		
			
				|  |  | +        <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"/>
 | 
	
		
			
				|  |  | +    </resultMap>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <sql id="selectSimMsgVo">
 | 
	
		
			
				|  |  | +        select sim_msg_id,
 | 
	
		
			
				|  |  | +               sim_id,
 | 
	
		
			
				|  |  | +               state,
 | 
	
		
			
				|  |  | +               priority,
 | 
	
		
			
				|  |  | +               send_msg,
 | 
	
		
			
				|  |  | +               send_time,
 | 
	
		
			
				|  |  | +               receive_msg,
 | 
	
		
			
				|  |  | +               receive_time,
 | 
	
		
			
				|  |  | +               retry_count,
 | 
	
		
			
				|  |  | +               create_by,
 | 
	
		
			
				|  |  | +               create_time,
 | 
	
		
			
				|  |  | +               update_by,
 | 
	
		
			
				|  |  | +               update_time,
 | 
	
		
			
				|  |  | +               remark
 | 
	
		
			
				|  |  | +        from sim_sim_msg
 | 
	
		
			
				|  |  | +    </sql>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="selectSimMsgList" parameterType="SimMsg" resultMap="SimMsgResult">
 | 
	
		
			
				|  |  | +        <include refid="selectSimMsgVo"/>
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +            <if test="simId != null ">and sim_id = #{simId}</if>
 | 
	
		
			
				|  |  | +            <if test="state != null  and state != ''">and state = #{state}</if>
 | 
	
		
			
				|  |  | +            <if test="priority != null ">and priority = #{priority}</if>
 | 
	
		
			
				|  |  | +            <if test="sendMsg != null  and sendMsg != ''">and send_msg = #{sendMsg}</if>
 | 
	
		
			
				|  |  | +            <if test="sendTime != null ">and send_time = #{sendTime}</if>
 | 
	
		
			
				|  |  | +            <if test="receiveMsg != null  and receiveMsg != ''">and receive_msg = #{receiveMsg}</if>
 | 
	
		
			
				|  |  | +            <if test="receiveTime != null ">and receive_time = #{receiveTime}</if>
 | 
	
		
			
				|  |  | +            <if test="retryCount != null ">and retry_count = #{retryCount}</if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="selectSimMsgBySimMsgId" parameterType="Long" resultMap="SimMsgResult">
 | 
	
		
			
				|  |  | +        <include refid="selectSimMsgVo"/>
 | 
	
		
			
				|  |  | +        where sim_msg_id = #{simMsgId}
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <insert id="insertSimMsg" parameterType="SimMsg" useGeneratedKeys="true" keyProperty="simMsgId">
 | 
	
		
			
				|  |  | +        insert into sim_sim_msg
 | 
	
		
			
				|  |  | +        <trim prefix="(" suffix=")" suffixOverrides=",">
 | 
	
		
			
				|  |  | +            <if test="simId != null">sim_id,</if>
 | 
	
		
			
				|  |  | +            <if test="state != null and state != ''">state,</if>
 | 
	
		
			
				|  |  | +            <if test="priority != null">priority,</if>
 | 
	
		
			
				|  |  | +            <if test="sendMsg != null">send_msg,</if>
 | 
	
		
			
				|  |  | +            <if test="sendTime != null">send_time,</if>
 | 
	
		
			
				|  |  | +            <if test="receiveMsg != null">receive_msg,</if>
 | 
	
		
			
				|  |  | +            <if test="receiveTime != null">receive_time,</if>
 | 
	
		
			
				|  |  | +            <if test="retryCount != null">retry_count,</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>
 | 
	
		
			
				|  |  | +        </trim>
 | 
	
		
			
				|  |  | +        <trim prefix="values (" suffix=")" suffixOverrides=",">
 | 
	
		
			
				|  |  | +            <if test="simId != null">#{simId},</if>
 | 
	
		
			
				|  |  | +            <if test="state != null and state != ''">#{state},</if>
 | 
	
		
			
				|  |  | +            <if test="priority != null">#{priority},</if>
 | 
	
		
			
				|  |  | +            <if test="sendMsg != null">#{sendMsg},</if>
 | 
	
		
			
				|  |  | +            <if test="sendTime != null">#{sendTime},</if>
 | 
	
		
			
				|  |  | +            <if test="receiveMsg != null">#{receiveMsg},</if>
 | 
	
		
			
				|  |  | +            <if test="receiveTime != null">#{receiveTime},</if>
 | 
	
		
			
				|  |  | +            <if test="retryCount != null">#{retryCount},</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>
 | 
	
		
			
				|  |  | +        </trim>
 | 
	
		
			
				|  |  | +    </insert>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <update id="updateSimMsg" parameterType="SimMsg">
 | 
	
		
			
				|  |  | +        update sim_sim_msg
 | 
	
		
			
				|  |  | +        <trim prefix="SET" suffixOverrides=",">
 | 
	
		
			
				|  |  | +            <if test="simId != null">sim_id = #{simId},</if>
 | 
	
		
			
				|  |  | +            <if test="state != null and state != ''">state = #{state},</if>
 | 
	
		
			
				|  |  | +            <if test="priority != null">priority = #{priority},</if>
 | 
	
		
			
				|  |  | +            <if test="sendMsg != null">send_msg = #{sendMsg},</if>
 | 
	
		
			
				|  |  | +            <if test="sendTime != null">send_time = #{sendTime},</if>
 | 
	
		
			
				|  |  | +            <if test="receiveMsg != null">receive_msg = #{receiveMsg},</if>
 | 
	
		
			
				|  |  | +            <if test="receiveTime != null">receive_time = #{receiveTime},</if>
 | 
	
		
			
				|  |  | +            <if test="retryCount != null">retry_count = #{retryCount},</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>
 | 
	
		
			
				|  |  | +        </trim>
 | 
	
		
			
				|  |  | +        where sim_msg_id = #{simMsgId}
 | 
	
		
			
				|  |  | +    </update>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <delete id="deleteSimMsgBySimMsgId" parameterType="Long">
 | 
	
		
			
				|  |  | +        delete
 | 
	
		
			
				|  |  | +        from sim_sim_msg
 | 
	
		
			
				|  |  | +        where sim_msg_id = #{simMsgId}
 | 
	
		
			
				|  |  | +    </delete>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <delete id="deleteSimMsgBySimMsgIds" parameterType="String">
 | 
	
		
			
				|  |  | +        delete from sim_sim_msg where sim_msg_id in
 | 
	
		
			
				|  |  | +        <foreach item="simMsgId" collection="array" open="(" separator="," close=")">
 | 
	
		
			
				|  |  | +            #{simMsgId}
 | 
	
		
			
				|  |  | +        </foreach>
 | 
	
		
			
				|  |  | +    </delete>
 | 
	
		
			
				|  |  | +</mapper>
 |