|
@@ -5,166 +5,182 @@
|
|
|
<mapper namespace="com.jjt.push.mapper.PushConfigMapper">
|
|
|
|
|
|
<resultMap type="PushConfig" id="PushConfigResult">
|
|
|
- <result property="pcId" column="PC_ID"/>
|
|
|
- <result property="flagSms" column="FLAG_SMS"/>
|
|
|
- <result property="flagMail" column="FLAG_MAIL"/>
|
|
|
- <result property="configSms" column="CONFIG_SMS"/>
|
|
|
- <result property="configMail" column="CONFIG_MAIL"/>
|
|
|
- <result property="lowSms" column="LOW_SMS"/>
|
|
|
- <result property="lowMail" column="LOW_MAIL"/>
|
|
|
- <result property="midSms" column="MID_SMS"/>
|
|
|
- <result property="midMail" column="MID_MAIL"/>
|
|
|
- <result property="highSms" column="HIGH_SMS"/>
|
|
|
- <result property="highMail" column="HIGH_MAIL"/>
|
|
|
- <result property="remark" column="REMARK"/>
|
|
|
+ <result property="pcId" column="PC_ID"/>
|
|
|
+ <result property="flagSms" column="FLAG_SMS"/>
|
|
|
+ <result property="flagMail" column="FLAG_MAIL"/>
|
|
|
+ <result property="configSms" column="CONFIG_SMS"/>
|
|
|
+ <result property="configMail" column="CONFIG_MAIL"/>
|
|
|
+ <result property="lowSms" column="LOW_SMS"/>
|
|
|
+ <result property="lowMail" column="LOW_MAIL"/>
|
|
|
+ <result property="midSms" column="MID_SMS"/>
|
|
|
+ <result property="midMail" column="MID_MAIL"/>
|
|
|
+ <result property="highSms" column="HIGH_SMS"/>
|
|
|
+ <result property="highMail" column="HIGH_MAIL"/>
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectPushConfigVo">
|
|
|
- select PC_ID, FLAG_SMS, FLAG_MAIL, CONFIG_SMS, CONFIG_MAIL, LOW_SMS, LOW_MAIL, MID_SMS, MID_MAIL, HIGH_SMS, HIGH_MAIL, REMARK
|
|
|
+ select PC_ID,
|
|
|
+ FLAG_SMS,
|
|
|
+ FLAG_MAIL,
|
|
|
+ CONFIG_SMS,
|
|
|
+ CONFIG_MAIL,
|
|
|
+ LOW_SMS,
|
|
|
+ LOW_MAIL,
|
|
|
+ MID_SMS,
|
|
|
+ MID_MAIL,
|
|
|
+ HIGH_SMS,
|
|
|
+ HIGH_MAIL,
|
|
|
+ REMARK
|
|
|
from push_config
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectPushConfigList" parameterType="PushConfig" resultMap="PushConfigResult">
|
|
|
<include refid="selectPushConfigVo"/>
|
|
|
<where>
|
|
|
- <if test="flagSms != null and flagSms != ''">
|
|
|
- and FLAG_SMS = #{flagSms}
|
|
|
- </if>
|
|
|
- <if test="flagMail != null and flagMail != ''">
|
|
|
- and FLAG_MAIL = #{flagMail}
|
|
|
- </if>
|
|
|
- <if test="configSms != null and configSms != ''">
|
|
|
- and CONFIG_SMS = #{configSms}
|
|
|
- </if>
|
|
|
- <if test="configMail != null and configMail != ''">
|
|
|
- and CONFIG_MAIL = #{configMail}
|
|
|
- </if>
|
|
|
- <if test="lowSms != null and lowSms != ''">
|
|
|
- and LOW_SMS = #{lowSms}
|
|
|
- </if>
|
|
|
- <if test="lowMail != null and lowMail != ''">
|
|
|
- and LOW_MAIL = #{lowMail}
|
|
|
- </if>
|
|
|
- <if test="midSms != null and midSms != ''">
|
|
|
- and MID_SMS = #{midSms}
|
|
|
- </if>
|
|
|
- <if test="midMail != null and midMail != ''">
|
|
|
- and MID_MAIL = #{midMail}
|
|
|
- </if>
|
|
|
- <if test="highSms != null and highSms != ''">
|
|
|
- and HIGH_SMS = #{highSms}
|
|
|
- </if>
|
|
|
- <if test="highMail != null and highMail != ''">
|
|
|
- and HIGH_MAIL = #{highMail}
|
|
|
- </if>
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and REMARK = #{remark}
|
|
|
- </if>
|
|
|
+ <if test="flagSms != null and flagSms != ''">
|
|
|
+ and FLAG_SMS = #{flagSms}
|
|
|
+ </if>
|
|
|
+ <if test="flagMail != null and flagMail != ''">
|
|
|
+ and FLAG_MAIL = #{flagMail}
|
|
|
+ </if>
|
|
|
+ <if test="configSms != null and configSms != ''">
|
|
|
+ and CONFIG_SMS = #{configSms}
|
|
|
+ </if>
|
|
|
+ <if test="configMail != null and configMail != ''">
|
|
|
+ and CONFIG_MAIL = #{configMail}
|
|
|
+ </if>
|
|
|
+ <if test="lowSms != null and lowSms != ''">
|
|
|
+ and LOW_SMS = #{lowSms}
|
|
|
+ </if>
|
|
|
+ <if test="lowMail != null and lowMail != ''">
|
|
|
+ and LOW_MAIL = #{lowMail}
|
|
|
+ </if>
|
|
|
+ <if test="midSms != null and midSms != ''">
|
|
|
+ and MID_SMS = #{midSms}
|
|
|
+ </if>
|
|
|
+ <if test="midMail != null and midMail != ''">
|
|
|
+ and MID_MAIL = #{midMail}
|
|
|
+ </if>
|
|
|
+ <if test="highSms != null and highSms != ''">
|
|
|
+ and HIGH_SMS = #{highSms}
|
|
|
+ </if>
|
|
|
+ <if test="highMail != null and highMail != ''">
|
|
|
+ and HIGH_MAIL = #{highMail}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and REMARK = #{remark}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPushConfigByPcId" parameterType="Long"
|
|
|
resultMap="PushConfigResult">
|
|
|
- <include refid="selectPushConfigVo"/>
|
|
|
- where PC_ID = #{pcId}
|
|
|
+ <include refid="selectPushConfigVo"/>
|
|
|
+ where PC_ID = #{pcId}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertPushConfig" parameterType="PushConfig" useGeneratedKeys="true"
|
|
|
keyProperty="pcId">
|
|
|
insert into push_config
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="flagSms != null">FLAG_SMS,
|
|
|
- </if>
|
|
|
- <if test="flagMail != null">FLAG_MAIL,
|
|
|
- </if>
|
|
|
- <if test="configSms != null">CONFIG_SMS,
|
|
|
- </if>
|
|
|
- <if test="configMail != null">CONFIG_MAIL,
|
|
|
- </if>
|
|
|
- <if test="lowSms != null">LOW_SMS,
|
|
|
- </if>
|
|
|
- <if test="lowMail != null">LOW_MAIL,
|
|
|
- </if>
|
|
|
- <if test="midSms != null">MID_SMS,
|
|
|
- </if>
|
|
|
- <if test="midMail != null">MID_MAIL,
|
|
|
- </if>
|
|
|
- <if test="highSms != null">HIGH_SMS,
|
|
|
- </if>
|
|
|
- <if test="highMail != null">HIGH_MAIL,
|
|
|
- </if>
|
|
|
- <if test="remark != null">REMARK,
|
|
|
- </if>
|
|
|
+ <if test="pcId != null">PC_ID,
|
|
|
+ </if>
|
|
|
+ <if test="flagSms != null">FLAG_SMS,
|
|
|
+ </if>
|
|
|
+ <if test="flagMail != null">FLAG_MAIL,
|
|
|
+ </if>
|
|
|
+ <if test="configSms != null">CONFIG_SMS,
|
|
|
+ </if>
|
|
|
+ <if test="configMail != null">CONFIG_MAIL,
|
|
|
+ </if>
|
|
|
+ <if test="lowSms != null">LOW_SMS,
|
|
|
+ </if>
|
|
|
+ <if test="lowMail != null">LOW_MAIL,
|
|
|
+ </if>
|
|
|
+ <if test="midSms != null">MID_SMS,
|
|
|
+ </if>
|
|
|
+ <if test="midMail != null">MID_MAIL,
|
|
|
+ </if>
|
|
|
+ <if test="highSms != null">HIGH_SMS,
|
|
|
+ </if>
|
|
|
+ <if test="highMail != null">HIGH_MAIL,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="flagSms != null">#{flagSms},
|
|
|
- </if>
|
|
|
- <if test="flagMail != null">#{flagMail},
|
|
|
- </if>
|
|
|
- <if test="configSms != null">#{configSms},
|
|
|
- </if>
|
|
|
- <if test="configMail != null">#{configMail},
|
|
|
- </if>
|
|
|
- <if test="lowSms != null">#{lowSms},
|
|
|
- </if>
|
|
|
- <if test="lowMail != null">#{lowMail},
|
|
|
- </if>
|
|
|
- <if test="midSms != null">#{midSms},
|
|
|
- </if>
|
|
|
- <if test="midMail != null">#{midMail},
|
|
|
- </if>
|
|
|
- <if test="highSms != null">#{highSms},
|
|
|
- </if>
|
|
|
- <if test="highMail != null">#{highMail},
|
|
|
- </if>
|
|
|
- <if test="remark != null">#{remark},
|
|
|
- </if>
|
|
|
+ <if test="pcId != null">#{pcId},
|
|
|
+ </if>
|
|
|
+ <if test="flagSms != null">#{flagSms},
|
|
|
+ </if>
|
|
|
+ <if test="flagMail != null">#{flagMail},
|
|
|
+ </if>
|
|
|
+ <if test="configSms != null">#{configSms},
|
|
|
+ </if>
|
|
|
+ <if test="configMail != null">#{configMail},
|
|
|
+ </if>
|
|
|
+ <if test="lowSms != null">#{lowSms},
|
|
|
+ </if>
|
|
|
+ <if test="lowMail != null">#{lowMail},
|
|
|
+ </if>
|
|
|
+ <if test="midSms != null">#{midSms},
|
|
|
+ </if>
|
|
|
+ <if test="midMail != null">#{midMail},
|
|
|
+ </if>
|
|
|
+ <if test="highSms != null">#{highSms},
|
|
|
+ </if>
|
|
|
+ <if test="highMail != null">#{highMail},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">#{remark},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updatePushConfig" parameterType="PushConfig">
|
|
|
update push_config
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="flagSms != null">FLAG_SMS =
|
|
|
- #{flagSms},
|
|
|
- </if>
|
|
|
- <if test="flagMail != null">FLAG_MAIL =
|
|
|
- #{flagMail},
|
|
|
- </if>
|
|
|
- <if test="configSms != null">CONFIG_SMS =
|
|
|
- #{configSms},
|
|
|
- </if>
|
|
|
- <if test="configMail != null">CONFIG_MAIL =
|
|
|
- #{configMail},
|
|
|
- </if>
|
|
|
- <if test="lowSms != null">LOW_SMS =
|
|
|
- #{lowSms},
|
|
|
- </if>
|
|
|
- <if test="lowMail != null">LOW_MAIL =
|
|
|
- #{lowMail},
|
|
|
- </if>
|
|
|
- <if test="midSms != null">MID_SMS =
|
|
|
- #{midSms},
|
|
|
- </if>
|
|
|
- <if test="midMail != null">MID_MAIL =
|
|
|
- #{midMail},
|
|
|
- </if>
|
|
|
- <if test="highSms != null">HIGH_SMS =
|
|
|
- #{highSms},
|
|
|
- </if>
|
|
|
- <if test="highMail != null">HIGH_MAIL =
|
|
|
- #{highMail},
|
|
|
- </if>
|
|
|
- <if test="remark != null">REMARK =
|
|
|
- #{remark},
|
|
|
- </if>
|
|
|
+ <if test="flagSms != null">FLAG_SMS =
|
|
|
+ #{flagSms},
|
|
|
+ </if>
|
|
|
+ <if test="flagMail != null">FLAG_MAIL =
|
|
|
+ #{flagMail},
|
|
|
+ </if>
|
|
|
+ <if test="configSms != null">CONFIG_SMS =
|
|
|
+ #{configSms},
|
|
|
+ </if>
|
|
|
+ <if test="configMail != null">CONFIG_MAIL =
|
|
|
+ #{configMail},
|
|
|
+ </if>
|
|
|
+ <if test="lowSms != null">LOW_SMS =
|
|
|
+ #{lowSms},
|
|
|
+ </if>
|
|
|
+ <if test="lowMail != null">LOW_MAIL =
|
|
|
+ #{lowMail},
|
|
|
+ </if>
|
|
|
+ <if test="midSms != null">MID_SMS =
|
|
|
+ #{midSms},
|
|
|
+ </if>
|
|
|
+ <if test="midMail != null">MID_MAIL =
|
|
|
+ #{midMail},
|
|
|
+ </if>
|
|
|
+ <if test="highSms != null">HIGH_SMS =
|
|
|
+ #{highSms},
|
|
|
+ </if>
|
|
|
+ <if test="highMail != null">HIGH_MAIL =
|
|
|
+ #{highMail},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">REMARK =
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
where PC_ID = #{pcId}
|
|
|
</update>
|
|
|
|
|
|
<delete id="deletePushConfigByPcId" parameterType="Long">
|
|
|
delete
|
|
|
- from push_config where PC_ID = #{pcId}
|
|
|
+ from push_config
|
|
|
+ where PC_ID = #{pcId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deletePushConfigByPcIds" parameterType="String">
|