|
@@ -18,10 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="advType" column="adv_type" />
|
|
<result property="advType" column="adv_type" />
|
|
|
<result property="showType" column="show_type" />
|
|
<result property="showType" column="show_type" />
|
|
|
<result property="activeId" column="active_id" />
|
|
<result property="activeId" column="active_id" />
|
|
|
|
|
+ <result property="originalId" column="original_id" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsAdvVo">
|
|
<sql id="selectFsAdvVo">
|
|
|
- select adv_id, adv_title, image_url, adv_url,app_adv_url, content, create_time, update_time, status, sort, adv_type, show_type, active_id from fs_adv
|
|
|
|
|
|
|
+ select adv_id, adv_title, image_url, adv_url,app_adv_url, content, create_time, update_time, status, sort,
|
|
|
|
|
+ adv_type, show_type, active_id,original_id from fs_adv
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectFsAdvList" parameterType="FsAdv" resultMap="FsAdvResult">
|
|
<select id="selectFsAdvList" parameterType="FsAdv" resultMap="FsAdvResult">
|
|
@@ -35,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
|
|
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
|
|
|
<if test="advType != null "> and adv_type = #{advType}</if>
|
|
<if test="advType != null "> and adv_type = #{advType}</if>
|
|
|
<if test="showType != null "> and show_type = #{showType}</if>
|
|
<if test="showType != null "> and show_type = #{showType}</if>
|
|
|
|
|
+ <if test="originalId != null and originalId != ''"> and original_id = #{originalId}</if>
|
|
|
</where>
|
|
</where>
|
|
|
order by status desc,sort,adv_id desc
|
|
order by status desc,sort,adv_id desc
|
|
|
</select>
|
|
</select>
|
|
@@ -43,6 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectFsAdvVo"/>
|
|
<include refid="selectFsAdvVo"/>
|
|
|
where adv_id = #{advId}
|
|
where adv_id = #{advId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="selectFsAppAdvList" resultType="com.fs.his.domain.FsAdv">
|
|
|
|
|
+ select * from fs_adv where status = 1 and adv_type = 11 and show_type = 4 order by sort asc
|
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
<insert id="insertFsAdv" parameterType="FsAdv" useGeneratedKeys="true" keyProperty="advId">
|
|
<insert id="insertFsAdv" parameterType="FsAdv" useGeneratedKeys="true" keyProperty="advId">
|
|
|
insert into fs_adv
|
|
insert into fs_adv
|
|
@@ -59,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="advType != null">adv_type,</if>
|
|
<if test="advType != null">adv_type,</if>
|
|
|
<if test="showType != null">show_type,</if>
|
|
<if test="showType != null">show_type,</if>
|
|
|
<if test="activeId != null">active_id,</if>
|
|
<if test="activeId != null">active_id,</if>
|
|
|
|
|
+ <if test="originalId != null">original_id,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="advTitle != null and advTitle != ''">#{advTitle},</if>
|
|
<if test="advTitle != null and advTitle != ''">#{advTitle},</if>
|
|
@@ -73,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="advType != null">#{advType},</if>
|
|
<if test="advType != null">#{advType},</if>
|
|
|
<if test="showType != null">#{showType},</if>
|
|
<if test="showType != null">#{showType},</if>
|
|
|
<if test="activeId != null">#{activeId},</if>
|
|
<if test="activeId != null">#{activeId},</if>
|
|
|
|
|
+ <if test="originalId != null">#{originalId},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -91,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="advType != null">adv_type = #{advType},</if>
|
|
<if test="advType != null">adv_type = #{advType},</if>
|
|
|
<if test="showType != null">show_type = #{showType},</if>
|
|
<if test="showType != null">show_type = #{showType},</if>
|
|
|
<if test="activeId != null">active_id = #{activeId},</if>
|
|
<if test="activeId != null">active_id = #{activeId},</if>
|
|
|
|
|
+ <if test="originalId != null and originalId != ''">original_id = #{originalId},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where adv_id = #{advId}
|
|
where adv_id = #{advId}
|
|
|
</update>
|
|
</update>
|