From 9670389ca9d2646f17e99c20ae04b1adae64511b Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 22 四月 2019 14:24:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml
index 1c0cc6a..0dd0764 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml
@@ -11,17 +11,19 @@
     <result column="pg_picture" property="picture" jdbcType="VARCHAR"/>
     <result column="pg_uid" property="uid" jdbcType="BIGINT"/>
     <result column="pg_versions" property="versions" jdbcType="VARCHAR"/>
-    <result column="pg_is_push" property="isPush" jdbcType="VARCHAR"/>
+    <result column="pg_remark" property="remark" jdbcType="VARCHAR"/>
+    <result column="pg_is_push" property="isPush" jdbcType="INTEGER"/>
+    <result column="pg_control_time" property="controlTime" jdbcType="TIMESTAMP"/>
     <result column="pg_push_time" property="pushTime" jdbcType="TIMESTAMP"/>
     <result column="pg_createtime" property="createTime" jdbcType="TIMESTAMP"/>
     <result column="pg_updatetime" property="updateTime" jdbcType="TIMESTAMP"/>
   </resultMap>
-  <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_is_push,pg_push_time,pg_createtime,pg_updatetime</sql>
+  <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime</sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
     <include refid="Base_Column_List"/>from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}</delete>
-  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_is_push,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{versions,jdbcType=VARCHAR},#{isPush,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
+  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{isPush,jdbcType=INTEGER},#{controlTime,jdbcType=TIMESTAMP},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">pg_id,</if>
@@ -32,7 +34,9 @@
       <if test="picture != null">pg_picture,</if>
       <if test="uid != null">pg_uid,</if>
       <if test="versions != null">pg_versions,</if>
+      <if test="remark != null">pg_remark,</if>
       <if test="isPush != null">pg_is_push,</if>
+      <if test="controlTime != null">pg_control_time,</if>
       <if test="pushTime != null">pg_push_time,</if>
       <if test="createTime != null">pg_createtime,</if>
       <if test="updateTime != null">pg_updatetime,</if>
@@ -46,13 +50,15 @@
       <if test="picture != null">#{picture,jdbcType=VARCHAR},</if>
       <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
       <if test="versions != null">#{versions,jdbcType=VARCHAR},</if>
-      <if test="isPush != null">#{isPush,jdbcType=VARCHAR},</if>
+      <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
+      <if test="isPush != null">#{isPush,jdbcType=INTEGER},</if>
+      <if test="controlTime != null">#{controlTime,jdbcType=TIMESTAMP},</if>
       <if test="pushTime != null">#{pushTime,jdbcType=TIMESTAMP},</if>
       <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
       <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_uid = #{uid,jdbcType=BIGINT},pg_versions = #{versions,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=VARCHAR},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update>
+  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_uid = #{uid,jdbcType=BIGINT},pg_versions = #{versions,jdbcType=VARCHAR},pg_remark = #{remark,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=INTEGER},pg_control_time = #{controlTime,jdbcType=TIMESTAMP},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods
     <set>
       <if test="alertTitle != null">pg_alert_title=#{alertTitle,jdbcType=VARCHAR},</if>
@@ -62,7 +68,9 @@
       <if test="picture != null">pg_picture=#{picture,jdbcType=VARCHAR},</if>
       <if test="uid != null">pg_uid=#{uid,jdbcType=BIGINT},</if>
       <if test="versions != null">pg_versions=#{versions,jdbcType=VARCHAR},</if>
-      <if test="isPush != null">pg_is_push=#{isPush,jdbcType=VARCHAR},</if>
+      <if test="remark != null">pg_remark=#{remark,jdbcType=VARCHAR},</if>
+      <if test="isPush != null">pg_is_push=#{isPush,jdbcType=INTEGER},</if>
+      <if test="controlTime != null">pg_control_time=#{controlTime,jdbcType=TIMESTAMP},</if>
       <if test="pushTime != null">pg_push_time=#{pushTime,jdbcType=TIMESTAMP},</if>
       <if test="createTime != null">pg_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
       <if test="updateTime != null">pg_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
@@ -83,7 +91,7 @@
 		   <if test='state != null'>
 		   	   AND pg_is_push = #{state}
 		   </if>
-   		ORDER BY pg_createtime desc 
+   		ORDER BY pg_is_push,pg_push_time DESC
     	LIMIT ${start},${count}
    </select>
    
@@ -118,5 +126,11 @@
 		<foreach item="item" collection="list" open="(" separator=","
 			close=")">#{item}</foreach>
    </select>
+   
+   <select id="listTask" resultMap="BaseResultMap">
+  		SELECT * FROM `yeshi_ec_push_goods` p
+		WHERE p.`pg_is_push` = 0 AND p.`pg_control_time` IS NOT NULL 
+		  	AND p.`pg_control_time` <![CDATA[<=]]> NOW()
+  </select>
 </mapper>
 

--
Gitblit v1.8.0