Browse Source

修改投放管理

jun.zhou 9 years ago
parent
commit
15342dc880

+ 0 - 7
src/main/java/com/cloudcross/ssp/common/consts/AdvertiserDirectType.java

@@ -1,7 +0,0 @@
-package com.cloudcross.ssp.common.consts;
-
-public interface AdvertiserDirectType {
-
-	public static final Integer locateType 	= 1;
-	public static final Integer timeType    	= 2;	
-}

+ 2 - 4
src/main/java/com/cloudcross/ssp/common/consts/DirectType.java

@@ -1,10 +1,8 @@
 package com.cloudcross.ssp.common.consts;
 
 public interface DirectType {
+	public static final Integer locateType 	= 1;
+	public static final Integer timeType  = 2;	
 
-	public static final String locateType 	= "deliveryLimitations:Geo:City";
-	public static final String timeType    	= "deliveryLimitations:Time:Day";
-	public static final String browserType 	="deliveryLimitations:Client:Browser";
-	public static final String osType 		="deliveryLimitations:Client:Os";
 	
 }

+ 121 - 111
src/main/java/com/cloudcross/ssp/model/Advertiser.java

@@ -11,13 +11,14 @@ import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
  *	
  */
 public class Advertiser implements ISelector{
-	
 	//广告主Id
 	private Long id;
-	//运营商Id  和t_operator(运营商)表相关
-	private Long agentId;
-	//行业Id  和t_indestry(行业)表相关
+	//行业Id (t_industry.id)
 	private Long industryId;
+	//代理商(t_adv_agent.id)
+	private Long agentId;
+	//运营商id(t_operator.id)
+	private Long operatorId;
 	//广告主名字
 	private String name;
 	//公司注册名
@@ -30,14 +31,10 @@ public class Advertiser implements ISelector{
 	private String tel;
 	//电子邮件
 	private String email;
-	//资金余额
-	private Float balance;
-	//状态
-	private Integer status;
-	//最后更新日期
-	private Date updated;
 	//备注
 	private String memo; 
+	//资金余额
+	private Float balance;
 	//CPI文件路径
 	private String cpiPath; 
 	//营业执照路径
@@ -54,92 +51,29 @@ public class Advertiser implements ISelector{
 	private String checkMemo; 
 	//管理员账号Id
 	private Long adminId;
-	/*
-	 *下面两个字段是为了在页面显示的时候方便,从数据库中直接联合查询就可以找到数据 
-	 */
-	
-	
-	
-	public String getCpiPath() {
-		return cpiPath;
-	}
-	public Long getAdminId() {
-		return adminId;
-	}
-	public void setAdminId(Long adminId) {
-		this.adminId = adminId;
-	}
-	public void setCpiPath(String cpiPath) {
-		this.cpiPath = cpiPath;
-	}
-	public String getLicencePath() {
-		return licencePath;
-	}
-	public void setLicencePath(String licencePath) {
-		this.licencePath = licencePath;
-	}
-	public String getIdPath() {
-		return idPath;
-	}
-	public void setIdPath(String idPath) {
-		this.idPath = idPath;
-	}
-	public String getOrgPath() {
-		return orgPath;
-	}
-	public void setOrgPath(String orgPath) {
-		this.orgPath = orgPath;
-	}
+	//状态
+	private Integer status;
+	//最后更新日期
+	private Date updated;
 	
-	public Long getCheckAccount() {
-		return checkAccount;
-	}
-	public void setCheckAccount(Long checkAccount) {
-		this.checkAccount = checkAccount;
-	}
-	public Integer getCheckStatus() {
-		return checkStatus;
-	}
-	public void setCheckStatus(Integer checkStatus) {
-		this.checkStatus = checkStatus;
-	}
-	public String getCheckMemo() {
-		return checkMemo;
-	}
-	public void setCheckMemo(String checkMemo) {
-		this.checkMemo = checkMemo;
-	}
-	public String getMemo() {
-		return memo;
-	}
-	public void setMemo(String memo) {
-		this.memo = memo;
-	}
-
-	public Float getBalance() {
-		return balance;
-	}
-	public void setBalance(Float balance) {
-		this.balance = balance;
-	}
-
+	/****************************************************/
+	//辅助字段,在数据库中没有对应的列
 	//订单数量
 	private Long orderNum;
 	//行业名称
 	private String industryName;
-	
-	
-	public Long getOrderNum() {
-		return orderNum;
-	}
-	public void setOrderNum(Long orderNum) {
-		this.orderNum = orderNum;
-	}
-	public String getIndustryName() {
-		return industryName;
+		
+	/******************************************************/
+	//下拉框取值要用到的方法
+	//获取广告主名字
+	public String getLabel() {
+		// TODO Auto-generated method stub
+		return this.getName();
 	}
-	public void setIndustryName(String industryName) {
-		this.industryName = industryName;
+	//获取广告主ID
+	public String getValue() {
+		// TODO Auto-generated method stub
+		return String.valueOf(this.getId());
 	}
 	public Long getId() {
 		return id;
@@ -147,18 +81,24 @@ public class Advertiser implements ISelector{
 	public void setId(Long id) {
 		this.id = id;
 	}
-	public Long getAgentId() {
-		return agentId;
-	}
-	public void setAgentId(Long operatorId) {
-		this.agentId = operatorId;
-	}
 	public Long getIndustryId() {
 		return industryId;
 	}
 	public void setIndustryId(Long industryId) {
 		this.industryId = industryId;
 	}
+	public Long getAgentId() {
+		return agentId;
+	}
+	public void setAgentId(Long agentId) {
+		this.agentId = agentId;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
 	public String getName() {
 		return name;
 	}
@@ -195,6 +135,66 @@ public class Advertiser implements ISelector{
 	public void setEmail(String email) {
 		this.email = email;
 	}
+	public String getMemo() {
+		return memo;
+	}
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
+	public Float getBalance() {
+		return balance;
+	}
+	public void setBalance(Float balance) {
+		this.balance = balance;
+	}
+	public String getCpiPath() {
+		return cpiPath;
+	}
+	public void setCpiPath(String cpiPath) {
+		this.cpiPath = cpiPath;
+	}
+	public String getLicencePath() {
+		return licencePath;
+	}
+	public void setLicencePath(String licencePath) {
+		this.licencePath = licencePath;
+	}
+	public String getIdPath() {
+		return idPath;
+	}
+	public void setIdPath(String idPath) {
+		this.idPath = idPath;
+	}
+	public String getOrgPath() {
+		return orgPath;
+	}
+	public void setOrgPath(String orgPath) {
+		this.orgPath = orgPath;
+	}
+	public Long getCheckAccount() {
+		return checkAccount;
+	}
+	public void setCheckAccount(Long checkAccount) {
+		this.checkAccount = checkAccount;
+	}
+	public Integer getCheckStatus() {
+		return checkStatus;
+	}
+	public void setCheckStatus(Integer checkStatus) {
+		this.checkStatus = checkStatus;
+	}
+	public String getCheckMemo() {
+		return checkMemo;
+	}
+	public void setCheckMemo(String checkMemo) {
+		this.checkMemo = checkMemo;
+	}
+	public Long getAdminId() {
+		return adminId;
+	}
+	public void setAdminId(Long adminId) {
+		this.adminId = adminId;
+	}
 	public Integer getStatus() {
 		return status;
 	}
@@ -207,24 +207,34 @@ public class Advertiser implements ISelector{
 	public void setUpdated(Date updated) {
 		this.updated = updated;
 	}
-	
-	@Override
-	public String toString() {
-		return "Advertiser [id=" + id + ", operatorId=" + agentId
-				+ ", industryId=" + industryId + ", name=" + name
-				+ ", regName=" + regName + ", homePage=" + homePage
-				+ ", contacts=" + contacts + ", tel=" + tel + ", email="
-				+ email + ", status=" + status + ", updated=" + updated + "]";
+	public Long getOrderNum() {
+		return orderNum;
 	}
-	@Override
-	public String getLabel() {
-		// TODO Auto-generated method stub
-		return this.getName();
+	public void setOrderNum(Long orderNum) {
+		this.orderNum = orderNum;
+	}
+	public String getIndustryName() {
+		return industryName;
+	}
+	public void setIndustryName(String industryName) {
+		this.industryName = industryName;
 	}
 	@Override
-	public String getValue() {
-		// TODO Auto-generated method stub
-		return String.valueOf(this.getId());
+	public String toString() {
+		return "Advertiser [id=" + id + ", industryId=" + industryId
+				+ ", agentId=" + agentId + ", operatorId=" + operatorId
+				+ ", name=" + name + ", regName=" + regName + ", homePage="
+				+ homePage + ", contacts=" + contacts + ", tel=" + tel
+				+ ", email=" + email + ", memo=" + memo + ", balance="
+				+ balance + ", cpiPath=" + cpiPath + ", licencePath="
+				+ licencePath + ", idPath=" + idPath + ", orgPath=" + orgPath
+				+ ", checkAccount=" + checkAccount + ", checkStatus="
+				+ checkStatus + ", checkMemo=" + checkMemo + ", adminId="
+				+ adminId + ", status=" + status + ", updated=" + updated
+				+ ", orderNum=" + orderNum + ", industryName=" + industryName
+				+ "]";
 	}
 	
+	
+	
 }

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

@@ -2,6 +2,296 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="advertiserSqlMapper">
 	
+	<!--广告主端 广告主list页面数据总条数 -->
+	<select id="countByParams" parameterType="java.util.Map" resultType="java.lang.Integer">
+		select count(t.advertiserId) from (
+			SELECT
+				tar.id advertiserId
+			FROM
+				t_advertiser tar
+			LEFT JOIN t_order tor ON tar.id = tor.advertiser_id
+			LEFT JOIN t_industry tiy ON tar.industry_id = tiy.id
+			WHERE tar. STATUS != - 1
+				<if test="value!=null">
+					and tar.name like #{value}
+				</if>
+				<if test="status!=null">	
+					and tar.status = #{status}
+				</if>
+				<if test="industryId!=null">	
+					and tar.industry_id = #{industryId}
+				</if>
+				<if test="agentId!=null">	
+					and tar.agent_id = #{agentId}
+				</if>
+			GROUP BY tar.id
+		)t
+	</select>
+	
+	<!--广告主端 广告主list页面数据加载 -->
+	<select id="selectByParams"  parameterType="java.util.Map" resultType="com.cloudcross.ssp.model.Advertiser">
+		select 
+			tar.id id,
+			tar.name name,
+			tiy.name industryName,
+			count(tor.id) as orderNum,
+			tar.updated updated,
+			tar.status status
+		from t_advertiser tar 
+		LEFT JOIN t_order tor on tar.id = tor.advertiser_id 
+		LEFT JOIN t_industry tiy ON tar.industry_id = tiy.id 
+		where tar.status != -1
+		 <if test="value!=null">
+			and tar.name like #{value}
+		</if>
+		 <if test="status!=null">	
+			and tar.status = #{status}
+		</if>
+		 <if test="industryId!=null">	
+			and tar.industry_id = #{industryId}
+		</if>
+		 <if test="agentId!=null">	
+			and tar.agent_id = #{agentId}
+		</if>
+		group by tar.id order by tar.id desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<!-- 根据广告主ID来查询一条信息 -->
+	<select id="selectById" parameterType="java.lang.Integer" resultType="com.cloudcross.ssp.model.Advertiser">
+		SELECT
+			tar.id id,
+			tar.industry_id industryId,
+			tar.agent_id agentId,
+			tar.operator_id operatorId,
+			tar.name name,
+			tar.reg_name regName,
+			tar.homepage homePage,
+			tar.contacts contacts,
+			tar.tel tel,
+			tar.email email,
+			tar.memo memo,
+			tar.balance balance,
+			tar.cpi_path cpiPath,
+			tar.licence_path licencePath,
+			tar.id_path idPath,
+			tar.org_path orgPath,
+			tar.check_account checkAccount,
+			tar.check_status checkStatus,
+			tar.check_memo checkMemo,
+			tar.admin_id adminId,
+			tar.status status,
+			tar.updated updated
+		FROM
+			t_advertiser tar where id = #{id}
+	</select>
+	
+	<!-- 添加 -->
+	<insert id="addAdvertiser" parameterType="com.cloudcross.ssp.model.Advertiser">
+        insert into t_advertiser 
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="industryId != null">
+                industry_id,
+            </if>
+            <if test="agentId != null">
+                agent_id,
+            </if>
+            <if test="operatorId != null">
+                operator_id,
+            </if>
+            <if test="name != null">
+                name,
+            </if>
+            <if test="regName != null">
+                reg_name,
+            </if>
+            <if test="homePage != null">
+                homePage,
+            </if>
+            <if test="contacts != null">
+                contacts,
+            </if>
+            <if test="tel != null">
+                tel,
+            </if>
+            <if test="email != null">
+                email,
+            </if>
+            <if test="memo != null">
+                memo,
+            </if>
+            <if test="balance != null">
+                balance,
+            </if>
+            <if test="cpiPath != null">
+                cpi_path,
+            </if>
+            <if test="licencePath != null">
+                licence_path,
+            </if>
+            <if test="idPath != null">
+                id_path,
+            </if>
+            <if test="orgPath != null">
+                org_path,
+            </if>
+            <if test="checkAccount != null">
+                check_account,
+            </if>
+            <if test="checkStatus != null">
+                check_status,
+            </if>
+            <if test="checkMemo != null">
+                check_memo,
+            </if>
+            <if test="adminId != null">
+                admin_id,
+            </if>
+            <if test="status != null">
+                status,
+            </if>
+            <if test="updated != null">
+                updated
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="industryId != null">
+                #{industryId},
+            </if>
+            <if test="agentId != null">
+               #{agentId},
+            </if>
+            <if test="operatorId != null">
+                #{operatorId},
+            </if>
+            <if test="name != null">
+                #{name},
+            </if>
+            <if test="regName != null">
+                #{regName},
+            </if>
+            <if test="homePage != null">
+                #{homePage},
+            </if>
+            <if test="contacts != null">
+                #{contacts},
+            </if>
+            <if test="tel != null">
+                #{tel},
+            </if>
+            <if test="email != null">
+               	#{email},
+            </if>
+            <if test="memo != null">
+                #{memo},
+            </if>
+            <if test="balance != null">
+                #{balance},
+            </if>
+            <if test="cpiPath != null">
+                #{cpiPath},
+            </if>
+            <if test="licencePath != null">
+                #{licencePath},
+            </if>
+            <if test="idPath != null">
+                #{idPath},
+            </if>
+            <if test="orgPath != null">
+                #{orgPath,jdbcType=VARCHAR},
+            </if>
+            <if test="checkAccount != null">
+               	#{checkAccount},
+            </if>
+            <if test="checkStatus != null">
+                #{checkStatus},
+            </if>
+            <if test="checkMemo != null">
+                #{checkMemo},
+            </if>
+            <if test="adminId != null">
+                #{adminId},
+            </if>
+            <if test="status != null">
+                #{status},
+            </if>
+            <if test="updated != null">
+                #{updated},
+            </if>
+        </trim>
+    </insert>
+	
+	<!-- 修改 -->
+	 <update id="editAdvertiser" parameterType="com.cloudcross.ssp.model.Advertiser">
+        update t_advertiser set
+        <trim suffix="" suffixOverrides=",">
+            <if test="industryId != null">
+                industry_id = #{industryId},
+            </if>
+            <if test="agentId != null">
+                agent_id = #{agentId},
+            </if>
+            <if test="operatorId != null">
+                operator_id = #{operatorId},
+            </if>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="regName != null">
+                reg_name = #{regName},
+            </if>
+            <if test="homePage != null">
+                homePage = #{homePage},
+            </if>
+            <if test="contacts != null">
+                contacts = #{contacts},
+            </if>
+            <if test="tel != null">
+                tel = #{tel},
+            </if>
+            <if test="email != null">
+                email = #{email},
+            </if>
+            <if test="memo != null">
+                memo = #{memo},
+            </if>
+            <if test="balance != null">
+                balance = #{balance},
+            </if>
+            <if test="cpiPath != null">
+                cpi_path = #{cpiPath},
+            </if>
+            <if test="licencePath != null">
+                licence_path = #{licencePath},
+            </if>
+            <if test="idPath != null">
+                id_path = #{idPath},
+            </if>
+            <if test="orgPath != null">
+                org_path = #{orgPath},
+            </if>
+            <if test="checkAccount != null">
+                check_account = #{checkAccount},
+            </if>
+            <if test="checkStatus != null">
+                check_status = #{checkStatus},
+            </if>
+            <if test="checkMemo != null">
+                check_memo = #{checkMemo},
+            </if>
+            <if test="adminId != null">
+                admin_id = #{adminId},
+            </if>
+            <if test="status != null">
+                status = #{status},
+            </if>
+            <if test="updated != null">
+                updated = #{updated,jdbcType=TIMESTAMP}
+            </if>
+            where id = #{id}
+        </trim>
+    </update>
+    
 	<sql id="base_column">
 		t_advertiser.id as id,
 		t_advertiser.agent_id as agentId,
@@ -26,16 +316,6 @@
 		t_advertiser.updated as updated
 	</sql>
 	
-	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.model.Advertiser">
-		select 
-		<include refid="base_column" />
-		from t_advertiser
-		<where>
-			id = #{id} and
-			status != -1
-		</where>
-	</select>
-	
 	<select id="selectByAgentId" parameterType="int" resultType="com.cloudcross.ssp.model.Advertiser">
 		select 
 		<include refid="base_column" />
@@ -76,30 +356,6 @@
 		</where>
 	</select>
 		
-	<select id="selectByParamsadvertiser"  parameterType="map" resultType="com.cloudcross.ssp.model.Advertiser">
-		select 
-		<include refid="base_column" />
-		,b.name as industryName, count(c.advertiser_id) as orderNum from t_industry b,t_advertiser left join t_order c
-		 on t_advertiser.id = c.advertiser_id and c.status != -1
-		 where 1 = 1 
-		 <if test="value!=null">
-			and t_advertiser.name like #{value}
-		</if>
-		 <if test="status!=null">	
-			and t_advertiser.status = #{status}
-		</if>
-		 <if test="industryId!=null">	
-			and t_advertiser.industry_id = #{industryId}
-		</if>
-		 <if test="agentId!=null">	
-			and t_advertiser.agent_id = #{agentId}
-		</if>
-		 and t_advertiser.status != -1
-		 and t_advertiser.industry_id = b.id 
-		group by t_advertiser.id
-		order by t_advertiser.id   desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
 	
 	<select id="selectByParamsback"  parameterType="map" resultType="com.cloudcross.ssp.model.Advertiser">
 	select 
@@ -170,22 +426,6 @@
 		from t_advertiser a where status = #{status}
 	</select>
 	
-	<select id="countByParamsadvertiser" parameterType="map" resultType="int">
-		select count(a.id)
-		from t_advertiser a where status != -1
-		<if test="value!=null">
-			and a.name like #{value}
-		</if>
-		 <if test="status!=null">	
-			and a.status = #{status}
-		</if>
-		 <if test="industryId!=null">	
-			and a.industry_id = #{industryId}
-		</if>
-		 <if test="agentId!=null">	
-			and a.agent_id = #{agentId}
-		</if>
-	</select>
 	
 	<select id="countByParamsoperator" parameterType="map" resultType="int">
 		select count(a.id)
@@ -205,12 +445,7 @@
 		</if>
 	</select>
 	
-	<insert id="addAdvertiseradvertiser" parameterType="com.cloudcross.ssp.model.Advertiser">
-		insert into t_advertiser(industry_id,agent_id,name,reg_name,homepage,contacts,tel,email,memo
-		,cpi_path,licence_path,id_path,org_path,check_memo,updated)
-		values(#{industryId},#{agentId},#{name},#{regName},#{homePage},#{contacts},#{tel}, #{email},#{memo}
-		,#{cpiPath},#{licencePath},#{idPath}, #{orgPath},#{checkMemo},NOW())
-	</insert>
+	
 	
 	<insert id="addAdvertiserback" parameterType="com.cloudcross.ssp.model.Advertiser">
 		insert into t_advertiser(industry_id,name,reg_name,homepage,contacts,tel,email,memo
@@ -224,13 +459,7 @@
 		values(#{industryId},#{name},#{regName},#{homePage},#{contacts},#{tel}, #{email},#{updated},#{memo})
 	</insert>
 	
-	<update id="editAdvertiseradvertiser" parameterType="com.cloudcross.ssp.model.Advertiser">
-		update t_advertiser 
-		set industry_id = #{industryId},name = #{name},reg_name = #{regName},homepage = #{homePage},contacts = #{contacts},tel=#{tel}
-		,email = #{email},memo = #{memo},updated = NOW(),admin_id = #{adminId}
-		,cpi_path = #{cpiPath},licence_path = #{licencePath},id_path = #{idPath},org_path = #{orgPath},check_memo = #{checkMemo}
-		where t_advertiser.id=#{id}
-	</update>
+
 	
 	<update id="editAdvertiserback" parameterType="com.cloudcross.ssp.model.Advertiser">
 		update t_advertiser 

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

@@ -136,7 +136,7 @@
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	
-	<select id="findByParamsoperator" parameterType="map" resultType="com.cloudcross.ssp.model.Campaign">
+	<select id="findByParams" parameterType="java.util.Map" resultType="com.cloudcross.ssp.model.Campaign">
 		select
 		<include refid="base_column" />
 		,count(t_adgroup.campaign_id) as groupNumber from t_campaign left join t_adgroup

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

@@ -13,7 +13,7 @@
 		
 	</sql>
 	
-	<select id="selectByParamsAdvertiser"  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 
@@ -38,7 +38,7 @@
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	
-	  <select id="countByParamsAdvertiser" parameterType="map" resultType="int">
+	  <select id="countByParams" parameterType="java.util.Map" resultType="java.lang.Integer">
 		select count(t_order.id)
 		from t_order where status != -1
 		<if test="advMark!=null">

+ 2 - 2
src/main/java/com/cloudcross/ssp/service/IOrderService.java

@@ -34,10 +34,10 @@ public interface IOrderService extends IGenericService<Order> {
 	public boolean updateStatusByAdvertiserId(List<Long> AdvertiseIdList, int status);
 	
 	public boolean updateStatusAll(List<Long> orderIdList, int status);
-	int countByParamsAdvertiser(Map<String, Object> paramMap);
+	
 	int countByParamsBack(Map<String, Object> paramMap);
 	int countByParamsOperator(Map<String, Object> paramMap);
-	List<Order> findByParamsAdvertiser(Map<String, Object> paramMap, Pager pager);
+	
 	List<Order> findByParamsOperator(Map<String, Object> paramMap, Pager pager);
 	List<Order> findByParamsBack(Map<String, Object> paramMap, Pager pager);
 	boolean addBack(Order t);

+ 1 - 2
src/main/java/com/cloudcross/ssp/service/impl/AdGroupScheduleService.java

@@ -58,8 +58,7 @@ public class AdGroupScheduleService implements IAdGroupScheduleService {
 
 	@Override
 	public boolean batchAdd(List<AdGroupSchedule> scheduleList) {
-		myBatisDao.save(
-				"back.adGroupScheduleSqlMapper.batchAdd",
+		myBatisDao.save("adGroupScheduleSqlMapper.batchAdd",
 				MapBuilder.create(HashMap.class)
 						.add("scheduleList", scheduleList).map());
 		return true;

+ 4 - 5
src/main/java/com/cloudcross/ssp/service/impl/AdGroupService.java

@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.cloudcross.ssp.base.dao.GenericIBatisDao;
-import com.cloudcross.ssp.common.consts.AdvertiserDirectType;
 import com.cloudcross.ssp.common.consts.DirectType;
 import com.cloudcross.ssp.common.utils.AdvertiserScheduleAclsUtis;
 import com.cloudcross.ssp.common.utils.Assert;
@@ -318,11 +317,11 @@ public void commonSaveDriect(Map<String,Object> targetParamsMap,Map<String,Objec
 			direct.setAdGroupId(adGroup.getId());
 			direct.setBackShow((String) targetParamsMap.get(uiKey));
 			// 将地域定向的数据转化为后台需要的数据格式
-			if(uiType == AdvertiserDirectType.locateType) {
+			if(uiType == DirectType.locateType) {
 				direct.setData(front2dblocate((String) targetParamsMap.get(uiKey)));
 			}
 			
-			if(uiType == AdvertiserDirectType.timeType) {
+			if(uiType == DirectType.timeType) {
 				// 将数据批量存入排期表
 		        List<AdGroupSchedule> scheduleList = AdvertiserScheduleAclsUtis.getScheduleList(
 		            adGroupId, (String) targetParamsMap.get(uiKey));
@@ -398,11 +397,11 @@ public void commonSaveDriect(Map<String,Object> targetParamsMap,Map<String,Objec
 				direct.setAdGroupId(adGroup.getId());
 				direct.setBackShow((String) targetParamsMap.get(uiKey));
 				// 将地域定向的数据转化为后台需要的数据格式
-				if(uiType == AdvertiserDirectType.locateType) {
+				if(uiType == DirectType.locateType) {
 					direct.setData(front2dblocate((String) targetParamsMap.get(uiKey)));
 				}
 				
-		        if(uiType == AdvertiserDirectType.timeType) {
+		        if(uiType == DirectType.timeType) {
 		         // 将数据批量存入排期表
 		          List<AdGroupSchedule> scheduleList = AdvertiserScheduleAclsUtis.getScheduleList(
 		              adGroup.getId(), (String) targetParamsMap.get(uiKey));

+ 7 - 12
src/main/java/com/cloudcross/ssp/service/impl/AdvertiserService.java

@@ -88,14 +88,11 @@ public class AdvertiserService implements IAdvertiserService, ISelectorProvider{
 	}
 	@Override
 	public int countByParams(Map<String, Object> paramMap) {
-		// TODO Auto-generated method stub
 		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
-		paramMap.put("key", paramMap.get("searchKey"));
 		paramMap.put("value", searchValue);
-		return myBatisDao.get("advertiserSqlMapper.countByParamsadvertiser", paramMap);
+		return myBatisDao.get("advertiserSqlMapper.countByParams", paramMap);
 	}
 	public int countByParamsOperator(Map<String, Object> paramMap) {
-		// TODO Auto-generated method stub
 		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
 		paramMap.put("key", paramMap.get("searchKey"));
 		paramMap.put("value", searchValue);
@@ -104,14 +101,13 @@ public class AdvertiserService implements IAdvertiserService, ISelectorProvider{
 	
 
 	@Override
-	public List<Advertiser> findByParams(Map<String, Object> paramMap,
-			Pager pager) {
-		// TODO Auto-generated method stub
+	public List<Advertiser> findByParams(Map<String, Object> paramMap,Pager pager) {
+		//根据广告主的名字模糊查询
 		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
-		paramMap.put("key", paramMap.get("searchKey"));
+		//paramMap.put("key", paramMap.get("searchKey"));
 		paramMap.put("value", searchValue);
 		paramMap.put("pager", pager);
-		return myBatisDao.getList("advertiserSqlMapper.selectByParamsadvertiser", paramMap);
+		return myBatisDao.getList("advertiserSqlMapper.selectByParams", paramMap);
 	}
 	
 	public List<Advertiser> findByParamsBack(Map<String, Object> paramMap,
@@ -149,7 +145,7 @@ public class AdvertiserService implements IAdvertiserService, ISelectorProvider{
 		//————————————————————————————这个地方要注意一点,operator_id并没有插进去!后面需要做完善的!——————————————————————————————————————————
 		t.setUpdated(new Date());
 //		t.setIndustryId(new Long(1));//由于下拉框的功能还没有完善,测试用。
-		myBatisDao.save("advertiserSqlMapper.addAdvertiseradvertiser", t);
+		myBatisDao.save("advertiserSqlMapper.addAdvertiser", t);
 		
 		return true;
 	}
@@ -173,9 +169,8 @@ public class AdvertiserService implements IAdvertiserService, ISelectorProvider{
 
 	@Override
 	public boolean edit(Advertiser t) {
-		// TODO Auto-generated method stub
 		t.setUpdated(new Date());
-		myBatisDao.save("advertiserSqlMapper.editAdvertiseradvertiser", t);
+		myBatisDao.save("advertiserSqlMapper.editAdvertiser", t);
 		return true;
 	}
 	

+ 5 - 5
src/main/java/com/cloudcross/ssp/service/impl/CampaignService.java

@@ -42,11 +42,11 @@ public class CampaignService implements ICampaignService,ISelectorProvider{
 	private IBannerService bannerService;
 	@Override
 	public Campaign findById(Long id) {
-		return ibatisDao.get("advertiser.campaignSqlMapper.findById", id);
+		return ibatisDao.get("campaignSqlMapper.findById", id);
 	}
 	@Override
 	public long findByName(String name) {
-		return ibatisDao.get("advertiser.campaignSqlMapper.findByName", name);
+		return ibatisDao.get("campaignSqlMapper.findByName", name);
 	}
 
 	@Override
@@ -63,7 +63,7 @@ public class CampaignService implements ICampaignService,ISelectorProvider{
 		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
 		paramMap.put("key", paramMap.get("searchKey"));
 		paramMap.put("value", searchValue);
-		return ibatisDao.get("operator.campaignSqlMapper.countByParamsoperator", paramMap);
+		return ibatisDao.get("campaignSqlMapper.countByParamsoperator", paramMap);
 	}	
 	
 	public int countByParamsBack(Map<String, Object> paramMap) {
@@ -71,7 +71,7 @@ public class CampaignService implements ICampaignService,ISelectorProvider{
 		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
 		paramMap.put("key", paramMap.get("searchKey"));
 		paramMap.put("value", searchValue);
-		return ibatisDao.get("back.campaignSqlMapper.countByParamsback", paramMap);
+		return ibatisDao.get("campaignSqlMapper.countByParamsback", paramMap);
 	}	
 
 	@Override
@@ -80,7 +80,7 @@ public class CampaignService implements ICampaignService,ISelectorProvider{
 		paramMap.put("key", paramMap.get("searchKey"));
 		paramMap.put("value", searchValue);
 		paramMap.put("pager", pager);
-		return ibatisDao.getList("advertiser.campaignSqlMapper.findByParams", paramMap);
+		return ibatisDao.getList("campaignSqlMapper.findByParams", paramMap);
 	}
 	
 	@Override

+ 16 - 22
src/main/java/com/cloudcross/ssp/service/impl/OrderService.java

@@ -46,13 +46,7 @@ public class OrderService implements IOrderService,ISelectorProvider {
 		return myBatisDao.get("orderSqlMapper.selectByName", name);
 	}
 	
-	@Override
-	public int countByParamsAdvertiser(Map<String, Object> paramMap) {
-		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
-		paramMap.put("key", paramMap.get("searchKey"));
-		paramMap.put("value", searchValue);
-		return myBatisDao.get("orderSqlMapper.countByParamsAdvertiser", paramMap);
-	}
+	
 	
 		@Override
 	public int countByParamsBack(Map<String, Object> paramMap) {
@@ -75,15 +69,7 @@ public class OrderService implements IOrderService,ISelectorProvider {
 	
 	
 	
-	@Override
-	public List<Order> findByParamsAdvertiser(Map<String, Object> paramMap, Pager pager) {
-		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
-		paramMap.put("key", paramMap.get("searchKey"));
-		paramMap.put("value", searchValue);
-		paramMap.put("pager", pager);
 	
-		return myBatisDao.getList("orderSqlMapper.selectByParamsAdvertiser", paramMap);
-	}
 		@Override
 	public List<Order> findByParamsOperator(Map<String, Object> paramMap, Pager pager) {
 		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
@@ -217,15 +203,23 @@ public class OrderService implements IOrderService,ISelectorProvider {
 		Boolean bannerFlag = this.bannerService.updateStatusByOrderId(orderIdList, status);
 		return orderFlag&&campaignFlag&&adGroupFlag&&bannerFlag;
 	}
-	@Override
-	public List<Order> findByParams(Map<String, Object> paramMap, Pager pager) {
-		// TODO Auto-generated method stub
-		return null;
-	}
+	
 
 	@Override
 	public int countByParams(Map<String, Object> paramMap) {
-		// TODO Auto-generated method stub
-		return 0;
+		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
+		paramMap.put("key", paramMap.get("searchKey"));
+		paramMap.put("value", searchValue);
+		return myBatisDao.get("orderSqlMapper.countByParams", paramMap);
+	}
+	
+	@Override
+	public List<Order> findByParams(Map<String, Object> paramMap, Pager pager) {
+		String searchValue = SqlHelper.doLike(paramMap.get("searchValue"));
+		paramMap.put("key", paramMap.get("searchKey"));
+		paramMap.put("value", searchValue);
+		paramMap.put("pager", pager);
+	
+		return myBatisDao.getList("orderSqlMapper.selectByParams", paramMap);
 	}
 }

+ 48 - 103
src/main/java/com/cloudcross/ssp/web/advertiser/main/ad/AdvertiserController.java

@@ -2,6 +2,7 @@ package com.cloudcross.ssp.web.advertiser.main.ad;
 
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -65,28 +66,34 @@ public class AdvertiserController extends SimpleController {
 		return redirect(page("list"));
 	}
 	
+	/**
+	 * 
+	 * @param model
+	 * @param paramMap
+	 * @param status 投放的状态:-1(删除)【不在界面显示】,0(正常),1(停用),2(全部)【只在界面显示】
+	 * @param page
+	 * @return
+	 */
 	@RequestMapping("/list")
-	public String list(Model model,
-			@RequestParam HashMap<String, Object> paramMap,
-			@RequestParam(defaultValue="2") int status,
-			@RequestParam(defaultValue="1") int page) {
-		
-	
-		/**
-		 * @author chenyou
-		 * 测试问题:第一按行业搜索和搜索功能没做
-		 * 
-		 * 按状态搜索有疑问,这个2代表什么状态,如果是全部拿如果前端传过来的是正常的话不就搜索不了
-		 * 
-		 * 查询列表是不是根据代理商id来查找下面的广告主吧?如果是这样的话你的查询有错误,因为没加上这个条件如果不是这我的这里就是废话不用理会
-		 * 
-		 * 修改记录有点问题,自己编辑一下看看就知道了
-		 */
+	public String list(Model model,@RequestParam HashMap<String, Object> paramMap,@RequestParam(defaultValue="2") int status,@RequestParam(defaultValue="1") int page) {
+		try {
+			String searchValue = null;
+			Object obj = paramMap.get("searchValue");
+			if(null != obj){
+				searchValue = new String(String.valueOf(obj).trim().getBytes("ISO-8859-1"),"UTF-8");
+			}
+			paramMap.put("searchValue", searchValue);
+		} catch (UnsupportedEncodingException e) {
+			
+			e.printStackTrace();
+		}
 		//按状态搜索用
 		if (status != 2){
-				paramMap.put("status", new Integer(status));
-				model.addAttribute("status",new Integer(status));
+			//状态为0,1,按状态查询
+			paramMap.put("status", new Integer(status));
+			model.addAttribute("status",new Integer(status));
 		}else {
+			//status为2查询所有状态
 			paramMap.put("status", null);
 		}
 		if((String)paramMap.get("industryId")!=null && !((String)paramMap.get("industryId")).equals("0")){
@@ -103,7 +110,7 @@ public class AdvertiserController extends SimpleController {
 		Pager pager = new Pager();
 		pager.setPage(page);
 		pager.setTotalRow(totalRow);
-		System.out.println("totalRow"+totalRow);
+		
 		List<Advertiser> advertiserList = advertiserService.findByParams(paramMap, pager);
 		if(paramMap.get("status")==null){
 			paramMap.put("status", new Integer(2));
@@ -112,17 +119,22 @@ public class AdvertiserController extends SimpleController {
 			paramMap.put("industryId",new Long(0));
 		}
 		model.addAllAttributes(paramMap);
-
 		model.addAttribute("pager", pager);
-		System.out.println("pager"+pager);
 		model.addAttribute("advertiserList", advertiserList);
-		System.out.println("zhangbao");
-		System.out.println(advertiserList);
 		return page("list");
 	}
+	
+	/**
+	 * 广告主编辑
+	 * @param request
+	 * @param model
+	 * @param id 广告主ID
+	 * @return
+	 */
 	@RequestMapping("/edit/{id}")
 	public String edit(HttpServletRequest request,Model model, @PathVariable long id) {
-		// 根据id从数据库中查询广告主对象。
+		// 根据id从数据库中查询广告主对象
+		//优化:可以用一条sql来查询(待做)
 		Advertiser advertiser = advertiserService.findById(id);
 		Industry industry = industryService.findByIndustryId(advertiser.getIndustryId());
 		model.addAttribute("industryName", industry.getName());
@@ -136,7 +148,7 @@ public class AdvertiserController extends SimpleController {
 	@RequestMapping("/create")
 	public String create(HttpServletRequest request,Model model) {
 		model.addAttribute("sessionid", request.getSession().getId());
-		com.cloudcross.ssp.model.Account account = getLoginUser();
+		Account account = getLoginUser();
 		if (account != null){
 			model.addAttribute("agentId",account.getAgentId());
 		}
@@ -164,32 +176,25 @@ public class AdvertiserController extends SimpleController {
 		return page("update");
 	}
 	
+	/**
+	 * 添加或修改的保存
+	 * @param model
+	 * @param t
+	 * @param request
+	 * @return
+	 */
 	@RequestMapping("/save")
 	public String save(Model model,@ModelAttribute("form") Advertiser t,HttpServletRequest request) {
 		// 校验参数
+	
 		//添加用户
-		if (t.getCpiPath()==null||t.getCpiPath().equals("")) {
-			t.setCpiPath("noFiles");
-		}
-		if (t.getLicencePath()==null||t.getCpiPath().equals("")) {
-			t.setLicencePath("noFiles");
-		}
-		if (t.getIdPath()==null||t.getCpiPath().equals("")) {
-			t.setIdPath("noFiles");
-		}
-		if (t.getOrgPath()==null||t.getCpiPath().equals("")) {
-			t.setOrgPath("noFiles");
-		}		
-		if (t.getCheckMemo()==null||t.getCpiPath().equals("")) {
-			t.setCheckMemo("wait");
-		}
+		//添加广告主ID为空
 		if (t.getId() == null) {
 			if (advertiserService.add(t)) {
 				//添加广告主后的资质审核消息
 				Message message = new Message();
-				if((t.getCpiPath().equals("noFiles")) && (t.getLicencePath().equals("noFiles")) && (t.getIdPath().equals("noFiles")) && (t.getOrgPath().equals("noFiles"))) {
-					;
-				}else {
+				Boolean flag = ("".equals(t.getCpiPath())&&"".equals(t.getIdPath())&&"".equals(t.getLicencePath())&&"".equals(t.getOrgPath()));
+				if(!flag) {
 					message.setContent("有一条新的广告主资质需要审核");
 					message.setType(1);//类型(1-审核,2-提现,3-其他)
 					messageService.add(message);
@@ -332,66 +337,6 @@ public class AdvertiserController extends SimpleController {
 	
 	
 	
-/*	@RequestMapping("/upload")
-	public String upload(@ RequestParam(value = "file", required = false) CommonsMultipartFile[] file, 
-			HttpServletRequest request,
-			Model model) throws IllegalStateException, IOException {
-		//System.out.println("bbbb:" + (file==null));
-		//创建一个通用的多部分解析器  
-		CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(request.getSession().getServletContext());
-		//创建文件的名字和类型
-		String myFileName = null;
-		String type = null;
-		String path = null;
-		//创建banner-template对象
-		BannerTemplate advertiser = new BannerTemplate();
-		//判断 request 是否有文件上传,即多部分请求  
-		if(multipartResolver.isMultipart(request)){  
-			//转换成多部分request    
-			MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest)request;  
-			//取得request中的所有文件名  
-			Iterator<String> iter = multiRequest.getFileNames();  
-			while(iter.hasNext()){  
-				//记录上传过程起始时的时间,用来计算上传时间  
-				//int pre = (int) System.currentTimeMillis();  
-				//取得上传文件  
-				MultipartFile file = multiRequest.getFile(iter.next());  
-				type = file.getContentType();
-				int t1 = type.lastIndexOf("\\");
-				type = type.substring(t1+1);
-				System.out.println("bbbb2:" + file.getSize());
-				System.out.println("bbbb2:" + file.getBytes());
-				if(file != null){  
-					//取得当前上传文件的文件名称  
-					myFileName = file.getOriginalFilename();  
-					//如果名称不为“”,说明该文件存在,否则说明该文件不存在  
-					if(myFileName.trim() !=""){  
-						System.out.println("bbbb:" + myFileName);  
-						//重命名上传后的文件名  
-						String fileName = "demoUpload" + file.getOriginalFilename();  
-						//定义上传路径  
-						path = "F:/" + fileName;  
-						File localFile = new File(path);  
-						file.transferTo(localFile);  
-					}  
-				}  
-				//记录上传该文件后的时间  
-				// int finaltime = (int) System.currentTimeMillis(); 
-				//System.out.println("bbbb");
-				//System.out.println(finaltime - pre);   
-			}  
-
-		} 
-		advertiser.setName(myFileName);
-		advertiser.setType(2);
-		advertiser.setStatus(1);
-		advertiser.setPath(path);
-		save(advertiser);
-		return page("list");  
-	} 
-	
-*/
-	
 	@RequestMapping("delete")
 	public @ResponseBody String delete(Long[] id,HttpServletRequest request) {
 		if (ArrayUtils.isNotEmpty(id)) {

+ 0 - 8
src/main/java/com/cloudcross/ssp/web/advertiser/main/ad/OrderController.java

@@ -56,7 +56,6 @@ public class OrderController extends SimpleController{
 	 */
 	@RequestMapping
 	public String index(Model model,@RequestParam Long advertiserId) {
-		System.out.println("zhangxiaobao"+advertiserId);
 		model.addAttribute("advertiserId", advertiserId);
 		return redirect(page("list"));
 	}
@@ -94,7 +93,6 @@ public class OrderController extends SimpleController{
 		}
 		// 查询总行数
 		int totalRow = orderService.countByParams(paramMap);
-		System.out.println(totalRow);
 		Pager pager = new Pager();
 		pager.setPage(page);
 		pager.setTotalRow(totalRow);
@@ -103,9 +101,7 @@ public class OrderController extends SimpleController{
 		if(status==2){
 			paramMap.put("status", new Long(2));
 		}
-		System.out.println("aaaa1" + orderList);
 		model.addAllAttributes(paramMap);
-		System.out.println(pager);
 		model.addAttribute("pager", pager);
 		model.addAttribute("orderList", orderList);
 		return page("list");
@@ -122,14 +118,12 @@ public class OrderController extends SimpleController{
 		paramMap.put("recordId", orderId);
 		Order order = orderService.findById(orderId);
 		model.addAttribute("advertiserId",order.getAdvertiserId() );
-		System.out.println("q1q1q1q"+order.getAdvertiserId());
 		int totalRow = logService.countByParams(paramMap,"Order");
 	
 		Pager pager = new Pager();
 		pager.setPage(page);
 		pager.setTotalRow(totalRow);		
 	List<Log> logList = logService.findByParams(paramMap, pager,"Order");
-	System.out.println("-------"+logList);
 		model.addAllAttributes(paramMap);
 		model.addAttribute("pager", pager);
 		model.addAttribute("logList", logList);
@@ -243,8 +237,6 @@ public class OrderController extends SimpleController{
 	public String save(Model model,@ModelAttribute("form") Order t,HttpServletRequest request) {
 		model.addAttribute("advertiserId", t.getAdvertiserId());
 		model.addAttribute("agentId",t.getAgentId());
-		System.out.println("###1"+t.toString());
-		System.out.println("###"+t.getAdvertiserId());
 		if(t.getId() == null) {
 			if(orderService.add(t)){
 				//如果添加订单成功,向log数据库中插入记录!!

+ 3 - 3
src/main/java/com/cloudcross/ssp/web/advertiser/main/ad/target/AdGroupController.java

@@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import com.cloudcross.ssp.base.utils.freemarker.FreemarkerTemplateProcessor;
 import com.cloudcross.ssp.base.web.SimpleController;
-import com.cloudcross.ssp.common.consts.AdvertiserDirectType;
+import com.cloudcross.ssp.common.consts.DirectType;
 import com.cloudcross.ssp.common.consts.Status;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.LangUtil;
@@ -519,9 +519,9 @@ public class AdGroupController extends SimpleController {
 		model.addAttribute("campaignId", campaignId);			
 		if(directs!=null){
 			for(Direct tmpDirect : directs ) {
-				if (tmpDirect.getDirectType() == AdvertiserDirectType.locateType) {
+				if (tmpDirect.getDirectType() == DirectType.locateType) {
 					model.addAttribute("locate", tmpDirect.getBackShow());
-				}else if(tmpDirect.getDirectType() == AdvertiserDirectType.timeType) {
+				}else if(tmpDirect.getDirectType() == DirectType.timeType) {
 					model.addAttribute("time", tmpDirect.getBackShow());
 				}
 			}

+ 2 - 21
src/main/java/com/cloudcross/ssp/web/advertiser/main/ad/target/CampaignController.java

@@ -145,8 +145,6 @@ public class CampaignController extends SimpleController {
 	List<Log> logList = logService.findByParams(paramMap, pager,"Campaign");
 	 
 	 Campaign c1= campaignService.findById(campaignId);
-	 
-	System.out.println("-------"+logList);
 		model.addAllAttributes(paramMap);
 		model.addAttribute("pager", pager);
 		model.addAttribute("logList", logList);
@@ -191,9 +189,6 @@ public class CampaignController extends SimpleController {
 			String[] tmpDate = dateRange.split("to");
 			String startDateFront = tmpDate[0].trim() + " 00:00:00";
 			String endDateFront = tmpDate[1].trim() + " 23:59:59";
-			//调试用,可删
-//			System.out.println("7777777777777" + startDateFront);
-//			System.out.println("6666666666666" + endDateFront);
 			java.text.SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd ");
 	
 			try {
@@ -208,15 +203,8 @@ public class CampaignController extends SimpleController {
 				// TODO Auto-generated catch block
 				e2.printStackTrace();
 			}	
-			
-//			//测试用,最后可删
-//			System.out.println("5555555555555" + startDateFront);
-//			System.out.println("4444444444444" + endDateFront);
-//			System.out.println(t.toString());
-			
+
 			if (campaignService.add(t)) {
-				
-//				System.out.println("333333333333333333333" + t);
 				//如果添加活动成功,向log数据库中插入记录
 				Log logAdd= new Log();
 				logAdd.setModule("Campaign");//对应模块
@@ -237,8 +225,6 @@ public class CampaignController extends SimpleController {
 		//下面是编辑控制
 		else {
 			Campaign formerCampaign = campaignService.findById(t.getId());
-			System.out.println("wwwwwwwwwwwwww" + formerCampaign);
-			
 			//下面是得到要编辑的活动的开始日期和结束日期,传到前端
 			//开始时显示的是这个日期,需要在中间加‘至’
 //			model.addAttribute("activeTime",formerCampaign.getActiveTime());
@@ -257,7 +243,6 @@ public class CampaignController extends SimpleController {
 			
 			//同样的,得到编辑后的时间周期,并将其分割
 			String dateRange =(String) paramMap.get("pickTime");
-			System.out.println("zzzzzzzzzzzzz" + dateRange);
 			String[] tmpDate = dateRange.split("to");
 			String startDateFront = tmpDate[0].trim() + " 00:00:00";
 			String endDateFront = tmpDate[1].trim() + " 23:59:59";
@@ -275,11 +260,7 @@ public class CampaignController extends SimpleController {
 				e2.printStackTrace();
 			}	
 									
-			if(campaignService.edit(t)) {
-				
-				System.out.println("rrrrrrrrrrrrr" + t.toString());
-				
-				
+			if(campaignService.edit(t)) {				
 				String s =t.getName()+":";
 				if (!formerCampaign.getName().equals(t.getName())) {
 					s=s.concat("活动名  "+formerCampaign.getName()+" > "+t.getName()+" / ");