From 9d35ba657fa5e3add766405d76e3ff8c4dcd4ad4 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 04 七月 2020 15:38:00 +0800
Subject: [PATCH] 多系统兼容优化

---
 fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml |  299 ++++++++++++++++++++++++++++++++---------------------------
 1 files changed, 161 insertions(+), 138 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 088b6ad..c730475 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
@@ -2,146 +2,169 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
 <mapper namespace="com.yeshi.fanli.dao.mybatis.push.PushGoodsMapper">
-  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.push.PushGoods">
-    <id column="pg_id" property="id" jdbcType="BIGINT"/>
-    <result column="pg_alert_title" property="alertTitle" jdbcType="VARCHAR"/>
-    <result column="pg_alert_content" property="alertContent" jdbcType="VARCHAR"/>
-    <result column="pg_title" property="title" jdbcType="VARCHAR"/>
-    <result column="pg_content" property="content" jdbcType="VARCHAR"/>
-    <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_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"/>
-    <result column="pg_type" property="type" jdbcType="INTEGER"/>
-    <result column="pg_other_id" property="otherId" jdbcType="VARCHAR"/>
-    <result column="pg_scan_num" property="scanNum" jdbcType="INTEGER"/>
-  </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_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num</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_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num) 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},#{type,jdbcType=INTEGER},#{otherId,jdbcType=VARCHAR},#{scanNum,jdbcType=INTEGER})</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>
-      <if test="alertTitle != null">pg_alert_title,</if>
-      <if test="alertContent != null">pg_alert_content,</if>
-      <if test="title != null">pg_title,</if>
-      <if test="content != null">pg_content,</if>
-      <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>
-      <if test="type != null">pg_type,</if>
-      <if test="otherId != null">pg_other_id,</if>
-      <if test="scanNum != null">pg_scan_num,</if>
-    </trim>values
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">#{id,jdbcType=BIGINT},</if>
-      <if test="alertTitle != null">#{alertTitle,jdbcType=VARCHAR},</if>
-      <if test="alertContent != null">#{alertContent,jdbcType=VARCHAR},</if>
-      <if test="title != null">#{title,jdbcType=VARCHAR},</if>
-      <if test="content != null">#{content,jdbcType=VARCHAR},</if>
-      <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="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>
-      <if test="type != null">#{type,jdbcType=INTEGER},</if>
-      <if test="otherId != null">#{otherId,jdbcType=VARCHAR},</if>
-      <if test="scanNum != null">#{scanNum,jdbcType=INTEGER},</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_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},pg_type = #{type,jdbcType=INTEGER},pg_other_id = #{otherId,jdbcType=VARCHAR},pg_scan_num = #{scanNum,jdbcType=INTEGER} 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>
-      <if test="alertContent != null">pg_alert_content=#{alertContent,jdbcType=VARCHAR},</if>
-      <if test="title != null">pg_title=#{title,jdbcType=VARCHAR},</if>
-      <if test="content != null">pg_content=#{content,jdbcType=VARCHAR},</if>
-      <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="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>
-      <if test="type != null">pg_type=#{type,jdbcType=INTEGER},</if>
-      <if test="otherId != null">pg_other_id=#{otherId,jdbcType=VARCHAR},</if>
-      <if test="scanNum != null">pg_scan_num=#{scanNum,jdbcType=INTEGER},</if>
-    </set> where pg_id = #{id,jdbcType=BIGINT}
-  </update>
-  <delete id="deleteBatchByPrimaryKey"  parameterType="java.util.List">
-		delete from yeshi_ec_push_goods where pg_id in
-		<foreach item="item" collection="list" open="(" separator=","
-			close=")">#{item}</foreach>
-   </delete>
-  
-   <select id="listQuery" resultMap="BaseResultMap">
-	    SELECT <include refid="Base_Column_List" />,IF(`pg_control_time` IS NOT NULL,pg_control_time,`pg_createtime`) AS orderyTime  FROM yeshi_ec_push_goods
-	    WHERE 1=1
-		   <if test='key != null and key != ""'>
-		   	   AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%') 
-		   </if>
-		   <if test='state != null'>
-		   	   AND pg_is_push = #{state}
-		   </if>
-   		ORDER BY orderyTime DESC
-    	LIMIT ${start},${count}
-   </select>
-   
-   <select id="countQuery" resultType="java.lang.Long">
-	    SELECT IFNULL(count(pg_id),0)  FROM yeshi_ec_push_goods 
-	    WHERE 1=1
-		   <if test='key != null and key != ""'>
-		   	   AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%') 
-		   </if>
-		    <if test='state != null'>
-		   	   AND pg_is_push = #{state}
-		   </if>
-	</select>
-	
-   <select id="listHistoryByPushTime" resultMap="BaseResultMap">
-	    SELECT <include refid="Base_Column_List" />  FROM yeshi_ec_push_goods
-	    WHERE pg_is_push = 1   AND <![CDATA[pg_push_time >= #{pushTime}]]>
-	    	  AND (pg_uid is null <if test='uid != null'>or pg_uid = #{uid} </if>)
-   		ORDER BY pg_push_time desc 
-    	LIMIT ${start},${count}
-   </select>
-   
-   <select id="countHistoryByPushTime" resultType="java.lang.Long">
-	    SELECT IFNULL(count(pg_id),0)  FROM yeshi_ec_push_goods
-	    WHERE pg_is_push = 1   AND <![CDATA[pg_push_time >= #{pushTime}]]>
-	    	  AND (pg_uid is null <if test='uid != null'>or pg_uid = #{uid} </if>)
-   </select>
-   
+    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.push.PushGoods">
+        <id column="pg_id" property="id" jdbcType="BIGINT"/>
+        <result column="pg_alert_title" property="alertTitle" jdbcType="VARCHAR"/>
+        <result column="pg_alert_content" property="alertContent" jdbcType="VARCHAR"/>
+        <result column="pg_title" property="title" jdbcType="VARCHAR"/>
+        <result column="pg_content" property="content" jdbcType="VARCHAR"/>
+        <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_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"/>
+        <result column="pg_type" property="type" jdbcType="INTEGER"/>
+        <result column="pg_other_id" property="otherId" jdbcType="VARCHAR"/>
+        <result column="pg_scan_num" property="scanNum" jdbcType="INTEGER"/>
+        <result column="pg_system" property="system" jdbcType="VARCHAR"/>
+    </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_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num,pg_system</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_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num,pg_system) 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},#{type,jdbcType=INTEGER},#{otherId,jdbcType=VARCHAR},#{scanNum,jdbcType=INTEGER},#{system,jdbcType=VARCHAR})</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>
+            <if test="alertTitle != null">pg_alert_title,</if>
+            <if test="alertContent != null">pg_alert_content,</if>
+            <if test="title != null">pg_title,</if>
+            <if test="content != null">pg_content,</if>
+            <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>
+            <if test="type != null">pg_type,</if>
+            <if test="otherId != null">pg_other_id,</if>
+            <if test="scanNum != null">pg_scan_num,</if>
+            <if test="system != null">pg_system,</if>
+        </trim>
+        values
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id,jdbcType=BIGINT},</if>
+            <if test="alertTitle != null">#{alertTitle,jdbcType=VARCHAR},</if>
+            <if test="alertContent != null">#{alertContent,jdbcType=VARCHAR},</if>
+            <if test="title != null">#{title,jdbcType=VARCHAR},</if>
+            <if test="content != null">#{content,jdbcType=VARCHAR},</if>
+            <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="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>
+            <if test="type != null">#{type,jdbcType=INTEGER},</if>
+            <if test="otherId != null">#{otherId,jdbcType=VARCHAR},</if>
+            <if test="scanNum != null">#{scanNum,jdbcType=INTEGER},</if>
+            <if test="system != null">#{system,jdbcType=VARCHAR},</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_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},pg_type = #{type,jdbcType=INTEGER},pg_other_id = #{otherId,jdbcType=VARCHAR},pg_scan_num = #{scanNum,jdbcType=INTEGER},pg_system = #{system,jdbcType=VARCHAR} 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>
+            <if test="alertContent != null">pg_alert_content=#{alertContent,jdbcType=VARCHAR},</if>
+            <if test="title != null">pg_title=#{title,jdbcType=VARCHAR},</if>
+            <if test="content != null">pg_content=#{content,jdbcType=VARCHAR},</if>
+            <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="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>
+            <if test="type != null">pg_type=#{type,jdbcType=INTEGER},</if>
+            <if test="otherId != null">pg_other_id=#{otherId,jdbcType=VARCHAR},</if>
+            <if test="scanNum != null">pg_scan_num=#{scanNum,jdbcType=INTEGER},</if>
+            <if test="system != null">pg_system=#{system,jdbcType=VARCHAR},</if>
+        </set>
+        where pg_id = #{id,jdbcType=BIGINT}
+    </update>
+    <delete id="deleteBatchByPrimaryKey" parameterType="java.util.List">
+        delete from yeshi_ec_push_goods where pg_id in
+        <foreach item="item" collection="list" open="(" separator=","
+                 close=")">#{item}
+        </foreach>
+    </delete>
+
+    <select id="listQuery" resultMap="BaseResultMap">
+        SELECT<include refid="Base_Column_List"/>,IF(`pg_control_time` IS NOT NULL,pg_control_time,`pg_createtime`) AS
+        orderyTime FROM yeshi_ec_push_goods
+        WHERE 1=1
+        AND pg_system=#{system}
+        <if test='key != null and key != ""'>
+            AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%')
+        </if>
+        <if test='state != null'>
+            AND pg_is_push = #{state}
+        </if>
+
+
+
+        ORDER BY orderyTime DESC
+        LIMIT ${start},${count}
+    </select>
+
+    <select id="countQuery" resultType="java.lang.Long">
+        SELECT IFNULL(count(pg_id),0) FROM yeshi_ec_push_goods
+        WHERE 1=1
+        AND pg_system=#{system}
+        <if test='key != null and key != ""'>
+            AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%')
+        </if>
+        <if test='state != null'>
+            AND pg_is_push = #{state}
+        </if>
+    </select>
+
+    <select id="listHistoryByPushTime" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM yeshi_ec_push_goods
+        WHERE pg_is_push = 1   AND pg_system=#{system} AND <![CDATA[pg_push_time >= #{pushTime}]]>
+        AND (pg_uid is null <if test='uid != null'>or pg_uid = #{uid}</if>)
+        ORDER BY pg_push_time desc
+        LIMIT ${start},${count}
+    </select>
+
+    <select id="countHistoryByPushTime" resultType="java.lang.Long">
+        SELECT IFNULL(count(pg_id),0) FROM yeshi_ec_push_goods
+        WHERE pg_is_push = 1   AND pg_system=#{system} AND <![CDATA[pg_push_time >= #{pushTime}]]>
+        AND (pg_uid is null <if test='uid != null'>or pg_uid = #{uid}</if>)
+    </select>
+
     <select id="listByPushState" resultMap="BaseResultMap" parameterType="java.util.List">
-	    SELECT <include refid="Base_Column_List" />  FROM yeshi_ec_push_goods
-	    WHERE  pg_is_push = 1 AND  pg_id in
-		<foreach item="item" collection="list" open="(" separator=","
-			close=")">#{item}</foreach>
-   </select>
-   
-   <select id="listTask" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM yeshi_ec_push_goods
+        WHERE pg_is_push = 1 AND pg_id in
+        <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 
+		WHERE p.`pg_is_push` = 0   AND pg_system=#{system} AND p.`pg_control_time` IS NOT NULL
 		  	AND p.`pg_control_time` <![CDATA[<=]]> NOW()
   </select>
 </mapper>

--
Gitblit v1.8.0