87 lines
2.3 KiB
XML
87 lines
2.3 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.web.mapper.ArchivedSettingMapper">
|
||
|
|
<insert id="addArchivedSetting">
|
||
|
|
INSERT INTO da_ky_archived_setting
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="archivedType != null and archivedType != ''">
|
||
|
|
archived_type,
|
||
|
|
</if>
|
||
|
|
<if test="cycle != null and cycle != ''">
|
||
|
|
cycle,
|
||
|
|
</if>
|
||
|
|
<if test="time != null and time != ''">
|
||
|
|
`time`,
|
||
|
|
</if>
|
||
|
|
<if test="weekOfDay != null and weekOfDay != ''">
|
||
|
|
week_of_day,
|
||
|
|
</if>
|
||
|
|
<if test="useStatus != null and useStatus != ''">
|
||
|
|
use_status,
|
||
|
|
</if>
|
||
|
|
<if test="cronStr != null and cronStr != ''">
|
||
|
|
cron_str,
|
||
|
|
</if>
|
||
|
|
<if test="monthDay != null and monthDay != ''">
|
||
|
|
month_day,
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="archivedType != null and archivedType != ''">
|
||
|
|
#{archivedType},
|
||
|
|
</if>
|
||
|
|
<if test="cycle != null and cycle != ''">
|
||
|
|
#{cycle},
|
||
|
|
</if>
|
||
|
|
<if test="time != null and time != ''">
|
||
|
|
#{time},
|
||
|
|
</if>
|
||
|
|
<if test="weekOfDay != null and weekOfDay != ''">
|
||
|
|
#{weekOfDay},
|
||
|
|
</if>
|
||
|
|
<if test="useStatus != null and useStatus != ''">
|
||
|
|
#{useStatus},
|
||
|
|
</if>
|
||
|
|
<if test="cronStr != null and cronStr != ''">
|
||
|
|
#{cronStr},
|
||
|
|
</if>
|
||
|
|
<if test="monthDay != null and monthDay != ''">
|
||
|
|
#{monthDay},
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
<update id="updateArchivedSetting">
|
||
|
|
UPDATE da_ky_archived_setting
|
||
|
|
<set>
|
||
|
|
<if test="archivedType != null and archivedType != ''">
|
||
|
|
archived_type = #{archivedType},
|
||
|
|
</if>
|
||
|
|
<if test="cycle != null and cycle != ''">
|
||
|
|
cycle = #{cycle},
|
||
|
|
</if>
|
||
|
|
<if test="time != null and time != ''">
|
||
|
|
`time` = #{time},
|
||
|
|
</if>
|
||
|
|
<if test="weekOfDay != null and weekOfDay != ''">
|
||
|
|
week_of_day = #{weekOfDay},
|
||
|
|
</if>
|
||
|
|
<if test="useStatus != null and useStatus != ''">
|
||
|
|
use_status = #{useStatus},
|
||
|
|
</if>
|
||
|
|
<if test="cronStr != null and cronStr != ''">
|
||
|
|
cron_str = #{cronStr},
|
||
|
|
</if>
|
||
|
|
<if test="monthDay != null and monthDay != ''">
|
||
|
|
month_day = #{monthDay},
|
||
|
|
</if>
|
||
|
|
</set>
|
||
|
|
WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<select id="getArchivedSetting" resultType="com.bonus.web.domain.ArchivedSettingDto">
|
||
|
|
select * from da_ky_archived_setting
|
||
|
|
</select>
|
||
|
|
</mapper>
|