ActivityThemeDaoMapper.xml 1.86 KB
<?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="cn.fw.dalaran.dao.ActivityThemeDao">

    <update id="alertTheme" parameterType="cn.fw.dalaran.domain.db.ActivityTheme">
        update activity_theme
        <set>
            <if test="param.theme !=null and param.theme != ''">
                theme = #{param.theme},
            </if>
            <if test="param.topic !=null and param.topic != ''">
                topic = #{param.topic},
            </if>
            <if test="param.startTime !=null">
                start_time = #{param.startTime},
            </if>
            <if test="param.endTime !=null">
                end_time = #{param.endTime},
            </if>
            <if test="param.allShop !=null">
                all_shop = #{param.allShop},
            </if>
            <if test="param.shopIds !=null and param.shopIds != ''">
                shop_ids = #{param.shopIds},
            </if>
            <if test="param.shopNames !=null and param.shopNames != ''">
                shop_names = #{param.shopNames},
            </if>
            <if test="param.validConfigJson !=null and param.validConfigJson != ''">
                valid_config_json = #{param.validConfigJson},
            </if>
            <if test="param.groupId !=null">
                group_id = #{param.groupId},
            </if>
            <if test="param.logicDel !=null">
                logic_del = #{param.logicDel},
            </if>
        </set>

        <where>
            <if test="param.id !=null">
                activity_theme.id = #{param.id}
            </if>
        </where>
    </update>

    <select id="getHasDelActivityTheme" resultType="cn.fw.dalaran.domain.db.ActivityTheme">
        SELECT * from activity_theme where logic_del = 1
    </select>

</mapper>