Browse Source

修改count与数据不对应

jun.zhou 9 years ago
parent
commit
0fe6063440

+ 16 - 3
src/main/java/com/cloudcross/ssp/model/WifiSum.java

@@ -9,6 +9,8 @@ public class WifiSum {
 
 	private Long id;
 	
+	private Long operatorId;
+	
 	private String location;
 	
 	private Long placeId;
@@ -78,14 +80,25 @@ public class WifiSum {
 		this.sum = sum;
 	}
 
+	
+	public Long getOperatorId() {
+		return operatorId;
+	}
+
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+
 	@Override
 	public String toString() {
-		return "WifiSum [id=" + id + ", location=" + location + ", placeId="
-				+ placeId + ", sum=" + sum + ", cn=" + cn + ", cnCity="
-				+ cnCity + ", placeName=" + placeName + "]";
+		return "WifiSum [id=" + id + ", operatorId=" + operatorId
+				+ ", location=" + location + ", placeId=" + placeId + ", sum="
+				+ sum + ", cn=" + cn + ", cnCity=" + cnCity + ", placeName="
+				+ placeName + "]";
 	}
 
 	
 	
 	
+	
 }

+ 1 - 1
src/main/java/com/cloudcross/ssp/model/mapper/advertiser.sql.xml

@@ -38,7 +38,7 @@
 			tar.updated updated,
 			tar.status status
 		from t_advertiser tar 
-		LEFT JOIN t_order tor on tar.id = tor.advertiser_id 
+		LEFT JOIN t_order tor on tar.id = tor.advertiser_id and tor.status != -1
 		LEFT JOIN t_industry tiy ON tar.industry_id = tiy.id 
 		where tar.status != -1
 		 <if test="value!=null">

+ 2 - 2
src/main/java/com/cloudcross/ssp/model/mapper/campaign.sql.xml

@@ -141,8 +141,8 @@
 		select
 		<include refid="base_column" />
 		,count(t_adgroup.campaign_id) as groupNumber from t_campaign left join t_adgroup
-		    on t_campaign.id = t_adgroup.campaign_id 
-		    where t_campaign.order_id = #{orderId} and t_campaign.status != -1 AND t_adgroup.status != -1
+		    on t_campaign.id = t_adgroup.campaign_id and t_adgroup.status != -1
+		    where t_campaign.order_id = #{orderId} and t_campaign.status != -1 
 		 	<if test="key!=null and value!=null">
 	            <choose>
 					<when test="key=='name'">

+ 2 - 3
src/main/java/com/cloudcross/ssp/model/mapper/order.sql.xml

@@ -14,9 +14,8 @@
 	</sql>
 	
 	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.model.Order">
-		select 
-		<include refid="base_column" />
-	,count(t_campaign.order_id) as campaignNumber from t_order left join t_campaign on t_order.id = t_campaign.order_id 
+		select <include refid="base_column" />,count(t_campaign.order_id) as campaignNumber 
+		from t_order left join t_campaign on t_order.id = t_campaign.order_id 
         and t_campaign.status != -1 and t_campaign.advertiser_id = #{advertiserId}
 		where 1=1
 		<if test="advMark!=null">