Browse Source

整合operator 和back

fan.yang@cloudcross.com 9 years ago
parent
commit
3a0cac0290
100 changed files with 8355 additions and 10 deletions
  1. 1 0
      .settings/org.eclipse.core.resources.prefs
  2. 1 1
      src/main/java/com/cloudcross/ssp/back/model/mapper/account.sql.xml
  3. 1 1
      src/main/java/com/cloudcross/ssp/back/model/mapper/ad-group.sql.xml
  4. 3 3
      src/main/java/com/cloudcross/ssp/back/model/mapper/advAgent.sql.xml
  5. 2 2
      src/main/java/com/cloudcross/ssp/back/model/mapper/resources.sql.xml
  6. 2 2
      src/main/java/com/cloudcross/ssp/back/model/mapper/roles.sql.xml
  7. 1 1
      src/main/java/com/cloudcross/ssp/common/consts/CheckStatus.java
  8. 10 0
      src/main/java/com/cloudcross/ssp/common/consts/Read.java
  9. 195 0
      src/main/java/com/cloudcross/ssp/common/utils/OperatorScheduleAclsUtis.java
  10. 173 0
      src/main/java/com/cloudcross/ssp/operator/model/Account.java
  11. 33 0
      src/main/java/com/cloudcross/ssp/operator/model/AccountResources.java
  12. 67 0
      src/main/java/com/cloudcross/ssp/operator/model/Acls.java
  13. 323 0
      src/main/java/com/cloudcross/ssp/operator/model/AdGroup.java
  14. 32 0
      src/main/java/com/cloudcross/ssp/operator/model/AdGroupPlace.java
  15. 108 0
      src/main/java/com/cloudcross/ssp/operator/model/AdGroupSchedule.java
  16. 43 0
      src/main/java/com/cloudcross/ssp/operator/model/AdGroupZone.java
  17. 154 0
      src/main/java/com/cloudcross/ssp/operator/model/Advertiser.java
  18. 143 0
      src/main/java/com/cloudcross/ssp/operator/model/Audit.java
  19. 128 0
      src/main/java/com/cloudcross/ssp/operator/model/Banner.java
  20. 108 0
      src/main/java/com/cloudcross/ssp/operator/model/BannerTemplate.java
  21. 221 0
      src/main/java/com/cloudcross/ssp/operator/model/Campaign.java
  22. 109 0
      src/main/java/com/cloudcross/ssp/operator/model/CodeClass.java
  23. 106 0
      src/main/java/com/cloudcross/ssp/operator/model/CodeConvert.java
  24. 78 0
      src/main/java/com/cloudcross/ssp/operator/model/CodeSite.java
  25. 51 0
      src/main/java/com/cloudcross/ssp/operator/model/DayParting.java
  26. 280 0
      src/main/java/com/cloudcross/ssp/operator/model/DeliverAnalysis.java
  27. 51 0
      src/main/java/com/cloudcross/ssp/operator/model/Dimension.java
  28. 60 0
      src/main/java/com/cloudcross/ssp/operator/model/Direct.java
  29. 39 0
      src/main/java/com/cloudcross/ssp/operator/model/Industry.java
  30. 128 0
      src/main/java/com/cloudcross/ssp/operator/model/Location.java
  31. 137 0
      src/main/java/com/cloudcross/ssp/operator/model/Log.java
  32. 59 0
      src/main/java/com/cloudcross/ssp/operator/model/Message.java
  33. 93 0
      src/main/java/com/cloudcross/ssp/operator/model/Operator.java
  34. 109 0
      src/main/java/com/cloudcross/ssp/operator/model/OperatorBalance.java
  35. 145 0
      src/main/java/com/cloudcross/ssp/operator/model/Order.java
  36. 44 0
      src/main/java/com/cloudcross/ssp/operator/model/Params.java
  37. 29 0
      src/main/java/com/cloudcross/ssp/operator/model/Place.java
  38. 61 0
      src/main/java/com/cloudcross/ssp/operator/model/PlaceOperator.java
  39. 107 0
      src/main/java/com/cloudcross/ssp/operator/model/Resources.java
  40. 20 0
      src/main/java/com/cloudcross/ssp/operator/model/ResourcesRole.java
  41. 23 0
      src/main/java/com/cloudcross/ssp/operator/model/RoleAccount.java
  42. 67 0
      src/main/java/com/cloudcross/ssp/operator/model/Roles.java
  43. 120 0
      src/main/java/com/cloudcross/ssp/operator/model/RptZone.java
  44. 132 0
      src/main/java/com/cloudcross/ssp/operator/model/RptZoneHour.java
  45. 39 0
      src/main/java/com/cloudcross/ssp/operator/model/Size.java
  46. 155 0
      src/main/java/com/cloudcross/ssp/operator/model/User.java
  47. 45 0
      src/main/java/com/cloudcross/ssp/operator/model/UserGroup.java
  48. 58 0
      src/main/java/com/cloudcross/ssp/operator/model/UserLogin.java
  49. 147 0
      src/main/java/com/cloudcross/ssp/operator/model/Wifi.java
  50. 176 0
      src/main/java/com/cloudcross/ssp/operator/model/Zone.java
  51. 54 0
      src/main/java/com/cloudcross/ssp/operator/model/ZoneDomain.java
  52. 51 0
      src/main/java/com/cloudcross/ssp/operator/model/ZoneIndustry.java
  53. 258 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/account.sql.xml
  54. 47 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/acls.sql.xml
  55. 182 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/ad-group.sql.xml
  56. 36 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/adgroup-place.sql.xml
  57. 28 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/adgroup-schedule.sql.xml
  58. 20 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/adgroup-zone.sql.xml
  59. 133 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/advertiser.sql.xml
  60. 125 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/audit.sql.xml
  61. 180 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/banner-template.sql.xml
  62. 188 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/banner.sql.xml
  63. 149 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/campaign.sql.xml
  64. 100 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/codeClass.sql.xml
  65. 88 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/codeConvert.sql.xml
  66. 42 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/codeSite.sql.xml
  67. 81 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/dimension.sql.xml
  68. 42 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/direct.sql.xml
  69. 27 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/industry.sql.xml
  70. 54 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/location.sql.xml
  71. 89 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/log.sql.xml
  72. 82 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/message.sql.xml
  73. 54 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/operator-balance.sql.xml
  74. 69 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/operator.sql.xml
  75. 154 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/order.sql.xml
  76. 45 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/place-operator.sql.xml
  77. 21 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/place.sql.xml
  78. 342 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/report.sql.xml
  79. 170 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/resources.sql.xml
  80. 92 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/roles.sql.xml
  81. 15 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/rpt-zone-hour.sql.xml
  82. 45 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/rpt-zone.sql.xml
  83. 19 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/size.sql.xml
  84. 25 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/user-group.sql.xml
  85. 123 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/user.sql.xml
  86. 46 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/userLogin.sql.xml
  87. 131 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/wifi.sql.xml
  88. 34 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/zone-domain.sql.xml
  89. 29 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/zone-industry.sql.xml
  90. 199 0
      src/main/java/com/cloudcross/ssp/operator/model/mapper/zone.sql.xml
  91. 34 0
      src/main/java/com/cloudcross/ssp/operator/service/IAccountService.java
  92. 12 0
      src/main/java/com/cloudcross/ssp/operator/service/IAclsService.java
  93. 13 0
      src/main/java/com/cloudcross/ssp/operator/service/IAdGroupPlaceService.java
  94. 17 0
      src/main/java/com/cloudcross/ssp/operator/service/IAdGroupScheduleService.java
  95. 35 0
      src/main/java/com/cloudcross/ssp/operator/service/IAdGroupService.java
  96. 18 0
      src/main/java/com/cloudcross/ssp/operator/service/IAdGroupZoneService.java
  97. 77 0
      src/main/java/com/cloudcross/ssp/operator/service/IAdReportService.java
  98. 18 0
      src/main/java/com/cloudcross/ssp/operator/service/IAdvertiserService.java
  99. 20 0
      src/main/java/com/cloudcross/ssp/operator/service/IAuditService.java
  100. 25 0
      src/main/java/com/cloudcross/ssp/operator/service/IBannerService.java

+ 1 - 0
.settings/org.eclipse.core.resources.prefs

@@ -1,2 +1,3 @@
 eclipse.preferences.version=1
 encoding//src/main/webapp/assets/back/css/public-head.css=UTF-8
+encoding/<project>=UTF-8

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

@@ -249,7 +249,7 @@
 
 	<!-- 根据用户名查出id -->
 	<select id="querySingleAccount" parameterType="String"
-		resultType="Account">
+		resultType="com.cloudcross.ssp.back.model.Account">
 		select
 		<include refid="selectId" />
 		from t_account where name=#{accountName}

+ 1 - 1
src/main/java/com/cloudcross/ssp/back/model/mapper/ad-group.sql.xml

@@ -179,7 +179,7 @@
 			#{status},NOW(),NOW())
 	</insert>
 	
-	<select id="findById" parameterType="long" resultType="AdGroup">
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.back.model.AdGroup">
 		select
 		<include refid="base_column"/>
 		from t_adgroup

+ 3 - 3
src/main/java/com/cloudcross/ssp/back/model/mapper/advAgent.sql.xml

@@ -55,7 +55,7 @@
 		order by  id   desc
 	limit #{pager.offset}, #{pager.limit}
 	</select>
-	<select id="getNew" parameterType="AdvAgent" resultType="com.cloudcross.ssp.back.model.AdvAgent">
+	<select id="getNew" parameterType="com.cloudcross.ssp.back.model.AdvAgent" resultType="com.cloudcross.ssp.back.model.AdvAgent">
 		select 
 		<include refid="base_column" />
 		from t_adv_agent
@@ -66,12 +66,12 @@
 		</where>
 	</select>
 	
-	<insert id="addAdvAgent" parameterType="AdvAgent">
+	<insert id="addAdvAgent" parameterType="com.cloudcross.ssp.back.model.AdvAgent">
 		insert into t_adv_agent(name,contacts,tel,mobile,homepage,address,zip,email,title,admin_id,status)
 		values(#{name},#{contacts},#{tel},#{mobile},#{homePage},#{address},#{zip},#{email},#{title},#{adminId},#{status})
 	</insert>
 	
-	<update id="editAdvAgent" parameterType="AdvAgent">
+	<update id="editAdvAgent" parameterType="com.cloudcross.ssp.back.model.AdvAgent">
 		update t_adv_agent
 		set name=#{name},
 			contacts=#{contacts},

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

@@ -159,11 +159,11 @@
 		where role_id=#{id}
 	</delete>
 	
-	<insert id="addRoleRes" parameterType="ResourcesRole">
+	<insert id="addRoleRes" parameterType="com.cloudcross.ssp.back.model.ResourcesRole">
 	insert into t_res_roles (role_id,resc_id) value (#{roleId},#{resId})
 	</insert>
 	
-	<insert id="addAccountResourcess" parameterType="AccountResources">
+	<insert id="addAccountResourcess" parameterType="com.cloudcross.ssp.back.model.AccountResources">
 	insert into t_res_accounts (account_id,res_id) value (#{accountId},#{resourceId})
 	</insert>
 </mapper>

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

@@ -37,7 +37,7 @@
 			</if>
 		</where>
 	</select>
-	<select id="isExist" resultType="Roles" parameterType="String">
+	<select id="isExist" resultType="com.cloudcross.ssp.back.model.Roles" parameterType="String">
 		select
 		<include refid="selectId" />
 		from t_ly_role
@@ -86,7 +86,7 @@
 		delete from t_acc_role
 		where acc_id=#{accountId}
 	</delete>
-  <insert id="addAccRole" parameterType="RoleAccount">
+  <insert id="addAccRole" parameterType="com.cloudcross.ssp.back.model.RoleAccount">
 	insert into t_acc_role (acc_id,role_id) value (#{accountId},#{roleId})
 	</insert>
 </mapper>

+ 1 - 1
src/main/java/com/cloudcross/ssp/common/consts/CheckStatus.java

@@ -5,7 +5,7 @@ package com.cloudcross.ssp.common.consts;
  *审核状态
  */
 public enum CheckStatus {
-	fail(-1), succ(1), wait(0);
+	fail(-1), succ(1), wait(0),disable(-1), enable(1), inactive(0);
 	public final int value;
 	private CheckStatus(int value) {
 		this.value = value;

+ 10 - 0
src/main/java/com/cloudcross/ssp/common/consts/Read.java

@@ -0,0 +1,10 @@
+package com.cloudcross.ssp.common.consts;
+
+public enum Read {
+	disable(1), enable(0), active(0), inactive(1);
+	public final int value;
+
+	private Read(int value) {
+		this.value = value;
+	}
+}

+ 195 - 0
src/main/java/com/cloudcross/ssp/common/utils/OperatorScheduleAclsUtis.java

@@ -0,0 +1,195 @@
+package com.cloudcross.ssp.common.utils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.cloudcross.ssp.operator.model.AdGroupSchedule;
+
+
+
+/**
+ * 排期定向工具类
+ * 
+ * @author tonglili
+ * 
+ */
+public class OperatorScheduleAclsUtis {
+  private static final String NODEHOUR = "-1";
+
+  /**
+   * 获得排期信息列表
+   * 
+   * @author tonglili
+   * @param adGroupId
+   * @param scheduleStr
+   * @return 排期信息列表
+   */
+  public static List<AdGroupSchedule> getScheduleList(long adGroupId,
+      String scheduleStr) {
+    Date now = new Date();
+    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+    List<AdGroupSchedule> scheduleList = new ArrayList<AdGroupSchedule>();
+    JSONArray scheduleArray = JSONArray.fromObject(scheduleStr);
+    for (Object object : scheduleArray) {
+    	AdGroupSchedule schedule = (AdGroupSchedule) JSONObject.toBean((JSONObject) object,
+    			AdGroupSchedule.class);
+      schedule.setAdGroupId(adGroupId);
+      schedule.setUpdated(now);
+      try {
+    	  if(schedule.getDehours() == null || "".equals(schedule.getDehours().trim())  || schedule.getDehours().equals(NODEHOUR)){
+    		  schedule.setDehours("");
+    	  }
+        schedule.setBeginDate(sf.parse(schedule.getStartDate()));
+        schedule.setsEndDate(sf.parse(schedule.getEndDate()));
+      } catch (ParseException e) {
+        e.printStackTrace();
+      }
+      scheduleList.add(schedule);
+      /*
+      if (!schedule.getDehours().equals(NODEHOUR)) {
+        scheduleList.add(schedule);
+      }*/
+    }
+    return scheduleList;
+  }
+
+  public static List<Date> findDates(Date dBegin, Date dEnd) {
+    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+    try {
+      dBegin = sf.parse(sf.format(dBegin));
+      dEnd = sf.parse(sf.format(dEnd));
+    } catch (ParseException e) {
+      System.out.println(e.getLocalizedMessage());
+      return null;
+    }
+    List<Date> lDate = new ArrayList<Date>();
+    lDate.add(dBegin);
+    Calendar calBegin = Calendar.getInstance();
+    // 使用给定的 Date 设置此 Calendar 的时间
+    calBegin.setTime(dBegin);
+    Calendar calEnd = Calendar.getInstance();
+    // 使用给定的 Date 设置此 Calendar 的时间
+    calEnd.setTime(dEnd);
+    // 测试此日期是否在指定日期之后
+    while (dEnd.after(calBegin.getTime())) {
+      // 根据日历的规则,为给定的日历字段添加或减去指定的时间量
+      calBegin.add(Calendar.DAY_OF_MONTH, 1);
+      lDate.add(calBegin.getTime());
+    }
+    return lDate;
+  }
+
+  /**
+   * 获得排期定向时间值
+   * 
+   * @author tonglili
+   * @param scheduleList
+   *          排期对象列表
+   * @return 排期定向时间值
+   */
+  public static String scheduleRoleStr(List<AdGroupSchedule> scheduleList) {
+
+    if (null == scheduleList || scheduleList.size() == 0) {
+      return "";
+    }
+    List<String> returnList = new ArrayList<String>();
+    for (AdGroupSchedule schedule : scheduleList) {
+    	if(schedule.getDehours() == null || "".equalsIgnoreCase(schedule.getDehours().trim()) ||  schedule.getDehours().equals(NODEHOUR)){
+    		continue;
+    	}
+    	//默认排期,不加定向限制
+    	if(scheduleList.size() == 1 && "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23".equalsIgnoreCase(schedule.getDehours())){
+    		return "";
+    	}
+      String scheduleStr = scheduleRoleStr(schedule.getBeginDate(),
+          schedule.getsEndDate(), schedule.getDehours());
+
+      if (null != scheduleStr) {
+        returnList.add(scheduleStr);
+      }
+    }
+    System.out.println("StringUtils.join(returnList.toArray())"
+        + StringUtils.join(returnList.toArray(), ","));
+    return StringUtils.join(returnList.toArray(), ",");
+  }
+
+  /**
+   * 获得排期时间定向值
+   * 
+   * @author tonglili
+   * @param startDate
+   *          开始时间(yyyy-MM-dd)
+   * @param endDate
+   *          结束时间(yyyy-MM-dd)
+   * @param dehours
+   *          时间段
+   * @return 排期定向值
+   */
+  public static String scheduleRoleStr(Date startDate, Date endDate,
+      String dehours) {
+    List<String> scheduleList = new ArrayList<String>();
+    List<Date> dateList = findDates(startDate, endDate);
+    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+    String[] hours = dehours.split(",");
+    //for (int i = 0; i < hours.length; i++) {
+    //  String hour = hours[i];
+     // if (!hour.equals(NODEHOUR))
+        for (Date date : dateList) {
+        	String s = sf.format(date);
+        	for (int i = 0; i < hours.length; i++) {
+        		String hour = hours[i];
+        		if (!hour.equals(NODEHOUR)){
+        			s = s.concat("_").concat(hour);
+        		}
+        	}
+          //String s = sf.format(date).concat("_").concat(hour);
+          scheduleList.add(s);
+        }
+    String returnStr = StringUtils.join(scheduleList.toArray(), ",");
+    System.out.println(returnStr);
+    return returnStr;
+  }
+  
+  /*
+  public static String scheduleRoleStr(Date startDate, Date endDate,
+	      String dehours) {
+	    List<String> scheduleList = new ArrayList<String>();
+	    List<Date> dateList = findDates(startDate, endDate);
+	    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+	    String[] hours = dehours.split(",");
+	    for (int i = 0; i < hours.length; i++) {
+	      String hour = hours[i];
+	      if (!hour.equals(NODEHOUR))
+	        for (Date date : dateList) {
+
+	          String s = sf.format(date).concat("_").concat(hour);
+	          scheduleList.add(s);
+	        }
+	    }
+	    String returnStr = StringUtils.join(scheduleList.toArray(), ",");
+	    System.out.println(returnStr);
+	    return returnStr;
+	  }*/
+
+  /**
+   * 例子
+   * 
+   * @param args
+   * @throws ParseException
+   */
+  public static void main(String[] args) throws ParseException {
+    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
+    Date s = sf.parse("2015-01-26");
+    Date e = sf.parse("2015-02-29");
+    scheduleRoleStr(s, e, "1,2,3");
+  }
+}

+ 173 - 0
src/main/java/com/cloudcross/ssp/operator/model/Account.java

@@ -0,0 +1,173 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+//import com.cloudcross.ssp.common.utils.ExcelDataMapper;
+
+
+/**
+ * 账号实体表
+ */
+@SuppressWarnings("serial")
+public class Account implements java.io.Serializable {
+	
+	private int id;
+
+	private String accountName;//账号名
+	
+	private String roleName;//账号名
+
+	private String password;//密码
+
+	private String description;//说明
+	
+	private String realName;//真实姓名
+	
+	private String tel;//联系电话
+
+	private String state;//账号状态  0 表示停用  1表示启用
+
+	private Date createTime; //创建时间
+	
+	private  Integer type;//账户类型(1-云联,2-运营商,3-运营商代理,4-广告主,5-广告主代理)
+	
+	private Long operatorId;//运营商Id
+	
+	private Long agentId;//代理商Id
+	
+	private Long advertiserId;//广告主Id
+	
+	private Integer sysType;
+	
+	public Integer getSysType() {
+		return sysType;
+	}
+
+	public void setSysType(Integer sysType) {
+		this.sysType = sysType;
+	}
+
+	public String getRealName() {
+		return realName;
+	}
+
+	public void setRealName(String realName) {
+		this.realName = realName;
+	}
+
+	public String getTel() {
+		return tel;
+	}
+
+	public void setTel(String tel) {
+		this.tel = tel;
+	}
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	public Long getOperatorId() {
+		return operatorId;
+	}
+
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+
+	public Long getAgentId() {
+		return agentId;
+	}
+
+	public void setAgentId(Long agentId) {
+		this.agentId = agentId;
+	}
+
+	public Long getAdvertiserId() {
+		return advertiserId;
+	}
+
+	public void setAdvertiserId(Long advertiserId) {
+		this.advertiserId = advertiserId;
+	}
+
+
+	public int getId() {
+		return id;
+	}
+
+	public void setId(int id) {
+		this.id = id;
+	}
+
+	public String getAccountName() {
+		return accountName;
+	}
+
+	public void setAccountName(String accountName) {
+		this.accountName = accountName;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+	/**
+	 * 时间格式化
+	 * @author lanyuan
+	 * Email:mmm333zzz520@163.com
+	 * date:2014-2-17
+	 * @return
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	
+	@Override
+	public String toString() {
+		return "Account [id=" + id + ", accountName=" + accountName
+				+ ", roleName=" + roleName + ", password=" + password
+				+ ", description=" + description + ", realName=" + realName
+				+ ", tel=" + tel + ", state=" + state + ", createTime="
+				+ createTime + ", type=" + type + ", operatorId=" + operatorId
+				+ ", agentId=" + agentId + ", advertiserId=" + advertiserId
+				+ "]";
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public String getRoleName() {
+		return roleName;
+	}
+
+	public void setRoleName(String roleName) {
+		this.roleName = roleName;
+	}
+
+}

+ 33 - 0
src/main/java/com/cloudcross/ssp/operator/model/AccountResources.java

@@ -0,0 +1,33 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 
+ * 账户直接对接权限类!
+ * 这样做权限控制上面会更灵活一点!
+ * 
+ * @author yzq
+ *
+ */
+
+public class AccountResources {
+	private Long accountId;
+	private Long resourceId;
+	public Long getAccountId() {
+		return accountId;
+	}
+	public void setAccountId(Long accountId) {
+		this.accountId = accountId;
+	}
+	public Long getResourceId() {
+		return resourceId;
+	}
+	public void setResourceId(Long resourceId) {
+		this.resourceId = resourceId;
+	}
+	
+	@Override
+	public String toString() {
+		return "AccountResources [accountId=" + accountId + ", resourceId="
+				+ resourceId + "]";
+	}
+}

+ 67 - 0
src/main/java/com/cloudcross/ssp/operator/model/Acls.java

@@ -0,0 +1,67 @@
+package com.cloudcross.ssp.operator.model;
+
+//luohongyu对应数据库里面的表t_acls
+public class Acls {
+	private Long bannerId;
+	private String logical;
+	private String type;
+	private String comparison;
+	private String data;
+	private Long executionOrder;
+	private Long adGroupId;
+	public Long getBannerId() {
+		return bannerId;
+	}
+
+	public void setBannerId(Long bannerId) {
+		this.bannerId = bannerId;
+	}
+
+	public String getLogical() {
+		return logical;
+	}
+
+	public void setLogical(String logical) {
+		this.logical = logical;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getComparison() {
+		return comparison;
+	}
+
+	public void setComparison(String comparison) {
+		this.comparison = comparison;
+	}
+
+	public String getData() {
+		return data;
+	}
+
+	public void setData(String data) {
+		this.data = data;
+	}
+
+	public Long getExecutionOrder() {
+		return executionOrder;
+	}
+
+	public void setExecutionOrder(Long executionOrder) {
+		this.executionOrder = executionOrder;
+	}
+
+	public Long getAdGroupId() {
+		return adGroupId;
+	}
+
+	public void setAdGroupId(Long adGroupId) {
+		this.adGroupId = adGroupId;
+	}
+}

+ 323 - 0
src/main/java/com/cloudcross/ssp/operator/model/AdGroup.java

@@ -0,0 +1,323 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+import com.cloudcross.ssp.common.consts.Status;
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+/**
+ * 投放管理中的投放管理表
+ * @author chenyou
+ *
+ */
+public final class AdGroup implements ISelector{
+	//投放id
+	private Long id;
+	//订单id
+	private Long orderId;
+	//活动id
+	private Long campaignId;
+	// 投放名称
+	private String adGroupName;
+	// 开始日期
+	private Date startDate;
+	// 结束日期
+	private Date endDate;
+	// 总预算
+	private Double totalBudget;
+	//投放模式
+	private Integer mode;
+	//单价
+	private Double price;
+	// 每日预算
+	private Double dailyBudget;
+	// 曝光总上限
+	private Long maxImpression;
+	// 点击总上限
+	private Long maxClick;
+	//转换总上限
+	private Long maxConversion;
+	// 每日曝光上限
+	private Long dailyMaxImpression;
+	// 每日点击上限
+	private Long dailyMaxClick;
+	// 每日转换上限
+	private Long dailyMaxConversion;
+	//单人曝光频次类型
+	private Integer perImpressionType;
+	//单人曝光频次
+	private Long perImpression;
+	//单人点击频次类型
+	private Integer perClickType;
+	//单人点击频次
+	private Long perClick;
+	//创意定向值
+	private String compiledLimitation;
+	//定向条件
+	private String aclPlugins;
+	//设备
+	private Integer device;
+	//点击找回
+	private Integer retarget;
+	//访客投放期
+	private Long period;
+	//状态
+	private Integer status;
+	//更新时间
+	private Date updated;
+	//这个活动的创意总数
+	private Integer bannerNumber;
+	
+	
+	
+	
+	public Integer getMode() {
+		return mode;
+	}
+
+	public void setMode(Integer mode) {
+		this.mode = mode;
+	}
+
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+
+	public String getCompiledLimitation() {
+		return compiledLimitation;
+	}
+
+	public void setCompiledLimitation(String compiledLimitation) {
+		this.compiledLimitation = compiledLimitation;
+	}
+
+
+
+	public String getAclPlugins() {
+		return aclPlugins;
+	}
+
+	public void setAclPlugins(String aclPlugins) {
+		this.aclPlugins = aclPlugins;
+	}
+
+	public Integer getDevice() {
+		return device;
+	}
+
+	public void setDevice(Integer device) {
+		this.device = device;
+	}
+
+	public Integer getRetarget() {
+		return retarget;
+	}
+
+	public void setRetarget(Integer retarget) {
+		this.retarget = retarget;
+	}
+
+	public Long getPeriod() {
+		return period;
+	}
+
+	public void setPeriod(Long period) {
+		this.period = period;
+	}
+
+	public Integer getBannerNumber() {
+		return bannerNumber;
+	}
+
+	public void setBannerNumber(Integer bannerNumber) {
+		this.bannerNumber = bannerNumber;
+	}
+
+	public Date getUpdated() {
+		return updated;
+	}
+
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getOrderId() {
+		return orderId;
+	}
+
+	public void setOrderId(Long orderId) {
+		this.orderId = orderId;
+	}
+
+	public Long getCampaignId() {
+		return campaignId;
+	}
+
+	public void setCampaignId(Long campaignId) {
+		this.campaignId = campaignId;
+	}
+
+	public String getAdGroupName() {
+		return adGroupName;
+	}
+
+	public void setAdGroupName(String adGroupName) {
+		this.adGroupName = adGroupName;
+	}
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public Double getTotalBudget() {
+		return totalBudget;
+	}
+
+	public void setTotalBudget(Double totalBudget) {
+		this.totalBudget = totalBudget;
+	}
+
+	public Double getDailyBudget() {
+		return dailyBudget;
+	}
+
+	public void setDailyBudget(Double dailyBudget) {
+		this.dailyBudget = dailyBudget;
+	}
+
+	public Long getMaxImpression() {
+		return maxImpression;
+	}
+
+	public void setMaxImpression(Long maxImpression) {
+		this.maxImpression = maxImpression;
+	}
+
+	public Long getMaxClick() {
+		return maxClick;
+	}
+
+	public void setMaxClick(Long maxClick) {
+		this.maxClick = maxClick;
+	}
+
+	public Long getMaxConversion() {
+		return maxConversion;
+	}
+
+	public void setMaxConversion(Long maxConversion) {
+		this.maxConversion = maxConversion;
+	}
+
+	public Long getDailyMaxImpression() {
+		return dailyMaxImpression;
+	}
+
+	public void setDailyMaxImpression(Long dailyMaxImpression) {
+		this.dailyMaxImpression = dailyMaxImpression;
+	}
+
+	public Long getDailyMaxClick() {
+		return dailyMaxClick;
+	}
+
+	public void setDailyMaxClick(Long dailyMaxClick) {
+		this.dailyMaxClick = dailyMaxClick;
+	}
+
+	public Long getDailyMaxConversion() {
+		return dailyMaxConversion;
+	}
+
+	public void setDailyMaxConversion(Long dailyMaxConversion) {
+		this.dailyMaxConversion = dailyMaxConversion;
+	}
+
+	public Integer getPerImpressionType() {
+		return perImpressionType;
+	}
+
+	public void setPerImpressionType(Integer perImpressionType) {
+		this.perImpressionType = perImpressionType;
+	}
+
+	public Long getPerImpression() {
+		return perImpression;
+	}
+
+	public void setPerImpression(Long perImpression) {
+		this.perImpression = perImpression;
+	}
+
+	public Integer getPerClickType() {
+		return perClickType;
+	}
+
+	public void setPerClickType(Integer perClickType) {
+		this.perClickType = perClickType;
+	}
+
+	public Long getPerClick() {
+		return perClick;
+	}
+
+	public void setPerClick(Long perClick) {
+		this.perClick = perClick;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	@Override
+	public String toString() {
+		return "AdGroup [id=" + id + "orderId=" + orderId + ", campaignId=" + campaignId + ", adGroupName=" 
+	            + adGroupName + ", startDate=" + startDate + ", endDate="
+				+ endDate + ", totalBudget=" + totalBudget + ", dailyBudget="
+				+ dailyBudget + ", maxImpression=" + maxImpression
+				+ ", maxClick=" + maxClick + ", maxConversion" + maxConversion +  ", dailyMaxImpression="
+				+ dailyMaxImpression + ", dailyMaxClick=" + dailyMaxClick
+				+ ", dailyMaxConversion=" + dailyMaxConversion + ", perImpressionType" + perImpressionType + 
+				", perImpression" + perImpression + ", perClickType" + perClickType + ", perClick" + perClick
+				+ ", status" + status + "]";
+	}
+	
+	@Override
+	public String getLabel() {
+		return this.adGroupName;
+	}
+
+	@Override
+	public String getValue() {
+		return String.valueOf(this.id);
+	}
+	
+}

+ 32 - 0
src/main/java/com/cloudcross/ssp/operator/model/AdGroupPlace.java

@@ -0,0 +1,32 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 场景与投放管理关联表,对应数据库里面的表t_adgroup_place
+ * @author luohongyu
+ */
+
+public class AdGroupPlace {
+	private Long id;
+	private Long adGroupId;
+	private Long placeId;
+	
+		
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getPlaceId() {
+		return placeId;
+	}
+	public void setPlaceId(Long placeId) {
+		this.placeId = placeId;
+	}
+	public Long getAdGroupId() {
+		return adGroupId;
+	}
+	public void setAdGroupId(Long adGroupId) {
+		this.adGroupId = adGroupId;
+	}
+}

+ 108 - 0
src/main/java/com/cloudcross/ssp/operator/model/AdGroupSchedule.java

@@ -0,0 +1,108 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 投放的排期表
+ * @author chenyou
+ *
+ */
+public class AdGroupSchedule {
+	private long id;
+	  
+	  private long adGroupId;
+	  
+	  
+	  /**
+	   * 排期开始日期
+	   */
+	  private String startDate;
+	  private Date beginDate;
+	  /**
+	   * 排期结束日期
+	   */
+	  private String endDate;
+	  private Date sEndDate;
+	  /**
+	   * 投放小时段 eg:0,1,5
+	   */
+	  private String dehours;
+	  /**
+	   * 每日投放上限
+	   */
+	  private Long dailyImpression = 0l;
+	  
+	  private Date updated;
+	  
+	public void setDailyImpression(Long dailyImpression) {
+		this.dailyImpression = dailyImpression;
+	}
+	public Long getDailyImpression() {
+		return this.dailyImpression;
+	}
+	public long getId() {
+	    return id;
+	  }
+	  public void setId(long id) {
+	    this.id = id;
+	  }
+	  public long getAdGroupId() {
+	    return adGroupId;
+	  }
+	  public void setAdGroupId(long adGroupId) {
+	    this.adGroupId = adGroupId;
+	  }
+	  public Date getUpdated() {
+	    return updated;
+	  }
+	  public void setUpdated(Date updated) {
+	    this.updated = updated;
+	  }
+	  public String getStartDate() {
+	    return startDate;
+	  }
+	  public void setStartDate(String startDate) {
+	    this.startDate = startDate;
+	  }
+	  public String getEndDate() {
+	    return endDate;
+	  }
+	  public void setEndDate(String endDate) {
+	    this.endDate = endDate;
+	  }
+	  public String getDehours() {
+	    return dehours;
+	  }
+	  public void setDehours(String dehours) {
+	    this.dehours = dehours;
+	  }
+	  public Date getBeginDate() {
+	    return beginDate;
+	  }
+	  public void setBeginDate(Date beginDate) {
+	    this.beginDate = beginDate;
+	  }
+	  public Date getsEndDate() {
+	    return sEndDate;
+	  }
+	  public void setsEndDate(Date sEndDate) {
+	    this.sEndDate = sEndDate;
+	  }
+	@Override
+	public String toString() {
+		return "AdGroupSchedule [id=" + id + ", adGroupId=" + adGroupId
+				+ ", startDate=" + startDate + ", beginDate=" + beginDate
+				+ ", endDate=" + endDate + ", sEndDate=" + sEndDate
+				+ ", dehours=" + dehours + ", dailyImpression="
+				+ dailyImpression + ", updated="
+				+ updated + "]";
+	}
+	  
+	
+	  
+	  
+	  
+	
+	
+	
+}

+ 43 - 0
src/main/java/com/cloudcross/ssp/operator/model/AdGroupZone.java

@@ -0,0 +1,43 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 投放与广告位关联表
+ * @author chenyou
+ *
+ */
+public class AdGroupZone {
+	private Long id;
+	//投放id
+	private Long adGroupId;
+	//广告位id
+	private Long zoneId;
+	
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getAdGroupId() {
+		return adGroupId;
+	}
+	public void setAdGroupId(Long adGroupId) {
+		this.adGroupId = adGroupId;
+	}
+	public Long getZoneId() {
+		return zoneId;
+	}
+	public void setZoneId(Long zoneId) {
+		this.zoneId = zoneId;
+	}
+	
+	@Override
+	public String toString() {
+		return "AdGroupZone [id=" + id + ", adGroupId=" + adGroupId
+				+ ", zoneId=" + zoneId + "]";
+	}
+	
+	
+	
+	
+}

+ 154 - 0
src/main/java/com/cloudcross/ssp/operator/model/Advertiser.java

@@ -0,0 +1,154 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+/**
+ * *
+ * @author CloudCross
+ *	和t_advertiser表相关
+ *	是广告主的对应的实体类
+ *	
+ */
+public class Advertiser implements ISelector{
+	
+	//广告主Id
+	private Long id;
+	//运营商Id  和t_operator(运营商)表相关
+	private Long operatorId;
+	//行业Id  和t_indestry(行业)表相关
+	private Long industryId;
+	//广告主名字
+	private String name;
+	//公司注册名
+	private String regName;
+	//网址
+	private String homePage;
+	//联系人
+	private String contacts;
+	//电话
+	private String tel;
+	//电子邮件
+	private String email;
+	//状态
+	private Integer status;
+	//最后更新日期
+	private Date updated;
+	//备注
+	private String memo; 
+	/*
+	 *下面两个字段是为了在页面显示的时候方便,从数据库中直接联合查询就可以找到数据 
+	 */
+	
+	public String getMemo() {
+		return memo;
+	}
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
+
+	//订单数量
+	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 void setIndustryName(String industryName) {
+		this.industryName = industryName;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public Long getIndustryId() {
+		return industryId;
+	}
+	public void setIndustryId(Long industryId) {
+		this.industryId = industryId;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getRegName() {
+		return regName;
+	}
+	public void setRegName(String regName) {
+		this.regName = regName;
+	}
+	public String getHomePage() {
+		return homePage;
+	}
+	public void setHomePage(String homePage) {
+		this.homePage = homePage;
+	}
+	public String getContacts() {
+		return contacts;
+	}
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+	public String getTel() {
+		return tel;
+	}
+	public void setTel(String tel) {
+		this.tel = tel;
+	}
+	public String getEmail() {
+		return email;
+	}
+	public void setEmail(String email) {
+		this.email = email;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public Date getUpdated() {
+		return updated;
+	}
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+	
+	@Override
+	public String toString() {
+		return "Advertiser [id=" + id + ", operatorId=" + operatorId
+				+ ", industryId=" + industryId + ", name=" + name
+				+ ", regName=" + regName + ", homePage=" + homePage
+				+ ", contacts=" + contacts + ", tel=" + tel + ", email="
+				+ email + ", status=" + status + ", updated=" + updated + "]";
+	}
+	@Override
+	public String getLabel() {
+		// TODO Auto-generated method stub
+		return this.getName();
+	}
+	@Override
+	public String getValue() {
+		// TODO Auto-generated method stub
+		return String.valueOf(this.getId());
+	}
+	
+}

+ 143 - 0
src/main/java/com/cloudcross/ssp/operator/model/Audit.java

@@ -0,0 +1,143 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+/**
+ * 
+ * @author xiangliu
+ * 和t_advertiser表相关
+ * 广告主的资质审核
+ */
+public class Audit {
+		//广告主Id
+		private Long id;
+		//广告主名字
+		private String name;
+		//行业Id  和t_indestry(行业)表相关
+		private Long industryId;
+		//公司注册名
+		private String regName;
+		//网址
+		private String homePage;
+		//联系人
+		private String contacts;
+		//电话
+		private String tel;
+		//电子邮件
+		private String email; 
+		//最后更新日期
+		private Date updated;
+		//CPI文件路径
+		private String cpiPath; 
+		//营业执照路径
+		private String licencePath; 
+		//法人代表身份证路径
+		private String idPath; 
+		//企业机构代码证
+		private String orgPath; 
+		//审核人账号id(t_account.id)
+		private Float checkAccount; 
+		//审核状态(0未审核,1审核通过,-1审核未通过)
+		private Integer checkStatus; 
+		//审核备注
+		private String checkMemo;
+		
+		public Long getId() {
+			return id;
+		}
+		public void setId(Long id) {
+			this.id = id;
+		}
+		public String getName() {
+			return name;
+		}
+		public void setName(String name) {
+			this.name = name;
+		}
+		public Long getIndustryId() {
+			return industryId;
+		}
+		
+		public void setIndustryId(Long industryId) {
+			this.industryId = industryId;
+		}
+		public String getRegName() {
+			return regName;
+		}
+		public void setRegName(String regName) {
+			this.regName = regName;
+		}
+		public String getHomePage() {
+			return homePage;
+		}
+		public void setHomePage(String homePage) {
+			this.homePage = homePage;
+		}
+		public String getContacts() {
+			return contacts;
+		}
+		public void setContacts(String contacts) {
+			this.contacts = contacts;
+		}
+		public String getTel() {
+			return tel;
+		}
+		public void setTel(String tel) {
+			this.tel = tel;
+		}
+		public String getEmail() {
+			return email;
+		}
+		public void setEmail(String email) {
+			this.email = email;
+		}
+		public Date getUpdated() {
+			return updated;
+		}
+		public void setUpdated(Date updated) {
+			this.updated = updated;
+		}
+		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 Float getCheckAccount() {
+			return checkAccount;
+		}
+		public void setCheckAccount(Float 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;
+		} 
+		
+		
+}

+ 128 - 0
src/main/java/com/cloudcross/ssp/operator/model/Banner.java

@@ -0,0 +1,128 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 投放活动对应的创意模板表
+ * @author wanfu
+ *
+ */
+public class Banner {
+	//主键
+	private Long id;
+	//创意模板id
+	private Long bannerTemplateId;
+	//订单id
+	private Long orderId;
+	//活动id
+	private Long campaignId;
+	//投放id
+	private Long adGroupId;
+	//到达地址
+	private String visitAddress;
+	//点击地址
+	private String clickAddress;
+	//曝光地址
+	private String impressionAddress;
+	//是否审核通过(0未审核,1云联审核通过,2云联审核不通过)
+	private Integer checked;
+	//最后更新时间
+	private Date updated;
+	//审核备注
+	private String memo;
+	//运营商审核状态
+	private Integer operatorChecked;
+	//创意模版
+	BannerTemplate bannerTemplate;
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getBannerTemplateId() {
+		return bannerTemplateId;
+	}
+	public void setBannerTemplateId(Long bannerTemplateId) {
+		this.bannerTemplateId = bannerTemplateId;
+	}
+	public Long getOrderId() {
+		return orderId;
+	}
+	public void setOrderId(Long orderId) {
+		this.orderId = orderId;
+	}
+	public Long getCampaignId() {
+		return campaignId;
+	}
+	public void setCampaignId(Long campaignId) {
+		this.campaignId = campaignId;
+	}
+	public Long getAdGroupId() {
+		return adGroupId;
+	}
+	public void setAdGroupId(Long adGroupId) {
+		this.adGroupId = adGroupId;
+	}
+	public String getVisitAddress() {
+		return visitAddress;
+	}
+	public void setVisitAddress(String visitAddress) {
+		this.visitAddress = visitAddress;
+	}
+	public String getClickAddress() {
+		return clickAddress;
+	}
+	public void setClickAddress(String clickAddress) {
+		this.clickAddress = clickAddress;
+	}
+	public String getImpressionAddress() {
+		return impressionAddress;
+	}
+	public void setImpressionAddress(String impressionAddress) {
+		this.impressionAddress = impressionAddress;
+	}
+	public Integer getChecked() {
+		return checked;
+	}
+	public void setChecked(Integer checked) {
+		this.checked = checked;
+	}
+	public Date getUpdated() {
+		return updated;
+	}
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+	public String getMemo() {
+		return memo;
+	}
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
+	public Integer getOperatorChecked() {
+		return operatorChecked;
+	}
+	public void setOperatorChecked(Integer operatorChecked) {
+		this.operatorChecked = operatorChecked;
+	}
+	public BannerTemplate getBannerTemplate() {
+		return bannerTemplate;
+	}
+	public void setBannerTemplate(BannerTemplate bannerTemplate) {
+		this.bannerTemplate = bannerTemplate;
+	}
+	@Override
+	public String toString() {
+		return "Banner [id=" + id + ", bannerTemplateId=" + bannerTemplateId
+				+ ", orderId=" + orderId + ", campaignId=" + campaignId
+				+ ", adGroupId=" + adGroupId + ", visitAddress=" + visitAddress
+				+ ", clickAddress=" + clickAddress + ", impressionAddress="
+				+ impressionAddress + ", checked=" + checked + ", updated="
+				+ updated + ", memo=" + memo + ", operatorChecked="
+				+ operatorChecked + ", bannerTemplate=" + bannerTemplate + "]";
+	}
+	
+	
+		
+}

+ 108 - 0
src/main/java/com/cloudcross/ssp/operator/model/BannerTemplate.java

@@ -0,0 +1,108 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 创意模板表
+ * @author chenyou
+ *
+ */
+public class BannerTemplate {
+	//主键id
+	private Long id;
+	//广告主id
+	private Long advertiserId;
+	//模板名称
+	private String name;
+	//上传文件路径
+	private String path;
+	//缩略图路径
+	private String pathSmall;
+	//创意类型
+	private Integer type;
+	//创意宽度
+	private Long width;
+	//创意高度
+	private Long height;
+	//状态
+	private Integer status;
+	//上传时间
+	private Date updated;
+	//表t_banner的id,编辑的时候要用这个id
+	private Long TBannerId;
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getAdvertiserId() {
+		return advertiserId;
+	}
+	public void setAdvertiserId(Long advertiserId) {
+		this.advertiserId = advertiserId;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getPath() {
+		return path;
+	}
+	public void setPath(String path) {
+		this.path = path;
+	}
+	public String getPathSmall() {
+		return pathSmall;
+	}
+	public void setPathSmall(String pathSmall) {
+		this.pathSmall = pathSmall;
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	public Long getWidth() {
+		return width;
+	}
+	public void setWidth(Long width) {
+		this.width = width;
+	}
+	public Long getHeight() {
+		return height;
+	}
+	public void setHeight(Long height) {
+		this.height = height;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public Date getUpdated() {
+		return updated;
+	}
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+	public Long getTBannerId() {
+		return TBannerId;
+	}
+	public void setTBannerId(Long tBannerId) {
+		TBannerId = tBannerId;
+	}
+	@Override
+	public String toString() {
+		return "BannerTemplate [id=" + id + ", advertiserId=" + advertiserId
+				+ ", name=" + name + ", path=" + path + ", pathSmall="
+				+ pathSmall + ", type=" + type + ", width=" + width
+				+ ", height=" + height + ", status=" + status + ", updated="
+				+ updated + ", TBannerId=" + TBannerId + "]";
+	}
+
+}

+ 221 - 0
src/main/java/com/cloudcross/ssp/operator/model/Campaign.java

@@ -0,0 +1,221 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+import com.cloudcross.ssp.common.consts.Status;
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+/**
+ * 广告投放活动表。
+ * <p/>
+ * 与t_campaign数据表相关
+ * 
+ */
+public class Campaign implements ISelector {
+	private Long id;
+	
+	// 订单id
+	private Long orderId;
+	
+	//活动名称
+	private String name;
+	
+	// 活动开始时间
+	private Date activeTime;
+	
+	// 活动结束时间
+	private Date expireTime;
+	
+	// 活动总预算
+	private Float totalBudget;
+	
+	// 活动日预算
+	private Float dailyBudget;
+	
+	// 曝光总上限
+	private Long impression;
+	
+	// 点击总上限
+	private Long click;
+	
+	// 转化总上限
+	private Long conversion;
+	
+	// 每日曝光上限
+	private Long dailyImpression;
+	
+	// 每日点击上限
+	private Long dailyClick;
+	
+	// 每日转换上限
+	private Long dailyConversion;
+	
+	//备注项
+	private String memo;
+	
+	// 活动状态
+	private Integer status;
+	
+	// 最后更新时间
+	private Date upDated;
+	
+    //投放数目
+	private Long groupNumber;
+	
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getOrderId() {
+		return orderId;
+	}
+
+	public void setOrderId(Long orderId) {
+		this.orderId = orderId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Date getActiveTime() {
+		return activeTime;
+	}
+
+	public void setActiveTime(Date activeTime) {
+		this.activeTime = activeTime;
+	}
+
+	public Date getExpireTime() {
+		return expireTime;
+	}
+
+	public void setExpireTime(Date expireTime) {
+		this.expireTime = expireTime;
+	}
+
+	public Float getTotalBudget() {
+		return totalBudget;
+	}
+
+	public void setTotalBudget(Float totalBudget) {
+		this.totalBudget = totalBudget;
+	}
+
+	public Float getDailyBudget() {
+		return dailyBudget;
+	}
+
+	public void setDailyBudget(Float dailyBudget) {
+		this.dailyBudget = dailyBudget;
+	}
+
+	public Long getImpression() {
+		return impression;
+	}
+
+	public void setImpression(Long impression) {
+		this.impression = impression;
+	}
+
+	public Long getClick() {
+		return click;
+	}
+
+	public void setClick(Long click) {
+		this.click = click;
+	}
+
+	public Long getConversion() {
+		return conversion;
+	}
+
+	public void setConversion(Long conversion) {
+		this.conversion = conversion;
+	}
+
+	public Long getDailyImpression() {
+		return dailyImpression;
+	}
+
+	public void setDailyImpression(Long dailyImpression) {
+		this.dailyImpression = dailyImpression;
+	}
+
+	public Long getDailyClick() {
+		return dailyClick;
+	}
+
+	public void setDailyClick(Long dailyClick) {
+		this.dailyClick = dailyClick;
+	}
+
+	public Long getDailyConversion() {
+		return dailyConversion;
+	}
+
+	public void setDailyConversion(Long dailyConversion) {
+		this.dailyConversion = dailyConversion;
+	}
+
+	public String getMemo() {
+		return memo;
+	}
+
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	public Date getUpDated() {
+		return upDated;
+	}
+
+	public void setUpDated(Date upDated) {
+		this.upDated = upDated;
+	}
+
+	public Long getGroupNumber() {
+		return groupNumber;
+	}
+
+	public void setGroupNumber(Long groupNumber) {
+		this.groupNumber = groupNumber;
+	}
+
+
+	@Override
+	public String toString() {
+		return "Campaign [id=" + id + ", orderId=" + orderId + ", name=" + name + ", activeTime=" + activeTime
+				+ ", expireTime=" + expireTime + ", totalBudget=" + totalBudget + ", dailyBudget=" + dailyBudget
+				+ ", impression=" + impression + ", click=" + click + ", conversion=" + conversion
+				+ ", dailyImpression=" + dailyImpression + ", dailyClick=" + dailyClick + ", dailyConversion="
+				+ dailyConversion + ", memo=" + memo + ", status=" + status + ", upDated=" + upDated + ", groupNumber="
+				+ groupNumber + "]";
+	}
+
+	@Override
+	public String getLabel() {
+		return this.name;
+	}
+
+	@Override
+	public String getValue() {
+		return String.valueOf(this.id);
+	}
+}

+ 109 - 0
src/main/java/com/cloudcross/ssp/operator/model/CodeClass.java

@@ -0,0 +1,109 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+/**
+ * *
+ * @author WangHeng
+ *	和t_code_class表相关
+ *	是分类访客找回的对应的实体类
+ *	
+ */
+public class CodeClass {
+	
+	private Long id;  //分类访客找回Id	
+	
+	private Long advertiserId;  //广告主ID	
+	
+	private String codeName;    //分类名称
+	
+	private String codePara;    //分类参数值
+	
+	private String script;     //  javascript代码
+	
+	private String picture;       //图片代码
+	
+	private Date updated;    //最后更新时间
+	
+
+	public Long getId() {
+		return id;
+	}
+
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+
+
+	public Long getAdvertiserId() {
+		return advertiserId;
+	}
+
+
+
+	public void setAdvertiserId(Long advertiserId) {
+		this.advertiserId = advertiserId;
+	}
+
+
+
+	public String getCodeName() {
+		return codeName;
+	}
+
+
+
+	public void setCodeName(String codeName) {
+		this.codeName = codeName;
+	}
+
+
+
+	public String getCodePara() {
+		return codePara;
+	}
+
+
+	public void setCodePara(String codePara) {
+		this.codePara = codePara;
+	}
+
+
+	public String getScript() {
+		return script;
+	}
+
+
+	public void setScript(String script) {
+		this.script = script;
+	}
+
+
+	public String getPicture() {
+		return picture;
+	}
+
+	public void setPicture(String picture) {
+		this.picture = picture;
+	}
+
+	public Date getUpdated() {
+		return updated;
+	}
+
+
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+
+
+	@Override
+	public String toString() {
+		return "CodeClass [id=" + id + ", advertiserId=" + advertiserId
+				+ ", codeName=" + codeName + ", codePara=" + codePara
+				+ ", script=" + script + ", picture=" + picture
+				+ ",  updated=" + updated + "]";
+	
+	}	
+}

+ 106 - 0
src/main/java/com/cloudcross/ssp/operator/model/CodeConvert.java

@@ -0,0 +1,106 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+/**
+ * *
+ * @author WangHeng
+ *	和t_code_convert表相关
+ *	是转化代码对应的实体类
+ *	
+ */
+public class CodeConvert {
+	
+	private Long id;  //转化代码Id	
+	
+	private Long advertiserId;  //广告主ID	
+	
+	private String convertName;    //转化代码名称
+	
+	private Long convertType;    //转化目标类型
+	
+	private String script;     //  javascript代码
+	
+	private String picture;       //图片代码
+	
+	private Date updated;    //最后更新时间
+	
+
+	public Long getId() {
+		return id;
+	}
+
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+
+	public Long getAdvertiserId() {
+		return advertiserId;
+	}
+
+
+	public void setAdvertiserId(Long advertiserId) {
+		this.advertiserId = advertiserId;
+	}
+
+
+	public String getConvertName() {
+		return convertName;
+	}
+
+
+	public void setConvertName(String convertName) {
+		this.convertName = convertName;
+	}
+
+
+	public Long getConvertType() {
+		return convertType;
+	}
+
+
+	public void setConvertType(Long convertType) {
+		this.convertType = convertType;
+	}
+
+
+	public String getScript() {
+		return script;
+	}
+
+
+	public void setScript(String script) {
+		this.script = script;
+	}
+
+
+	public String getPicture() {
+		return picture;
+	}
+
+
+	public void setPicture(String picture) {
+		this.picture = picture;
+	}
+
+
+	public Date getUpdated() {
+		return updated;
+	}
+
+
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+
+
+	@Override
+	public String toString() {
+		return "CodeConvert [id=" + id + ", advertiserId=" + advertiserId
+				+ ", convertName=" + convertName + ", convertType=" + convertType
+				+ ", script=" + script + ", picture=" + picture
+				+ ",  updated=" + updated + "]";
+	
+	}	
+}

+ 78 - 0
src/main/java/com/cloudcross/ssp/operator/model/CodeSite.java

@@ -0,0 +1,78 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+/**
+ * *
+ * @author WangHeng
+ *	和t_code_site表相关
+ *	是全站访客找回的对应的实体类
+ *	
+ */
+public class CodeSite {
+	
+	private Long id;  //分类访客找回Id	
+	
+	private Long advertiserId;  //广告主ID	
+
+	private String script;     //  javascript代码
+	
+	private String picture;       //图片代码
+	
+	
+
+	public Long getId() {
+		return id;
+	}
+
+
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+
+
+	public Long getAdvertiserId() {
+		return advertiserId;
+	}
+
+
+
+	public void setAdvertiserId(Long advertiserId) {
+		this.advertiserId = advertiserId;
+	}
+
+
+
+	public String getScript() {
+		return script;
+	}
+
+
+
+	public void setScript(String script) {
+		this.script = script;
+	}
+
+
+
+	public String getPicture() {
+		return picture;
+	}
+
+
+
+	public void setPicture(String picture) {
+		this.picture = picture;
+	}
+
+
+
+	@Override
+	public String toString() {
+		return "CodeSite [id=" + id + ", advertiserId=" + advertiserId
+				+ ", script=" + script + ", picture=" + picture
+				+ ",  ]";
+	
+	}	
+}

+ 51 - 0
src/main/java/com/cloudcross/ssp/operator/model/DayParting.java

@@ -0,0 +1,51 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 排期时间段及曝光上限
+ * @author chenyou
+ *
+ */
+public class DayParting {
+	
+	private Date startDate;
+
+	private Date endDate;
+	
+	private String dehours;
+	
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public String getDehours() {
+		return dehours;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public void setDehours(String dehours) {
+		this.dehours = dehours;
+	}
+
+	@Override
+	public String toString() {
+		return "DayParting [startDate=" + startDate + ", endDate=" + endDate
+				+ ", dehours=" + dehours + "]";
+	}
+
+
+
+	
+}

+ 280 - 0
src/main/java/com/cloudcross/ssp/operator/model/DeliverAnalysis.java

@@ -0,0 +1,280 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+public final class DeliverAnalysis  {
+	//id
+	private Long id;
+	//广告位id
+	private Long zoneId;
+	//广告位
+	private String zoneName;
+	//浏览量占比
+	private double viewRate;
+	
+	//广告位宽
+	private double width;
+	//广告位高
+	private double height;
+	//位置
+	private Long position;
+	//系统
+	private Long system;
+	
+	//类型
+	private Long device;
+	
+	//地域
+	private Long location;
+	
+	//省份
+	private String cn;
+	//是不是省份的标志1-表示省份,2-表示不是,默认不是
+	//注:这个属性是在地域报表导出excel时用到的
+	private Integer cnMark = 2;
+	//城市
+	private String cn_city;
+	//场景
+	private String place;
+	
+	//热点
+	private String apmac;
+	
+	
+	//PV
+	private double pv;
+	//UV
+	private double uv;
+
+	//曝光数
+	private double impression;
+	//点击数
+	private double click;
+	//唯一曝光数
+	private Long uImpression;
+	//唯一点击数
+	private Long uClick;
+	
+    //填充率
+    private double fillRate;
+	
+    //点击率
+	private double clickRate;
+	
+	//eCmp
+	private double eCpm;
+	//收入
+	private double income;
+	//日期
+	private Date reportDate;
+	
+	//开始日期
+	private Date startDate;
+	//结束日期
+	private Date endDate;	
+	
+	public Integer getCnMark() {
+		return cnMark;
+	}
+	public void setCnMark(Integer cnMark) {
+		this.cnMark = cnMark;
+	}
+	public String getApmac() {
+		return apmac;
+	}
+	public void setApmac(String apmac) {
+		this.apmac = apmac;
+	}
+	public Long getuImpression() {
+		return uImpression;
+	}
+	public void setuImpression(Long uImpression) {
+		this.uImpression = uImpression;
+	}
+	public Long getuClick() {
+		return uClick;
+	}
+	public void setuClick(Long uClick) {
+		this.uClick = uClick;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getZoneId() {
+		return zoneId;
+	}
+	public void setZoneId(Long zoneId) {
+		this.zoneId = zoneId;
+	}
+	
+	
+	
+	
+	public String getZoneName() {
+		return zoneName;
+	}
+	public void setZoneName(String zoneName) {
+		this.zoneName = zoneName;
+	}
+	public double getViewRate() {
+		return viewRate;
+	}
+	public void setViewRate(double viewRate) {
+		this.viewRate = viewRate;
+	}
+	public double getWidth() {
+		return width;
+	}
+	public void setWidth(double width) {
+		this.width = width;
+	}
+	public double getHeight() {
+		return height;
+	}
+	public void setHeight(double height) {
+		this.height = height;
+	}
+	
+	
+	public Long getPosition() {
+		return position;
+	}
+	public void setPosition(Long position) {
+		this.position = position;
+	}
+	
+	
+	public Long getSystem() {
+		return system;
+	}
+	public void setSystem(Long system) {
+		this.system = system;
+	}
+	
+	
+	public Long getDevice() {
+		return device;
+	}
+	public void setDevice(Long device) {
+		this.device = device;
+	}
+	
+	
+	public Long getLocation() {
+		return location;
+	}
+	public void setLocation(Long location) {
+		this.location = location;
+	}
+	
+	
+	
+	public String getCn() {
+		return cn;
+	}
+	public void setCn(String cn) {
+		this.cn = cn;
+	}
+	public String getCn_city() {
+		return cn_city;
+	}
+	public void setCn_city(String cn_city) {
+		this.cn_city = cn_city;
+	}
+	public String getPlace() {
+		return place;
+	}
+	public void setPlace(String place) {
+		this.place = place;
+	}
+	public double getPv() {
+		return pv;
+	}
+	public void setPv(double pv) {
+		this.pv = pv;
+	}
+	public double getUv() {
+		return uv;
+	}
+	public void setUv(double uv) {
+		this.uv = uv;
+	}
+	public double getImpression() {
+		return impression;
+	}
+	public void setImpression(double impression) {
+		this.impression = impression;
+	}
+	public double getClick() {
+		return click;
+	}
+	public void setClick(double click) {
+		this.click = click;
+	}
+	public double getFillRate() {
+		return fillRate;
+	}
+	public void setFillRate(double fillRate) {
+		this.fillRate = fillRate;
+	}
+	public double getClickRate() {
+		return clickRate;
+	}
+	public void setClickRate(double clickRate) {
+		this.clickRate = clickRate;
+	}
+	public double geteCpm() {
+		return eCpm;
+	}
+	public void seteCpm(double eCpm) {
+		this.eCpm = eCpm;
+	}
+	public double getIncome() {
+		return income;
+	}
+	public void setIncome(double income) {
+		this.income = income;
+	}
+	public Date getReportDate() {
+		return reportDate;
+	}
+	public void setReportDate(Date reportDate) {
+		this.reportDate = reportDate;
+	}
+	
+	public Date getStartDate() {
+		return startDate;
+	}
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+	public Date getEndDate() {
+		return endDate;
+	}
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+	
+	@Override
+	public String toString() {
+		return "DeliverAnalysis [id=" + id + ", zoneId=" + zoneId
+				+ ", zoneName=" + zoneName + ", viewRate=" + viewRate
+				+ ", width=" + width + ", height=" + height + ", position="
+				+ position + ", system=" + system + ", device=" + device
+				+ ", location=" + location + ", cn=" + cn + ", cnMark="
+				+ cnMark + ", cn_city=" + cn_city + ", place=" + place
+				+ ", apmac=" + apmac + ", pv=" + pv + ", uv=" + uv
+				+ ", impression=" + impression + ", click=" + click
+				+ ", uImpression=" + uImpression + ", uClick=" + uClick
+				+ ", fillRate=" + fillRate + ", clickRate=" + clickRate
+				+ ", eCpm=" + eCpm + ", income=" + income + ", reportDate="
+				+ reportDate + ", startDate=" + startDate + ", endDate="
+				+ endDate + "]";
+	}
+	
+	
+	
+}

+ 51 - 0
src/main/java/com/cloudcross/ssp/operator/model/Dimension.java

@@ -0,0 +1,51 @@
+package com.cloudcross.ssp.operator.model;
+
+public class Dimension {
+
+	private Long id;
+	private String name;
+	private String content;
+	private byte isDefault;
+	private Long operatorId;
+	
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	public byte getIsDefault() {
+		return isDefault;
+	}
+	public void setIsDefault(byte isDefault) {
+		this.isDefault = isDefault;
+	}	
+	public String getContent() {
+		return content;
+	}
+	public void setContent(String content) {
+		this.content = content;
+	}
+	
+	@Override
+	public String toString() {
+		return "Dimension [id=" + id + ", name=" + name + ", content="
+				+ content + ", isDefault=" + isDefault + "]";
+	}
+	
+	
+	
+}

+ 60 - 0
src/main/java/com/cloudcross/ssp/operator/model/Direct.java

@@ -0,0 +1,60 @@
+package com.cloudcross.ssp.operator.model;
+
+
+/**
+ * 定向表,对应数据库里面的表t_target_show
+ * @author luohongyu
+ */
+
+import java.util.Date;
+
+public class Direct {
+	private Long id ;
+	//策略Id
+	private Long adGroupId;
+	//定向的类型设置
+	private String directType;
+	//定向回显
+	private String backShow;
+	//用来给rv_acls字段存值
+	private String  data;
+	private Date updated;
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getAdGroupId() {
+		return adGroupId;
+	}
+	public void setAdGroupId(Long adGroupId) {
+		this.adGroupId = adGroupId;
+	}
+	public String getDirectType() {
+		return directType;
+	}
+	public void setDirectType(String directType) {
+		this.directType = directType;
+	}
+ 
+	
+	public String getBackShow() {
+		return backShow;
+	}
+	public void setBackShow(String backShow) {
+		this.backShow = backShow;
+	}
+	public String getData() {
+		return data;
+	}
+	public void setData(String data) {
+		this.data = data;
+	}
+	public Date getUpdated() {
+		return updated;
+	}
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+}

+ 39 - 0
src/main/java/com/cloudcross/ssp/operator/model/Industry.java

@@ -0,0 +1,39 @@
+package com.cloudcross.ssp.operator.model;
+
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+public class Industry implements ISelector{
+	
+	private Long id;
+	
+	private String name;
+	
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@Override
+	public String getLabel() {
+		// TODO Auto-generated method stub
+		return this.name;
+	}
+
+	@Override
+	public String getValue() {
+		// TODO Auto-generated method stub
+		return String.valueOf(this.id);
+	}
+	
+}

+ 128 - 0
src/main/java/com/cloudcross/ssp/operator/model/Location.java

@@ -0,0 +1,128 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 地域表,对应数据库里面的表t_location
+ * @author luohongyu
+ */
+
+public class Location {
+	private Long id;
+	private String location;
+	private String locationT;
+	private String location1;
+	private String location2;
+	private String location3;
+	private String country;
+	private String cn;
+	private String big5;
+	private String cnCity;
+	private String big5City;
+	private String cnDistrict;
+	private String big5District;
+	private String py;
+	private String enCity;
+	private String enDistrict;
+	private String en;
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getLocation() {
+		return location;
+	}
+	public void setLocation(String location) {
+		this.location = location;
+	}
+	public String getLocationT() {
+		return locationT;
+	}
+	public void setLocationT(String locationT) {
+		this.locationT = locationT;
+	}
+	public String getLocation1() {
+		return location1;
+	}
+	public void setLocation1(String location1) {
+		this.location1 = location1;
+	}
+	public String getLocation2() {
+		return location2;
+	}
+	public void setLocation2(String location2) {
+		this.location2 = location2;
+	}
+	public String getLocation3() {
+		return location3;
+	}
+	public void setLocation3(String location3) {
+		this.location3 = location3;
+	}
+	public String getCountry() {
+		return country;
+	}
+	public void setCountry(String country) {
+		this.country = country;
+	}
+	public String getCn() {
+		return cn;
+	}
+	public void setCn(String cn) {
+		this.cn = cn;
+	}
+	public String getBig5() {
+		return big5;
+	}
+	public void setBig5(String big5) {
+		this.big5 = big5;
+	}
+	public String getCnCity() {
+		return cnCity;
+	}
+	public void setCnCity(String cnCity) {
+		this.cnCity = cnCity;
+	}
+	public String getBig5City() {
+		return big5City;
+	}
+	public void setBig5City(String big5City) {
+		this.big5City = big5City;
+	}
+	public String getCnDistrict() {
+		return cnDistrict;
+	}
+	public void setCnDistrict(String cnDistrict) {
+		this.cnDistrict = cnDistrict;
+	}
+	public String getBig5District() {
+		return big5District;
+	}
+	public void setBig5District(String big5District) {
+		this.big5District = big5District;
+	}
+	public String getPy() {
+		return py;
+	}
+	public void setPy(String py) {
+		this.py = py;
+	}
+	public String getEnCity() {
+		return enCity;
+	}
+	public void setEnCity(String enCity) {
+		this.enCity = enCity;
+	}
+	public String getEnDistrict() {
+		return enDistrict;
+	}
+	public void setEnDistrict(String enDistrict) {
+		this.enDistrict = enDistrict;
+	}
+	public String getEn() {
+		return en;
+	}
+	public void setEn(String en) {
+		this.en = en;
+	}
+}

+ 137 - 0
src/main/java/com/cloudcross/ssp/operator/model/Log.java

@@ -0,0 +1,137 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+public class Log {
+		// 主键
+		private Long id;
+		// 表名
+		private String tableName;
+		// 修改记录id
+		private Long recordId;
+		// 用户id
+		private Long accountId;
+		// 操作人真实姓名
+		private String accountName;
+		// 模块
+		private String module;
+		// 操作类型
+		private String actionType;
+		// 变更详情
+		private String action;
+		// 操作时长
+		private String actionTime;
+		// 用户ip
+		private String userIp;
+		// 操作时间
+		private Date operTime;
+		
+		
+		
+		public Log() {}
+		
+		public Log(Long accounId, String accounName, String module,
+				String actionType, String action, String actionTime,
+				String userIp, Date operTime) {
+			super();
+			this.accountId = accountId;
+			this.accountName = accountName;
+			this.module = module;
+			this.actionType = actionType;
+			this.action = action;
+			this.actionTime = actionTime;
+			this.userIp = userIp;
+			this.operTime = operTime;
+		}
+		
+		public String getTableName() {
+			return tableName;
+		}
+
+		public void setTableName(String tableName) {
+			this.tableName = tableName;
+		}
+
+		public Long getRecordId() {
+			return recordId;
+		}
+
+		public void setRecordId(Long recordId) {
+			this.recordId = recordId;
+		}
+
+		public Long getId() {
+			return id;
+		}
+		public void setId(Long id) {
+			this.id = id;
+		}
+		
+		public Long getAccountId() {
+			return accountId;
+		}
+
+		public void setAccountId(Long accountId) {
+			this.accountId = accountId;
+		}
+
+		public String getAccountName() {
+			return accountName;
+		}
+
+		public void setAccountName(String accountName) {
+			this.accountName = accountName;
+		}
+
+		public String getModule() {
+			return module;
+		}
+		public void setModule(String module) {
+			this.module = module;
+		}
+		public String getActionType() {
+			return actionType;
+		}
+		public void setActionType(String actionType) {
+			this.actionType = actionType;
+		}
+		public String getAction() {
+			return action;
+		}
+		public void setAction(String action) {
+			this.action = action;
+		}
+		public String getActionTime() {
+			return actionTime;
+		}
+		public void setActionTime(String actionTime) {
+			this.actionTime = actionTime;
+		}
+		public String getUserIp() {
+			return userIp;
+		}
+		public void setUserIp(String userIp) {
+			this.userIp = userIp;
+		}
+		public Date getOperTime() {
+			return operTime;
+		}
+		public void setOperTime(Date operTime) {
+			this.operTime = operTime;
+		}
+
+		@Override
+		public String toString() {
+			return "Log [id=" + id + ", tableName=" + tableName + ", recordId="
+					+ recordId + ", accountId=" + accountId + ", accountName="
+					+ accountName + ", module=" + module + ", actionType="
+					+ actionType + ", action=" + action + ", actionTime="
+					+ actionTime + ", userIp=" + userIp + ", operTime="
+					+ operTime + "]";
+		}
+
+		
+		
+		
+		
+}

+ 59 - 0
src/main/java/com/cloudcross/ssp/operator/model/Message.java

@@ -0,0 +1,59 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+public class Message {
+			//消息Id
+			private Long id;
+			//消息内容
+			private String content;
+			//发送时间
+			private Date sendTime;
+			//账户id
+			private Integer accountId;
+			//是否已读
+			private Boolean read;
+			//类型(1-审核,2-提现,3-其他)
+			private Integer type;
+			
+			public Integer getType() {
+				return type;
+			}
+			public void setType(Integer type) {
+				this.type = type;
+			}
+			public Long getId() {
+				return id;
+			}
+			public void setId(Long id) {
+				this.id = id;
+			}
+			public String getContent() {
+				return content;
+			}
+			public void setContent(String content) {
+				this.content = content;
+			}
+			
+			public Date getSendTime() {
+				return sendTime;
+			}
+			public void setSendTime(Date sendTime) {
+				this.sendTime = sendTime;
+			}
+			public Integer getAccountId() {
+				return accountId;
+			}
+			public void setAccountId(Integer accountId) {
+				this.accountId = accountId;
+			}
+			public Boolean getRead() {
+				return read;
+			}
+			public void setRead(Boolean read) {
+				this.read = read;
+			}
+			
+		
+			
+}

+ 93 - 0
src/main/java/com/cloudcross/ssp/operator/model/Operator.java

@@ -0,0 +1,93 @@
+package com.cloudcross.ssp.operator.model;
+
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+/**
+ * 媒体运营商实体类!对应t_operator表
+ * @author CloudCross
+ *
+ */
+public class Operator implements ISelector{
+	private Long id;
+	private String companyName;
+	private String linkMan;
+	private String tel;
+	private String account;
+	private String accountName;
+	private String bank;
+	private Integer status;
+	private Long adminId;//是相应的管理员账号的关联的t_account.id
+	
+	public Long getAdminId() {
+		return adminId;
+	}
+	public void setAdminId(Long adminId) {
+		this.adminId = adminId;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getCompanyName() {
+		return companyName;
+	}
+	public void setCompanyName(String companyName) {
+		this.companyName = companyName;
+	}
+	public String getLinkMan() {
+		return linkMan;
+	}
+	public void setLinkMan(String linkMan) {
+		this.linkMan = linkMan;
+	}
+	public String getTel() {
+		return tel;
+	}
+	public void setTel(String tel) {
+		this.tel = tel;
+	}
+	public String getAccount() {
+		return account;
+	}
+	public void setAccount(String account) {
+		this.account = account;
+	}
+	public String getAccountName() {
+		return accountName;
+	}
+	public void setAccountName(String accountName) {
+		this.accountName = accountName;
+	}
+	public String getBank() {
+		return bank;
+	}
+	public void setBank(String bank) {
+		this.bank = bank;
+	}
+	
+	@Override
+	public String toString() {
+		return "Operator [id=" + id + ", companyName=" + companyName
+				+ ", linkMan=" + linkMan + ", tel=" + tel + ", account="
+				+ account + ", accountName=" + accountName + ", bank=" + bank
+				+ "]";
+	}
+	@Override
+	public String getLabel() {
+		// TODO Auto-generated method stub
+		return this.companyName;
+	}
+	@Override
+	public String getValue() {
+		// TODO Auto-generated method stub
+		return String.valueOf(this.id);
+	}
+}

+ 109 - 0
src/main/java/com/cloudcross/ssp/operator/model/OperatorBalance.java

@@ -0,0 +1,109 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 提现记录表,与数据库表t_operator_balance相对应
+ * @author chenyou
+ *
+ */
+public class OperatorBalance {
+	//主键
+	private Long id;
+	//运营商id
+	private Long operatorId;
+	//时间
+	private Date actTime;
+	//交易号
+	private String num;
+	//提取金额
+	private Float amount;
+	//状态,1-申请中,2-审核不通过,3-已提现
+	private Integer state;
+	//收入
+	private Float income;
+	//可提现金额
+	private Float balance;
+	//
+	public Integer impression;
+	public Integer click;
+	public Float ecpm;
+	public Integer getImpression() {
+		return impression;
+	}
+	public void setImpression(Integer impression) {
+		this.impression = impression;
+	}
+	public Integer getClick() {
+		return click;
+	}
+	public void setClick(Integer click) {
+		this.click = click;
+	}
+	public Float getEcpm() {
+		return ecpm;
+	}
+	public void setEcpm(Float ecpm) {
+		this.ecpm = ecpm;
+	}
+	public Float getIncome() {
+		return income;
+	}
+	public void setIncome(Float income) {
+		this.income = income;
+	}
+	public Float getBalance() {
+		return balance;
+	}
+	public void setBalance(Float balance) {
+		this.balance = balance;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public Date getActTime() {
+		return actTime;
+	}
+	public void setActTime(Date actTime) {
+		this.actTime = actTime;
+	}
+	public String getNum() {
+		return num;
+	}
+	public void setNum(String num) {
+		this.num = num;
+	}
+	public Float getAmount() {
+		return amount;
+	}
+	public void setAmount(Float amount) {
+		this.amount = amount;
+	}
+	public Integer getState() {
+		return state;
+	}
+	public void setState(Integer state) {
+		this.state = state;
+	}
+	@Override
+	public String toString() {
+		return "OperatorBalance [id=" + id + ", operatorId=" + operatorId
+				+ ", actTime=" + actTime + ", num=" + num + ", amount="
+				+ amount + ", state=" + state + ", income=" + income
+				+ ", balance=" + balance + ", impression=" + impression
+				+ ", click=" + click + ", ecpm=" + ecpm + "]";
+	}
+	
+	
+	
+	
+}

+ 145 - 0
src/main/java/com/cloudcross/ssp/operator/model/Order.java

@@ -0,0 +1,145 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+/**
+ * 订单表
+ * <p/>
+ * 与t_order表相关。
+ */
+public class Order implements ISelector {
+		// 主键
+		private Long id;
+		// 广告主ID
+		private Long advertiserId;
+		// 订单名称
+		private String name;
+		// 订单预算
+		private float budget;
+		// 订单备注
+		private String comment;
+		// 状态(0开启,1暂停)
+		private Integer status;
+		// 更新日期
+		private Date updated;
+		/**
+		 * 活动个数
+		 * <p/>
+		 * 与t_campaign表相关。
+		 */
+		//活动个数campaign
+		private Long campaignNumber;
+		
+		public Long getCampaignNumber() {
+			return campaignNumber;
+		}
+		public void setCampaignNumber(Long campaignNumber) {
+			this.campaignNumber = campaignNumber;
+		}
+		public Long getId() {
+			return id;
+		}
+		public void setId(Long id) {
+			this.id = id;
+		}
+		public Long getAdvertiserId() {
+			return advertiserId;
+		}
+		public void setAdvertiserId(Long advertiserId) {
+			this.advertiserId = advertiserId;
+		}
+		public String getName() {
+			return name;
+		}
+		public void setName(String name) {
+			this.name = name;
+		}
+		public float getBudget() {
+			return budget;
+		}
+		public void setBudget(float budget) {
+			this.budget = budget;
+		}
+		public String getComment() {
+			return comment;
+		}
+		public void setComment(String comment) {
+			this.comment = comment;
+		}
+		public Integer getStatus() {
+			return status;
+		}
+		public void setStatus(Integer status) {
+			this.status = status;
+		}
+		
+		public Date getUpdated() {
+			return updated;
+		}
+		public void setUpdated(Date updated) {
+			this.updated = updated;
+		}
+		@Override
+		public String toString() {
+			return "Order [id=" + id + ", advertiserId=" + advertiserId
+					+ ", name=" + name + ", budget=" + budget + ", comment="
+					+ comment + ", status=" + status + ", upDate=" + updated
+					+ "]";
+		}
+		@Override
+		public String getLabel() {
+			
+			return this.name;
+		}
+		@Override
+		public String getValue() {
+			
+			return String.valueOf(this.id);
+		}
+		@Override
+		public int hashCode() {
+			final int prime = 31;
+			int result = 1;
+			result = prime * result
+					+ ((advertiserId == null) ? 0 : advertiserId.hashCode());
+			result = prime * result + Float.floatToIntBits(budget);
+			result = prime * result
+					+ ((comment == null) ? 0 : comment.hashCode());
+			result = prime * result + ((name == null) ? 0 : name.hashCode());
+			return result;
+		}
+		@Override
+		public boolean equals(Object obj) {
+			if (this == obj)
+				return true;
+			if (obj == null)
+				return false;
+			if (getClass() != obj.getClass())
+				return false;
+			Order other = (Order) obj;
+			if (advertiserId == null) {
+				if (other.advertiserId != null)
+					return false;
+			} else if (!advertiserId.equals(other.advertiserId))
+				return false;
+			if (Float.floatToIntBits(budget) != Float
+					.floatToIntBits(other.budget))
+				return false;
+			if (comment == null) {
+				if (other.comment != null)
+					return false;
+			} else if (!comment.equals(other.comment))
+				return false;
+			if (name == null) {
+				if (other.name != null)
+					return false;
+			} else if (!name.equals(other.name))
+				return false;
+			return true;
+		}
+		
+		
+		
+}

+ 44 - 0
src/main/java/com/cloudcross/ssp/operator/model/Params.java

@@ -0,0 +1,44 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 前台发送的是一个对象数组
+ * 后台需要以下对象接受
+ * 例如:
+ * menus[0].id	    1
+ * menus[0].level	1
+ * menus[1].id	    3
+ * menus[1].level	2
+ * menus[2].id	    2
+ * menus[2].level	3
+ * 这个菜单数组对象要接收这个对象,必须在这里加一个list<Resourcess>
+ * @author lanyuan
+ * Email:mmm333zzz520@163.com
+ * date:2014-2-12
+ */
+public class Params {
+
+	
+	private List<Resources> resources = new ArrayList<Resources>();
+	private List<String> id = new ArrayList<String>();
+
+	public List<String> getId() {
+		return id;
+	}
+
+	public void setId(List<String> id) {
+		this.id = id;
+	}
+
+	public List<Resources> getResources() {
+		return resources;
+	}
+
+	public void setResources(List<Resources> resources) {
+		this.resources = resources;
+	}
+
+}

+ 29 - 0
src/main/java/com/cloudcross/ssp/operator/model/Place.java

@@ -0,0 +1,29 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 场景表,对应数据库里面的表t_place
+ * @author luohongyu
+ */
+
+public class Place {
+	private Long id;
+	private String name;
+	
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	@Override
+	public String toString() {
+		return "Place [id=" + id + ", name=" + name + "]";
+	}
+	
+}

+ 61 - 0
src/main/java/com/cloudcross/ssp/operator/model/PlaceOperator.java

@@ -0,0 +1,61 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 运营商定义的场景名称和云联定义场景名称对对应表
+ * 对应数据库的t_place_operator表
+ * @author chenyou
+ *
+ */
+public class PlaceOperator {
+	//主键
+	private Long id;
+	//数据场景id
+	private Long operatorId;
+	//运营商自定义场景名称
+	private String name;
+	//标准场景id
+	private Long placeId;
+	//标准场景名称
+	private String placeName;
+	
+	public String getPlaceName() {
+		return placeName;
+	}
+	public void setPlaceName(String placeName) {
+		this.placeName = placeName;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public Long getPlaceId() {
+		return placeId;
+	}
+	public void setPlaceId(Long placeId) {
+		this.placeId = placeId;
+	}
+	
+	@Override
+	public String toString() {
+		return "PlaceOperator [id=" + id + ", operatorId=" + operatorId
+				+ ", name=" + name + ", placeId=" + placeId + ", placeName="
+				+ placeName + "]";
+	}
+	
+	
+	
+}

+ 107 - 0
src/main/java/com/cloudcross/ssp/operator/model/Resources.java

@@ -0,0 +1,107 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+@SuppressWarnings("serial")
+public class Resources implements java.io.Serializable {
+
+	private Integer id;
+	private String name;
+	private Integer parentId; //父类Id
+	private String parentName;
+	private String resKey;//这个权限KEY是唯一的,新增时要注意,
+	private String resUrl;//URL地址.例如:/videoType/query  不需要项目名和http://xxx:8080
+	private Integer level;//级别 菜单的顺序
+	private String type;//类型,目录 菜单  按扭..在spring security3安全权限中,涉及精确到按扭控制
+	private String description;
+	private List<Resources> children = new ArrayList<Resources>();
+
+	public Integer getId() {
+		return this.id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getType() {
+		return this.type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getResUrl() {
+		return resUrl;
+	}
+
+	public void setResUrl(String resUrl) {
+		this.resUrl = resUrl;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+
+	public String getResKey() {
+		return resKey;
+	}
+
+	public void setResKey(String resKey) {
+		this.resKey = resKey;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public Integer getParentId() {
+		return parentId;
+	}
+
+	public void setParentId(Integer parentId) {
+		this.parentId = parentId;
+	}
+
+
+	public String getParentName() {
+		return parentName;
+	}
+
+	public void setParentName(String parentName) {
+		this.parentName = parentName;
+	}
+
+	public List<Resources> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Resources> children) {
+		this.children = children;
+	}
+
+	@Override
+	public String toString() {
+		return "Menu [id=" + id + ", name=" + name + ", parentId=" + parentId + ", parentName=" + parentName + ", resKey=" + resKey + ", resUrl=" + resUrl + ", level=" + level + ", type=" + type + ", description=" + description + ", children=" + children + "]";
+	}
+
+}

+ 20 - 0
src/main/java/com/cloudcross/ssp/operator/model/ResourcesRole.java

@@ -0,0 +1,20 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.io.Serializable;
+@SuppressWarnings("serial")
+public class ResourcesRole implements Serializable{
+	private String resId;
+	private String roleId;
+	public String getResId() {
+		return resId;
+	}
+	public void setResId(String resId) {
+		this.resId = resId;
+	}
+	public String getRoleId() {
+		return roleId;
+	}
+	public void setRoleId(String roleId) {
+		this.roleId = roleId;
+	}
+}

+ 23 - 0
src/main/java/com/cloudcross/ssp/operator/model/RoleAccount.java

@@ -0,0 +1,23 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.io.Serializable;
+
+@SuppressWarnings("serial")
+public class RoleAccount implements Serializable{
+
+	private Integer roleId;
+	private Integer accountId;
+	public Integer getRoleId() {
+		return roleId;
+	}
+	public void setRoleId(Integer roleId) {
+		this.roleId = roleId;
+	}
+	public Integer getAccountId() {
+		return accountId;
+	}
+	public void setAccountId(Integer accountId) {
+		this.accountId = accountId;
+	}
+	
+}

+ 67 - 0
src/main/java/com/cloudcross/ssp/operator/model/Roles.java

@@ -0,0 +1,67 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@SuppressWarnings("serial")
+public class Roles implements java.io.Serializable {
+
+	private Integer id;
+	private String enable;//是否禁用角色 1 表示禁用 2 表示不禁用
+	private String name;
+	private String roleKey;//唯一,新境时,需要判断
+	private String description;
+	private Set<Resources> resources = new HashSet<Resources>(0);
+
+	public Roles() {
+	}
+
+	public Integer getId() {
+		return this.id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getEnable() {
+		return this.enable;
+	}
+
+	public void setEnable(String enable) {
+		this.enable = enable;
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Set<Resources> getResources() {
+		return resources;
+	}
+
+	public void setResources(Set<Resources> resources) {
+		this.resources = resources;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public String getRoleKey() {
+		return roleKey;
+	}
+
+	public void setRoleKey(String roleKey) {
+		this.roleKey = roleKey;
+	}
+
+}

+ 120 - 0
src/main/java/com/cloudcross/ssp/operator/model/RptZone.java

@@ -0,0 +1,120 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 对应数据库的t_rpt_zone表
+ * @author chenyou
+ *
+ */
+public class RptZone {
+	//主键
+	private Long id;
+	//运营商id
+	private Long operatorId;
+	//日期
+	private Date date;
+	//广告位id
+	private Long zoneId;
+	//pv
+	private Long pv;
+	//uv
+	private Long uv;
+	//曝光数
+	private Long impression;
+	//唯一曝光数
+	private Long uImpression;
+	//点击数
+	private Long click;
+	//唯一点击数
+	private Long uClick;
+	//ecpm
+	private Float ecpm;
+	//收入
+	private Long income;
+	
+	public Long getuImpression() {
+		return uImpression;
+	}
+	public void setuImpression(Long uImpression) {
+		this.uImpression = uImpression;
+	}
+	public Long getuClick() {
+		return uClick;
+	}
+	public void setuClick(Long uClick) {
+		this.uClick = uClick;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public Date getDate() {
+		return date;
+	}
+	public void setDate(Date date) {
+		this.date = date;
+	}
+	public Long getZoneId() {
+		return zoneId;
+	}
+	public void setZoneId(Long zoneId) {
+		this.zoneId = zoneId;
+	}
+	public Long getPv() {
+		return pv;
+	}
+	public void setPv(Long pv) {
+		this.pv = pv;
+	}
+	public Long getUv() {
+		return uv;
+	}
+	public void setUv(Long uv) {
+		this.uv = uv;
+	}
+	public Long getImpression() {
+		return impression;
+	}
+	public void setImpression(Long impression) {
+		this.impression = impression;
+	}
+	public Long getClick() {
+		return click;
+	}
+	public void setClick(Long click) {
+		this.click = click;
+	}
+	public Float getEcpm() {
+		return ecpm;
+	}
+	public void setEcpm(Float ecpm) {
+		this.ecpm = ecpm;
+	}
+	public Long getIncome() {
+		return income;
+	}
+	public void setIncome(Long income) {
+		this.income = income;
+	}
+	
+	@Override
+	public String toString() {
+		return "RptZone [id=" + id + ", operatorId=" + operatorId + ", date="
+				+ date + ", zoneId=" + zoneId + ", pv=" + pv + ", uv=" + uv
+				+ ", impression=" + impression + ", uImpression=" + uImpression
+				+ ", click=" + click + ", uClick=" + uClick + ", ecpm=" + ecpm
+				+ ", income=" + income + "]";
+	}
+	
+	
+	
+}

+ 132 - 0
src/main/java/com/cloudcross/ssp/operator/model/RptZoneHour.java

@@ -0,0 +1,132 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 对应数据库表t_rpt_zone_hour
+ * 
+ * @author chenyou
+ *
+ */
+public class RptZoneHour {
+	// 主键
+	private Long id;
+	// 运营商id
+	private Long operatorId;
+	// 日期
+	private Date date;
+	// 小时
+	private Integer hour;
+	// 广告位id
+	private Long zoneId;
+	// pv
+	private Long pv;
+	// uv
+	private Long uv;
+	// 曝光数
+	private Long impression;
+	//唯一曝光数
+	private Long uImpression;
+	// 点击数
+	private Long click;
+	//唯一点击数
+	private Long uClick;
+	// ecpm
+	private Float ecpm;
+	// 收入
+	private Long income;
+	
+	public Long getuImpression() {
+		return uImpression;
+	}
+	public void setuImpression(Long uImpression) {
+		this.uImpression = uImpression;
+	}
+	public Long getuClick() {
+		return uClick;
+	}
+	public void setuClick(Long uClick) {
+		this.uClick = uClick;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public Date getDate() {
+		return date;
+	}
+	public void setDate(Date date) {
+		this.date = date;
+	}
+	public Integer getHour() {
+		return hour;
+	}
+	public void setHour(Integer hour) {
+		this.hour = hour;
+	}
+	public Long getZoneId() {
+		return zoneId;
+	}
+	public void setZoneId(Long zoneId) {
+		this.zoneId = zoneId;
+	}
+	public Long getPv() {
+		return pv;
+	}
+	public void setPv(Long pv) {
+		this.pv = pv;
+	}
+	public Long getUv() {
+		return uv;
+	}
+	public void setUv(Long uv) {
+		this.uv = uv;
+	}
+	public Long getImpression() {
+		return impression;
+	}
+	public void setImpression(Long impression) {
+		this.impression = impression;
+	}
+	public Long getClick() {
+		return click;
+	}
+	public void setClick(Long click) {
+		this.click = click;
+	}
+	public Float getEcpm() {
+		return ecpm;
+	}
+	public void setEcpm(Float ecpm) {
+		this.ecpm = ecpm;
+	}
+	public Long getIncome() {
+		return income;
+	}
+	public void setIncome(Long income) {
+		this.income = income;
+	}
+	
+	@Override
+	public String toString() {
+		return "RptZoneHour [id=" + id + ", operatorId=" + operatorId
+				+ ", date=" + date + ", hour=" + hour + ", zoneId=" + zoneId
+				+ ", pv=" + pv + ", uv=" + uv + ", impression=" + impression
+				+ ", uImpression=" + uImpression + ", click=" + click
+				+ ", uClick=" + uClick + ", ecpm=" + ecpm + ", income="
+				+ income + "]";
+	}
+	
+
+	
+	
+	
+}

+ 39 - 0
src/main/java/com/cloudcross/ssp/operator/model/Size.java

@@ -0,0 +1,39 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * 素材模板表。
+ *  
+ * @author Wanfu
+ */
+public final class Size {
+	private Long id;
+	//模版尺寸的宽度
+	private Long width;
+	//模版尺寸的高度
+	private Long height;
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getWidth() {
+		return width;
+	}
+	public void setWidth(Long width) {
+		this.width = width;
+	}
+	public Long getHeight() {
+		return height;
+	}
+	public void setHeight(Long height) {
+		this.height = height;
+	}
+	@Override
+	public String toString() {
+		return "Size [id=" + id + ", width=" + width + ", height=" + height
+				+ "]";
+	}
+}

+ 155 - 0
src/main/java/com/cloudcross/ssp/operator/model/User.java

@@ -0,0 +1,155 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+
+/**
+ * 用户表
+ * <p/>
+ * 与rv_users表相关。
+ */
+public final class User implements ISelector {
+	// 主键
+	private Long id;
+	// 邮箱地址
+	private String email;
+	// 用户组ID
+	private Long userGroupId;
+	// 登录用户
+	private String username;
+	// 登录密码
+	private String password;
+	// 联系姓名
+	private String contactName;
+	// 联系电话
+	private String phone;
+	// 状态:活跃还是不活跃
+	private Integer status;
+	// 创建日期
+	private Date createDate;
+	// 更新日期
+	private Date modifyDate;
+	
+	/**
+	 * @return the id
+	 */
+	public Long getId() {
+		return id;
+	}
+	/**
+	 * @param id the id to set
+	 */
+	public void setId(Long id) {
+		this.id = id;
+	}
+	/**
+	 * @return the email
+	 */
+	public String getEmail() {
+		return email;
+	}
+	/**
+	 * @param email the email to set
+	 */
+	public void setEmail(String email) {
+		this.email = email;
+	}
+	/**
+	 * @return the username
+	 */
+	public String getUsername() {
+		return username;
+	}
+	/**
+	 * @param username the username to set
+	 */
+	public void setUsername(String username) {
+		this.username = username;
+	}
+	/**
+	 * @return the password
+	 */
+	public String getPassword() {
+		return password;
+	}
+	/**
+	 * @param password the password to set
+	 */
+	public void setPassword(String password) {
+		this.password = password;
+	}
+	/**
+	 * @return the status
+	 */
+	public Integer getStatus() {
+		return status;
+	}
+	/**
+	 * @param status the status to set
+	 */
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	/**
+	 * @return the createDate
+	 */
+	public Date getCreateDate() {
+		return createDate;
+	}
+	/**
+	 * @param createDate the createDate to set
+	 */
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+	/**
+	 * @return the modifyDate
+	 */
+	public Date getModifyDate() {
+		return modifyDate;
+	}
+	/**
+	 * @param modifyDate the modifyDate to set
+	 */
+	public void setModifyDate(Date modifyDate) {
+		this.modifyDate = modifyDate;
+	}
+	
+	public Long getUserGroupId() {
+		return userGroupId;
+	}
+	public void setUserGroupId(Long userGroupId) {
+		this.userGroupId = userGroupId;
+	}
+	public String getPhone() {
+		return phone;
+	}
+	public void setPhone(String phone) {
+		this.phone = phone;
+	}
+	public String getContactName() {
+		return contactName;
+	}
+	public void setContactName(String contactName) {
+		this.contactName = contactName;
+	}
+	@Override
+	public String toString() {
+		return "User [id=" + id + ", email=" + email + ", userGroupId="
+				+ userGroupId + ", username=" + username + ", password="
+				+ password + ", phone=" + phone + ", status=" + status
+				+ ", createDate=" + createDate + ", modifyDate=" + modifyDate
+				+ "]";
+	}
+	@Override
+	public String getLabel() {
+		return this.username;
+	}
+	@Override
+	public String getValue() {
+		return String.valueOf(this.id);
+	}
+	
+}

+ 45 - 0
src/main/java/com/cloudcross/ssp/operator/model/UserGroup.java

@@ -0,0 +1,45 @@
+package com.cloudcross.ssp.operator.model;
+
+/**
+ * 用户分组表。
+ * <p/>
+ * 与rv_accounts表内容相关。
+ *  
+ * @author qaohao
+ */
+public final class UserGroup {
+	private Long id;
+	private String userGroup;
+	private String userGroupType;
+	private String status;
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getUserGroup() {
+		return userGroup;
+	}
+	public void setUserGroup(String userGroup) {
+		this.userGroup = userGroup;
+	}
+	public String getUserGroupType() {
+		return userGroupType;
+	}
+	public void setUserGroupType(String userGroupType) {
+		this.userGroupType = userGroupType;
+	}
+	public String getStatus() {
+		return status;
+	}
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	@Override
+	public String toString() {
+		return "UserGroup [id=" + id + ", userGroup=" + userGroup
+				+ ", userGroupType=" + userGroupType + ", status=" + status
+				+ "]";
+	}
+}

+ 58 - 0
src/main/java/com/cloudcross/ssp/operator/model/UserLogin.java

@@ -0,0 +1,58 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+
+
+public class UserLogin implements java.io.Serializable  {
+ /**
+	 * 
+	 */
+	private static final long serialVersionUID = 4999821408224216189L;
+private Integer userId;
+private String userName;
+ private Date loginTime;
+ private String loginIP;
+ 
+ public void setUserId (Integer userId)
+ {
+	    this.userId = userId;
+ }
+ 
+ public Integer getUserId(){
+	 return userId;
+ }
+ 
+ public void setUserName (String userName)
+ {
+	    this.userName = userName;
+ }
+ 
+ public String getUserName(){
+	 return userName;
+ }
+ 
+ public void setLoginTime (Date loginTime)
+ {
+	    this.loginTime = loginTime;
+ }
+
+ public Date getLoginTime(){
+	 return loginTime;
+ }
+  
+ public void setloginIP (String loginIP)
+ {
+	    this.loginIP = loginIP;
+ }
+ 
+ public String getLoginIP(){
+	 return loginIP;
+ }
+ 
+ @Override
+	public String toString() {
+		return "Menu [userId=" + userId + ",userName=" + userName + ", loginTime=" + loginTime + ", loginIP=" + loginIP + "]";
+	}
+ 
+}

+ 147 - 0
src/main/java/com/cloudcross/ssp/operator/model/Wifi.java

@@ -0,0 +1,147 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+
+/**
+ * Wifi,对应数据库里面的表t_wifi
+ * @author chenyou
+ */
+
+public class Wifi {
+
+	private Long id;
+	//热点名称
+	private String name;
+	private String SSID;
+	private String location;
+	//省的名称,在联表查询时使用
+	private String cn;
+	//市的名称,在联表查询时使用
+	private String cnCity;
+	private String apmac;
+	private String address;
+	private Float longitude;
+	private Float latitude;
+	//运营商场景
+	private String place;
+	//场景id,这是云联自己定义的场景名称对应的id
+	private Long placeId;
+	//场景名称,这是云联自己定义的场景名称,在联表查询时使用
+	private String placeName;
+	//运营商id
+	private Long operatorId;
+	//状态,0-开启,1-暂停,-1-删除
+	private Integer status;
+	//更新时间
+	private Date updated;
+	
+	public String getCn() {
+		return cn;
+	}
+	public void setCn(String cn) {
+		this.cn = cn;
+	}
+	public String getCnCity() {
+		return cnCity;
+	}
+	public void setCnCity(String cnCity) {
+		this.cnCity = cnCity;
+	}
+	public String getPlaceName() {
+		return placeName;
+	}
+	public void setPlaceName(String placeName) {
+		this.placeName = placeName;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getSSID() {
+		return SSID;
+	}
+	public void setSSID(String sSID) {
+		SSID = sSID;
+	}
+	public String getApmac() {
+		return apmac;
+	}
+	public void setApmac(String apmac) {
+		this.apmac = apmac;
+	}
+	public String getPlace() {
+		return place;
+	}
+	public void setPlace(String place) {
+		this.place = place;
+	}
+	public Long getPlaceId() {
+		return placeId;
+	}
+	public void setPlaceId(Long placeId) {
+		this.placeId = placeId;
+	}
+	public Long getOperatorId() {
+		return operatorId;
+	}
+	public void setOperatorId(Long operatorId) {
+		this.operatorId = operatorId;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public Date getUpdated() {
+		return updated;
+	}
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getLocation() {
+		return location;
+	}
+	public void setLocation(String location) {
+		this.location = location;
+	}
+	public String getAddress() {
+		return address;
+	}
+	public void setAddress(String address) {
+		this.address = address;
+	}	
+	public Float getLongitude() {
+		return longitude;
+	}
+	public void setLongitude(Float longitude) {
+		this.longitude = longitude;
+	}
+	public Float getLatitude() {
+		return latitude;
+	}
+	public void setLatitude(Float latitude) {
+		this.latitude = latitude;
+	}
+	
+	@Override
+	public String toString() {
+		return "Wifi [id=" + id + ", name=" + name + ", SSID=" + SSID
+				+ ", location=" + location + ", cn=" + cn + ", cnCity="
+				+ cnCity + ", apmac=" + apmac + ", address=" + address
+				+ ", longitude=" + longitude + ", latitude=" + latitude
+				+ ", place=" + place + ", placeId=" + placeId + ", placeName="
+				+ placeName + ", operatorId=" + operatorId + ", status="
+				+ status + ", updated=" + updated + "]";
+	}
+	
+	
+}

+ 176 - 0
src/main/java/com/cloudcross/ssp/operator/model/Zone.java

@@ -0,0 +1,176 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
+
+public class Zone implements ISelector{
+	private Long id;
+	private Long operator_id;
+	private String name;
+	private Long width;
+	private Long height;
+	private Integer device;
+	private Integer position;
+	private String domain;
+	private Integer status;
+	private Date updated;
+	private Date supdated;
+	private Integer recheck;
+	private String default_path;
+	private String default_url;
+	private Long sizeId;
+	private List<Industry> industryList;
+	private String industry;
+	private String default_path_small;
+	
+	public Date getSupdated() {
+		return supdated;
+	}
+	public void setSupdated(Date supdated) {
+		this.supdated = supdated;
+	}
+	public Long getSizeId() {
+		return sizeId;
+	}
+	public void setSizeId(Long sizeId) {
+		this.sizeId = sizeId;
+	}
+	public String getDefault_path() {
+		return default_path;
+	}
+	public void setDefault_path(String default_path) {
+		this.default_path = default_path;
+	}
+	public String getDefault_url() {
+		return default_url;
+	}
+	public void setDefault_url(String default_url) {
+		this.default_url = default_url;
+	}
+	public Integer getRecheck() {
+		return recheck;
+	}
+	public void setRecheck(Integer recheck) {
+		this.recheck = recheck;
+	}
+	public List<Industry> getIndustryList() {
+		return industryList;
+	}
+	public void setIndustryList(List<Industry> industryList) {
+		this.industryList = industryList;
+	}
+	public String getIndustry() {
+		return industry;
+	}
+	public void setIndustry(String industry) {
+		this.industry = industry;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOperator_id() {
+		return operator_id;
+	}
+	public void setOperator_id(Long operator_id) {
+		this.operator_id = operator_id;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	public Long getWidth() {
+		return width;
+	}
+	public void setWidth(Long width) {
+		this.width = width;
+	}
+	public Long getHeight() {
+		return height;
+	}
+	public void setHeight(Long height) {
+		this.height = height;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	
+	public Integer getDevice() {
+		return device;
+	}
+	public void setDevice(Integer device) {
+		this.device = device;
+	}
+	public Integer getPosition() {
+		return position;
+	}
+	public void setPosition(Integer position) {
+		this.position = position;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public Date getUpdated() {
+		return updated;
+	}
+	public void setUpdated(Date updated) {
+		this.updated = updated;
+	}
+
+
+	
+
+
+
+	public String getDomain() {
+		return domain;
+	}
+	public void setDomain(String domain) {
+		this.domain = domain;
+	}
+	
+	
+	
+	
+	
+	
+	@Override
+	public String toString() {
+		return "Zone [id=" + id + ", operator_id=" + operator_id + ", name="
+				+ name + ", width=" + width + ", height=" + height
+				+ ", device=" + device + ", position=" + position + ", domain="
+				+ domain + ", status=" + status + ", updated=" + updated
+				+ ", supdated=" + supdated + ", recheck=" + recheck
+				+ ", default_path=" + default_path + ", default_url="
+				+ default_url + ", sizeId=" + sizeId + ", industryList="
+				+ industryList + ", industry=" + industry
+				+ ", default_path_small=" + default_path_small + "]";
+	}
+	public String getDefault_path_small() {
+		return default_path_small;
+	}
+	public void setDefault_path_small(String default_path_small) {
+		this.default_path_small = default_path_small;
+	}
+	@Override
+	public String getLabel() {
+		// TODO Auto-generated method stub
+		return this.getName();
+	}
+	@Override
+	public String getValue() {
+		// TODO Auto-generated method stub
+		return String.valueOf(this.getId());
+	}
+	
+	
+
+}

+ 54 - 0
src/main/java/com/cloudcross/ssp/operator/model/ZoneDomain.java

@@ -0,0 +1,54 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+import java.util.List;
+
+public class ZoneDomain {
+	private Long id;
+	private Long zoneId;
+	private String domain;
+	private Date supdated;
+	private Integer status;
+	public Date getSupdated() {
+		return supdated;
+	}
+	public void setSupdated(Date supdated) {
+		this.supdated = supdated;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	
+	public Long getZoneId() {
+		return zoneId;
+	}
+	public void setZoneId(Long zoneId) {
+		this.zoneId = zoneId;
+	}
+	public String getDomain() {
+		return domain;
+	}
+	public void setDomain(String domain) {
+		this.domain = domain;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	@Override
+	public String toString() {
+		return "ZoneDomain [id=" + id + ", zoneId=" + zoneId + ", domain="
+				+ domain + ", supdated=" + supdated + ", status=" + status
+				+ "]";
+	}
+	
+	
+
+	
+
+}

+ 51 - 0
src/main/java/com/cloudcross/ssp/operator/model/ZoneIndustry.java

@@ -0,0 +1,51 @@
+package com.cloudcross.ssp.operator.model;
+
+import java.util.Date;
+import java.util.List;
+
+public class ZoneIndustry {
+	private Long id;
+	private Long zoneId;
+	private Long industryId;
+	private Date supdated;
+	private Integer status;
+	
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getZoneId() {
+		return zoneId;
+	}
+	public void setZoneId(Long zoneId) {
+		this.zoneId = zoneId;
+	}
+	public Long getIndustryId() {
+		return industryId;
+	}
+	public void setIndustryId(Long industryId) {
+		this.industryId = industryId;
+	}
+	public Date getSupdated() {
+		return supdated;
+	}
+	public void setSupdated(Date supdated) {
+		this.supdated = supdated;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	@Override
+	public String toString() {
+		return "ZoneIndustry [id=" + id + ", zoneId=" + zoneId
+				+ ", industryId=" + industryId + ", supdated=" + supdated
+				+ ", status=" + status + "]";
+	}
+	
+	
+}

+ 258 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/account.sql.xml

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="operator.accountSqlMapper">
+
+	<!--mybatis ehcache缓存配置 -->
+	<!-- 以下两个<cache>标签二选一,第一个可以输出日志,第二个不输出日志 <cache type="org.mybatis.caches.ehcache.LoggingEhcache" 
+		/> -->
+	<!-- <cache type="org.mybatis.caches.ehcache.EhcacheCache"/> -->
+	<!-- 以下与实体类的中字段一致 -->
+	<sql id="selectId">
+		id,
+		name as accountName,
+		(select group_concat(name) from t_ly_role
+		where t_ly_role.id
+		in (SELECT role_id FROM t_acc_role WHERE
+		acc_id=t_account.id) ) roleName,
+		password,
+		description,
+		state,
+		create_time as createTime,
+		type,
+		real_name as realName,tel,
+		operator_id as operatorId,
+		agent_id as agentId,
+		advertiser_id as advertiserId,
+		sys_type as sysType
+	</sql>
+
+	<!--resultType="Account" 每返回一条结果封装到Account里 -->
+	<select id="queryAll" resultType="com.cloudcross.ssp.operator.model.Account" parameterType="com.cloudcross.ssp.operator.model.Account">
+		select
+		<include refid="selectId" />
+		from t_account
+		<where>
+			<if test="accountName != null and accountName != ''">
+				name like '%${accountName}%'
+			</if>
+		</where>
+	</select>
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Account">
+		select id,
+		name as accountName,
+		real_name as realName,tel,state,create_time as createTime
+		from t_account
+		where deletestatus != -1 
+		and operator_id = #{loginAccount.operatorId}
+		and id != #{loginAccount.id}
+		<if test="value!=null">
+			and ( t_account.name like #{value}
+			or t_account.real_name like #{value} )
+		</if>
+		and sys_type = #{loginAccount.sysType}
+		order by id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) 
+		from t_account
+		where deletestatus != -1 
+		and operator_id = #{loginAccount.operatorId}
+		<if test="value!=null">
+			and ( t_account.name like #{value}
+			or t_account.real_name like #{value} )
+		</if>
+		and id != #{loginAccount.id}
+		and sys_type = #{loginAccount.sysType}
+	</select>
+
+	<select id="isExist" resultType="com.cloudcross.ssp.operator.model.Account" parameterType="String">
+		select
+		<include refid="selectId" />
+		from t_account
+		where name = #{accountName}
+	</select>
+
+	<!--resultType="Account" 每返回一条结果封装到Account里 -->
+	<select id="query" resultType="com.cloudcross.ssp.operator.model.Account" parameterType="java.util.HashMap">
+		select
+		<include refid="selectId" />
+		from t_account
+		<where>
+			<if test="t.accountName != null and t.accountName != ''">
+				name like '%${t.accountName}%'
+			</if>
+		</where>
+	</select>
+
+	<select id="queryNoMatch" resultType="com.cloudcross.ssp.operator.model.Account" parameterType="java.util.HashMap">
+		select
+		a.id,
+		a.name,
+		a.password,
+		a.accountType,
+		a.description,
+		a.state,
+		a.createTime,
+		(SELECT dp.name from department dp where dp.id =
+		d.subdep_id) depName
+		from account a LEFT JOIN dep_account d on
+		a.id=d.account_id
+		<where>
+			<if test="t.accountName != null and t.accountName != ''">
+				name like '%${t.accountName}%'
+			</if>
+		</where>
+	</select>
+	
+		<!-- 增加用户 -->
+	<insert id="add" parameterType="com.cloudcross.ssp.operator.model.Account">
+		insert into t_account (
+		name,
+		password,
+		description,
+		state )
+		values (#{accountName},
+		#{password}, #{description},
+		#{state})
+	</insert>
+	<!-- 增加用户 -->
+	<insert id="addAccount" parameterType="com.cloudcross.ssp.operator.model.Account">
+		insert into t_account
+		 (name,
+		 password,
+		 real_name,
+		 tel,
+		 operator_id,
+		 description, 
+		 state,
+		 sys_type ) values (#{accountName}, #{password},#{realName}, 
+    	#{tel},#{operatorId},#{description},#{state},#{sysType}) 
+	</insert>
+
+	<delete id="delete" parameterType="String">
+		delete from t_account where
+		id=#{id}
+	</delete>
+
+	<select id="getById" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Account">
+		select
+		id,
+		name as accountName,
+		(select group_concat(name) from t_ly_role
+		where t_ly_role.id
+		in (SELECT role_id FROM t_acc_role WHERE
+		acc_id=t_account.id) ) roleName,
+		password,
+		real_name as realName,
+		tel,
+		description,
+		state,
+		create_time as createTime,
+		type,
+		operator_id as operatorId,
+		agent_id as agentId,
+		advertiser_id as advertiserId,
+		sys_type as sysType
+		from t_account where id=#{id}
+	</select>
+
+	<update id="updateAccountStatus" parameterType="HashMap">
+		update t_account
+				set state=#{state}
+		where t_account.id in
+			<foreach item="accountId" collection="accountIdList"
+		      open="(" separator="," close=")">
+		        #{accountId}
+			</foreach>
+	</update>
+	<update id="editAccount" parameterType="com.cloudcross.ssp.operator.model.Account">
+		update t_account
+		<set>
+			<if test="accountName != null and accountName != ''">
+				name=#{accountName},
+			</if>
+			<if test="password != null and password != ''">
+				password=#{password},
+			</if>
+			<if test="description != null and description != ''">
+				description=#{description},
+			</if>
+			<if test="state != null and state != ''">
+				state=#{state},
+			</if>
+			<if test="createTime != null and createTime != ''">
+				createTime=#{createTime},
+			</if>
+			<if test="realName != null and realName != ''">
+				real_name=#{realName},
+			</if>
+			<if test="tel != null and tel != ''">
+				tel=#{tel}
+			</if>
+		</set>
+		where id=#{id}
+	</update>
+	<update id="update" parameterType="com.cloudcross.ssp.operator.model.Account">
+		update t_account
+		<set>
+			<if test="accountName != null and accountName != ''">
+				name=#{accountName},
+			</if>
+			<if test="password != null and password != ''">
+				password=#{password},
+			</if>
+			<if test="description != null and description != ''">
+				description=#{description},
+			</if>
+			<if test="state != null and state != ''">
+				state=#{state},
+			</if>
+			<if test="createTime != null and createTime != ''">
+				createTime=#{createTime}
+			</if>
+			<if test="realName != null and tel != ''">
+				real_name=#{realName}
+			</if>
+			<if test="tel != null and tel != ''">
+				tel=#{tel}
+			</if>
+		</set>
+		where id=#{id}
+	</update>
+
+	<!-- 验证用户登陆 -->
+	<select id="countAccount" parameterType="com.cloudcross.ssp.operator.model.Account" resultType="com.cloudcross.ssp.operator.model.Account">
+		select
+		<include refid="selectId" />
+		from t_account where
+		name=#{accountName} and password=#{password}
+	</select>
+
+	<!-- 根据用户名查出id -->
+	<select id="querySingleAccount" parameterType="String"
+		resultType="com.cloudcross.ssp.operator.model.Account">
+		select
+		<include refid="selectId" />
+		from t_account where name=#{accountName}
+	</select>
+	
+	<select id="findExcelAccount"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Account">
+		select id,
+		name as accountName,
+		real_name as realName,tel,state,create_time as createTime
+		from t_account
+		where deletestatus != -1 
+		and operator_id = #{loginAccount.operatorId}
+		and id != #{loginAccount.id}
+		<if test="value!=null">
+			and ( t_account.name like #{value}
+			or t_account.real_name like #{value} )
+		</if>
+		and sys_type = #{loginAccount.sysType}
+		order by id   desc
+	</select>
+</mapper>

+ 47 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/acls.sql.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.aclsSqlMapper">
+	<sql id="base_column">
+		banner_id as bannerId,
+		logical ,
+		type,
+		comparison,
+		data,
+		executionorder as executionOrder,
+		adgroup_id as adGroupId
+	</sql>
+	<insert id="addAcls" parameterType="com.cloudcross.ssp.operator.model.Acls">
+		insert into  	t_acls(banner_id,logical,type,comparison,data,<if test="null!=executionOrder" >executionorder,</if>adgroup_id)
+		values (#{bannerId},#{logical},#{type},#{comparison},#{data},<if test="null!=executionOrder" >#{executionOrder},</if>#{adGroupId})
+	</insert>
+	<update id="editAcls" parameterType="com.cloudcross.ssp.operator.model.Acls">
+		update t_acls
+		set logical=
+		#{logical},comparison = #{comparison},data=#{data}
+		where type=#{type} and adgroup_id=#{adGroupId}
+	</update>
+	
+	<select id="findById" parameterType="long"  resultType="com.cloudcross.ssp.operator.model.Acls">
+		select  <include refid="base_column"/>  from t_acls  where  banner_id  =  #{bannerId}
+	</select>
+	
+	<delete id="deleteAcls" parameterType="long">
+		delete from t_acls where  banner_id = #{id} 
+	</delete>
+	
+	<delete id="deleteAclsBatch" parameterType="map">
+			delete from t_acls where  type=#{type} and banner_id in
+				<foreach item="id" collection="idList" open="("  separator="," close=")">
+				#{id}
+				</foreach>
+	</delete>
+	
+	<insert  id="addAclsBatch" parameterType="map">
+	    insert into t_acls  (banner_id,logical,type,comparison,data,
+						<if test="null!=acls.executionOrder" >executionorder,</if>adgroup_id)
+          values    <foreach collection="idList" item="item" index="index" separator=",">
+    					(#{item},#{acls.logical},#{acls.type},#{acls.comparison},#{acls.data},
+    					<if test="null!=acls.executionOrder" >#{acls.executionOrder},</if>#{adGroupId})
+    			    </foreach> 
+	</insert>
+</mapper>

+ 182 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/ad-group.sql.xml

@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.adGroupSqlMapper">
+	<sql id="base_column">
+		t_adgroup.id,
+		t_adgroup.order_id as orderId,
+		t_adgroup.campaign_id as campaignId,
+		name as adGroupName,
+		activate_time as startDate,
+		expire_time as endDate,
+		totalbudget as totalBudget,
+		mode,
+		price,
+		dailybudget as dailyBudget,
+		impression as maxImpression,
+		click as maxClick,
+		conversion as maxConversion,
+		daily_impression as dailyMaxImpression,
+		daily_click as dailyMaxClick,
+		daily_conversion as dailyMaxConversion,
+		per_impression_type as perImpressionType,
+		per_impression as perImpression,
+		per_click_type as perClickType,
+		per_click as perClick,
+		compiledlimitation as compiledLimitation,
+		acl_plugins as aclPlugins,
+		device,
+		retarget,
+		period,
+		status,
+		t_adgroup.updated
+	</sql>
+	
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) 
+		from t_adgroup
+		<where>
+			campaign_id=#{campaignId} and status!=-1
+			<if test="key!=null and value!=null">
+				<choose>
+					<when test="key=='adGroupName'">
+					and name like #{value}
+					</when>
+				</choose>
+			</if>
+			<if test="selectedStatus1!=null">
+			and now()>activate_time and expire_time>now() and status=0
+			</if>
+			<if test="selectedStatus2!=null">
+			and activate_time>now()
+			</if>
+			<if test="selectedStatus3!=null">
+			and now()>expire_time and status=1
+			</if>
+			<if test="selectedStatus4!=null">
+			and status=1
+			</if>
+		</where>
+	</select>
+	
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.AdGroup">
+		select
+		<include refid="base_column"/>, count(banner_template_id) as bannerNumber
+		from t_adgroup left join t_banner
+		on t_adgroup.id=t_banner.adgroup_id
+		<where>
+			t_adgroup.campaign_id=#{campaignId} and status!=-1
+			<if test="key!=null and value!=null">
+				<choose>
+					<when test="key=='adGroupName'">
+					and name like #{value}
+					</when>
+				</choose>
+			</if>
+			<if test="selectedStatus1!=null">
+			and now()>activate_time and expire_time>now() and status=0
+			</if>
+			<if test="selectedStatus2!=null">
+			and activate_time>now()
+			</if>
+			<if test="selectedStatus3!=null">
+			and now()>expire_time and status=1
+			</if>
+			<if test="selectedStatus4!=null">
+			and status=1
+			</if>
+		</where>
+		group by t_adgroup.id
+		order by t_adgroup.id desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	
+	
+	<update id="updateAdGroupStatus" parameterType="HashMap">
+		update t_adgroup 
+		set status=#{status},updated = #{updated}
+		where id in
+		<foreach item="id" collection="idList" open="(" separator=","
+			close=")">
+			#{id}
+		</foreach>
+	</update>
+	
+	<select id="findByCampaignId" parameterType="long" resultType="com.cloudcross.ssp.operator.model.AdGroup">
+	    select
+		<include refid="base_column"/>
+		from t_adgroup 
+		where campaign_id=#{campaignId} and status!=-1
+	</select>
+	<insert id="addAdGroup" parameterType="com.cloudcross.ssp.operator.model.AdGroup"  useGeneratedKeys="true"
+		keyProperty="id">
+		insert into t_adgroup
+			(name,campaign_id,order_id,activate_time,expire_time,mode,price,totalbudget,
+			<if test="dailyBudget !=null">dailybudget,</if>
+			<if test="maxImpression !=null">impression,</if>
+			<if test="maxClick !=null">	click,</if>
+			<if test="maxConversion !=null"> conversion,</if>
+			<if test="dailyMaxImpression !=null">daily_impression,</if>
+			<if test="dailyMaxClick !=null">daily_click,</if>
+			<if test="dailyMaxConversion !=null">daily_conversion,</if>
+			<if test="perImpressionType !=null">per_impression_type,</if>
+			<if test="perImpression !=null">per_impression,</if>
+			<if test="perClickType !=null">per_click_type,</if>
+			<if test="perClick !=null">per_click,</if>
+			compiledlimitation,acl_plugins,retarget,period,device,status,updated)
+		values
+			(#{adGroupName},#{campaignId},#{orderId},#{startDate},#{endDate},#{mode},#{price},#{totalBudget},
+			<if test="dailyBudget !=null">#{dailyBudget},</if>
+			<if test="maxImpression !=null">#{maxImpression},</if>
+			<if test="maxClick !=null">#{maxClick},</if>
+			<if test="maxConversion !=null">#{maxConversion},</if>
+			<if test="dailyMaxImpression !=null">#{dailyMaxImpression},</if>
+			<if test="dailyMaxClick !=null">#{dailyMaxClick},</if>
+			<if test="dailyMaxConversion !=null">#{dailyMaxConversion},</if>
+			<if test="perImpressionType !=null">#{perImpressionType},</if>
+			<if test="perImpression !=null">#{perImpression},</if>
+			<if test="perClickType !=null">#{perClickType},</if>
+			<if test="perClick !=null">#{perClick},</if>
+			#{compiledLimitation},#{aclPlugins},#{retarget},#{period},#{device},#{status},NOW())
+	</insert>
+	
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.operator.model.AdGroup">
+		select
+		<include refid="base_column"/>
+		from t_adgroup
+		<where>
+		id = #{id}
+		</where>
+	</select>
+	
+	<update id="editAdGroup" parameterType="com.cloudcross.ssp.operator.model.AdGroup">
+		update t_adgroup
+		set name = #{adGroupName},
+		activate_time = #{startDate},
+		expire_time = #{endDate},		
+		totalbudget = #{totalBudget},
+		mode = #{mode},
+		price = #{price},		
+		dailybudget = IFNULL(#{dailyBudget},default(dailybudget)),
+		impression = IFNULL(#{maxImpression},default(impression)),
+		click =IFNULL( #{maxClick},default(click)),
+		conversion=IFNULL( #{maxConversion},default(conversion)),
+		daily_impression = IFNULL(#{dailyMaxImpression},default(daily_impression)),
+		daily_click =IFNULL( #{dailyMaxClick},default(daily_click)),
+		daily_conversion = IFNULL(#{dailyMaxConversion},default(daily_conversion)),
+		per_impression_type = IFNULL(#{perImpressionType},default(per_impression_type)),
+		per_click_type =IFNULL( #{perClickType},default(per_click_type)),
+		per_impression = #{perImpression},
+		per_click = #{perClick},		
+		device = #{device},
+		retarget = #{retarget},
+		period = #{period},
+		status = #{status},
+		updated = NOW()
+		<where>
+			id = #{id}
+		</where>
+	</update>
+	
+</mapper>

+ 36 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/adgroup-place.sql.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.adGroupPlaceSqlMapper">
+	<sql id="base_column">
+		id,
+		adgroup_id  as adGroupId,
+		place_id as placeId
+	</sql>
+
+	<insert id="addPlace" parameterType="com.cloudcross.ssp.operator.model.AdGroupPlace">
+		insert into
+		t_adgroup_place (adgroup_id,place_id)
+		values (#{adGroupId},#{placeId})
+	</insert>
+
+	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.operator.model.AdGroupPlace">
+		select
+		<include refid="base_column"/>
+		from t_adgroup_place
+		<where>
+		adgroup_id = #{adGroupId}
+		</where>
+	</select>
+	
+	<delete id="delete" parameterType="long"> 
+	delete from t_adgroup_place where adgroup_id = #{adGroupId} 
+	</delete>
+	
+	
+	<select id="findAllByAdGroupId" parameterType="long" resultType="com.cloudcross.ssp.operator.model.AdGroupPlace">
+		select
+		<include refid="base_column"/>
+		from t_adgroup_place
+		where adgroup_id = #{adGroupId}
+	</select>
+</mapper>

+ 28 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/adgroup-schedule.sql.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.adGroupScheduleSqlMapper">
+	<sql id="base_column">
+		id ,
+		adgroup_id as adGroupId ,
+		startdate as beginDate,
+		enddate as sEndDate,
+		dehours,
+		daily_impression as dailyImpression,
+		daily_click as dailyClick,
+		updated 
+	</sql>
+	
+	<insert  id="batchAdd" parameterType="map">
+	    insert into t_adgroup_schedule  (adgroup_id,startdate,enddate,dehours,daily_impression,updated)
+          values    <foreach collection="scheduleList" item="schedule" index="index" separator=",">
+    					(#{schedule.adGroupId},#{schedule.beginDate},#{schedule.sEndDate},#{schedule.dehours},
+    					#{schedule.dailyImpression},
+    					#{schedule.updated})
+    			    </foreach> 
+	</insert>
+	
+	<delete id="deleteByAdGroupId" parameterType="long">
+		delete from t_adgroup_schedule where adgroup_id = #{adGroupId}
+	</delete>
+	
+</mapper>

+ 20 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/adgroup-zone.sql.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.adGroupZoneSqlMapper">
+
+
+	<insert id="addAdGroupZone" parameterType="com.cloudcross.ssp.operator.model.AdGroupZone">
+		insert into t_adgroup_zone(adgroup_id,zone_id) values(#{adGroupId},#{zoneId})
+	</insert>
+	
+	<delete id="deleteByAdGroupId" parameterType="long">
+		delete from t_adgroup_zone where adgroup_id = #{adGroupId}
+	</delete>
+	
+	<select id="findAllByAdGroupId" parameterType="long" resultType="com.cloudcross.ssp.operator.model.AdGroupZone">
+		select id, adgroup_id as adGroupId, zone_id as zoneId
+		from t_adgroup_zone
+		where adgroup_id = #{adGroupId}
+		order by zone_id asc
+ 	</select>
+</mapper>

+ 133 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/advertiser.sql.xml

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.advertiserSqlMapper">
+	
+	<sql id="base_column">
+		t_advertiser.id as id,
+		agent_id as operatorId,
+		industry_id as industryId,
+		t_advertiser.name as name,
+		reg_name as regName,
+		homepage as homePage,
+		t_advertiser.contacts,
+		t_advertiser.tel as tel,
+		t_advertiser.email as email,
+		t_advertiser.status as status,
+		t_advertiser.updated as updated,
+		t_advertiser.memo as memo
+	</sql>
+	
+	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Advertiser">
+		select 
+		<include refid="base_column" />
+		from t_advertiser
+		<where>
+			id = #{id} and
+			status != -1
+		</where>
+	</select>
+	
+	<select id="selectByName" parameterType="String" resultType="long">
+		select 
+		max(id)
+		from t_advertiser
+		<where>
+		name = #{name} and
+			status != -1
+		</where>
+	</select>
+		
+	<select id="selectByOperator" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Advertiser">
+		select 
+		<include refid="base_column" />
+		from t_advertiser
+		<where>
+			operator_id = #{operatorId} and
+			status != -1.
+		</where>
+	</select>
+		
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.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 
+		 where 1 = 1 
+		 <if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and t_advertiser.name like #{value}
+				</when>
+			</choose>	
+		</if>
+		 <if test="status!=null">	
+			and t_advertiser.status = #{status}
+		</if>
+		 <if test="industryId!=null">	
+			and t_advertiser.industry_id = #{industryId}
+		</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="selectByStatus"  parameterType="map" resultType="com.cloudcross.ssp.operator.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 
+		 where 1 = 1 
+		 and t_advertiser.status = #{status}
+		 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="countByStatus" parameterType="map" resultType="int">
+		select count(a.id)
+		from t_advertiser a where status = #{status}
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(a.id)
+		from t_advertiser a where status != -1
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and a.name like #{value}
+				</when>
+			</choose>	
+		</if>
+		 <if test="status!=null">	
+			and a.status = #{status}
+		</if>
+		 <if test="industryId!=null">	
+			and a.industry_id = #{industryId}
+		</if>
+	</select>
+	
+	<insert id="addAdvertiser" parameterType="com.cloudcross.ssp.operator.model.Advertiser">
+		insert into t_advertiser(industry_id,name,reg_name,homepage,contacts,tel,email,updated,memo)
+		values(#{industryId},#{name},#{regName},#{homePage},#{contacts},#{tel}, #{email},#{updated},#{memo})
+	</insert>
+	
+	<update id="editAdvertiser" parameterType="com.cloudcross.ssp.operator.model.Advertiser">
+		update t_advertiser 
+		set industry_id = #{industryId},name = #{name},reg_name = #{regName},homepage = #{homePage},contacts = #{contacts},tel=#{tel}
+		,email = #{email},updated = #{updated},memo = #{memo}
+		where t_advertiser.id=#{id}
+	</update>
+	
+	<update id="updateAdvertiserStatus" parameterType="HashMap">
+		update t_advertiser 
+			set status = #{status},updated = #{modifyDate}
+			where t_advertiser.id in
+			<foreach item="advertiserId" collection="advertiserIdList"
+		      open="(" separator="," close=")">
+		        #{advertiserId}
+			</foreach>
+	</update>
+</mapper>

+ 125 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/audit.sql.xml

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.auditSqlMapper">
+	
+	<sql id="base_column">
+		t_advertiser.id as id,
+		industry_id as industryId,
+		t_advertiser.name as name,
+		t_advertiser.reg_name as regName,
+		t_advertiser.homepage as homePage,
+		t_advertiser.contacts,
+		t_advertiser.tel as tel,
+		t_advertiser.email as email,
+		t_advertiser.updated as updated,
+		t_advertiser.cpi_path as cpiPath,
+		t_advertiser.licence_path as licencePath,
+		t_advertiser.id_path as idPath,
+		t_advertiser.org_path as orgPath,
+		t_advertiser.check_account as checkAccount,
+		t_advertiser.check_status as checkStatus,
+		t_advertiser.check_memo as checkMemo
+	</sql>
+	
+	
+	
+	
+			
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Audit">
+		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 
+		 where 1 = 1 
+		 <if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and t_advertiser.name like #{value}
+				</when>
+			</choose>	
+		</if>
+		 <if test="checkStatus!=null">	
+			and t_advertiser.check_status = #{checkStatus}
+		</if>
+		 <if test="industryId!=null">	
+			and t_advertiser.industry_id = #{industryId}
+		</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="countByParams" parameterType="map" resultType="int">
+		select count(a.id)
+		from t_advertiser a where status != -1
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and a.name like #{value}
+				</when>
+			</choose>	
+		</if>
+		 <if test="checkStatus!=null">	
+			and a.check_status = #{checkStatus}
+		</if>
+		 <if test="industryId!=null">	
+			and a.industry_id = #{industryId}
+		</if>
+	</select>
+<!-- 
+<select id="selectByStatus"  parameterType="map" resultType="audit">
+		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 
+		 where 1 = 1 
+		 and t_advertiser.check_status = #{checkStatus}
+		 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="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Audit">
+		select 
+		<include refid="base_column" />
+		from t_advertiser
+		<where>
+			id = #{id}
+		</where>
+	</select>
+	
+	<select id="selectByStatus"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Audit">
+		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 
+		 where 1 = 1 
+		 and t_advertiser.check_status = #{checkStatus}
+		 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="countByStatus" parameterType="map" resultType="int">
+		select count(a.id)
+		from t_advertiser a where check_status = #{checkStatus}
+		
+	</select>
+	<update id="updateStatus" parameterType="HashMap">
+		update t_advertiser 
+			set check_status = #{checkStatus},updated = #{modifyDate}
+			where t_advertiser.id in
+			<foreach item="advertiserId" collection="advertiserIdList"
+		      open="(" separator="," close=")">
+		        #{advertiserId}
+			</foreach>
+	</update>
+	
+	
+</mapper>

+ 180 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/banner-template.sql.xml

@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.bannerTemplateSqlMapper">
+	<sql id="base_column">
+		id,
+		advertiser_id as advertiserId,
+		name,
+		path,
+		type,
+		width,
+		height,
+		status,
+		updated
+	</sql>
+	
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) 
+		from t_banner_template
+		<where>
+			id in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})
+			and status!=-1
+			<if test="key!=null and value!=null">
+				<choose>
+					<when test="key=='name'">
+					and name like #{value}
+					</when>
+				</choose>
+			</if>
+		</where>
+	</select>
+	
+	<select id="countByParams3" parameterType="map" resultType="int">
+		select count(id)
+		from t_banner_template
+		<where>
+		id not in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})
+			and status != -1
+			<if test="advertiserId != null">
+				and advertiser_id=#{advertiserId}
+			</if>
+		</where>
+	</select>
+	
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.BannerTemplate">
+		select t_banner_template.id as id, t_banner_template.advertiser_id as advertiser_id,t_banner_template.name as name,
+        t_banner_template.path as path,t_banner_template.type as type,t_banner_template.width as width,t_banner_template.height as height,
+        t_banner_template.status as status,t_banner_template.updated as updated,t_banner.id as TBannerId from t_banner_template left join t_banner on t_banner_template.id = t_banner.banner_template_id
+        <where> 
+        t_banner.adgroup_id = #{adGroupId} 
+			and status!=-1
+			<if test="key!=null and value!=null">
+				<choose>
+					<when test="key=='name'">
+					and name like #{value}
+					</when>
+				</choose>
+			</if>
+		</where>
+		order by id desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.operator.model.BannerTemplate">
+		select
+		<include refid="base_column"/>
+		from t_banner_template
+		<where>
+		id = #{id}
+		</where>
+	</select>
+	
+	<update id="updateBannerTemplateStatus" parameterType="HashMap">
+		update t_banner_template
+		set status=#{status},updated = #{updated}
+		where id in
+		<foreach item="id" collection="idList" open="(" separator=","
+			close=")">
+			#{id}
+		</foreach>
+	</update>
+	
+	<select id="findByCampaignId" parameterType="long" resultType="com.cloudcross.ssp.operator.model.AdGroup">
+	    select
+		<include refid="base_column"/>
+		from t_adgroup 
+		where campaign_id=#{campaignId} and status!=-1
+	</select>
+	
+		
+	<update id="alterName" parameterType="map">
+		update t_banner_template set name = #{name} updated = now() where id = #{id}
+	</update>
+	
+	<update id="edit" parameterType="com.cloudcross.ssp.operator.model.BannerTemplate">
+		update t_banner_template a,t_banner b
+		set a.name = #{name},
+		a.updated = #{updated},
+		b.visit_address = #{banner.visitAddress},
+		b.click_address = #{banner.clickAddress},
+		b.impression_address = #{banner.impressionAddress}
+		WHERE a.id = b.banner_template_id and a.id = #{id}
+	</update>
+	
+	<select id="countByParams2" parameterType="map" resultType="int">
+		select count(id)
+		from t_banner_template
+		<where>
+			<if test="status != null">
+				status=#{status}
+			</if>
+			<if test="status == null">
+				status in (0,1)
+			</if>
+			<!-- <if test="advertiserId != null"> and advertiser_id=#{advertiserId} 
+				</if> -->
+			<if test="type != null">
+				and type=#{type}
+			</if>
+			<if test="height != null">
+				and height=#{height}
+			</if>
+			<if test="width != null">
+				and width=#{width}
+			</if>
+			<if test="value != null">
+				and name like #{value}
+			</if>
+		</where>
+
+	</select>
+
+	<select id="findByParams2" parameterType="map" resultType="com.cloudcross.ssp.operator.model.BannerTemplate">
+		select
+		<include refid="base_column" />
+		from t_banner_template
+		<where>
+			<if test="status != null">
+				status=#{status}
+			</if>
+			<if test="status == null">
+				status in (0,1)
+			</if>
+			<!-- <if test="advertiserId != null"> and advertiser_id=#{advertiserId} 
+				</if> -->
+			<if test="type != null">
+				and type=#{type}
+			</if>
+			<if test="height != null">
+				and height=#{height}
+			</if>
+			<if test="width != null">
+				and width=#{width}
+			</if>
+			<if test="value != null">
+				and name like #{value}
+			</if>
+		</where>
+		order by id desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+		
+	<select id="findByParams4" parameterType="map" resultType="com.cloudcross.ssp.operator.model.BannerTemplate">
+		select
+		<include refid="base_column"/>
+		from t_banner_template
+		<where>
+		id not in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})
+		and	status != -1
+			<if test="advertiserId != null">
+				and advertiser_id=#{advertiserId}
+			</if>
+		</where>
+		order by  id  desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	
+</mapper>

+ 188 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/banner.sql.xml

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.bannerSqlMapper">
+	<sql id="base_column">
+		b.id as bannerId,
+		banner_template_id as bannerTemplateId,
+		order_id as orderId,
+		campaign_id as campaignId,
+		adgroup_id as adGroupId,
+		visit_address as visitAddress,
+		click_address as clickAddress,
+		impression_address as impressionAddress,
+		b.checked as checked,
+		IFNULL(bo.checked,-1) as operatorChecked,
+		b.updated as updated,
+		memo
+	</sql>
+	<sql id="banner_template_base_column">
+		bt.id as banner_templateId,
+		advertiser_id as advertiserId,
+		name,
+		path,
+		path_small as pathSmall,
+		type,
+		width,
+		height,
+		bt.status as status,
+		bt.updated as bannerTemplateUpdated
+	</sql>
+	
+	<resultMap type="com.cloudcross.ssp.operator.model.Banner" id="banner">
+		<id property="id" column="bannerId"/>
+		<result property="bannerTemplateId" column="bannerTemplateId"/> 
+		<result property="orderId" column="orderId"/>
+		<result property="campaignId" column="campaignId"/> 
+	  	<result property="adGroupId" column="adgroupId"/>   
+	    <result property="visitAddress" column="visitAddress"/> 
+	    <result property="clickAddress" column="clickAddress"/> 
+	    <result property="impressionAddress" column="impressionAddress"/> 
+	    <result property="checked" column="checked"/> 
+	    <result property="operatorChecked" column="operatorChecked"/>
+	    <result property="updated" column="updated"/> 
+	    <result property="memo" column="memo"/> 
+	    <association property="bannerTemplate" resultMap="com.cloudcross.ssp.operator.model.BannerTemplate"/>
+	</resultMap>  
+	<resultMap type="com.cloudcross.ssp.operator.model.BannerTemplate" id="bannerTemplate">  
+	   <id property="id" column="banner_templateId"/>  
+	   <result property="advertiserId" column="advertiserId"/> 
+	   <result property="name" column="name"/>
+	    <result property="path" column="path"/> 
+	     <result property="pathSmall" column="pathSmall"/>
+	   <result property="type" column="type"/>
+	   <result property="width" column="width"/> 
+	   <result property="height" column="height"/> 
+	   <result property="status" column="status"/>   
+	   <result property="updated" column="bannerTemplateUpdated"/>     
+	</resultMap>
+	
+	
+	<select id="countByZoneSize" parameterType="HashMap" resultType="int">
+		select count(*) from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id 
+		where bt.status != -1 and checked != 2 and checked !=0
+	   	<if test="zoneList.size()>0">
+			and
+		   	<foreach item="zone" collection="zoneList"
+		   		 open="(" separator="or" close=")" >
+			      bt.width &lt;= #{zone.width} and bt.height &lt;= #{zone.height}
+			</foreach>
+		</if>
+		<if test="searchKey!=null and searchValue!=null">
+			and bt.name like #{searchValue}
+		</if>
+		<if test="checked!=null">
+			and b.checked like #{checked}
+		</if>
+	</select>
+	
+	<select id="findByZoneSize" parameterType="HashMap" resultMap="banner">  
+		select <include refid="base_column"/> ,<include refid="banner_template_base_column"/>
+		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id
+		where bt.status != -1 and checked != 2 and checked !=0
+		<if test="zoneList.size()>0">
+			and
+		   	<foreach item="zone" collection="zoneList"
+		   		 open="(" separator="or" close=")" >
+			      bt.width &lt;= #{zone.width} and bt.height &lt;= #{zone.height}
+			</foreach>
+		</if>
+	   	<if test="searchKey!=null and searchValue!=null">
+			and bt.name like #{searchValue}
+		</if>
+		<if test="checked!=null">
+			and b.checked like #{checked}
+		</if>
+	    order by  b.id   desc
+	    <if test="pager!=null">
+		limit #{pager.offset}, #{pager.limit}
+		</if>
+	</select>
+	
+	<select id="findById" parameterType="int" resultMap="banner">  
+		select <include refid="base_column"/> ,<include refid="banner_template_base_column"/>
+		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id left join t_banner_operator bo
+on b.id=bo.banner_id where b.id=#{id}
+	</select>
+
+<select id="countByOperator" parameterType="HashMap" resultType="int">
+		select count(*) from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id left join t_banner_operator bo
+on b.id=bo.banner_id and bo.operator_id=#{operatorId}  
+where b.status = 0 and bt.status = 0 and b.checked = 1 
+	   	<if test="zoneList.size()>0">
+			and
+		   	<foreach item="zone" collection="zoneList"
+		   		 open="(" separator="or" close=")" >
+			      bt.width &lt;= #{zone.width} and bt.height &lt;= #{zone.height}
+			</foreach>
+		</if>
+		<if test="searchKey!=null and searchValue!=null">
+			and bt.name like #{searchValue}
+		</if>
+		<if test="operatorChecked!=null">
+		<choose>
+			<when test="operatorChecked == 0">
+				and ISNULL(bo.checked) or bo.checked =0
+			</when>
+			<otherwise>
+				and bo.checked=#{operatorChecked}
+			</otherwise>	
+		</choose>
+		</if>
+	</select>
+	
+	<select id="findByOpertor" parameterType="HashMap" resultMap="banner">  
+		select <include refid="base_column"/> ,<include refid="banner_template_base_column"/>
+		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id left join t_banner_operator bo
+on b.id=bo.banner_id and bo.operator_id=#{operatorId}  
+where b.status = 0 and bt.status = 0 and b.checked = 1
+		<if test="zoneList.size()>0">
+			and
+		   	<foreach item="zone" collection="zoneList"
+		   		 open="(" separator="or" close=")" >
+			      bt.width &lt;= #{zone.width} and bt.height &lt;= #{zone.height}
+			</foreach>
+		</if>
+	   	<if test="searchKey!=null and searchValue!=null">
+			and bt.name like #{searchValue}
+		</if>
+		<if test="operatorChecked!=null">
+		<choose>
+			<when test="operatorChecked == 0">
+				and ISNULL(bo.checked) or bo.checked =0
+			</when>
+			<otherwise>
+				and bo.checked=#{operatorChecked}
+			</otherwise>	
+		</choose>
+		</if>
+	    order by  b.id   desc
+	    <if test="pager!=null">
+		limit #{pager.offset}, #{pager.limit}
+		</if>
+	</select>
+
+
+	<update id="updateBannerStatus" parameterType="HashMap">
+		update t_banner 
+			set checked = #{checked},updated = #{updated}
+			where id in
+			<foreach item="bannerId" collection="bannerIdList"
+		      open="(" separator="," close=")">
+		        #{bannerId}
+			</foreach>
+	</update>
+	
+	<insert id="addOperatorBanner" parameterType="HashMap">
+	insert into t_banner_operator 
+			(operator_id,banner_id,checked,supdated)
+			values(#{operatorId},#{bannerId},#{operatorChecked},#{supdated})
+		</insert>
+	
+	
+	<update id="updateOperatorBanner" parameterType="HashMap">
+		update t_banner_operator 
+			set operator_id=#{operatorId},checked = #{operatorChecked},supdated = #{supdated}
+			where banner_id = #{bannerId}
+	</update>
+	
+</mapper>

+ 149 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/campaign.sql.xml

@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.campaignSqlMapper">
+	<sql id="base_column">
+	    t_campaign.id as id,
+	    t_campaign.order_id as orderId,
+	    t_campaign.name as name,
+	    t_campaign.activate_time as activeTime,
+	    t_campaign.expire_time as expireTime,
+	    t_campaign.totalbudget as totalBudget,
+	    t_campaign.dailybudget as dailyBudget,
+	    t_campaign.impression as impression,
+	    t_campaign.click as click,
+	    t_campaign.conversion as conversion,
+	    t_campaign.daily_impression as dailyImpression,
+	    t_campaign.daily_click as dailyClick,
+	    t_campaign.daily_conversion as dailyConversion,
+	    t_campaign.memo as memo,
+	    t_campaign.status as status,
+	    t_campaign.updated as upDated
+	</sql>
+	
+	<insert id="addCampaign" parameterType="com.cloudcross.ssp.operator.model.Campaign">
+		insert into t_campaign
+			(name,order_id,activate_time,expire_time,
+			totalbudget,dailybudget,impression,click,conversion,daily_impression,
+			daily_click,daily_conversion,memo,updated)
+		values
+			(#{name},#{orderId},#{activeTime},#{expireTime},#{totalBudget},
+			#{dailyBudget},#{impression},#{click},#{conversion},#{dailyImpression},
+			#{dailyClick},#{dailyConversion},#{memo},NOW())
+	</insert>
+	
+	<update id="editCampaign" parameterType="com.cloudcross.ssp.operator.model.Campaign">
+		update t_campaign set
+		name = #{name},
+		activate_time = #{activeTime},
+		expire_time = #{expireTime},
+		totalbudget = #{totalBudget},
+		dailybudget = IFNULL(#{dailyBudget},default(dailybudget)),
+		conversion =IFNULL(#{conversion},default(conversion)),
+		click = IFNULL(#{click},default(click)),
+		impression =IFNULL(#{impression},default(impression)),
+		daily_click = IFNULL(#{dailyClick},default(daily_click)),
+		daily_conversion = 0,
+		daily_impression = IFNULL(#{dailyImpression},default(daily_impression)),
+		memo = IFNULL(#{memo},default(memo)),
+		updated = NOW()
+		where t_campaign.id = #{id}
+	</update>
+		
+	
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.Campaign">
+		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
+		 	<if test="key!=null and value!=null">
+	            <choose>
+					<when test="key=='name'">
+						and t_campaign.name like #{value}
+					</when>				
+				</choose>
+			</if>			
+		<if test="status!=null">	
+			and t_campaign.status = #{status}
+		</if>						
+			  group by t_campaign.id
+		order by t_campaign.id desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) from t_campaign
+		<where>
+			order_id = #{orderId} and status != -1
+			<if test="key!=null and value!=null">
+				<choose>
+					<when test="key=='name'">
+						and name like #{value}
+					</when>
+				</choose>
+			</if>
+						
+		<if test="status!=null">	
+			and t_campaign.status = #{status}
+		</if>
+		</where>
+	</select>
+
+	
+	<update id="updateCampaignStatus" parameterType="HashMap">
+		update t_campaign 
+		set status=#{status},
+			updated = #{upDated}
+		where
+		id in
+		<foreach item="id" collection="idList" open="(" separator=","
+			close=")">
+			#{id}
+		</foreach>
+	</update>
+	
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.operator.model.Campaign">
+		select
+		<include refid="base_column" />
+		from t_campaign 
+		where id = #{id}
+	</select>
+	
+	<select id="findByName" parameterType="String" resultType="long">
+		select
+		max(id)
+		from t_campaign 
+		where name = #{name}
+	</select>
+	
+	
+	<delete id="deleteByID" parameterType="int">
+	delete from t_campaign where id=#{id}
+	</delete>
+	
+	
+	<select id="findByOrderId" parameterType="long" resultType="com.cloudcross.ssp.operator.model.Campaign">
+		select
+		<include refid="base_column" />
+		from t_campaign
+		<where>
+			order_id = #{orderId} and status != -1
+		</where>
+	</select>
+	
+	
+	<select id="selectByStatus"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Campaign">
+		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 1 = 1 
+		 and t_campaign.status = #{status}
+		 and t_campaign.order_id = #{orderId}  
+		group by t_campaign.id
+		order by t_campaign.id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>	
+	
+
+</mapper>

+ 100 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/codeClass.sql.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.codeClassSqlMapper">
+	
+	<sql id="base_column">
+		          id,
+	advertiser_id as advertiserId,
+	          name as codeName,
+	          para as codePara,
+	   script_code as script,
+	      pic_code as picture,
+	            updated
+	            	
+	</sql>
+	
+	<select id="selectByName"  parameterType="string" resultType="com.cloudcross.ssp.operator.model.CodeClass">
+		select 
+		<include refid="base_column" />
+		from t_code_class
+		<where>
+			name = #{codeName}
+		</where>
+		order by id  desc
+	</select>
+	
+	
+	 <select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.CodeClass">
+		select 
+		<include refid="base_column" />
+		from t_code_class
+		<where>
+			id = #{id} 			
+		</where>
+	</select>  
+	
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.CodeClass">
+		select 
+		<include refid="base_column" />
+		from t_code_class where id>0	
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='codeName'">
+					and name like #{value}
+				</when>
+				<when test="key=='id'">
+					and id like #{value}
+				</when>
+			</choose>	
+		</if>
+		
+		order by id  desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	
+	
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id)
+		from t_code_class where id>0	
+			<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='id'">
+					and id like #{value}
+				</when>
+				<when test="key=='codeName'">
+					and name like #{value}
+				</when>
+			</choose>	
+		</if>
+	</select>
+	
+	
+	
+	  <insert id="addCodeClass" parameterType="com.cloudcross.ssp.operator.model.CodeClass">
+		insert into t_code_class(name, para, updated )
+		values(#{codeName},#{codePara},#{updated})
+	</insert>
+	
+	
+	<update id="editCodeClass" parameterType="com.cloudcross.ssp.operator.model.CodeClass">
+		update t_code_class 
+		set name=#{codeName}, para=#{codePara}, updated=#{updated} , script_code=#{script}, pic_code=#{picture}
+		
+		
+		
+		where id = #{id}
+	</update>
+	
+	<!--  <delete id="deleteById" parameterType="int">
+		delete 
+		from rv_grade
+		<where>
+			grade_id = #{gradeId} 
+		</where>
+	</delete> -->
+	
+	
+</mapper>

+ 88 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/codeConvert.sql.xml

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.codeConvertSqlMapper">
+	
+	<sql id="base_column">
+		          id,
+	advertiser_id as advertiserId,
+	          name as convertName,
+	          type as convertType,
+	   script_code as script,
+	      pic_code as picture,
+	            updated
+	            	
+	</sql>
+	
+	<select id="selectByName"  parameterType="string" resultType="com.cloudcross.ssp.operator.model.CodeConvert">
+		select 
+		<include refid="base_column" />
+		from t_code_convert
+		<where>
+			name = #{convertName}
+		</where>
+		order by id  desc
+	</select>
+	
+	
+	 <select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.CodeConvert">
+		select 
+		<include refid="base_column" />
+		from t_code_convert
+		<where>
+			id = #{id} 			
+		</where>
+	</select>  
+	
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.CodeConvert">
+		select 
+		<include refid="base_column" />
+		from t_code_convert where id>0	
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='convertName'">
+					and name like #{value}
+				</when>
+				<when test="key=='id'">
+					and id like #{value}
+				</when>
+			</choose>	
+		</if>
+		
+		order by id  desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id)
+		from t_code_convert where id>0	
+			<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='id'">
+					and id like #{value}
+				</when>
+				<when test="key=='convertName'">
+					and name like #{value}
+				</when>
+			</choose>	
+		</if>
+	</select>
+	
+	
+	
+	  <insert id="addCodeConvert" parameterType="com.cloudcross.ssp.operator.model.CodeConvert">
+		insert into t_code_convert(name, type, updated )
+		values(#{convertName},#{convertType},#{updated})
+	</insert>
+	
+	
+	<update id="editCodeConvert" parameterType="com.cloudcross.ssp.operator.model.CodeConvert">
+		update t_code_convert 
+		set name=#{convertName}, type=#{convertType}, updated=#{updated}, script_code=#{script}, pic_code=#{picture}
+		where id = #{id}
+	</update>
+	
+
+	
+</mapper>

+ 42 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/codeSite.sql.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.codeSiteSqlMapper">
+	
+	<sql id="base_column">
+		 id,
+		 advertiser_id as advertiserId,      
+	     script_code as script,
+	     pic_code as picture	            	
+	</sql>
+	
+	<select id="findAllAdvertiserId"  parameterType="int" resultType="com.cloudcross.ssp.operator.model.CodeSite">
+		select 
+		<include refid="base_column" />
+		from t_code_site where advertiser_id = 	#{AdvertiserId}
+	</select>
+	
+	
+	
+	 <select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.CodeSite">
+		select 
+		<include refid="base_column" />
+		from t_code_site
+		<where>
+			id = #{id} 			
+		</where>
+	</select>  
+	
+	 
+	 
+	 	<select id="selectByAdvertiserId"  parameterType="int" resultType="com.cloudcross.ssp.operator.model.CodeSite">
+		select 
+		<include refid="base_column" />
+		from t_code_site where advertiser_id = 	#{AdvertiserId}
+	</select>
+	
+	
+	 
+	
+	
+	
+</mapper>

+ 81 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/dimension.sql.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.dimensionSqlMapper">
+	
+	<sql id="base_column">
+		id,
+		name,
+		operator_id as operatorId,	
+		content,
+		is_default as isDefault	
+	</sql>
+	
+	<select id="selectByName"  parameterType="string" resultType="com.cloudcross.ssp.operator.model.Dimension">
+		select 
+		<include refid="base_column" />
+		from t_rpt_schema
+		<where>
+			name = #{name}
+		</where>
+		order by id  desc
+	</select>
+	
+	
+	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Dimension">
+		select 
+		<include refid="base_column" />
+		from t_rpt_schema
+		<where>
+			id = #{id} 
+			
+		</where>
+	</select>
+	
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Dimension">
+		select 
+		* from t_rpt_schema 			
+		
+	</select>
+	
+	
+	
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(1)
+		from t_rpt_schema 	 	
+			<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='id'">
+					and id like #{value}
+				</when>
+				<when test="key=='name'">
+					and name like #{value}
+				</when>
+			</choose>	
+		</if>
+		
+	</select>
+	
+	
+	
+	<insert id="addDimension" parameterType="com.cloudcross.ssp.operator.model.Dimension">
+		insert into t_rpt_schema(id,name,content)
+		values(#{id},#{name},#{content})
+	</insert>
+	
+	
+	<update id="editDimension" parameterType="com.cloudcross.ssp.operator.model.Dimension">
+		update t_rpt_schema 
+		set id=#{id},name=#{name},content=#{content},is_default=#{isDefault}
+		where id = #{id}
+	</update>
+	
+	<delete id="deleteById" parameterType="int">
+		delete 
+		from t_rpt_schema
+		<where>
+			id = #{id} 
+		</where>
+	</delete>
+</mapper>

+ 42 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/direct.sql.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.directSqlMapper">
+	<sql id="base_column">
+		id ,
+		adgroup_id  as adGroupId,
+		targettype as directType,
+		targetshow as backShow,
+		targetdata as data,
+		updated
+	</sql>
+
+	<insert id="addDirect" parameterType="com.cloudcross.ssp.operator.model.Direct">
+		insert into
+		t_target_show (adgroup_id,targettype,targetshow,targetdata,updated)
+		values (#{adGroupId},#{directType},#{backShow},#{data},NOW())
+	</insert>
+
+	<select id="findByAdGroupId" parameterType="map"  resultType="com.cloudcross.ssp.operator.model.Direct">
+		select
+		<include refid="base_column" />
+		from t_target_show
+		where adgroup_id=#{adGroupId}  
+			<if test="directType!=null">
+				and  targettype=#{directType} 
+			</if>
+	</select>
+
+	<update id="editDirect" parameterType="com.cloudcross.ssp.operator.model.Direct">
+		UPDATE t_target_show
+		SET
+		targetshow =#{backShow},
+		targetdata = #{data},
+		updated = NOW()
+		WHERE adgroup_id=#{adGroupId}  and targettype = #{directType}
+	</update>
+
+	<delete id="deleteDirect" parameterType="map" >
+	    delete from t_target_show where adgroup_id=#{adGroupId}  and targettype = #{directType}
+	</delete>
+
+</mapper>

+ 27 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/industry.sql.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.industrySqlMapper">
+
+	<sql id="base_column">
+		id,name
+	</sql>
+
+	<select id="findAllIndustry"  resultType="com.cloudcross.ssp.operator.model.Industry">
+	    select <include refid="base_column" /> from t_industry
+	</select>
+	
+	<select id="findByIndustryId" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Industry">
+		select <include refid="base_column" /> from t_industry where id = #{id}
+	</select>
+	
+	<select id="findAllIndustryByZoneId"  resultType="com.cloudcross.ssp.operator.model.Industry">
+	    select
+	    <include refid="base_column" />
+	    from t_industry 
+	    <where>
+		id not in( select industry_id from t_zone_industry where zone_id = #{zoneId} and
+		 t_zone_industry.status != -1)
+		</where>
+	</select>
+	
+</mapper>

+ 54 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/location.sql.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.locationSqlMapper">
+	<sql id="base_column">
+		id,
+		location,
+		location_t as locationT,
+		location1,
+		location2,
+		location3,
+		country,
+		cn,
+		cn_city as cnCity,
+		cn_district as cnDistrict,
+		py,
+		en_city as enCity,
+		en_district as enDistrict,
+		en
+	</sql>
+	
+	<select id="findAll" resultType="com.cloudcross.ssp.operator.model.Location">
+		select
+		<include refid="base_column" />
+		from t_location where country = #{country}  
+	</select>
+	
+	<select id="findByProvince" resultType="com.cloudcross.ssp.operator.model.Location">
+		select
+		<include refid="base_column" />
+		from t_location where location1 = #{location1}
+		and location2 = #{location2}
+	</select>
+	
+	
+	<select id="findByLocationT" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Location">
+		select <include refid="base_column" /> 
+		from t_location
+		where location_t = #{locationT}
+	</select>
+	
+	
+	<select id="findByCnAndCnCity" parameterType="map" resultType="com.cloudcross.ssp.operator.model.Location">
+		select <include refid="base_column" />
+		from t_location where cn = #{cn} and cn_city =#{cnCity} 
+	</select>
+	
+	<select id="findCityByProvince" parameterType="String" resultType="String">
+		 select cn_city from t_location where cn=#{province}
+	</select>
+	
+	<select id="findAllProvince" resultType="String">
+		select cn from t_location where location1='CN' group by cn order by location2 asc
+	</select>
+</mapper>

+ 89 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/log.sql.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.logSqlMapper">
+	
+	<sql id="base_column">
+		id,
+		table_name as tableName,
+		record_id as recordId,
+		account_id as accountId,
+		account_name as accountName,
+		module,
+		action_type as actionType,
+		action,
+		action_time as actionTime,
+		user_ip as userIp,
+		oper_time as operTime
+	</sql>
+	
+	<insert id="addLog" parameterType="com.cloudcross.ssp.operator.model.Log">
+		insert into t_log(table_name,record_id,account_id,account_name,module,action_type,action,action_time,user_ip,oper_time)
+		values(#{tableName},#{recordId},#{accountId},#{accountName},#{module},#{actionType},#{action},#{actionTime},#{userIp},#{operTime})
+	</insert>
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Log">
+		select 
+		<include refid="base_column" />
+		from t_log where 1 = 1
+		and table_name=#{tableName}
+		and record_id=#{recordId}
+		order by id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	<!-- 导出excel用 -->
+	<select id="selectByParams1"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Log">
+		select 
+		oper_time as operTime,
+		account_name as accountName,
+		user_ip as userIp,
+		action_type as actionType,
+		action
+		from t_log where 
+		table_name=#{tableName}
+	 	and record_id=#{recordId}
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id)
+		from t_log where 1 = 1
+		and table_name=#{tableName}
+		and record_id=#{recordId}
+	</select>
+	
+	<select id="selectByModule"  parameterType="String" resultType="com.cloudcross.ssp.operator.model.Log">
+		select 
+		<include refid="base_column" />
+		from t_log where
+		module = #{module} 
+		order by id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findByModule" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Log">
+		select 
+		<include refid="base_column" />
+		from t_log where
+		module = #{module}
+	</select>
+	
+	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Log">
+		select 
+		<include refid="base_column" />
+		from t_log
+		<where>
+			id = #{id}
+		</where>
+	</select>
+	
+	<update id="editLog" parameterType="com.cloudcross.ssp.operator.model.Log">
+		update t_log set account_id=#{accountId},account_name=#{accountName},
+		action_type=#{actionType},user_ip=#{userIp},
+		<if test="module !=null">
+			module=#{module},
+		</if>
+			oper_time=#{operTime} 
+		 	where id=#{id}
+	</update>	
+	
+</mapper>
+	

+ 82 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/message.sql.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.messageSqlMapper">
+	
+	<sql id="base_column">
+		t_message.id,
+		t_message.content,	
+		t_message.send_time as sendTime,
+		t_message.type
+	</sql>
+	
+	<insert id="addMessage" parameterType="com.cloudcross.ssp.operator.model.Message">
+		insert into t_message(content,send_time,type)
+		values(#{content},#{sendTime},#{type})
+	</insert>
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Message">
+		select 
+		<include refid="base_column" />
+		from t_message
+		<where>
+			<if test="type!=null">	
+				and type = #{type}
+			</if>
+			<if test="value!=null">	
+				and content like #{value}
+			</if>
+		</where>	
+		
+		order by id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) from t_message
+		<where>
+			<if test="type!=null">	
+				and type = #{type}
+			</if>
+			<if test="value!=null">	
+				and content like #{value}
+			</if>
+		</where>	
+	</select>
+
+	
+<select id="selectByType" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Message">
+		select 
+		<include refid="base_column" />
+		from t_message
+		<where>
+		<if test="type!=null">	
+			and type = #{type}
+		</if>
+			
+		</where>
+	</select>
+<!-- 	
+	<select id="selectByRead"  parameterType="int"  resultType="Message">
+		select t_message.*,t_message_read.account_id 
+	 from t_message left join t_message_read on t_message.id=t_message_read.message_id  	
+	</select>	
+	
+<select id="selectByParams"  parameterType="map" resultType="Message">
+		select 
+		<include refid="base_column" />
+		from t_message where 1 = 1
+			
+		<if test="type!=null">	
+			and type = #{type}
+		</if>
+		
+		order by id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+
+
+  -->	
+
+	
+</mapper>
+	

+ 54 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/operator-balance.sql.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.operatorBalanceSqlMapper">
+	<sql id="base_column">
+		id,
+		operator_id as operatorId,
+		act_time as actTime,
+		num,
+		amount,
+		state,
+		balance,
+		income
+	</sql>
+	
+	<insert id="addOperatorBalance" parameterType="com.cloudcross.ssp.operator.model.OperatorBalance"  useGeneratedKeys="true"
+		keyProperty="id">
+		insert into t_operator_balance(operator_id,act_time,num,amount,state,balance)
+		values(#{operatorId},#{actTime},#{num},#{amount},#{state},#{balance})	
+	</insert>
+	
+	<select id="findSumAmountByOperatorId" parameterType="long" resultType="float">
+		select sum(amount) from t_operator_balance where
+		operator_id = #{operatorId} and state != 2
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) from t_operator_balance
+		where operator_id = #{operatorId} and amount > 0
+	</select>
+	<select id="findFinancial" parameterType="map" resultType="com.cloudcross.ssp.operator.model.OperatorBalance">
+		select 
+		impression,click,ecpm,income
+		
+		from t_rpt_zone
+	</select>
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.OperatorBalance">
+		select <include refid="base_column"/> from t_operator_balance
+		where operator_id = #{operatorId} and amount > 0
+		order by act_time desc
+		limit #{pager.offset}, #{pager.limit} 
+	</select>
+	
+	<select id="findByParams1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.OperatorBalance">
+		select <include refid="base_column"/> from t_operator_balance
+		where operator_id = #{operatorId}  and amount > 0
+		order by act_time desc
+	</select>
+	
+	<select id="findAvailableMoney" parameterType="long" resultType="float">
+		select balance from t_operator_balance where operator_id = #{operatorId}
+        order by id desc limit 1
+	</select>
+	
+</mapper>

+ 69 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/operator.sql.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.operatorSqlMapper">
+	
+	<sql id="base_column">
+	id,
+	company_name as companyName,
+	link_man as linkMan,
+	tel,
+	account,
+	account_name as accountName,
+	bank,
+	status,
+	admin_id as adminId
+	</sql>
+	<select id="findById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Operator">
+		select 
+		<include refid="base_column" />
+		from t_operator
+		<where>
+			id = #{id} and status !=-1
+		</where>
+	</select>
+	
+	<select id="findAllOperator" resultType="com.cloudcross.ssp.operator.model.Operator">
+		select 
+		<include refid="base_column" />
+		from t_operator
+		<where>
+			 status !=-1
+		</where>
+	</select>
+	
+	<update id="editOperator" parameterType="com.cloudcross.ssp.operator.model.Operator">
+		update t_operator
+		<set>
+			<if test="accountName != null and accountName != ''">
+				account_name=#{accountName},
+			</if>
+			<if test="account != null and account != ''">
+				account=#{account},
+			</if>
+			<if test="companyName != null and companyName != ''">
+				company_name=#{companyName},
+			</if>
+			<if test="status != null and status != ''">
+				status=#{status},
+			</if>
+			<if test="linkMan != null and linkMan != ''">
+				link_man=#{linkMan},
+			</if>
+			<if test="tel != null and tel != ''">
+				tel=#{tel},
+			</if>
+			<if test="bank != null and bank != ''">
+				bank=#{bank}
+			</if>
+		</set>
+		where id=#{id}
+	</update>
+	
+	
+	
+	
+	
+	
+	
+	
+</mapper>

+ 154 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/order.sql.xml

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.orderSqlMapper">
+	
+	<sql id="base_column">
+		t_order.id as id,
+		advertiser_id as advertiserId,
+		t_order.name as name,
+		t_order.budget as budget,
+		t_order.comment as comment,
+		t_order.status as status,
+		t_order.updated as updated
+	</sql>
+	
+	
+	
+<!-- 	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) from t_order 
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					where name like #{value}
+				</when>
+				<when test="key=='advertiserId'">
+					where id like #{value}
+				</when>
+			</choose>	
+		</if>
+	</select>
+	 -->
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.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 
+		where
+		t_order.advertiser_id = #{advertiserId} 
+		and t_order.status != -1
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and t_order.name like #{value}
+				</when>
+			</choose>	
+		</if>
+		
+		<if test="status!=null">	
+			and t_order.status = #{status}
+		</if>
+		group by t_order.id	
+		order by t_order.id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	  <select id="countByParams" parameterType="map" resultType="int">
+		select count(t_order.id)
+		from t_order where status != -1
+		and t_order.advertiser_id = #{advertiserId} 
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and t_order.name like #{value}
+				</when>
+			</choose>	
+		</if>
+		
+		<if test="status!=null">	
+			and t_order.status = #{status}
+		</if>
+		
+		 <if test="status!=null">	
+			and t_order.status = #{status}
+		</if>	
+	</select>
+	
+	  <select id="selectByAdvertiserType" parameterType="string" resultType="com.cloudcross.ssp.operator.model.Order">
+		select
+		<include refid="base_column" />
+		from t_order where advertiser_id=#{advertiserType} 
+		and status != -1
+	</select>
+	
+	
+	<select id="selectByStatus"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Advertiser">
+		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 
+		 where 1 = 1 
+		 and t_order.status = #{status}
+		 and t_order.advertiser_id = #{advertiserId}  
+		group by t_order.id
+		order by t_order.id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Order">
+		select 
+		<include refid="base_column" />
+		from t_order
+		<where>
+			id = #{id} and
+			status != -1
+		</where>
+	</select>
+	
+	<select id="findByAdvertiserId" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Order">
+		select 
+		<include refid="base_column" />
+		from t_order
+		<where>
+			advertiser_id = #{advertiserId}
+			and
+			status != -1
+		</where>
+	</select>
+	
+	<select id="selectByName" parameterType="String" resultType="long">
+		select
+		max(id)
+		from t_order
+		<where>
+			t_order.name = #{name} and
+			status != -1
+		</where>
+	</select>
+	
+	
+	<insert id="addOrder" parameterType="com.cloudcross.ssp.operator.model.Order">
+		insert into t_order(name,budget,comment,updated,advertiser_id)
+		values(#{name},#{budget},#{comment},#{updated},#{advertiserId})
+	</insert>
+	
+	<update id="editOrder" parameterType="com.cloudcross.ssp.operator.model.Order">
+		update t_order set t_order.name=#{name},t_order.budget=#{budget},t_order.comment=#{comment},
+			<if test="status !=null">
+			status=#{status},
+			</if>
+			updated=#{updated} 
+		 where t_order.id=#{id}
+	</update>
+	
+	<update id="updateOrderStatus" parameterType="HashMap">
+		update t_order 
+			set status = #{status},updated = #{modifyDate}
+			where t_order.id in
+			<foreach item="orderId" collection="orderIdList"
+		      open="(" separator="," close=")">
+		        #{orderId}
+			</foreach>
+	</update>
+	
+	
+	
+</mapper>
+	

+ 45 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/place-operator.sql.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.placeOperatorSqlMapper">
+	
+	<select id="findByNameAndOperatorId" parameterType="String" resultType="long">
+		select place_id from t_place_operator
+		where name = #{name} and operator_id= #{operatorId}
+	</select>
+	
+	<select id="findPlaceByOperator" parameterType="long" resultType="String">
+		select name from t_place_operator where operator_id = #{operatorId} 
+	</select>
+	
+	<select id="findPlace" parameterType="long" resultType="map">
+		select o.place_id,p.name from t_place_operator o, t_place p where o.place_id = p.id and o.operator_id = #{operatorId}
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(o.id)
+		from t_place_operator o, t_place p
+		where o.place_id = p.id and o.operator_id = #{operatorId}
+		<if test="searchValue != null">
+		and (o.name like #{searchValue} or p.name like #{searchValue})
+		</if>
+	</select>
+	
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.PlaceOperator">
+		select o.id as id, o.operator_id as operatorId, o.name as name, p.name as placeName, p.id as placeId
+		from t_place_operator o, t_place p
+		where o.place_id = p.id and o.operator_id = #{operatorId}
+		<if test="searchValue != null">
+		and (o.name like #{searchValue} or p.name like #{searchValue})
+		</if>
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findByParams1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.PlaceOperator">
+		select o.id as id, o.operator_id as operatorId, o.name as name, p.name as placeName, p.id as placeId
+		from t_place_operator o, t_place p
+		where o.place_id = p.id and o.operator_id = #{operatorId}
+		<if test="searchValue != null">
+		and (o.name like #{searchValue} or p.name like #{searchValue})
+		</if>
+	</select>
+</mapper>

+ 21 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/place.sql.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.placeSqlMapper">
+	<sql id="base_column">
+		id,
+		name
+	</sql>
+	
+	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.operator.model.Place">
+		select
+		<include refid="base_column"/>
+		from t_place
+	</select>
+	
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.operator.model.Place">
+		select
+		<include refid="base_column"/>
+		from t_place
+		where id = #{id}
+	</select>
+</mapper>

+ 342 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/report.sql.xml

@@ -0,0 +1,342 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.adReportSqlMapper">
+	
+	<sql id="base_column">
+		id,
+		zone_id as zoneId,
+		pv,
+		uv,
+		width,
+		height,
+		position,
+		os,
+		device,
+		impression,
+		place,
+		click,
+		clickRate,
+		eCpm,
+		income,
+		t_rpt_zone.date as reportDate
+	</sql>
+	
+	<select id="findCountForDeliverEffectAnalysis" parameterType="map" resultType="int">
+		select count(date) from ((
+		select distinct date 
+		from t_rpt_zone  
+		<where>
+		operator_id = #{operatorId} and date &gt;= #{startDate} and #{endDate} &gt;=date
+		<if test="zoneId!=null">
+		and zone_id=#{zoneId}
+		</if>
+		</where>
+		) as a)
+	</select>
+	
+	
+	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+		zone_id as zoneId,date as reportDate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,sum(uimpression) as uImpression,
+		sum(uclick) as uClick,
+		100*sum(impression)/sum(pv) as fillRate,
+        sum(click) as click,100* sum(click)/sum(impression) as clickRate,sum(ecpm) as eCpm,sum(income) as income
+		from t_rpt_zone 
+		<where>
+		operator_id = #{operatorId} and date &gt;= #{startDate} and #{endDate} &gt;=date
+		<if test="zoneId!=null">
+		and zone_id=#{zoneId}
+		</if>
+		</where>
+		group by date
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findSum" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, sum(click) as click, sum(income) as income
+		from t_rpt_zone 
+		<where>
+		operator_id = #{operatorId}
+		<if test="zoneId!=null">
+		and zone_id=#{zoneId}
+		</if>
+		
+		<if test="startDate!=null and endDate!=null"> 
+            and date &gt;= #{startDate} and #{endDate} &gt;=date
+		</if>
+		</where>
+	</select>
+	
+	<!-- 导出Excel用 -->
+	<select id="findDeliverEffectAnalysis1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+		zone_id as zoneId,date as reportDate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
+		sum(uimpression) as uImpression,
+		sum(uclick) as uClick,100*sum(impression)/sum(pv) as fillRate,
+        sum(click) as click,100* sum(click)/sum(impression) as clickRate,sum(ecpm) as eCpm,sum(income) as income
+		from t_rpt_zone 
+		<where>
+		operator_id = #{operatorId} and date &gt;= #{startDate} and #{endDate} &gt;=date
+		<if test="zoneId!=null">
+		and zone_id=#{zoneId}
+		</if>
+		</where>
+		group by date
+	</select>
+	
+	<select id="countBySize" parameterType="map" resultType="int">
+		 select count(height) from ((select distinct width,height from t_rpt_zone_size where 
+		  date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		 ) as a )
+	</select>
+	
+	<select id="findBySize" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+	    id,date as reportDate,width ,height,100*sum(pv)/(select sum(pv) from t_rpt_zone_size 
+	    where
+            date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		) as viewRate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
+		sum(uimpression) as uImpression, sum(uclick) as uClick,
+		100*impression/pv as fillRate,sum(click) as click,100*sum(click)/sum(impression) as clickRate,sum(ecpm) as eCpm,sum(income) as income
+		from t_rpt_zone_size 
+		where
+            date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		group by width,height
+		order by impression desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<!-- 导出Excel用 -->
+	<select id="findBySize1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+	    id,date as reportDate,width ,height,100*sum(pv)/(select sum(pv) from t_rpt_zone_size 
+	    where
+            date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		) as viewRate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
+		sum(uimpression) as uImpression, sum(uclick) as uClick,
+		100*impression/pv as fillRate,sum(click) as click,100*sum(click)/sum(impression) as clickRate,sum(ecpm) as eCpm,sum(income) as income
+		from t_rpt_zone_size 
+		where
+            date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		group by width,height
+		order by impression desc
+	</select>
+	
+	<select id="findByPosition" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+	    id,date as reportDate,position,100*sum(pv)/(select sum(pv) from t_rpt_zone_position where 
+		 date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		 ) as viewRate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression ,
+		 sum(uimpression) as uImpression, sum(uclick) as uClick,
+		 100*sum(impression)/sum(pv) as fillRate,sum(click) as click ,100*sum(click)/sum(impression) as clickRate,sum(eCpm) as eCpm,sum(income) as income 
+		from t_rpt_zone_position
+		where 
+		 date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		group by position 
+		order by impression desc 
+	</select>
+	
+	<!-- 系统报表 -->
+	<select id="countBySystem" parameterType="map" resultType="int">
+         select count(os) from ((select distinct os from t_rpt_zone_os where 
+		  date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		  ) as a)
+	</select>
+	
+	<select id="findBySystem" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+	   select 
+	    os as system,100*(sum(pv)/(select sum(pv) from t_rpt_zone_os
+		where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		   )) as viewRate,
+		sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
+		sum(uimpression) as uImpression, sum(uclick) as uClick,
+		100*(sum(impression)/sum(pv)) as fillRate,
+        sum(click) as click,100*(sum(click)/sum(impression)) as clickRate,sum(ecpm) as eCpm,sum(income) as income
+		from t_rpt_zone_os 
+		where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		group by os
+		order by impression desc
+	</select>
+	
+	<!-- 导出Excel用 -->
+	<select id="findBySystem1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+	    select 
+	    os as system,100*(sum(pv)/(select sum(pv) from t_rpt_zone_os
+		where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		   )) as viewRate,
+		sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
+		sum(uimpression) as uImpression, sum(uclick) as uClick,
+		100*(sum(impression)/sum(pv)) as fillRate,
+        sum(click) as click,100*(sum(click)/sum(impression)) as clickRate,sum(ecpm) as eCpm,sum(income) as income
+		from t_rpt_zone_os 
+		where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		group by os
+		order by impression desc
+	</select>
+	
+	
+	<select id="findByDevice" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		
+		select 
+	    id,date as reportDate,device,100*sum(pv)/
+	    (select sum(pv) from t_rpt_zone_device where operator_id = #{operatorId} and date &gt;= #{startDate} and #{endDate} &gt;=date) as viewRate,
+	    sum(pv) as pv,sum(uv) as uv,sum(impression) as impression ,
+	    sum(uimpression) as uImpression,
+		sum(uclick) as uClick,100*sum(impression)/sum(pv) as fillRate,sum(click) as click ,100*sum(click)/sum(impression) as clickRate,sum(eCpm) as eCpm,sum(income) as income
+        from t_rpt_zone_device
+		where operator_id = #{operatorId} and date &gt;= #{startDate} and #{endDate} &gt;=date
+		group by device 
+		order by impression desc
+	</select>
+	
+	<select id="countByAllAreal" parameterType="map" resultType="int">
+		select count(cn) from ((select distinct cn from t_rpt_zone_location a,t_location b 
+  		where
+		a.location = b.location and date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		) as t)
+		
+	</select>
+	
+	<select id="findByAllAreal" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		 select 
+	    a.id,a.date as reportDate,b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		) as viewRate,
+	    sum(a.pv) as pv,sum(a.uv) as uv,sum(a.impression) as impression,
+	    sum(uimpression) as uImpression, sum(uclick) as uClick,100*sum(a.impression)/sum(a.pv) as fillRate,sum(a.click) as click,100*sum(a.click)/sum(a.impression) as clickRate,sum(a.eCpm) as eCpm,sum(a.income) as income
+		from t_rpt_zone_location a,t_location b
+	 	where
+		a.location = b.location  and a.date &gt;= #{startDate} and #{endDate} &gt;=a.date
+		    and operator_id=#{operatorId}
+		group by b.cn 
+		order by b.cn 
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findByArealCity" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		 select 
+	    b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		) as viewRate,
+	    sum(a.pv) as pv,sum(a.uv) as uv,sum(a.impression),
+	    sum(uimpression) as uImpression, sum(uclick) as uClick,
+	    100*sum(a.impression)/sum(a.pv) as fillRate,sum(a.click),100*sum(a.click)/sum(a.impression) as clickRate,sum(a.eCpm) as eCpm,sum(a.income) as income
+		from t_rpt_zone_location a,t_location b
+		where
+		a.location=b.location and b.cn=#{cn} and date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+       group by b.cn_city
+	</select>
+	
+	<select id="findByAreal" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+	    b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+		) as viewRate,
+	    sum(a.pv) as pv,sum(a.uv) as uv,sum(a.impression),
+	    sum(uimpression) as uImpression, sum(uclick) as uClick,
+	    100*sum(a.impression)/sum(a.pv) as fillRate,sum(a.click),100*sum(a.click)/sum(a.impression) as clickRate,sum(a.eCpm) as eCpm,sum(a.income) as income
+		from t_rpt_zone_location a,t_location b
+		where
+		a.location=b.location and b.cn=#{cn} and date &gt;= #{startDate} and #{endDate} &gt;=date
+		    and operator_id=#{operatorId}
+       group by b.cn_city
+	</select>
+	
+	
+	<select id="countByPlace" parameterType="map" resultType="int">
+		select count(place_id) from ((select distinct place_id from t_rpt_zone_place where 
+		operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as a) 
+	</select>
+	
+	<select id="findByPlace" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select t_place.name as place,sum(p.pv) as pv, sum(p.uv) as uv, sum(p.impression) as impression, 
+		sum(uimpression) as uImpression,
+		sum(uclick) as uClick,sum(p.click) as click, sum(p.ecpm) as eCpm,
+    sum(p.income) as income, 100 * sum(p.pv) / (select sum(pv) from t_rpt_zone_place where operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as viewRate, 
+    100 * sum(p.impression) / sum(p.pv) as fillRate, 100 * sum(p.click) / sum(p.impression) as clickRate
+    from ((select distinct place_id from t_rpt_zone_place where operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as a ), 
+    t_rpt_zone_place as p, t_place where a.place_id = p.place_id and a.place_id = t_place.id
+    and operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}
+    group by p.place_id
+    order by p.impression desc
+	limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<!-- 导出Excel用 -->
+	<select id="findByPlace1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select t_place.name as place,sum(p.pv) as pv, sum(p.uv) as uv, sum(p.impression) as impression, 
+		sum(uimpression) as uImpression,
+		sum(uclick) as uClick,sum(p.click) as click, sum(p.ecpm) as eCpm,
+    sum(p.income) as income, 100 * sum(p.pv) / (select sum(pv) from t_rpt_zone_place where operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as viewRate, 
+    100 * sum(p.impression) / sum(p.pv) as fillRate, 100 * sum(p.click) / sum(p.impression) as clickRate
+    from ((select distinct place_id from t_rpt_zone_place where operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as a ), 
+    t_rpt_zone_place as p, t_place where a.place_id = p.place_id and a.place_id = t_place.id
+    and operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}
+    group by p.place_id
+     order by p.impression desc
+	</select>
+	
+	<select id="countByApmac" parameterType="map" resultType="int">
+			select count(apmac) from ((select distinct apmac from t_rpt_zone_ap where 
+		operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as a) 
+	</select>
+	
+	<select id="findByApmac" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select apmac, sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, 
+		sum(uimpression) as uImpression,
+		sum(uclick) as uClick,sum(click) as click, sum(ecpm) as eCpm,
+    sum(income) as income, 100 * sum(pv) / (select sum(pv) from t_rpt_zone_ap where operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as viewRate, 
+    100 * sum(impression) / sum(pv) as fillRate, 100 * sum(click) / sum(impression) as clickRate
+    from  t_rpt_zone_ap  where 
+    operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}
+    group by apmac
+    order by impression desc
+	limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findByApmac1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+			select apmac, sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, 
+		sum(uimpression) as uImpression,
+		sum(uclick) as uClick,sum(click) as click, sum(ecpm) as eCpm,
+    sum(income) as income, 100 * sum(pv) / (select sum(pv) from t_rpt_zone_ap where operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}) as viewRate, 
+    100 * sum(impression) / sum(pv) as fillRate, 100 * sum(click) / sum(impression) as clickRate
+    from  t_rpt_zone_ap  where 
+    operator_id = #{operatorId} and date &gt;= #{startDate} and date &lt;= #{endDate}
+    group by apmac
+    order by impression desc
+	</select>
+	
+	
+	<select id="findAllArea" parameterType="map" resultType="com.cloudcross.ssp.operator.model.DeliverAnalysis">
+		select 
+	    a.id,a.date as reportDate,b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
+		<if test="operatorId!=null">
+		    and operator_id=#{operatorId}
+		</if>) as viewRate,
+	    sum(a.pv) as pv,sum(a.uv) as uv,sum(a.impression) as impression,
+	    sum(uimpression) as uImpression, sum(uclick) as uClick,
+	    100*sum(a.impression)/sum(a.pv) as fillRate,sum(a.click) as click,100*sum(a.click)/sum(a.impression) as clickRate,sum(a.eCpm) as eCpm,sum(a.income) as income
+		from t_rpt_zone_location a,t_location b
+	 	where
+		a.location = b.location  and a.date &gt;= #{startDate} and #{endDate} &gt;=a.date
+		<if test="operatorId!=null">
+		    and operator_id=#{operatorId}
+		</if>
+		group by b.cn 
+		order by b.cn
+	</select>
+</mapper>

+ 170 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/resources.sql.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="operator.resourcesSqlMapper">
+<!--mybatis ehcache缓存配置  -->
+<!-- 以下两个<cache>标签二选一,第一个可以输出日志,第二个不输出日志
+<cache type="org.mybatis.caches.ehcache.LoggingEhcache" /> -->
+<!-- <cache type="org.mybatis.caches.ehcache.EhcacheCache"/> -->
+
+	<!-- 以下与实体类的中字段一致 -->
+	<sql id="selectId">
+	id,
+	name,
+	parentId,
+	(select r.name from t_resources r where r.id = t_resources.parentId ) parentName,
+	resKey,
+	type,
+	resUrl,
+	level,
+	description
+	</sql>
+	
+	<select id="queryAll" resultType="com.cloudcross.ssp.operator.model.Resources" parameterType="com.cloudcross.ssp.operator.model.Resources">
+		select
+		<include refid="selectId" />
+		from t_resources 
+		where 1+1
+		<if test="name != null and name != ''">
+				and name like '%${name}%'
+				</if>
+		<if test="parentId != null">
+				and parentId =#{parentId}
+		</if>
+		order By level asc
+	</select>
+	<!-- -->
+	<select id="getMaxLevel" resultType="int">
+		select max(level)+1  from t_resources
+	</select>
+	<!--resultType="Resources" 每返回一条结果封装到Resources里 -->
+	<select id="query" resultType="com.cloudcross.ssp.operator.model.Resources" parameterType="java.util.HashMap">
+		select
+		<include refid="selectId" />
+		from t_resources
+		<where>
+			<if test="t.name != null and t.name != ''">
+				name like '%${t.name}%'
+				</if>
+		</where>
+		order By level asc
+	</select>
+	
+	<!--查找菜单名称是否是否存在-->
+		<select id="isExist" resultType="com.cloudcross.ssp.operator.model.Resources" parameterType="String">
+		select
+		<include refid="selectId" />
+		from t_resources
+		where name = #{accountName}
+	</select>
+	<!-- 新增 -->
+	<insert id="add" parameterType="com.cloudcross.ssp.operator.model.Resources">
+		insert into t_resources (
+					name,
+					parentId,
+					resKey,
+					type,
+					resUrl,
+					level,
+					description
+								) 
+		values (
+				#{name},
+				#{parentId},
+				#{resKey},
+				#{type},
+				#{resUrl},
+				#{level},
+				#{description}
+				)
+	</insert>
+	
+	<!-- 删 -->
+	<delete id="delete" parameterType="String">
+		delete from t_resources
+		where id=#{id}
+	</delete>
+	
+	<select id="getById" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Resources">
+		SELECT 
+		<include refid="selectId" />
+		 from t_resources where id=#{id}
+	</select>
+	
+	<select id="queryByParentId" parameterType="java.util.HashMap" resultType="com.cloudcross.ssp.operator.model.Resources">
+		SELECT 
+		<include refid="selectId" />
+		 from t_resources where  type =  convert(#{type},SIGNED) - 1
+	</select>
+	
+	
+	<!-- 更新 -->
+	<update id="update" parameterType="com.cloudcross.ssp.operator.model.Resources">
+	    update t_resources
+	    set
+	    	name = #{name},
+	    	parentId = #{parentId},
+			resKey = #{resKey},
+			type = #{type},
+			resUrl = #{resUrl},
+			level = #{level},
+			description = #{description}
+	   where id = #{id}
+	</update>
+	
+	<!-- 更新 -->
+	<update id="updateSortOrder" parameterType="com.cloudcross.ssp.operator.model.Resources">
+	    update t_resources
+	    set level = #{level}
+	   where id = #{id}
+	</update>
+	<!-- 根据部门Id获取该用户的权限-->
+	<select id="findRoleRes" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Resources">
+		SELECT 
+		<include refid="selectId" />
+		FROM t_resources WHERE id in(
+		SELECT resc_id FROM
+		t_res_roles WHERE role_id = #{roleId})
+		order By level asc
+	</select>
+	
+    
+  	<select id="findResourcesByAccount" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Resources">
+		select
+		<include refid="selectId" /> 
+ 		from t_resources where t_resources.id in 
+    	(select res_id from t_res_accounts where t_res_accounts.account_id = #{id})
+		order By level asc
+	</select>
+	
+	<!-- 根据账号Id获取该用户的权限-->
+	<select id="findAccountResourcess" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Resources">
+		SELECT 
+		<include refid="selectId" />
+		FROM t_resources WHERE id in(
+		SELECT resc_id FROM
+		t_res_roles WHERE role_id in(
+		SELECT role_id FROM t_acc_role
+		WHERE acc_id=#{id}))
+		order By level asc
+	</select>
+	<!-- 删 -->
+	<delete id="deleteResourcesRole" parameterType="String">
+		delete from t_res_roles
+		where role_id=#{id}
+	</delete>
+	
+	<insert id="addRoleRes" parameterType="com.cloudcross.ssp.operator.model.ResourcesRole">
+	insert into t_res_roles (role_id,resc_id) value (#{roleId},#{resId})
+	</insert>
+	
+	<delete id="deleteAccountResources" parameterType="long">
+		delete from t_res_accounts
+		where account_id=#{accountId}
+	</delete>
+	
+	
+	<insert id="addAccountResourcess" parameterType="com.cloudcross.ssp.operator.model.AccountResources">
+	insert into t_res_accounts (account_id,res_id) value (#{accountId},#{resourceId})
+	</insert>
+</mapper>

+ 92 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/roles.sql.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="operator.rolesSqlMapper">
+
+<!--mybatis ehcache缓存配置  -->
+<!-- 以下两个<cache>标签二选一,第一个可以输出日志,第二个不输出日志 
+<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />-->
+<!-- <cache type="org.mybatis.caches.ehcache.EhcacheCache"/> -->
+	<!-- 以下与实体类的中字段一致 -->
+	<sql id="selectId">
+		id,
+		enable,
+		name,
+		roleKey,
+		description
+	</sql>
+	
+	<!--resultType="Roles" 每返回一条结果封装到Account里 -->
+	<select id="query" resultType="com.cloudcross.ssp.operator.model.Roles" parameterType="java.util.HashMap">
+		select
+		<include refid="selectId" />
+		from t_ly_role
+		<where>
+			<if test="t.name != null and t.name != ''">
+				name like '%${t.name}%'
+			</if>
+		</where>
+	</select>
+	<select id="queryAll" resultType="com.cloudcross.ssp.operator.model.Roles" parameterType="com.cloudcross.ssp.operator.model.Roles">
+		select
+		<include refid="selectId" />
+		from t_ly_role
+		<where>
+			<if test="name != null and name != ''">
+				name like '%${name}%'
+			</if>
+		</where>
+	</select>
+	<select id="isExist" resultType="com.cloudcross.ssp.operator.model.Roles" parameterType="String">
+		select
+		<include refid="selectId" />
+		from t_ly_role
+		where name = #{name}
+	</select>
+	
+	<insert id="add" parameterType="com.cloudcross.ssp.operator.model.Roles">
+		insert into t_ly_role ( enable,name,roleKey,description)
+		values (#{enable},
+		#{name}, #{roleKey},
+		#{description})
+	</insert>
+	<delete id="delete" parameterType="String">
+		delete from t_ly_role where
+		id=#{id}
+	</delete>
+	<select id="getById" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Roles">
+		select
+		<include refid="selectId" />
+		from t_ly_role where id=#{id}
+	</select>
+	<update id="update" parameterType="com.cloudcross.ssp.operator.model.Roles">
+		update t_ly_role
+		<set>
+			<if test="name != null and name != ''">
+				name=#{name},
+			</if>
+			<if test="enable != null and enable != ''">
+				enable=#{enable},
+			</if>
+			<if test="description != null and description != ''">
+				description=#{description},
+			</if>
+			<if test="roleKey != null and roleKey != ''">
+				roleKey=#{roleKey}
+			</if>
+		</set>
+		where id=#{id}
+	</update>
+	<select id="findbyAccountRole" parameterType="String" resultType="com.cloudcross.ssp.operator.model.Roles">
+  select 
+  <include refid="selectId" /> 
+  from t_ly_role where id in (SELECT role_id FROM t_acc_role WHERE acc_id=#{accountId}) 
+  </select>
+  <delete id="deleteAccountRole" parameterType="String">
+		delete from t_acc_role
+		where acc_id=#{accountId}
+	</delete>
+  <insert id="addAccRole" parameterType="com.cloudcross.ssp.operator.model.RoleAccount">
+	insert into t_acc_role (acc_id,role_id) value (#{accountId},#{roleId})
+	</insert>
+</mapper>

+ 15 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/rpt-zone-hour.sql.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.rptZoneHourSqlMapper">
+	
+	<select id="findEveryHourData" parameterType="map" resultType="com.cloudcross.ssp.operator.model.RptZoneHour">
+		select hour,sum(pv) as pv,sum(uv) as uv, sum(impression) as impression, sum(click) as click,sum(uimpression) as uImpression,
+		sum(uclick) as uClick, sum(income) as income
+		from t_rpt_zone_hour where operator_id = #{operatorId} and date = #{startDate}
+		<if test="zoneId!=null">
+        	and zone_id = #{zoneId}
+        </if>      
+		group by hour
+	</select>
+
+</mapper>

+ 45 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/rpt-zone.sql.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.rptZoneSqlMapper">
+
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.RptZone">
+		select date, sum(impression) as impression, sum(click) as click, sum(ecpm) as ecpm,
+        sum(income) as income from t_rpt_zone
+        where  operator_id = #{operatorId} and date >= #{startDate} and date &lt;= #{endDate}
+        <if test="zoneId!=null">
+        	and zone_id = #{zoneId}
+        </if>
+		group by date
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	
+	<!-- 导出excel用 -->
+	<select id="findByParams1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.RptZone">
+		select date, sum(impression) as impression, sum(click) as click, sum(ecpm) as ecpm,
+        sum(income) as income from t_rpt_zone
+        where  operator_id = #{operatorId} and date >= #{startDate} and date &lt;= #{endDate}
+        <if test="zoneId!=null">
+        	and zone_id = #{zoneId}
+        </if>
+		group by date
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(id) from t_rpt_zone
+        where id in ( select id from t_rpt_zone
+        where  operator_id = #{operatorId} and date >= #{startDate} and date &lt;= #{endDate}  
+        <if test="zoneId!=null">
+        	and zone_id = #{zoneId}
+        </if>      
+		group by date
+       		)  
+	</select>
+	
+	
+	<select id="findByOperatorIdAndDate" parameterType="map" resultType="com.cloudcross.ssp.operator.model.RptZone">
+		select operator_id as operatorId, date, sum(pv) as pv, sum(uv) as uv,
+        sum(impression) as impression, sum(click) as click,sum(income) as income from t_rpt_zone
+        where  operator_id = #{operatorId} and date=#{date}
+	</select>
+</mapper>

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

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.sizeSqlMapper">
+	<sql id="base_column">
+		id,width,height
+	</sql>
+
+	<select id="findAllSize"  resultType="com.cloudcross.ssp.operator.model.Size">
+		select <include refid="base_column"/> from t_size order by id desc
+	</select>
+
+	<select id="findSize" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Size">
+		select <include refid="base_column"/>  from t_size where id = #{id} 
+	</select>
+	
+	<select id="findSizeId" parameterType = "map" resultType="com.cloudcross.ssp.operator.model.Size">
+		select <include refid="base_column"/> from t_size where width = #{width} and height = #{height}
+	</select>
+</mapper>

+ 25 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/user-group.sql.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.userGroupSqlMapper">
+	
+	<sql id="base_column">
+		account_id as id,
+		account_type as userGroupType,
+		account_name as userGroup,
+		active as status
+	</sql>
+	
+	<insert id="addUserGroup" parameterType="com.cloudcross.ssp.operator.model.UserGroup" useGeneratedKeys="true"
+		keyProperty="id">
+		insert into rv_accounts(account_type,account_name) values(#{userGroupType},#{userGroup});
+	</insert>
+	
+	<select id="findUserGroupById" parameterType="long" resultType="com.cloudcross.ssp.operator.model.UserGroup">
+	    select
+	    <include refid="base_column" />
+	    from rv_accounts
+	    <where>
+	    	account_id = #{id}
+	    </where>
+	</select>
+</mapper>

+ 123 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/user.sql.xml

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.userSqlMapper">
+	
+	<sql id="base_column">
+		user_id as id,
+		email_address as email,
+		username,
+		password,
+		default_account_id as userGroupId,
+		contact_name as contactName,
+		contact_phone as phone,
+		active as status,
+		date_created as createDate,
+		updated as modifyDate
+	</sql>
+	
+	<select id="selectByUsername"  parameterType="string" resultType="com.cloudcross.ssp.operator.model.User">
+		select 
+		<include refid="base_column" />
+		from rv_users
+		<where>
+			username = #{username}
+		</where>
+		order by user_id  desc
+	</select>
+	
+	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.operator.model.User">
+		select 
+		<include refid="base_column" />
+		from rv_users
+		<where>
+			user_id = #{id} and
+			active != -1
+		</where>
+	</select>
+	
+	<select id="selectByUserGroupType" parameterType="string" resultType="com.cloudcross.ssp.operator.model.User">
+		select
+		<include refid="base_column" />
+		from rv_users
+		<where>
+			exists(select account_id from rv_accounts where account_type=#{userGroupType} and
+			account_id=default_account_id) and
+			active != -1
+		</where>
+	</select>
+	
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.User">
+		select 
+		<include refid="base_column" />
+		from rv_users where active != -1
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='username'">
+					and username like #{value}
+				</when>
+				<when test="key=='contactName'">
+					and contact_name like #{value}
+				</when>
+			</choose>	
+		</if>
+		<if test="userGroupType!=null">
+			and exists(
+				select account_id from rv_accounts 
+					where account_id=default_account_id and 
+					account_type=#{userGroupType})
+		</if>
+		order by  user_id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(user_id)
+		from rv_users where active != -1
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='username'">
+					and username like #{value}
+				</when>
+				<when test="key=='contactName'">
+					and contact_name like #{value}
+				</when>
+			</choose>	
+		</if>
+		<if test="userGroupType!=null">
+			and exists(
+				select account_id from rv_accounts 
+					where account_id=default_account_id and 
+					account_type=#{userGroupType})
+		</if>
+	</select>
+	
+	<insert id="addUser" parameterType="com.cloudcross.ssp.operator.model.User">
+		insert into rv_users(username,password,contact_name,contact_phone,active,default_account_id,updated,date_created)
+		values(#{username},#{password},#{contactName},#{phone},#{status},#{userGroupId}, #{createDate},#{createDate})
+	</insert>
+	
+	<update id="editUser" parameterType="com.cloudcross.ssp.operator.model.User">
+		update rv_users 
+		set username=#{username},
+		<if test="password !=null ">
+			password=#{password},
+		</if>
+			contact_name=IFNULL(#{contactName},default(contact_name)),
+			contact_phone=IFNULL(#{phone},default(contact_phone)),
+		  <if test="status !=null">
+			active=#{status},
+			</if>
+			updated=#{modifyDate} 
+		where user_id=#{id}
+	</update>
+	
+	<update id="updateUserStatus" parameterType="HashMap">
+		update rv_users 
+			set active = #{status},updated = #{modifyDate}
+			where user_id in
+			<foreach item="userId" collection="userIdList"
+		      open="(" separator="," close=")">
+		        #{userId}
+			</foreach>
+	</update>
+</mapper>

+ 46 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/userLogin.sql.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="operator.userLoginSqlMapper">
+
+<!--mybatis ehcache缓存配置  -->
+<!-- 以下两个<cache>标签二选一,第一个可以输出日志,第二个不输出日志 
+<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />-->
+<!-- <cache type="org.mybatis.caches.ehcache.EhcacheCache"/> -->
+	<!-- 以下与实体类的中字段一致 -->
+	<sql id="selectId">
+		loginId,
+		userId,
+		userName,
+		loginTime,
+		loginIP
+	</sql>
+	
+	<!--resultType="Account" 每返回一条结果封装到Account里 -->
+	<select id="query" resultType="com.cloudcross.ssp.operator.model.UserLogin" parameterType="java.util.HashMap">
+		select
+		<include refid="selectId" />
+		from t_userloginlist where 1=1
+		
+	</select>
+	
+	<select id="getById" resultType="com.cloudcross.ssp.operator.model.UserLogin" parameterType="String">
+		select
+		loginId,
+		userId,
+		userName,
+		max(loginTime) as loginTime,
+		loginIP
+		from t_userloginlist where 1=1
+		and t_userloginlist.userId = #{id}
+	</select>
+	<!-- 增加用户 -->
+	<insert id="add" parameterType="com.cloudcross.ssp.operator.model.UserLogin">
+		insert into t_userloginlist ( userId,userName,
+		loginIP)
+		values (#{userId},#{userName},
+		#{loginIP})
+	</insert>
+
+	
+</mapper>

+ 131 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/wifi.sql.xml

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.wifiSqlMapper">
+	<sql id="base_column">
+		t_wifi.id as id,
+		t_wifi.name as name,
+		t_wifi.SSID as SSID,
+		t_wifi.location as location,
+		t_wifi.apmac as apmac,
+		t_wifi.address as address,
+		t_wifi.longitude as longitude,
+		t_wifi.latitude as latitude,
+		t_wifi.place as place,
+		t_wifi.place_id as placeId,
+		t_wifi.operator_id as operatorId,
+		t_wifi.status as status,
+		t_wifi.updated as updated
+	</sql>
+	
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(w.id) from t_wifi w, t_location l
+		<where>
+			w.location = l.location and w.status != -1 and w.operator_id = #{operatorId}
+			<if test="cn != null">
+				and l.cn = #{cn}
+			</if> 
+			<if test="cnCity != null">
+				and l.cn_city = #{cnCity}
+			</if>
+			<if test="placeId != null">
+				and w.place_id = #{placeId}
+			</if>
+			<if test="place != null">
+				and w.place = #{place}
+			</if>
+			<if test="searchValue != null">
+				and (w.address like #{searchValue} or w.name like #{searchValue})
+			</if>
+		</where> 
+	</select>
+	
+	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.operator.model.Wifi">
+		select 
+		<include refid="base_column" />, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName
+		from t_wifi, t_location, t_place
+		<where>
+			t_wifi.location = t_location.location and t_wifi.place_id = t_place.id
+			and t_wifi.status != -1 and t_wifi.operator_id = #{operatorId}
+			<if test="cn != null">
+				and t_location.cn = #{cn}
+			</if> 
+			<if test="cnCity != null">
+				and t_location.cn_city = #{cnCity}
+			</if>
+			<if test="placeId != null">
+				and t_wifi.place_id = #{placeId}
+			</if>
+			<if test="place != null">
+				and t_wifi.place = #{place}
+			</if>
+			<if test="searchValue != null">
+				and (t_wifi.address like #{searchValue} or t_wifi.name like #{searchValue})
+			</if>
+		</where> 
+		limit #{pager.offset}, #{pager.limit}
+	</select>
+	
+	<select id="findByParams1" parameterType="map" resultType="com.cloudcross.ssp.operator.model.Wifi">
+		select 
+		<include refid="base_column" />, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName
+		from t_wifi, t_location, t_place
+		<where>
+			t_wifi.location = t_location.location and t_wifi.place_id = t_place.id
+			and t_wifi.status != -1 and t_wifi.operator_id = #{operatorId}
+			<if test="cn != null">
+				and t_location.cn = #{cn}
+			</if> 
+			<if test="cnCity != null">
+				and t_location.cn_city = #{cnCity}
+			</if>
+			<if test="placeId != null">
+				and t_wifi.place_id = #{placeId}
+			</if>
+			<if test="place != null">
+				and t_wifi.place = #{place}
+			</if>
+			<if test="searchValue != null">
+				and (t_wifi.address like #{searchValue} or t_wifi.name like #{searchValue})
+			</if>
+		</where> 
+	</select>
+	
+	
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.operator.model.Wifi">
+		select 
+		<include refid="base_column" />, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName
+		from t_wifi, t_location, t_place
+		<where>
+			t_wifi.location = t_location.location and t_wifi.place_id = t_place.id
+			and t_wifi.status != -1 and t_wifi.id = #{id}
+		</where>
+	</select>
+	
+	<update id="updateWifiStatus" parameterType="HashMap">
+		update t_wifi
+		set status=#{status},updated = #{updated}
+		where id in
+		<foreach item="id" collection="idList" open="(" separator=","
+			close=")">
+			#{id}
+		</foreach>
+	</update>
+	
+	<update id="editWifi" parameterType="com.cloudcross.ssp.operator.model.Wifi">
+		update t_wifi set name = #{name},
+		location = #{location},
+		address = #{address},
+		longitude = #{longitude},
+		latitude = #{latitude},
+		apmac = #{apmac},
+		place = #{place},
+		place_id = #{placeId}
+		where id = #{id}
+	</update>
+	
+	<insert id="add" parameterType="com.cloudcross.ssp.operator.model.Wifi" useGeneratedKeys="true" keyProperty="id">
+		insert into t_wifi(name, SSID, location, apmac, address, longitude, latitude, place, place_id, operator_id, updated)
+		values(#{name}, #{SSID}, #{location}, #{apmac}, #{address}, #{longitude}, #{latitude}, #{place}, #{placeId}, #{operatorId}, #{updated})
+	</insert>
+	
+</mapper>

+ 34 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/zone-domain.sql.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.zoneDomainSqlMapper">
+	<sql id="base_column">
+		id,zone_id as zoneId,domain,status
+	</sql>
+
+	<insert id="addZoneDomain" parameterType="com.cloudcross.ssp.operator.model.ZoneDomain" >
+		insert into t_zone_domain(zone_id ,domain,supdated,status)
+		values(#{zoneId},#{domain},#{supdated},#{status})
+	</insert>
+	
+	
+	<select id="findAllDomain" parameterType="long" resultType="com.cloudcross.ssp.operator.model.ZoneDomain">
+		select <include refid="base_column"/> from t_zone_domain where zone_id = #{zoneId} and t_zone_domain.status = 0
+	</select>
+	
+	<update id="deleteZoneDomain" parameterType="com.cloudcross.ssp.operator.model.Zone">
+		update t_zone_domain set status=-1,supdated=#{supdated} where zone_id = #{id}
+	</update>
+	
+	<update id="editZoneDomain" parameterType="com.cloudcross.ssp.operator.model.ZoneDomain">
+		update t_zone_domain set  domain=#{domain} where zone_id = #{zone_id}
+	</update>
+	
+	<select id="selectById"  parameterType="int" resultType="com.cloudcross.ssp.operator.model.ZoneDomain">
+		select <include refid="base_column" /> from t_zone_domain 
+	<where> zone_id = #{id} 
+		and
+		t_zone_domain.status = 0
+	</where>
+	</select>
+	
+</mapper>

+ 29 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/zone-industry.sql.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.zoneIndustrySqlMapper">
+	<sql id="base_column">
+		id,zone_id as zoneId,industry_id as industryId,status,supdated
+	</sql>
+
+	<insert id="addZoneIndustry" parameterType="com.cloudcross.ssp.operator.model.ZoneIndustry">
+		insert into t_zone_industry (zone_id,industry_id,supdated,status)
+		values (#{zoneId},#{industryId},#{supdated},#{status})
+	</insert>
+	
+	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.operator.model.ZoneIndustry">
+		select <include refid="base_column"/> from t_zone_industry where zone_id = #{zoneId} and t_zone_industry.status = 0
+	</select>
+	
+	<update id="editZoneIndustry" parameterType="com.cloudcross.ssp.operator.model.ZoneIndustry">
+		update t_zone_industry
+		set  zone_id=#{zoneId},industry_id=#{industryId},status=0;
+		where zone_id = #{zoneId}
+			
+	</update>
+	<update id="deleteZoneIndustry" parameterType="com.cloudcross.ssp.operator.model.Zone">
+		
+		update t_zone_industry
+		set status=-1,supdated=#{supdated} 
+		where zone_id = #{id}
+	</update>	
+</mapper>

+ 199 - 0
src/main/java/com/cloudcross/ssp/operator/model/mapper/zone.sql.xml

@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="operator.zoneSqlMapper">
+	
+	<sql id="base_column">
+		t_zone.id as id,
+		operator_id ,
+		t_zone.name as name,
+		width,
+		height,
+		device,
+		position,
+		status,
+		updated,
+		supdated,
+		default_path,
+		default_url,
+		recheck,
+		default_path_small
+	</sql>	
+	<select id="findZone" parameterType="int" resultType="com.cloudcross.ssp.operator.model.Zone">
+		select * from t_zone where id=#{zoneId}
+	</select>
+	
+	 <select id="selectById"  parameterType="int" resultType="com.cloudcross.ssp.operator.model.Zone">
+		select *
+		from t_zone 
+		<where>
+			t_zone.id = #{id}
+		</where>
+		order by t_zone.id  desc
+	</select> 		
+	<select id="findByName"  parameterType="string" resultType="long">
+		select t_zone.id from t_zone 
+	<where> name = #{name} </where>
+	</select>
+	<resultMap id="zoneResult" type="com.cloudcross.ssp.operator.model.Zone">
+		<id property="id" column="id" />
+		<result property="operator_id" column="operator_id" />
+		<result property="name" column="name" />
+		<result property="width" column="width" />
+		<result property="height" column="height" />
+		<result property="device" column="device" />
+		<result property="position" column="position" />
+		<result property="status" column="status" />
+		<result property="updated" column="updated" />
+		<result property="supdated" column="supdated" />
+	</resultMap> 
+	
+	<select id="selectByParams"  parameterType="map" resultMap="zoneResult">
+		select 
+		<include refid="base_column" />
+		from t_zone 
+		where t_zone.status != -1
+		
+		<if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='name'">
+					and t_zone.name like #{value}
+				</when>
+				<when test="key=='id'">
+					and t_zone.id like #{value}
+				</when>
+			</choose>	
+		</if>
+		<if test="status != null">
+				and status like #{status}
+		</if>		
+		<if test="device != null">
+				and device like #{device}
+		</if>
+		<if test="position != null">
+				and position like #{position}
+		</if>	
+		<if test="height != null">
+				and height like #{height}
+		</if>
+		<if test="width != null">
+				and width like #{width}
+		</if>
+		<if test="operatorId != null">
+				and operator_id = #{operatorId}
+		</if>	
+		
+		order by  t_zone.id   desc
+		limit #{pager.offset}, #{pager.limit}
+	</select>		
+	<select id="countByParams" parameterType="map" resultType="int">
+		select count(t_zone.id)
+		from t_zone 
+		where t_zone.status != -1	
+		
+			 <if test="key!=null and value!=null">
+			<choose>
+				<when test="key=='id'">
+					and t_zone.id like #{value}
+				</when>
+				<when test="key=='name'">
+					and t_zone.name = #{value}
+				</when>
+			</choose>	
+		</if>
+		<if test="status != null">
+				and status like #{status}
+		</if>		
+		<if test="device != null">
+				and device like #{device}
+		</if>	
+		<if test="position != null">
+				and position like #{position}
+		</if>
+		<if test="height != null">
+				and height like #{height}
+		</if>
+		<if test="width != null">
+				and width like #{width}
+		</if>
+		<if test="operatorId != null">
+				and operator_id = #{operatorId}
+		</if>	
+	</select>
+		
+	<insert id="addZone" parameterType="com.cloudcross.ssp.operator.model.Zone" useGeneratedKeys="true"
+		keyProperty="id">
+		insert into t_zone(operator_id,name,device,position,width,height,recheck,updated,supdated,default_path,default_url,default_path_small)
+		values(#{operator_id},#{name},#{device},#{position},#{width},#{height},#{recheck},#{updated},#{supdated},#{default_path},#{default_url},#{default_path_small})
+		
+	
+	</insert>
+	
+	<update id="editZone" parameterType="com.cloudcross.ssp.operator.model.Zone">
+		update t_zone 
+		set  name=#{name},device=#{device},position=#{position}, width=#{width}, height=#{height},default_path=#{default_path},default_path_small=#{default_path_small},default_url=#{default_url},recheck=#{recheck},updated=#{updated},supdated=#{supdated}
+		where id = #{id}
+			
+	</update>
+	
+	<update id="updateZoneStatus" parameterType="HashMap">
+		update t_zone
+			set status = #{status},updated = #{updated}
+			where id in
+			<foreach item="id" collection="zoneIdList"
+		      open="(" separator="," close=")">
+		        #{id}
+			</foreach>
+	</update>
+
+	<delete id="deleteById" parameterType="int">
+		delete 
+		from t_zone
+		<where>
+		id = #{id} 
+		</where>
+	</delete>
+	
+	
+	
+	
+	<!-- 
+	<select id="findByDeviceAndPlaceId" parameterType="map" resultType="zone">
+		select t_zone.id,t_zone.name
+		 from t_zone 
+		 <where>
+		 	<if test="zoneDevice != null">
+		 		1=1 and t_zone.device = #{zoneDevice}
+		 	</if>
+		 	<if test="zonePlaceIdList != null">
+		 		and t_zone.id in (
+		 		select t_zone_place.zone_id from t_zone_place where place_id in
+		 		<foreach item="placeId" collection="zonePlaceIdList"  open="(" separator="," close=")">
+		 			#{placeId}
+		 		</foreach>
+		 		)
+		 	</if>
+		 </where>
+	</select>
+	 -->
+	<!-- 广告位排期按在投广告位ID和日期查找 -->
+	
+     <select id="findAdgroupNameByZoneIdAndSchedule" resultType="string" parameterType="map">
+       select t.name from t_adgroup t 
+       where 
+       t.id in (select az.adgroup_id from t_adgroup_zone az where az.zone_id = #{zoneId}) 
+       and
+       t.id in (select ac.adgroup_id from t_adgroup_schedule ac where ac.startdate &lt;= #{date}  and #{date} &lt;= ac.enddate)
+     </select>
+	
+	<!-- 首页中查找设备,暂时只有PC和MoBile -->
+     <select id="findByDevice" resultType="com.cloudcross.ssp.operator.model.Zone" parameterType="int">
+           select id,name from t_zone
+         <where> device = #{device} </where>
+           order by t_zone.id desc 
+      </select>
+      
+      <!-- add by Wanfu for banner-audit -->
+      <select id="findByOperatorId" resultType="com.cloudcross.ssp.operator.model.Zone" parameterType="int">
+           select * from t_zone where operator_id = #{operatorId} and recheck = 1 and status=0
+      </select>
+</mapper>

+ 34 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAccountService.java

@@ -0,0 +1,34 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.HashMap;
+import java.util.List;
+
+import com.cloudcross.ssp.base.service.BaseService;
+import com.cloudcross.ssp.operator.model.Account;
+import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;
+
+
+
+public interface IAccountService extends BaseService<Account>{
+	public Account querySingleAccount(String accountName);
+	public Account isExist(String accountName);
+	/**
+	 * 验证用户登陆
+	 * @author lanyuan
+	 * Email:mmm333zzz520@163.com
+	 * date:2014-2-25
+	 * @param Account account
+	 * @return
+	 */
+	public boolean addAccount(Account account);
+	public Account countAccount(Account account);
+	/**
+	 * @param account
+	 * @param pageView
+	 * @return
+	 */
+	public PageView queryNoMatch(Account account,PageView pageView);
+	public boolean updateState(List<Long> idList, int status);
+	public boolean editAccount(Account t);
+	public List<Account> findExcelAccounts(HashMap<String, Object> paramMap);
+}

+ 12 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAclsService.java

@@ -0,0 +1,12 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.Acls;
+
+public interface IAclsService extends IGenericService<Acls> {
+	boolean deleteByBannerId(Long id);
+	
+ 	boolean deleteBatch (List<Long> lists,String type);
+}

+ 13 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAdGroupPlaceService.java

@@ -0,0 +1,13 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.AdGroupPlace;
+
+public interface IAdGroupPlaceService extends IGenericService<AdGroupPlace>{
+	public List<AdGroupPlace> findAll(Long id);
+	public boolean delete(Long adGroupId);
+	//根据投放id查找所有的场景id
+	List<AdGroupPlace> findAllByAdGroupId(Long adGroupId);
+}

+ 17 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAdGroupScheduleService.java

@@ -0,0 +1,17 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.AdGroupSchedule;
+
+
+/**
+ * 投放的排期表服务接口定义
+ * @author chenyou
+ *
+ */
+public interface IAdGroupScheduleService extends IGenericService<AdGroupSchedule> {
+	boolean batchAdd(List<AdGroupSchedule> scheduleList);
+	boolean deleteByAdGroupId(Long adGroupId);
+}

+ 35 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAdGroupService.java

@@ -0,0 +1,35 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.AdGroup;
+
+
+/**
+ * 投放服务接口定义
+ * @author chenyou
+ *
+ */
+public interface IAdGroupService extends IGenericService<AdGroup> {
+	//更具活动id得到它有几个投放
+	List<AdGroup> findByCampaignId(Long campaignId);
+	
+	/**
+	 * 新增投放信息
+	 * @param adGroup
+	 * @param targetParamsMap
+	 * @return 
+	 */
+	boolean save(AdGroup adGroup, Map<String, Object> targetParamsMap);
+	
+	/**
+	 * 编辑投放信息
+	 * @param adGroup
+	 * @param targetParamsMap
+	 * @return
+	 */
+	boolean edit(AdGroup adGroup,Map<String, Object> targetParamsMap);
+	public void front2dbplace(String str,AdGroup adGroup);
+}

+ 18 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAdGroupZoneService.java

@@ -0,0 +1,18 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.AdGroupZone;
+
+/**
+ * 投放与广告位关联服务接口定义
+ * @author chenyou
+ *
+ */
+public interface IAdGroupZoneService extends IGenericService<AdGroupZone> {
+	//根据投放id删除投放和广告位对应的信息
+	boolean deleteByAdGroupId(Long adGroupId);
+	//根据投放id找到所有的广告位id,并且得到的这个集合要按广告位id升序排序
+	List<AdGroupZone> findAllByAdGroupId(Long adGroupId);
+}

+ 77 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAdReportService.java

@@ -0,0 +1,77 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.common.utils.Pager;
+import com.cloudcross.ssp.operator.model.DeliverAnalysis;
+
+
+/**
+ * 报表服务
+ * @author colin
+ *
+ */
+public interface IAdReportService extends IGenericService<DeliverAnalysis> {
+	
+	int findCountForDeliverEffectAnalysis(Map<String, Object> paramMap);
+
+	List<DeliverAnalysis> findDeliverEffectAnalysis(
+			Map<String, Object> paramMap, Pager pager);
+	List<DeliverAnalysis> findDeliverEffectAnalysis(
+			Map<String, Object> paramMap);
+	
+	int countBySize(Map<String, Object> paramMap);
+	List<DeliverAnalysis> findBySize(
+			Map<String, Object> paramMap, Pager pager);
+	List<DeliverAnalysis> findBySize(
+			Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByPosition(
+			Map<String, Object> paramMap);
+	
+	int countBySystem(Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findBySystem(
+			Map<String, Object> paramMap, Pager pager);
+	
+	List<DeliverAnalysis> findBySystem(
+			Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByDevice(
+			Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByArealCity(
+			Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByAreal(
+			Map<String, Object> paramMap);
+	
+	int countByPlace(Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByPlace(
+			Map<String, Object> paramMap, Pager pager);
+	
+	List<DeliverAnalysis> findByPlace(
+			Map<String, Object> paramMap);
+	
+	int countByApmac(Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByApmac(
+			Map<String, Object> paramMap, Pager pager);
+	
+	List<DeliverAnalysis> findByApmac(
+			Map<String, Object> paramMap);
+	
+	int countByAllAreal(Map<String, Object> paramMap);
+	
+	List<DeliverAnalysis> findByAllAreal(
+			Map<String, Object> paramMap, Pager pager);
+	
+	 //根据查询条件查询总的pv,uv,曝光数等等
+    DeliverAnalysis findSum(Map<String, Object> paramMap);
+    
+    List<DeliverAnalysis> findAllArea(Map<String, Object> paramMap);
+	
+}

+ 18 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAdvertiserService.java

@@ -0,0 +1,18 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.Advertiser;
+
+public interface IAdvertiserService extends IGenericService<Advertiser>{
+	
+	//用状态和搜索条件查找广告主
+	public int countByStatus(Map<String, Object> paramMap);
+	
+	public List<Advertiser> findByStatus(Map<String, Object> paramMap);
+
+	public long findByName(String name);
+	
+}

+ 20 - 0
src/main/java/com/cloudcross/ssp/operator/service/IAuditService.java

@@ -0,0 +1,20 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.operator.model.Audit;
+
+public interface IAuditService extends IGenericService<Audit>{
+	
+	//用状态和搜索条件查找广告主
+	public int countByStatus(Map<String, Object> paramMap);
+	
+	public List<Audit> findByStatus(Map<String, Object> paramMap);
+
+	public long findByName(String name);
+	
+	
+	
+}

+ 25 - 0
src/main/java/com/cloudcross/ssp/operator/service/IBannerService.java

@@ -0,0 +1,25 @@
+package com.cloudcross.ssp.operator.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloudcross.ssp.base.service.IGenericService;
+import com.cloudcross.ssp.common.utils.Pager;
+import com.cloudcross.ssp.operator.model.Banner;
+
+/**
+ * 投放活动对应创意表的服务接口
+ * @author wanfu
+ *
+ */
+public interface IBannerService extends IGenericService<Banner> {
+	//定义根据运营商id,搜索框的值,计算素材个数的方法
+	int countByOperatorIdandParams(Long operatorId,Map<String, Object> paramMap);
+	//定义根据运营商id,搜索框的值,和相应的页码 返回素材列表的方法
+	List<Banner> findByOperatorIdandParams(Long operatorId,Map<String, Object> paramMap, Pager pager);
+	//新增素材审核
+	boolean addOperatorBanner(Long bannerId,int status,Long operatorId);
+	//更新素材审核
+	boolean updataOperatorBanner(Long bannerId,int status,Long operatorId);
+
+}

Some files were not shown because too many files changed in this diff