Browse Source

Merge branch 'master' of gitlab.cloudcross.net:ssp/ssp_web

fan.yang@cloudcross.com 9 years ago
parent
commit
82fdc3c657

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

@@ -9,6 +9,8 @@ public class WifiSum {
 
 
 	private Long id;
 	private Long id;
 	
 	
+	private Long operatorId;
+	
 	private String location;
 	private String location;
 	
 	
 	private Long placeId;
 	private Long placeId;
@@ -78,14 +80,25 @@ public class WifiSum {
 		this.sum = sum;
 		this.sum = sum;
 	}
 	}
 
 
+	
+	public Long getOperatorId() {
+		return operatorId;
+	}
+
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+
 	@Override
 	@Override
 	public String toString() {
 	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.updated updated,
 			tar.status status
 			tar.status status
 		from t_advertiser tar 
 		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 
 		LEFT JOIN t_industry tiy ON tar.industry_id = tiy.id 
 		where tar.status != -1
 		where tar.status != -1
 		 <if test="value!=null">
 		 <if test="value!=null">

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

@@ -141,8 +141,8 @@
 		select
 		select
 		<include refid="base_column" />
 		<include refid="base_column" />
 		,count(t_adgroup.campaign_id) as groupNumber from t_campaign left join t_adgroup
 		,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">
 		 	<if test="key!=null and value!=null">
 	            <choose>
 	            <choose>
 					<when test="key=='name'">
 					<when test="key=='name'">

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

@@ -14,9 +14,8 @@
 	</sql>
 	</sql>
 	
 	
 	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.model.Order">
 	<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}
         and t_campaign.status != -1 and t_campaign.advertiser_id = #{advertiserId}
 		where 1=1
 		where 1=1
 		<if test="advMark!=null">
 		<if test="advMark!=null">

+ 5 - 0
src/main/java/com/cloudcross/ssp/model/mapper/size.sql.xml

@@ -10,6 +10,11 @@
 		from t_size group by rwidth,rheight order by id desc
 		from t_size group by rwidth,rheight order by id desc
 	</select>
 	</select>
 
 
+	<select id="findAllSizeForZone"  resultType="com.cloudcross.ssp.model.Size">
+		select <include refid="base_column"/> 
+		from t_size group by width,height order by width,height
+	</select>
+
 	<select id="findSize" parameterType="int" resultType="com.cloudcross.ssp.model.Size">
 	<select id="findSize" parameterType="int" resultType="com.cloudcross.ssp.model.Size">
 		select <include refid="base_column"/>  
 		select <include refid="base_column"/>  
 		from t_size where id = #{id} 
 		from t_size where id = #{id} 

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/ISizeService.java

@@ -15,7 +15,7 @@ public interface ISizeService extends IGenericService<Size>{
 	
 	
 	public List<Size> findAllSize();
 	public List<Size> findAllSize();
 	
 	
-
+	public List<Size> findAllSizeForZone();
 	public Size findSize(Long id);
 	public Size findSize(Long id);
 	public Size findSizeId(Long width,Long height);
 	public Size findSizeId(Long width,Long height);
 
 

+ 3 - 0
src/main/java/com/cloudcross/ssp/service/impl/SizeService.java

@@ -24,6 +24,9 @@ public class SizeService implements ISizeService{
 		return myBatisDao.getList("sizeSqlMapper.findAllSize");
 		return myBatisDao.getList("sizeSqlMapper.findAllSize");
 	}
 	}
 
 
+	public List<Size> findAllSizeForZone() {
+		return myBatisDao.getList("sizeSqlMapper.findAllSizeForZone");
+	}
 	
 	
 	@Override
 	@Override
 	public Size findSize(Long id) {
 	public Size findSize(Long id) {

+ 3 - 3
src/main/java/com/cloudcross/ssp/web/operator/main/ad/ZoneController.java

@@ -104,7 +104,7 @@ public  class ZoneController extends SimpleController {
 		pager.setTotalRow(totalRow);
 		pager.setTotalRow(totalRow);
 		
 		
 		List<Zone> zoneList = zoneService.findByParams(paramMap, pager);					
 		List<Zone> zoneList = zoneService.findByParams(paramMap, pager);					
-		List<Size> sizeList = sizeService.findAllSize();											
+		List<Size> sizeList = sizeService.findAllSizeForZone();											
 		model.addAttribute("pager", pager);
 		model.addAttribute("pager", pager);
 		model.addAttribute("zoneList", zoneList);
 		model.addAttribute("zoneList", zoneList);
 		model.addAttribute("sizeList", sizeList);
 		model.addAttribute("sizeList", sizeList);
@@ -153,7 +153,7 @@ public  class ZoneController extends SimpleController {
 	@RequestMapping("/create")
 	@RequestMapping("/create")
 	public String create(Model model,HttpServletRequest request)  {
 	public String create(Model model,HttpServletRequest request)  {
 		List<Industry> industryList = industryService.findAll();
 		List<Industry> industryList = industryService.findAll();
-		List<Size> sizeList = sizeService.findAllSize();
+		List<Size> sizeList = sizeService.findAllSizeForZone();
 		System.out.println("abc"+sizeList.toString());
 		System.out.println("abc"+sizeList.toString());
 		model.addAttribute("sizeList", sizeList);
 		model.addAttribute("sizeList", sizeList);
 		model.addAttribute("industryList",industryList);
 		model.addAttribute("industryList",industryList);
@@ -182,7 +182,7 @@ public  class ZoneController extends SimpleController {
 		//查询所有的行业
 		//查询所有的行业
 		List<Industry> industryList = industryService.findAll();
 		List<Industry> industryList = industryService.findAll();
 		//查询所有的尺寸
 		//查询所有的尺寸
-		List<Size> SizeList = sizeService.findAllSize();
+		List<Size> SizeList = sizeService.findAllSizeForZone();
 		//根据广告位的宽高查询广告位的ID
 		//根据广告位的宽高查询广告位的ID
 		Size Size = sizeService.findSizeId(zone.getHeight(),zone.getWidth());
 		Size Size = sizeService.findSizeId(zone.getHeight(),zone.getWidth());