From c558c4f1130debfd785c74ff0e963afc6455f196 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@Admin>
Date: 星期三, 21 十一月 2018 16:30:42 +0800
Subject: [PATCH] Merge branch 'master' into dev1
---
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml | 33 ++++++++++++++++++++-------------
1 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml
index 463936c..c7d7a69 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml
@@ -6,25 +6,29 @@
<id column="pic_id" property="id" jdbcType="BIGINT"/>
<result column="pic_banner_id" property="bannerId" jdbcType="BIGINT"/>
<result column="pic_src" property="src" jdbcType="VARCHAR"/>
- <result column="pic_link" property="link" jdbcType="VARCHAR"/>
+ <result column="pic_params" property="params" jdbcType="VARCHAR"/>
<result column="pic_order" property="order" jdbcType="INTEGER"/>
<result column="pic_remark" property="remark" jdbcType="VARCHAR"/>
<result column="pic_state" property="state" jdbcType="INTEGER"/>
<result column="pic_createtime" property="createtime" jdbcType="TIMESTAMP"/>
<result column="pic_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
+
+ <association property="jumpDetail" column="pic_jumpid" resultMap="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.BaseResultMap"/>
+
</resultMap>
- <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_link,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime</sql>
+ <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
<include refid="Base_Column_List"/>from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}</delete>
- <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_link,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{link,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
+ <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">pic_id,</if>
<if test="bannerId != null">pic_banner_id,</if>
<if test="src != null">pic_src,</if>
- <if test="link != null">pic_link,</if>
+ <if test="jumpDetail != null">pic_jumpid,</if>
+ <if test="params != null">pic_params,</if>
<if test="order != null">pic_order,</if>
<if test="remark != null">pic_remark,</if>
<if test="state != null">pic_state,</if>
@@ -35,7 +39,8 @@
<if test="id != null">#{id,jdbcType=BIGINT},</if>
<if test="bannerId != null">#{bannerId,jdbcType=BIGINT},</if>
<if test="src != null">#{src,jdbcType=VARCHAR},</if>
- <if test="link != null">#{link,jdbcType=VARCHAR},</if>
+ <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if>
+ <if test="params != null">#{params,jdbcType=VARCHAR},</if>
<if test="order != null">#{order,jdbcType=INTEGER},</if>
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
<if test="state != null">#{state,jdbcType=INTEGER},</if>
@@ -43,12 +48,13 @@
<if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
- <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_link = #{link,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update>
+ <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update>
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture
<set>
<if test="bannerId != null">pic_banner_id=#{bannerId,jdbcType=BIGINT},</if>
<if test="src != null">pic_src=#{src,jdbcType=VARCHAR},</if>
- <if test="link != null">pic_link=#{link,jdbcType=VARCHAR},</if>
+ <if test="jumpDetail != null">pic_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if>
+ <if test="params != null">pic_params=#{params,jdbcType=VARCHAR},</if>
<if test="order != null">pic_order=#{order,jdbcType=INTEGER},</if>
<if test="remark != null">pic_remark=#{remark,jdbcType=VARCHAR},</if>
<if test="state != null">pic_state=#{state,jdbcType=INTEGER},</if>
@@ -57,12 +63,12 @@
</set> where pic_id = #{id,jdbcType=BIGINT}
</update>
-
<select id="queryByBannerID" resultMap="BaseResultMap">
- SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_swiper_banner_picture
- WHERE pic_banner_id = #{bannerId}
- ORDER BY pic_order
- LIMIT ${start},${count}
+ SELECT * FROM yeshi_ec_swiper_banner_picture p
+ LEFT JOIN `yeshi_ec_action_jumpdetail_v2` j ON j.`jp_id` = p.`pic_jumpid`
+ WHERE pic_banner_id = #{bannerId}
+ ORDER BY pic_order
+ LIMIT ${start},${count}
</select>
<select id="countQueryByBannerID" resultType="java.lang.Long">
@@ -117,8 +123,9 @@
<select id="getByBannerCard" resultMap="BaseResultMap">
- SELECT <include refid="Base_Column_List" /> FROM `yeshi_ec_swiper_banner` w
+ SELECT * FROM `yeshi_ec_swiper_banner` w
LEFT JOIN `yeshi_ec_swiper_banner_picture` p ON p.`pic_banner_id` = w.`sp_id`
+ LEFT JOIN `yeshi_ec_action_jumpdetail_v2` j ON j.`jp_id` = p.`pic_jumpid`
WHERE w.`sp_card` = #{card} AND w.`sp_state` = 0 AND p.`pic_state`= 0
ORDER BY p.`pic_order`
</select>
--
Gitblit v1.8.0