Browse Source

删除以前的service

Signed-off-by: you.chen <you.chen@cloudcross.com>
you.chen 10 years ago
parent
commit
1ede907723
100 changed files with 0 additions and 9419 deletions
  1. 0 173
      src/main/java/com/cloudcross/ssp/advertiser/model/Account.java
  2. 0 33
      src/main/java/com/cloudcross/ssp/advertiser/model/AccountResources.java
  3. 0 67
      src/main/java/com/cloudcross/ssp/advertiser/model/Acls.java
  4. 0 336
      src/main/java/com/cloudcross/ssp/advertiser/model/AdGroup.java
  5. 0 41
      src/main/java/com/cloudcross/ssp/advertiser/model/AdGroupPlace.java
  6. 0 108
      src/main/java/com/cloudcross/ssp/advertiser/model/AdGroupSchedule.java
  7. 0 119
      src/main/java/com/cloudcross/ssp/advertiser/model/AdvAgent.java
  8. 0 178
      src/main/java/com/cloudcross/ssp/advertiser/model/AdvBalance.java
  9. 0 230
      src/main/java/com/cloudcross/ssp/advertiser/model/Advertiser.java
  10. 0 136
      src/main/java/com/cloudcross/ssp/advertiser/model/Banner.java
  11. 0 110
      src/main/java/com/cloudcross/ssp/advertiser/model/BannerTemplate.java
  12. 0 245
      src/main/java/com/cloudcross/ssp/advertiser/model/Campaign.java
  13. 0 109
      src/main/java/com/cloudcross/ssp/advertiser/model/CodeClass.java
  14. 0 106
      src/main/java/com/cloudcross/ssp/advertiser/model/CodeConvert.java
  15. 0 78
      src/main/java/com/cloudcross/ssp/advertiser/model/CodeSite.java
  16. 0 51
      src/main/java/com/cloudcross/ssp/advertiser/model/DayParting.java
  17. 0 439
      src/main/java/com/cloudcross/ssp/advertiser/model/DeliverAnalysis.java
  18. 0 50
      src/main/java/com/cloudcross/ssp/advertiser/model/Dimension.java
  19. 0 60
      src/main/java/com/cloudcross/ssp/advertiser/model/Direct.java
  20. 0 177
      src/main/java/com/cloudcross/ssp/advertiser/model/Finance.java
  21. 0 39
      src/main/java/com/cloudcross/ssp/advertiser/model/Industry.java
  22. 0 128
      src/main/java/com/cloudcross/ssp/advertiser/model/Location.java
  23. 0 121
      src/main/java/com/cloudcross/ssp/advertiser/model/Log.java
  24. 0 57
      src/main/java/com/cloudcross/ssp/advertiser/model/Message.java
  25. 0 93
      src/main/java/com/cloudcross/ssp/advertiser/model/Operator.java
  26. 0 163
      src/main/java/com/cloudcross/ssp/advertiser/model/Order.java
  27. 0 44
      src/main/java/com/cloudcross/ssp/advertiser/model/Params.java
  28. 0 29
      src/main/java/com/cloudcross/ssp/advertiser/model/Place.java
  29. 0 107
      src/main/java/com/cloudcross/ssp/advertiser/model/Resources.java
  30. 0 20
      src/main/java/com/cloudcross/ssp/advertiser/model/ResourcesRole.java
  31. 0 23
      src/main/java/com/cloudcross/ssp/advertiser/model/RoleAccount.java
  32. 0 67
      src/main/java/com/cloudcross/ssp/advertiser/model/Roles.java
  33. 0 187
      src/main/java/com/cloudcross/ssp/advertiser/model/RptAdvertiserHour.java
  34. 0 154
      src/main/java/com/cloudcross/ssp/advertiser/model/RptZone.java
  35. 0 39
      src/main/java/com/cloudcross/ssp/advertiser/model/Size.java
  36. 0 155
      src/main/java/com/cloudcross/ssp/advertiser/model/User.java
  37. 0 45
      src/main/java/com/cloudcross/ssp/advertiser/model/UserGroup.java
  38. 0 58
      src/main/java/com/cloudcross/ssp/advertiser/model/UserLogin.java
  39. 0 53
      src/main/java/com/cloudcross/ssp/advertiser/model/Wifi.java
  40. 0 270
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/account.sql.xml
  41. 0 47
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/acls.sql.xml
  42. 0 325
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/ad-group.sql.xml
  43. 0 41
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/adgroup-place.sql.xml
  44. 0 27
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/adgroup-schedule.sql.xml
  45. 0 171
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/adv-balance.sql.xml
  46. 0 100
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/advAgent.sql.xml
  47. 0 201
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/advertiser.sql.xml
  48. 0 236
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/banner-template.sql.xml
  49. 0 333
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/banner.sql.xml
  50. 0 226
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/campaign.sql.xml
  51. 0 114
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/codeClass.sql.xml
  52. 0 119
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/codeConvert.sql.xml
  53. 0 62
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/codeSite.sql.xml
  54. 0 107
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/dimension.sql.xml
  55. 0 42
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/direct.sql.xml
  56. 0 96
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/finance.sql.xml
  57. 0 25
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/industry.sql.xml
  58. 0 40
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/location.sql.xml
  59. 0 85
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/log.sql.xml
  60. 0 82
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/message.sql.xml
  61. 0 69
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/operator.sql.xml
  62. 0 182
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/order.sql.xml
  63. 0 21
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/place.sql.xml
  64. 0 693
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/report.sql.xml
  65. 0 170
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/resources.sql.xml
  66. 0 92
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/roles.sql.xml
  67. 0 23
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/rpt-advertiser-hour.sql.xml
  68. 0 12
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/rpt-zone.sql.xml
  69. 0 32
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/size.sql.xml
  70. 0 25
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/user-group.sql.xml
  71. 0 123
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/user.sql.xml
  72. 0 46
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/userLogin.sql.xml
  73. 0 85
      src/main/java/com/cloudcross/ssp/advertiser/model/mapper/wifi.sql.xml
  74. 0 34
      src/main/java/com/cloudcross/ssp/advertiser/service/IAccountService.java
  75. 0 12
      src/main/java/com/cloudcross/ssp/advertiser/service/IAclsService.java
  76. 0 14
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdGroupPlaceService.java
  77. 0 17
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdGroupScheduleService.java
  78. 0 50
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdGroupService.java
  79. 0 71
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdReportService.java
  80. 0 8
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdvAgentService.java
  81. 0 22
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdvBalanceService.java
  82. 0 43
      src/main/java/com/cloudcross/ssp/advertiser/service/IAdvertiserService.java
  83. 0 36
      src/main/java/com/cloudcross/ssp/advertiser/service/IBannerService.java
  84. 0 38
      src/main/java/com/cloudcross/ssp/advertiser/service/IBannerTemplateService.java
  85. 0 28
      src/main/java/com/cloudcross/ssp/advertiser/service/ICampaignService.java
  86. 0 17
      src/main/java/com/cloudcross/ssp/advertiser/service/ICodeClassService.java
  87. 0 17
      src/main/java/com/cloudcross/ssp/advertiser/service/ICodeConvertService.java
  88. 0 18
      src/main/java/com/cloudcross/ssp/advertiser/service/ICodeSiteService.java
  89. 0 22
      src/main/java/com/cloudcross/ssp/advertiser/service/IDimensionService.java
  90. 0 12
      src/main/java/com/cloudcross/ssp/advertiser/service/IDirectService.java
  91. 0 11
      src/main/java/com/cloudcross/ssp/advertiser/service/IFinanceService.java
  92. 0 11
      src/main/java/com/cloudcross/ssp/advertiser/service/IIndustryService.java
  93. 0 15
      src/main/java/com/cloudcross/ssp/advertiser/service/ILocationService.java
  94. 0 40
      src/main/java/com/cloudcross/ssp/advertiser/service/ILogService.java
  95. 0 25
      src/main/java/com/cloudcross/ssp/advertiser/service/IMessageService.java
  96. 0 7
      src/main/java/com/cloudcross/ssp/advertiser/service/IOperatorService.java
  97. 0 37
      src/main/java/com/cloudcross/ssp/advertiser/service/IOrderService.java
  98. 0 12
      src/main/java/com/cloudcross/ssp/advertiser/service/IPlaceService.java
  99. 0 36
      src/main/java/com/cloudcross/ssp/advertiser/service/IResourcesService.java
  100. 0 16
      src/main/java/com/cloudcross/ssp/advertiser/service/IRolesService.java

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

@@ -1,173 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	}
-
-}

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

@@ -1,33 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	}
-}

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

@@ -1,67 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-//luohongyu对应数据库里面的表t_acls
-public class Acls {
-	private Long bannerId;
-	private String logical;
-	private Integer 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 Integer getType() {
-		return type;
-	}
-
-	public void setType(Integer 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;
-	}
-}

+ 0 - 336
src/main/java/com/cloudcross/ssp/advertiser/model/AdGroup.java

@@ -1,336 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 agentId;
-	//广告主id
-	private Long advertiserId;
-	//订单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 position;
-	//点击找回
-	private Integer retarget;
-	//访客投放期
-	private Long period;
-	//状态
-	private Integer status;
-	//更新时间
-	private Date updated;
-	//这个活动的创意总数
-	private Integer bannerNumber;
-	//是否全客网站
-	private Integer site;
-	
-	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 Integer getSite() {
-		return site;
-	}
-
-	public void setSite(Integer site) {
-		this.site = site;
-	}
-
-	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 getPosition() {
-		return position;
-	}
-
-	public void setPosition(String position) {
-		this.position = position;
-	}
-
-	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 + ", agentId=" + agentId + ", advertiserId="
-				+ advertiserId + ", orderId=" + orderId + ", campaignId="
-				+ campaignId + ", adGroupName=" + adGroupName + ", startDate="
-				+ startDate + ", endDate=" + endDate + ", totalBudget="
-				+ totalBudget + ", mode=" + mode + ", price=" + price
-				+ ", dailyBudget=" + dailyBudget + ", maxImpression="
-				+ maxImpression + ", maxClick=" + maxClick + ", maxConversion="
-				+ maxConversion + ", dailyMaxImpression=" + dailyMaxImpression
-				+ ", dailyMaxClick=" + dailyMaxClick + ", dailyMaxConversion="
-				+ dailyMaxConversion + ", perImpressionType="
-				+ perImpressionType + ", perImpression=" + perImpression
-				+ ", perClickType=" + perClickType + ", perClick=" + perClick
-				+ ", position=" + position + ", retarget=" + retarget
-				+ ", period=" + period + ", status=" + status + ", updated="
-				+ updated + ", bannerNumber=" + bannerNumber + ", site=" + site
-				+ "]";
-	}
-
-	@Override
-	public String getLabel() {
-		return this.adGroupName;
-	}
-
-	@Override
-	public String getValue() {
-		return String.valueOf(this.id);
-	}
-	
-}

+ 0 - 41
src/main/java/com/cloudcross/ssp/advertiser/model/AdGroupPlace.java

@@ -1,41 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-/**
- * 场景与投放管理关联表,对应数据库里面的表t_adgroup_place
- * @author luohongyu
- */
-
-public class AdGroupPlace {
-	private Long id;
-	private Long adGroupId;
-	private Long placeId;
-	private Date supdated;
-	
-		
-	public Date getSupdated() {
-		return supdated;
-	}
-	public void setSupdated(Date supdated) {
-		this.supdated = supdated;
-	}
-	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;
-	}
-}

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

@@ -1,108 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	}
-	  
-	
-	  
-	  
-	  
-	
-	
-	
-}

+ 0 - 119
src/main/java/com/cloudcross/ssp/advertiser/model/AdvAgent.java

@@ -1,119 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-import com.cloudcross.ssp.web.widget.SelectorController.ISelector;
-
-public class AdvAgent implements ISelector{
-	private Long id;
-	private String name;
-	private String contacts;
-	private String tel;
-	private String mobile;
-	private String homePage;
-	private String address;
-	private String zip;
-	private String email;
-	private String title;
-	private Long adminId;
-	private Integer status;
-	private Date updated;
-	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 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 getMobile() {
-		return mobile;
-	}
-	public void setMobile(String mobile) {
-		this.mobile = mobile;
-	}
-	public String getHomePage() {
-		return homePage;
-	}
-	public void setHomePage(String homePage) {
-		this.homePage = homePage;
-	}
-	public String getAddress() {
-		return address;
-	}
-	public void setAddress(String address) {
-		this.address = address;
-	}
-	public String getZip() {
-		return zip;
-	}
-	public void setZip(String zip) {
-		this.zip = zip;
-	}
-	public String getEmail() {
-		return email;
-	}
-	public void setEmail(String email) {
-		this.email = email;
-	}
-	public String getTitle() {
-		return title;
-	}
-	public void setTitle(String title) {
-		this.title = title;
-	}
-	public Long getAdminId() {
-		return adminId;
-	}
-	public void setAdminId(Long admin_id) {
-		this.adminId = admin_id;
-	}
-	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 "AdvAgent [id=" + id + ", name=" + name + ", regName=" + 
-				 ", contacts=" + contacts + ", tel=" + tel + ", mobile="
-				+ mobile + ", homePage=" + homePage + ", address=" + address
-				+ ", zip=" + zip + ", email=" + email + ", title=" + title
-				+ ", admin_id="  + ", status=" + status
-				+ ", updated=" + updated + "]";
-	}
-	@Override
-	public String getLabel() {
-		// TODO Auto-generated method stub
-		return this.name;
-	}
-	@Override
-	public String getValue() {
-		// TODO Auto-generated method stub
-		return this.id.toString();
-	}
-
-}

+ 0 - 178
src/main/java/com/cloudcross/ssp/advertiser/model/AdvBalance.java

@@ -1,178 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-import java.util.Date;
-public class AdvBalance {
-	private Long id;
-	private Long accountId;
-	private Long agentId;
-	private Long advertiserId;
-	private String advertiserName;
-	private String agentName;
-	private Date actTime;
-	private String startDate;
-	private String endDate;
-	private String num;
-	private String type;
-	private Double balance;
-	private Double cash;
-	private Double charge;
-	private Double allocate;
-	private Double consume;
-	private String memo;
-	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 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 String getAdvertiserName() {
-		return advertiserName;
-	}
-	public void setAdvertiserName(String advertiserName) {
-		this.advertiserName = advertiserName;
-	}
-	public String getAgentName() {
-		return agentName;
-	}
-	public void setAgentName(String agentName) {
-		this.agentName = agentName;
-	}
-	public Date getActTime() {
-		return actTime;
-	}
-	public void setActTime(Date actTime) {
-		this.actTime = actTime;
-	}
-	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 getNum() {
-		return num;
-	}
-	public void setNum(String num) {
-		this.num = num;
-	}
-	
-	public String getType() {
-		if   ( charge > 0)  {
-		return "充值";
-		}
-		else if ( allocate > 0) {
-		return "分配";
-		}
-		else if( consume > 0)	{
-		return "消费";
-		}
-		else 
-		return "未知";	
-	}
-	
-	public void setType(String type) {
-		if  ( charge > 0)  { 
-		    this.type = "充值";
-		    }
-		else if  ( allocate > 0)  { 
-			this.type = "分配";
-			}
-		else if ( consume > 0)  { 
-			this.type = "消费";
-			}
-		else  
-			this.type = "未知";
-			
-	}
-	public Double getCash() {
-		if   ( charge > 0)  {
-			return charge;
-			}
-			else if ( allocate > 0) {
-			return allocate;
-			}
-			else if( consume > 0)	{
-			return consume;
-			}
-			else 
-			return null;	
-	}
-	public void setCash(Double cash) {
-		if  ( charge > 0)  { 
-		    this.cash = charge;
-		    }
-		else if  ( allocate > 0)  { 
-			this.cash = allocate;
-			}
-		else if ( consume > 0)  { 
-			this.cash = consume;
-			}
-		else  
-			this.type = null;
-	}
-	public Double getBalance() {
-		return balance;
-	}
-	public void setBalance(Double balance) {
-		this.balance = balance;
-	}
-	public Double getCharge() {
-		return charge;
-	}
-	public void setCharge(Double charge) {
-		this.charge = charge;
-	}
-	public Double getAllocate() {
-		return allocate;
-	}
-	public void setAllocate(Double allocate) {
-		this.allocate = allocate;
-	}
-	public Double getConsume() {
-		return consume;
-	}
-	public void setConsume(Double consume) {
-		this.consume = consume;
-	}
-	public String getMemo() {
-		return memo;
-	}
-	public void setMemo(String memo) {
-		this.memo = memo;
-	}
-	@Override
-	public String toString() {
-		return "AdvBalance [id=" + id + ", accountId=" + accountId
-				+ ", agentId=" + agentId + ", advertiserId=" + advertiserId
-				+ ", advertiserName=" + advertiserName + ", agentName="
-				+ agentName + ", actTime=" + actTime + ", startDate="
-				+ startDate + ", endDate=" + endDate + ", num=" + num
-				+ ", type=" + type + ", balance=" + balance + ", cash=" + cash
-				+ ", charge=" + charge + ", allocate=" + allocate
-				+ ", consume=" + consume + ", memo=" + memo + "]";
-	}
-	
-}

+ 0 - 230
src/main/java/com/cloudcross/ssp/advertiser/model/Advertiser.java

@@ -1,230 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 agentId;
-	//行业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 Float balance;
-	//状态
-	private Integer status;
-	//最后更新日期
-	private Date updated;
-	//备注
-	private String memo; 
-	//CPI文件路径
-	private String cpiPath; 
-	//营业执照路径
-	private String licencePath; 
-	//法人代表身份证路径
-	private String idPath; 
-	//企业机构代码证
-	private String orgPath; 
-	//审核人账号id(t_account.id)
-	private Long checkAccount; 
-	//审核状态(0未审核,1审核通过,-1审核未通过)
-	private Integer checkStatus; 
-	//审核备注
-	private String checkMemo; 
-	//管理员账号Id
-	private Long adminId;
-	/*
-	 *下面两个字段是为了在页面显示的时候方便,从数据库中直接联合查询就可以找到数据 
-	 */
-	
-	
-	
-	public String getCpiPath() {
-		return cpiPath;
-	}
-	public Long getAdminId() {
-		return adminId;
-	}
-	public void setAdminId(Long adminId) {
-		this.adminId = adminId;
-	}
-	public void setCpiPath(String cpiPath) {
-		this.cpiPath = cpiPath;
-	}
-	public String getLicencePath() {
-		return licencePath;
-	}
-	public void setLicencePath(String licencePath) {
-		this.licencePath = licencePath;
-	}
-	public String getIdPath() {
-		return idPath;
-	}
-	public void setIdPath(String idPath) {
-		this.idPath = idPath;
-	}
-	public String getOrgPath() {
-		return orgPath;
-	}
-	public void setOrgPath(String orgPath) {
-		this.orgPath = orgPath;
-	}
-	
-	public Long getCheckAccount() {
-		return checkAccount;
-	}
-	public void setCheckAccount(Long checkAccount) {
-		this.checkAccount = checkAccount;
-	}
-	public Integer getCheckStatus() {
-		return checkStatus;
-	}
-	public void setCheckStatus(Integer checkStatus) {
-		this.checkStatus = checkStatus;
-	}
-	public String getCheckMemo() {
-		return checkMemo;
-	}
-	public void setCheckMemo(String checkMemo) {
-		this.checkMemo = checkMemo;
-	}
-	public String getMemo() {
-		return memo;
-	}
-	public void setMemo(String memo) {
-		this.memo = memo;
-	}
-
-	public Float getBalance() {
-		return balance;
-	}
-	public void setBalance(Float balance) {
-		this.balance = balance;
-	}
-
-	//订单数量
-	private Long orderNum;
-	//行业名称
-	private String industryName;
-	
-	
-	public Long getOrderNum() {
-		return orderNum;
-	}
-	public void setOrderNum(Long orderNum) {
-		this.orderNum = orderNum;
-	}
-	public String getIndustryName() {
-		return industryName;
-	}
-	public void setIndustryName(String industryName) {
-		this.industryName = industryName;
-	}
-	public Long getId() {
-		return id;
-	}
-	public void setId(Long id) {
-		this.id = id;
-	}
-	public Long getAgentId() {
-		return agentId;
-	}
-	public void setAgentId(Long operatorId) {
-		this.agentId = operatorId;
-	}
-	public Long getIndustryId() {
-		return industryId;
-	}
-	public void setIndustryId(Long industryId) {
-		this.industryId = industryId;
-	}
-	public 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=" + agentId
-				+ ", 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());
-	}
-	
-}

+ 0 - 136
src/main/java/com/cloudcross/ssp/advertiser/model/Banner.java

@@ -1,136 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-/**
- * 投放活动对应的创意模板表
- * @author chenyou
- *
- */
-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;
-	//审核状态
-	private Integer checked;
-	//审核备注
-	private String memo;
-	//创意状态
-	private Integer status;
-	//最后更新时间
-	private Date updated;
-	//新增及状态更新时间
-	private Date supdated;
-	//创建bannerTemplate对象
-	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 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 Date getSupdated() {
-		return supdated;
-	}
-	public void setSupdated(Date supdated) {
-		this.supdated = supdated;
-	}
-	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 + ", memo=" + memo
-				+ ", status=" + status + ", updated=" + updated + ", supdated="
-				+ supdated + ", bannerTemplate=" + bannerTemplate + "]";
-	}
-	
-	
-	
-}

+ 0 - 110
src/main/java/com/cloudcross/ssp/advertiser/model/BannerTemplate.java

@@ -1,110 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-/**
- * 创意模板表
- * @author chenyou
- *
- */
-public class BannerTemplate {
-	//主键id
-	private Long id;
-	//代理商id
-	private Long agentId;
-	//广告主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;
-	public Long getId() {
-		return id;
-	}
-	public void setId(Long id) {
-		this.id = id;
-	}
-	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 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;
-	}
-	@Override
-	public String toString() {
-		return "BannerTemplate [id=" + id + ", agentId=" + agentId
-				+ ", advertiserId=" + advertiserId + ", name=" + name
-				+ ", path=" + path + ", pathSmall=" + pathSmall + ", type="
-				+ type + ", width=" + width + ", height=" + height
-				+ ", status=" + status + ", updated=" + updated + "]";
-	}
-	
-
-	
-}

+ 0 - 245
src/main/java/com/cloudcross/ssp/advertiser/model/Campaign.java

@@ -1,245 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	
-	
-	//广告主advertiserId,增于2015/10/20
-	private Long advertiserId;
-	
-	public Long getAdvertiserId(){
-		return advertiserId;
-	}
-	
-	public void setAdvertiserId(Long advertiserId){
-		this.advertiserId = advertiserId;
-	}
-	
-	//代理商Id,增于2015/10/21
-	private Long agentId;
-	
-	public Long getAgentId() {
-		return agentId;
-	}
-
-	public void setAgentId(Long agentId) {
-		this.agentId = agentId;
-	}
-	
-
-	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 + ", advertiserId=" + advertiserId + ", agentId=" + agentId + ", 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);
-	}
-}

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

@@ -1,109 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	
-	}	
-}

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

@@ -1,106 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	
-	}	
-}

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

@@ -1,78 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-
-/**
- * *
- * @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 + "]";
-	}
-
-	
-}

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

@@ -1,51 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	}
-
-
-
-	
-}

+ 0 - 439
src/main/java/com/cloudcross/ssp/advertiser/model/DeliverAnalysis.java

@@ -1,439 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-public final class DeliverAnalysis  {
-	//id
-	private Long id;
-	//广告主id
-	private Long advertiserId;
-	//订单id
-	private Long orderId;
-	//活动id
-	private Long campaignId;
-	//投放id
-	private Long adGroupId;
-	//创意id
-	private Long bannerId;
-	//创意模板Id
-	private Long bannerTemplateId;
-	//场景id
-	private Long placeId;
-	//地域
-	private String location;
-	//系统
-	private Integer os;
-	//广告主名称
-	private String advertiserName;
-	//场景名称
-	private String placeName;
-	//订单名称
-	private String orderName;
-	//活动名称
-	private String campaignName;
-	//投放名称
-	private String adGroupName;
-	//创意分组名称
-	private String bannerName;
-	
-	//请求数
-	private double request;
-	//曝光数
-	private double impression;
-	//曝光总数	
-	private double impressionSum;
-	//点击数
-	private double click;
-	//点击总数
-	private double clickSum;
-	//到达数
-	private double visit; 
-	//到达总数
-	private double visitSum;
-	//转化数
-    private double conversion;
-    //转化总数
-    private double conversionSum;
-	//曝光占比
-    private double impressionRate;
-    //点击率
-	private double clickRate;
-	//全部对应的点击率
-	private double clickRatesum;	
-	//到达率
-	private double visitRate;
-	//全部对应的到达率
-	private double visitRatesum;
-	//转化率
-	private double conversionRate;
-	//全部对应的转化率
-	private double conversionRatesum;
-	//eCmp
-	private double eCmp;
-	//eCmp总数
-	private double eCmpSum;
-	//花费
-	private double consume;
-	//花费总额
-	private double consumeSum;
-	
-	//开始时间
-	private Date startDate;
-	
-	//结束时间
-	private Date endDate;
-	
-	//日期
-	private Date reportDate;
-	
-	//小时
-	private Integer hour;
-
-	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 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 Long getBannerId() {
-		return bannerId;
-	}
-
-	public void setBannerId(Long bannerId) {
-		this.bannerId = bannerId;
-	}
-
-	public Long getBannerTemplateId() {
-		return bannerTemplateId;
-	}
-
-	public void setBannerTemplateId(Long bannerTemplateId) {
-		this.bannerTemplateId = bannerTemplateId;
-	}
-
-	public Long getPlaceId() {
-		return placeId;
-	}
-
-	public void setPlaceId(Long placeId) {
-		this.placeId = placeId;
-	}
-
-	public String getLocation() {
-		return location;
-	}
-
-	public void setLocation(String location) {
-		this.location = location;
-	}
-
-	public Integer getOs() {
-		return os;
-	}
-
-	public void setOs(Integer os) {
-		this.os = os;
-	}
-
-	public String getAdvertiserName() {
-		return advertiserName;
-	}
-
-	public void setAdvertiserName(String advertiserName) {
-		this.advertiserName = advertiserName;
-	}
-
-	public String getPlaceName() {
-		return placeName;
-	}
-
-	public void setPlaceName(String placeName) {
-		this.placeName = placeName;
-	}
-
-	public String getOrderName() {
-		return orderName;
-	}
-
-	public void setOrderName(String orderName) {
-		this.orderName = orderName;
-	}
-
-	public String getCampaignName() {
-		return campaignName;
-	}
-
-	public void setCampaignName(String campaignName) {
-		this.campaignName = campaignName;
-	}
-
-	public String getAdGroupName() {
-		return adGroupName;
-	}
-
-	public void setAdGroupName(String adGroupName) {
-		this.adGroupName = adGroupName;
-	}
-
-	public String getBannerName() {
-		return bannerName;
-	}
-
-	public void setBannerName(String bannerName) {
-		this.bannerName = bannerName;
-	}
-
-	public double getRequest() {
-		return request;
-	}
-
-	public void setRequest(double request) {
-		this.request = request;
-	}
-
-	public double getImpression() {
-		return impression;
-	}
-
-	public void setImpression(double impression) {
-		this.impression = impression;
-	}
-
-	public double getImpressionSum() {
-		return impressionSum;
-	}
-
-	public void setImpressionSum(double impressionSum) {
-		this.impressionSum = impressionSum;
-	}
-
-	public double getClick() {
-		return click;
-	}
-
-	public void setClick(double click) {
-		this.click = click;
-	}
-
-	public double getClickSum() {
-		return clickSum;
-	}
-
-	public void setClickSum(double clickSum) {
-		this.clickSum = clickSum;
-	}
-
-	public double getVisit() {
-		return visit;
-	}
-
-	public void setVisit(double visit) {
-		this.visit = visit;
-	}
-
-	public double getVisitSum() {
-		return visitSum;
-	}
-
-	public void setVisitSum(double visitSum) {
-		this.visitSum = visitSum;
-	}
-
-	public double getConversion() {
-		return conversion;
-	}
-
-	public void setConversion(double conversion) {
-		this.conversion = conversion;
-	}
-
-	public double getConversionSum() {
-		return conversionSum;
-	}
-
-	public void setConversionSum(double conversionSum) {
-		this.conversionSum = conversionSum;
-	}
-
-	public double getImpressionRate() {
-		return impressionRate;
-	}
-
-	public void setImpressionRate(double impressionRate) {
-		this.impressionRate = impressionRate;
-	}
-
-	public double getClickRate() {
-		return clickRate;
-	}
-
-	public void setClickRate(double clickRate) {
-		this.clickRate = clickRate;
-	}
-
-	public double getClickRatesum() {
-		return clickRatesum;
-	}
-
-	public void setClickRatesum(double clickRatesum) {
-		this.clickRatesum = clickRatesum;
-	}
-
-	public double getVisitRate() {
-		return visitRate;
-	}
-
-	public void setVisitRate(double visitRate) {
-		this.visitRate = visitRate;
-	}
-
-	public double getVisitRatesum() {
-		return visitRatesum;
-	}
-
-	public void setVisitRatesum(double visitRatesum) {
-		this.visitRatesum = visitRatesum;
-	}
-
-	public double getConversionRate() {
-		return conversionRate;
-	}
-
-	public void setConversionRate(double conversionRate) {
-		this.conversionRate = conversionRate;
-	}
-
-	public double getConversionRatesum() {
-		return conversionRatesum;
-	}
-
-	public void setConversionRatesum(double conversionRatesum) {
-		this.conversionRatesum = conversionRatesum;
-	}
-
-	public double geteCmp() {
-		return eCmp;
-	}
-
-	public void seteCmp(double eCmp) {
-		this.eCmp = eCmp;
-	}
-
-	public double geteCmpSum() {
-		return eCmpSum;
-	}
-
-	public void seteCmpSum(double eCmpSum) {
-		this.eCmpSum = eCmpSum;
-	}
-
-	public double getConsume() {
-		return consume;
-	}
-
-	public void setConsume(double consume) {
-		this.consume = consume;
-	}
-
-	public double getConsumeSum() {
-		return consumeSum;
-	}
-
-	public void setConsumeSum(double consumeSum) {
-		this.consumeSum = consumeSum;
-	}
-
-	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 Date getReportDate() {
-		return reportDate;
-	}
-
-	public void setReportDate(Date reportDate) {
-		this.reportDate = reportDate;
-	}
-
-	public Integer getHour() {
-		return hour;
-	}
-
-	public void setHour(Integer hour) {
-		this.hour = hour;
-	}
-
-	@Override
-	public String toString() {
-		return "DeliverAnalysis [id=" + id + ", advertiserId=" + advertiserId
-				+ ", orderId=" + orderId + ", campaignId=" + campaignId
-				+ ", adGroupId=" + adGroupId + ", bannerId=" + bannerId
-				+ ", bannerTemplateId=" + bannerTemplateId + ", placeId="
-				+ placeId + ", location=" + location + ", os=" + os
-				+ ", advertiserName=" + advertiserName + ", placeName="
-				+ placeName + ", orderName=" + orderName + ", campaignName="
-				+ campaignName + ", adGroupName=" + adGroupName
-				+ ", bannerName=" + bannerName + ", request=" + request
-				+ ", impression=" + impression + ", impressionSum="
-				+ impressionSum + ", click=" + click + ", clickSum=" + clickSum
-				+ ", visit=" + visit + ", visitSum=" + visitSum
-				+ ", conversion=" + conversion + ", conversionSum="
-				+ conversionSum + ", impressionRate=" + impressionRate
-				+ ", clickRate=" + clickRate + ", clickRatesum=" + clickRatesum
-				+ ", visitRate=" + visitRate + ", visitRatesum=" + visitRatesum
-				+ ", conversionRate=" + conversionRate + ", conversionRatesum="
-				+ conversionRatesum + ", eCmp=" + eCmp + ", eCmpSum=" + eCmpSum
-				+ ", consume=" + consume + ", consumeSum=" + consumeSum
-				+ ", startDate=" + startDate + ", endDate=" + endDate
-				+ ", reportDate=" + reportDate + ", hour=" + hour + "]";
-	}
-	
-
-	
-}

+ 0 - 50
src/main/java/com/cloudcross/ssp/advertiser/model/Dimension.java

@@ -1,50 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-public class Dimension {
-
-	private Long id;
-	private String name;
-	private String content;
-	private byte isDefault;
-	private Long accountId;
-	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 String getContent() {
-		return content;
-	}
-	public void setContent(String content) {
-		this.content = content;
-	}
-	public byte getIsDefault() {
-		return isDefault;
-	}
-	public void setIsDefault(byte isDefault) {
-		this.isDefault = isDefault;
-	}
-	public Long getAccountId() {
-		return accountId;
-	}
-	public void setAccountId(Long accountId) {
-		this.accountId = accountId;
-	}
-	@Override
-	public String toString() {
-		return "Dimension [id=" + id + ", name=" + name + ", content="
-				+ content + ", isDefault=" + isDefault + ", accountId="
-				+ accountId + "]";
-	}
-	
-	
-	
-	
-}

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

@@ -1,60 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-
-/**
- * 定向表,对应数据库里面的表t_target_show
- * @author luohongyu
- */
-
-import java.util.Date;
-
-public class Direct {
-	private Long id ;
-	//策略Id
-	private Long adGroupId;
-	//定向的类型设置
-	private Integer 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 Integer getDirectType() {
-		return directType;
-	}
-	public void setDirectType(Integer 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;
-	}
-}

+ 0 - 177
src/main/java/com/cloudcross/ssp/advertiser/model/Finance.java

@@ -1,177 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-public class Finance {
-	private Long id;
-	
-	//用户账户ID
-	private Long accountId;
-	
-	// 分配时间
-	private Date actTime;
-	//交易号
-	private String num;
-	
-	//广告主名称
-	private String advertiserName;
-	
-	//代理商充值的金额
-	private Double charge;
-	
-	//代理商给广告主分配的金额
-	private Double allocate;
-	
-	//广告主消费的金额
-	private Double consume;
-	
-	private String memo;
-	
-	
-	// 暂时未用到该值
-	private Double saveMoney;
-	
-	//广告主代理商ID
-	private Long agentId;
-	//广告主ID
-	private Long advertiserId;
-	
-	//余额
-	private Double balance;
-
-	public Double getBalance() {
-		return balance;
-	}
-	public void setBalance(Double balance) {
-		this.balance = balance;
-	}
-	
-	//最后更新时间
-	private Date upDated;
-	
-	public Date getUpDated() {
-		return upDated;
-	}
-	public void setUpDated(Date upDated) {
-		this.upDated = upDated;
-	}
-	
-
-	//广告主账户余额
-	private Double adBalance;
-	//代理商账户余额
-	private Double agentBalance;
-	//累计分配的金额(广告主)
-	private Double sumAllocation;
-
-	public Double getAdBalance() {
-		return adBalance;
-	}
-	public void setAdBalance(Double adBalance) {
-		this.adBalance = adBalance;
-	}
-	public Double getAgentBalance() {
-		return agentBalance;
-	}
-	public void setAgentBalance(Double agentBalance) {
-		this.agentBalance = agentBalance;
-	}
-	public Double getSumAllocation() {
-		return sumAllocation;
-	}
-	public void setSumAllocation(Double sumAllocation) {
-		this.sumAllocation = sumAllocation;
-	}
-	
-	
-	
-	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 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 String getAdvertiserName() {
-		return advertiserName;
-	}
-	public void setAdvertiserName(String advertiserName) {
-		this.advertiserName = advertiserName;
-	}
-	public Double getCharge() {
-		return charge;
-	}
-	public void setCharge(Double charge) {
-		this.charge = charge;
-	}
-	public Double getAllocate() {
-		return allocate;
-	}
-	public void setAllocate(Double allocate) {
-		this.allocate = allocate;
-	}
-	public Double getConsume() {
-		return consume;
-	}
-	public void setConsume(Double consume) {
-		this.consume = consume;
-	}
-	public String getMemo() {
-		return memo;
-	}
-	public void setMemo(String memo) {
-		this.memo = memo;
-	}
-	public Double getSaveMoney() {
-		return saveMoney;
-	}
-	public void setSaveMoney(Double saveMoney) {
-		this.saveMoney = saveMoney;
-	}
-	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;
-	}
-	@Override
-	public String toString() {
-		return "Finance [id=" + id + ", accountId=" + accountId + ", actTime=" + actTime + ", num=" + num
-				+ ", advertiserName=" + advertiserName + ", charge=" + charge + ", allocate=" + allocate + ", consume="
-				+ consume + ", memo=" + memo + ", saveMoney=" + saveMoney + ", agentId=" + agentId + ", advertiserId="
-				+ advertiserId + ", balance=" + balance + ", upDated=" + upDated + ", adBalance=" + adBalance
-				+ ", agentBalance=" + agentBalance + ", sumAllocation=" + sumAllocation + "]";
-	}
-
-
-	
-	
-	
-	
-	
-
-}
-

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

@@ -1,39 +0,0 @@
-package com.cloudcross.ssp.advertiser.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);
-	}
-	
-}

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

@@ -1,128 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	}
-}

+ 0 - 121
src/main/java/com/cloudcross/ssp/advertiser/model/Log.java

@@ -1,121 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 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 + "]";
-		}
-
-		
-		
-		
-		
-}

+ 0 - 57
src/main/java/com/cloudcross/ssp/advertiser/model/Message.java

@@ -1,57 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-public class Message {
-			//消息Id
-			private Long id;
-			//消息内容
-			private String content;
-			//账号Id  和t_account.id表相关
-			private Long accountId;
-			//发送时间
-			private Date sendTime;
-			//是否已读
-			private Integer 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 Long getAccountId() {
-				return accountId;
-			}
-			public void setAccountId(Long accountId) {
-				this.accountId = accountId;
-			}
-			public Date getSendTime() {
-				return sendTime;
-			}
-			public void setSendTime(Date sendTime) {
-				this.sendTime = sendTime;
-			}
-			public Integer getRead() {
-				return read;
-			}
-			public void setRead(Integer read) {
-				this.read = read;
-			} 
-		
-			
-}

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

@@ -1,93 +0,0 @@
-package com.cloudcross.ssp.advertiser.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);
-	}
-}

+ 0 - 163
src/main/java/com/cloudcross/ssp/advertiser/model/Order.java

@@ -1,163 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-		// 新增/status更新时间
-		private Date supdated;
-		/**
-		 * 活动个数
-		 * <p/>
-		 * 与t_campaign表相关。
-		 */
-		//活动个数campaign
-		private Long campaignNumber;
-		
-		private Long agentId;
-		
-		
-		public Long getAgentId() {
-			return agentId;
-		}
-		public void setAgentId(Long agentId) {
-			this.agentId = agentId;
-		}
-		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;
-		}
-		public Date getSupdated() {
-			return supdated;
-		}
-		public void setSupdated(Date supdated) {
-			this.supdated = supdated;
-		}
-		@Override
-		public String toString() {
-			return "Order [id=" + id + ", advertiserId=" + advertiserId
-					+ ", agentId=" + agentId + ",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;
-		}
-	
-		
-		
-		
-}

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

@@ -1,44 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	}
-
-}

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

@@ -1,29 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	}
-	
-}

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

@@ -1,107 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	}
-
-}

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

@@ -1,20 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	}
-}

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

@@ -1,23 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	}
-	
-}

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

@@ -1,67 +0,0 @@
-package com.cloudcross.ssp.advertiser.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;
-	}
-
-}

+ 0 - 187
src/main/java/com/cloudcross/ssp/advertiser/model/RptAdvertiserHour.java

@@ -1,187 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-/**
- * 对应数据库的t_rpt_advertiser_hour表
- * @author yzl
- *
- */
-public class RptAdvertiserHour {
-	//主键
-	private Long id;
-	//运营商id
-	private Long AdvertiserId;
-	//日期
-	private Date date;
-	//小时
-	private Integer hour;
-	//订单id
-	private Long orderId;
-	//活动id
-	private Long campaignId;
-	//投放Id
-	private Long adgroupId;
-	//创意Id
-	private Long bannerId;
-	//曝光数
-	private Long impression;
-	//点击数
-	private Long click;
-	//到达数
-	private Long visit;
-	//转化数
-	private Long conversion;
-	//ecpm
-	private Float ecpm;
-	//消费
-	private Long consume;
-	//一天总的到达数
-	private Long totalVisit;
-	//一天总的转化数
-	private Long totalConversion;
-	//一天总的曝光数
-	private Long totalImpression;
-	//一天总的点击数
-	private Long totalClick;
-	//一天总的ecpm
-	private Long totalEcpm;
-	//一天的消费数
-	private Long totalConsume;
-	public Long getId() {
-		return id;
-	}
-	public void setId(Long id) {
-		this.id = id;
-	}
-	public Long getAdvertiserId() {
-		return AdvertiserId;
-	}
-	public void setAdvertiserId(Long advertiserId) {
-		AdvertiserId = advertiserId;
-	}
-	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 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 Long getBannerId() {
-		return bannerId;
-	}
-	public void setBannerId(Long bannerId) {
-		this.bannerId = bannerId;
-	}
-	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 getVisit() {
-		return visit;
-	}
-	public void setVisit(Long visit) {
-		this.visit = visit;
-	}
-	public Long getConversion() {
-		return conversion;
-	}
-	public void setConversion(Long conversion) {
-		this.conversion = conversion;
-	}
-	public Float getEcpm() {
-		return ecpm;
-	}
-	public void setEcpm(Float ecpm) {
-		this.ecpm = ecpm;
-	}
-	public Long getConsume() {
-		return consume;
-	}
-	public void setConsume(Long consume) {
-		this.consume = consume;
-	}
-	public Long getTotalVisit() {
-		return totalVisit;
-	}
-	public void setTotalVisit(Long totalVisit) {
-		this.totalVisit = totalVisit;
-	}
-	public Long getTotalConversion() {
-		return totalConversion;
-	}
-	public void setTotalConversion(Long totalConversion) {
-		this.totalConversion = totalConversion;
-	}
-	public Long getTotalImpression() {
-		return totalImpression;
-	}
-	public void setTotalImpression(Long totalImpression) {
-		this.totalImpression = totalImpression;
-	}
-	public Long getTotalClick() {
-		return totalClick;
-	}
-	public void setTotalClick(Long totalClick) {
-		this.totalClick = totalClick;
-	}
-	public Long getTotalEcpm() {
-		return totalEcpm;
-	}
-	public void setTotalEcpm(Long totalEcpm) {
-		this.totalEcpm = totalEcpm;
-	}
-	public Long getTotalConsume() {
-		return totalConsume;
-	}
-	public void setTotalConsume(Long totalConsume) {
-		this.totalConsume = totalConsume;
-	}
-	@Override
-	public String toString() {
-		return "RptAdvertiserHour [id=" + id + ", AdvertiserId=" + AdvertiserId
-				+ ", date=" + date + ", hour=" + hour + ", orderId=" + orderId
-				+ ", campaignId=" + campaignId + ", adgroupId=" + adgroupId
-				+ ", bannerId=" + bannerId + ", impression=" + impression
-				+ ", click=" + click + ", visit=" + visit + ", conversion="
-				+ conversion + ", ecpm=" + ecpm + ", consume=" + consume
-				+ ", totalVisit=" + totalVisit + ", totalConversion="
-				+ totalConversion + ", totalImpression=" + totalImpression
-				+ ", totalClick=" + totalClick + ", totalEcpm=" + totalEcpm
-				+ ", totalConsume=" + totalConsume + "]";
-	}
-	
-	
-	
-}

+ 0 - 154
src/main/java/com/cloudcross/ssp/advertiser/model/RptZone.java

@@ -1,154 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-import java.util.Date;
-
-/**
- * 对应数据库的t_rpt_zone表
- * @author chenyou
- *
- */
-public class RptZone {
-	//主键
-	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 click;
-	//ecpm
-	private Float ecpm;
-	//收入
-	private Long income;
-	//一天总的pv
-	private Long totalPv;
-	//一天总的uv
-	private Long totalUv;
-	//一天总的曝光数
-	private Long totalImpression;
-	//一天总的点击数
-	private Long totalClick;
-	//一天总的收入
-	private Long totalIncome;
-	
-	public Long getTotalPv() {
-		return totalPv;
-	}
-	public void setTotalPv(Long totalPv) {
-		this.totalPv = totalPv;
-	}
-	public Long getTotalUv() {
-		return totalUv;
-	}
-	public void setTotalUv(Long totalUv) {
-		this.totalUv = totalUv;
-	}
-	public Long getTotalImpression() {
-		return totalImpression;
-	}
-	public void setTotalImpression(Long totalImpression) {
-		this.totalImpression = totalImpression;
-	}
-	public Long getTotalClick() {
-		return totalClick;
-	}
-	public void setTotalClick(Long totalClick) {
-		this.totalClick = totalClick;
-	}
-	public Long getTotalIncome() {
-		return totalIncome;
-	}
-	public void setTotalIncome(Long totalIncome) {
-		this.totalIncome = totalIncome;
-	}
-	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 "RptZone [id=" + id + ", operatorId=" + operatorId + ", date="
-				+ date + ", hour=" + hour + ", zoneId=" + zoneId + ", pv=" + pv
-				+ ", uv=" + uv + ", impression=" + impression + ", click="
-				+ click + ", ecpm=" + ecpm + ", income=" + income
-				+ ", totalPv=" + totalPv + ", totalUv=" + totalUv
-				+ ", totalImpression=" + totalImpression + ", totalClick="
-				+ totalClick + ", totalIncome=" + totalIncome + "]";
-	}
-	
-	
-	
-}

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

@@ -1,39 +0,0 @@
-package com.cloudcross.ssp.advertiser.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
-				+ "]";
-	}
-}

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

@@ -1,155 +0,0 @@
-package com.cloudcross.ssp.advertiser.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);
-	}
-	
-}

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

@@ -1,45 +0,0 @@
-package com.cloudcross.ssp.advertiser.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
-				+ "]";
-	}
-}

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

@@ -1,58 +0,0 @@
-package com.cloudcross.ssp.advertiser.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 + "]";
-	}
- 
-}

+ 0 - 53
src/main/java/com/cloudcross/ssp/advertiser/model/Wifi.java

@@ -1,53 +0,0 @@
-package com.cloudcross.ssp.advertiser.model;
-
-/**
- * Wifi,对应数据库里面的表t_wifi
- * @author luohongyu
- */
-
-public class Wifi {
-
-	private Long id;
-	private String location;
-	private String address;
-	private Float longitude;
-	private Float latitude;
-	
-	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 + ", location=" + location + ", address="
-				+ address + ", longitude=" + longitude + ", latitude="
-				+ latitude + "]";
-	}
-	
-}

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

@@ -1,270 +0,0 @@
-<?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="advertiser.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.advertiser.model.Account" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.model.Account">
-		select id,
-		name as accountName,
-		real_name as realName,tel,state,create_time as createTime
-		from t_account
-		where deletestatus != -1 
-		and agent_id = #{loginAccount.agentId}
-		<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}
-		<if test="loginAccount.advertiserId != 0 ">
-		and advertiser_id = #{loginAccount.advertiserId}
-		</if>
-		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 agent_id = #{loginAccount.agentId}
-		<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}
-		<if test="loginAccount.advertiserId != 0 ">
-		and advertiser_id = #{loginAccount.advertiserId}
-			</if>
-	</select>
-
-	<select id="isExist" resultType="com.cloudcross.ssp.advertiser.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.advertiser.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.advertiser.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.advertiser.model.Account">
-		insert into t_account (
-		name,
-		password,
-		description,
-		state )
-		values (#{accountName},
-		#{password}, #{description},
-		#{state})
-	</insert>
-	<!-- 增加用户 -->
-	<insert id="addAccount" parameterType="com.cloudcross.ssp.advertiser.model.Account" useGeneratedKeys="true" keyProperty="id">
-		insert into t_account
-		 (name,
-		 password,
-		 real_name,
-		 tel,
-		 agent_id,
-		 advertiser_id,
-		 description, 
-		 state,
-		 sys_type ) values (#{accountName}, #{password},#{realName}, 
-    	#{tel},#{agentId},#{advertiserId},#{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.advertiser.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.advertiser.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>
-			<if test="advertiserId != null">
-				advertiser_id=#{advertiserId}
-			</if>
-		</set>
-		where id=#{id}
-	</update>
-	<update id="update" parameterType="com.cloudcross.ssp.advertiser.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>
-
-	<!-- 验证用户登陆 -->
-	<select id="countAccount" parameterType="com.cloudcross.ssp.advertiser.model.Account" resultType="com.cloudcross.ssp.advertiser.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.advertiser.model.Account">
-		select
-		<include refid="selectId" />
-		from t_account where name=#{accountName}
-	</select>
-	
-	<select id="findExcelAccount"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Account">
-		select id,
-		name as accountName,
-		real_name as realName,tel,state,create_time as createTime
-		from t_account
-		where deletestatus != -1 
-		and agent_id = #{loginAccount.agentId}
-		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}
-		<if test="loginAccount.advertiserId != 0 ">
-			and advertiser_id = #{loginAccount.advertiserId}
-		</if>
-		order by id   desc
-	</select>
-</mapper>

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

@@ -1,47 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.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.advertiser.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>

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

@@ -1,325 +0,0 @@
-<?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="advertiser.adGroupSqlMapper">
-	<sql id="base_column">
-		t_adgroup.id,
-		t_adgroup.agent_id as agentId,
-		t_adgroup.advertiser_id as advertiserId,
-		t_adgroup.order_id as orderId,
-		t_adgroup.campaign_id as campaignId,
-		name as adGroupName,
-		active_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,
-		position,
-		site,
-		retarget,
-		period,
-		t_adgroup.status,
-		t_adgroup.updated as updated
-	</sql>
-	
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(id) 
-		from t_adgroup
-		where status != -1
-		<if test="agentId!=null">
-			 and agent_id = #{agentId}
-		</if>
-		<if test="agentId == null">
-			and advertiser_id = #{advertiserId}
-		</if>
-		<if test="orderMark == null">
-			and order_id = #{orderId}
-		</if>
-		<if test="campaignMark == null">
-			and campaign_id = #{campaignId}
-		</if>
-		<if test="adGroupName != null">
-			and name like #{adGroupName}
-		</if>
-			<if test="selectedStatus1!=null">
-			and now()>active_time and expire_time>now() and status=0
-			</if>
-			<if test="selectedStatus2!=null">
-			and active_time>now()
-			</if>
-			<if test="selectedStatus3!=null">
-			and now()>expire_time and status=1
-			</if>
-			<if test="selectedStatus4!=null">
-			and status=1
-			</if>
-	</select>
-	
-	
-	<select id="findByParams" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.AdGroup">
-		select
-		<include refid="base_column"/>, (select count(t_banner.id) from t_banner where t_banner.adgroup_id = t_adgroup.id and t_banner.status !=-1
-		) as bannerNumber
-		from t_adgroup 
-		<where>
-			 t_adgroup.status!=-1
-			<if test="agentId!=null">
-			 and t_adgroup.agent_id = #{agentId}
-		</if>
-		<if test="agentId == null">
-			and t_adgroup.advertiser_id = #{advertiserId}
-		</if>
-		<if test="orderMark == null">
-			and t_adgroup.order_id = #{orderId}
-		</if>
-		<if test="campaignMark == null">
-			and t_adgroup.campaign_id = #{campaignId}
-		</if>
-		<if test="adGroupName != null">
-			and name like #{adGroupName}
-			</if>
-			<if test="selectedStatus1!=null">
-			and now()>active_time and expire_time>now() and t_adgroup.status=0
-			</if>
-			<if test="selectedStatus2!=null">
-			and active_time>now()
-			</if>
-			<if test="selectedStatus3!=null">
-			and now()>expire_time and t_adgroup.status=1
-			</if>
-			<if test="selectedStatus4!=null">
-			and t_adgroup.status=1
-			</if>
-		</where>
-		group by t_adgroup.id
-		order by t_adgroup.id desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="findByParams1" parameterType="map" resultType="com.cloudcross.ssp.advertiser.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.status!=-1
-			<if test="agentId!=null">
-			 and t_adgroup.agent_id = #{agentId}
-		</if>
-		<if test="agentId == null">
-			and t_adgroup.advertiser_id = #{advertiserId}
-		</if>
-		<if test="orderMark == null">
-			and t_adgroup.order_id = #{orderId}
-		</if>
-		<if test="campaignMark == null">
-			and t_adgroup.campaign_id = #{campaignId}
-		</if>
-		<if test="adGroupName != null">
-			and name like #{adGroupName}
-			</if>
-			<if test="selectedStatus1!=null">
-			and now()>active_time and expire_time>now() and t_adgroup.status=0
-			</if>
-			<if test="selectedStatus2!=null">
-			and active_time>now()
-			</if>
-			<if test="selectedStatus3!=null">
-			and now()>expire_time and t_adgroup.status=1
-			</if>
-			<if test="selectedStatus4!=null">
-			and t_adgroup.status=1
-			</if>
-		</where>
-		group by t_adgroup.id
-		order by t_adgroup.id desc
-	</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>
-	
-	<update id="updatedSupdated" parameterType="Long">
-		update t_adgroup 
-		set supdated=NOW()
-		where id = #{adGroupId}
-	</update>
-	
-	<select id="findByCampaignId" parameterType="long" resultType="com.cloudcross.ssp.advertiser.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.advertiser.model.AdGroup"  useGeneratedKeys="true"
-		keyProperty="id">
-		insert into t_adgroup
-			(name,campaign_id,order_id,agent_id,advertiser_id,active_time,expire_time,totalbudget,mode,
-			price,
-			<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>			
-			<if test="retarget !=null">retarget,</if>
-			<if test="period !=null">period,</if>
-			<if test="site !=null">site,</if>
-			<if test="position !=null">position,</if>
-			status,updated,supdated)
-		values
-			(#{adGroupName},#{campaignId},#{orderId},#{agentId},#{advertiserId},#{startDate},#{endDate},#{totalBudget},#{mode},
-			#{price},
-			<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>			
-			<if test="retarget !=null">#{retarget},</if>
-			<if test="period !=null">#{period},</if>
-			<if test="site !=null">#{site},</if>
-			<if test="position !=null">#{position},</if>
-			#{status},NOW(),NOW())
-	</insert>
-	
-	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.AdGroup">
-		select
-		<include refid="base_column"/>
-		from t_adgroup
-		<where>
-		id = #{id}
-		</where>
-	</select>
-	
-	<update id="editAdGroup" parameterType="com.cloudcross.ssp.advertiser.model.AdGroup">
-		update t_adgroup
-		set name = #{adGroupName},
-		active_time = #{startDate},
-		expire_time = #{endDate},		
-		totalbudget = #{totalBudget},
-		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_impression = IFNULL( #{perImpression},default(per_impression)),
-		per_click_type =IFNULL( #{perClickType},default(per_click_type)),
-		per_click = IFNULL( #{perClick},default(per_click)),
-		retarget = IFNULL( #{retarget},default(retarget)),
-		period = IFNULL( #{period},default(period)),
-		site = IFNULL( #{site},default(site)),		
-		position =IFNULL( #{position},default(position)),		
-		status = #{status},
-		updated = NOW()
-		<where>
-			id = #{id}
-		</where>
-	</update>
-	
-	
-	<select id="findAdgroupByAdvertiserId_Dashboard" parameterType="long" resultType="map">  
-    select g.id as adGroupId, g.name as adGroupName
-    from t_order o, t_adgroup g
-    where o.id = g.order_id and o.advertiser_id = #{advertiserId} and  date(g.active_time) &lt;=date(date_add(now(), interval -1 day)) and date(g.expire_time)>=date(date_add(now(), interval -1 day))
-    </select>
-	
-	<!-- ************************************************** -->
-	<!-- 根据广告主ID查询投放ID -->
-	<select id="findAllAdGroudByAdvertiserId" parameterType = "long" resultType = "long">
-		select id from t_adgroup where t_adgroup.advertiser_id = #{advertiserId}
-	</select>
-	<!-- 根据advertiser_id修改ad_group的supdated -->
-	<update id="updateSupdatedByAdvertiserID" parameterType="HashMap">
-		update t_adgroup
-			set t_adgroup.supdated= #{modifyDate}
-			where  t_adgroup.advertiser_id in
-			<foreach item="advertiserId" collection="advertiserIdList"
-		      open="(" separator="," close=")">
-		        #{advertiserId}
-			</foreach>
-	</update>
-	
-	<update id="updateSupdatedByOrderId" parameterType="HashMap">
-		update t_adgroup
-			set t_adgroup.supdated= #{modifyDate}
-			where  t_adgroup.order_id in
-			<foreach item="orderId" collection="orderIdList"
-		      open="(" separator="," close=")">
-		        #{orderId}
-			</foreach>
-	</update>
-	
-	<!-- 根据campaignid修改adgroup的supdated -->
-	<update id="updateSupdatedByCampaignId" parameterType="HashMap">
-		update t_adgroup
-			set t_adgroup.supdated= #{modifyDate}
-			where  t_adgroup.campaign_id in
-			<foreach item="campaignId" collection="campaignIdList"
-		      open="(" separator="," close=")">
-		        #{campaignId}
-			</foreach>
-	</update>
-	
-	<update id="updateStatusByAdvertiserId" parameterType="HashMap">
-		update t_adgroup
-			set status = #{status},updated = NOW()
-			where t_adgroup.advertiser_id in
-			<foreach item="advertiserId" collection="advertiserIdList"
-		      open="(" separator="," close=")">
-		        #{advertiserId}
-			</foreach>
-	</update>
-	
-	<update id="updateStatusByOrderId" parameterType="HashMap">
-		update t_adgroup 
-		set status=#{status},updated = #{modifyDate}
-		where t_adgroup.order_id in
-		<foreach item="orderId" collection="orderIdList" open="(" separator="," close=")">
-			#{orderId}
-		</foreach>
-	</update>
-	
-	<update id="updateStatusByCampaignId" parameterType="HashMap">
-		update t_adgroup 
-		set status=#{status},updated = #{modifyDate}
-		where t_adgroup.campaign_id in
-		<foreach item="campaignId" collection="campaignIdList" open="(" separator="," close=")">
-			#{campaignId}
-		</foreach>
-	</update>
-</mapper>

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

@@ -1,41 +0,0 @@
-<?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="advertiser.adGroupPlaceSqlMapper">
-	<sql id="base_column">
-		id,
-		adgroup_id  as adGroupId,
-		place_id as placeId
-	</sql>
-
-	<insert id="addPlace" parameterType="com.cloudcross.ssp.advertiser.model.AdGroupPlace">
-		insert into
-		t_adgroup_place (adgroup_id,place_id,supdated)
-		values (#{adGroupId},#{placeId},NOW())
-	</insert>
-
-	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.advertiser.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>
-	
-	<update id="updatedSupdate" parameterType="long">
-	update t_adgroup_place 
-	set supdated=NOW()
-	where adgroup_id= #{adGroupId}
-	</update>
-	
-	<select id="findAllByAdGroupId" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.AdGroupPlace">
-		select
-		<include refid="base_column"/>
-		from t_adgroup_place
-		where adgroup_id = #{adGroupId}
-	</select>
-</mapper>

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

@@ -1,27 +0,0 @@
-<?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="advertiser.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,updated)
-          values    <foreach collection="scheduleList" item="schedule" index="index" separator=",">
-    					(#{schedule.adGroupId},#{schedule.beginDate},#{schedule.sEndDate},#{schedule.dehours},
-    					#{schedule.updated})
-    			    </foreach> 
-	</insert>
-	
-	<delete id="deleteByAdGroupId" parameterType="long">
-		delete from t_adgroup_schedule where adgroup_id = #{adGroupId}
-	</delete>
-	
-</mapper>

+ 0 - 171
src/main/java/com/cloudcross/ssp/advertiser/model/mapper/adv-balance.sql.xml

@@ -1,171 +0,0 @@
-<?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="advertiser.advBalanceSqlMapper">
-	
-	<sql id="base_column">
-		id,
-		account_id as accountId,
-		t_agent_id as agentId, 
-		advertiser_id as advertiserId,
-		act_time as actTime,
-		num,
-		type,
-		charge,
-		allocate,
-		consume,
-	    t_advertiser.name as advertiserName,
-	    t_agent.name as agentName,                     
-		balance,
-		memo
-	</sql>
-	
-	<select id="findAdvBalance" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.AdvBalance">
-		select * from 	t_adv_balance where id=#{advBalanceId}
-	</select>
-		
-	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.AdvBalance">
-		select 
-		a.act_time as actTime,
-		<if test="type != 'charge'">
-		 b.name as advertiserName,
-		</if>
-		<if test="type == 'charge'">
-		 d.name as agentName,
-		</if>
-		a.num,a.charge,a.allocate,a.consume,a.balance
-		from t_adv_balance a,
-		<if test="type != 'charge'">
-		 t_advertiser b
-		</if>
-		<if test="type == 'charge'">
-		 t_adv_agent d
-		</if>
-        where 
-     <!--     a.account_id=#{accountId} -->
-        a.agent_id=#{agentId}
-        <if test="adverId !=null ">
-		and a.advertiser_id = #{adverId} 
-		</if>
-        <if test="type == 'charge'">
-		and a.agent_id=d.id 
-		</if>
-        <if test="startDate!=null and endDate!=null"> 
-            and a.act_time &gt;= #{startDate} and #{endDate} &gt;=a.act_time
-		</if> 
-	    <if test="advertiserId !=null ">
-		and a.advertiser_id = #{advertiserId} 
-		</if>	
-		<if test="type != 'charge'">
-		 and  b.id= a.advertiser_id
-		 </if>	
-		 <if test="type!=null and type == 'charge'">
-		 and a.charge > 0
-		 and a.advertiser_id=0
-		 </if>
-		 <if test="type!=null and type == 'consume'">
-		 and a.consume > 0 
-		 </if>
-		 <if test="type!=null and type == 'allocate'">
-		 and a.allocate > 0 
-		 </if>
-		order by  a.act_time  desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>	
-	
-    <select id="selectByParams2"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.AdvBalance">
-		select 
-		a.act_time as actTime,b.name as advertiserName,num,charge,allocate,consume,a.balance,d.name as agentName
-		from t_adv_balance a,t_advertiser b,t_account c,t_adv_agent d
-        where b.id= a.advertiser_id 
-        and a.account_id=c.id
-        and a.agent_id=b.agent_id=c.agent_id=d.id
-        and a.allocate != 0
-       <!--     a.account_id=#{accountId} -->
-        and a.agent_id=#{agentId}
-        <if test="adverId !=null ">
-		and a.advertiser_id = #{adverId} 
-		</if>
-        <if test="startDate!=null and endDate!=null"> 
-            and a.act_time &gt;= #{startDate} and #{endDate} &gt;=a.act_time
-		</if>  
-	    <if test="advertiserId !=null ">
-		and a.advertiser_id = #{advertiserId} 
-		</if>	
-		order by  a.id   desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(a.id)
-		from t_adv_balance a,
-		<if test="type != 'charge'">
-		 t_advertiser b
-		</if>
-		<if test="type == 'charge'">
-		 t_adv_agent d
-		</if>
-        where 
-      <!--     a.account_id=#{accountId} -->
-        a.agent_id=#{agentId}
-        <if test="adverId !=null ">
-		and a.advertiser_id = #{adverId} 
-		</if>
-        <if test="type == 'charge'">
-		and a.agent_id=d.id 
-		</if>
-        <if test="startDate!=null and endDate!=null"> 
-            and a.act_time &gt;= #{startDate} and #{endDate} &gt;=a.act_time
-		</if> 
-	    <if test="advertiserId !=null ">
-		and a.advertiser_id = #{advertiserId} 
-		</if>	
-		<if test="type != 'charge'">
-		 and  b.id= a.advertiser_id
-		 </if>	
-		 <if test="type!=null and type == 'charge'">
-		 and a.charge > 0
-		 and a.advertiser_id=0
-		 </if>
-		 <if test="type!=null and type == 'consume'">
-		 and a.consume > 0 
-		 </if>
-		 <if test="type!=null and type == 'allocate'">
-		 and a.allocate > 0 
-		 </if>
-	</select>
-	
-	<select id="countByParams2" parameterType="map" resultType="int">
-		select count(a.id)
-		from t_adv_balance a,t_advertiser b,t_account c,t_adv_agent d
-        where b.id= a.advertiser_id 
-        and a.account_id=c.id
-        and a.agent_id=b.agent_id=c.agent_id=d.id
-        and a.allocate != 0
-        <!--     a.account_id=#{accountId} -->
-        and a.agent_id=#{agentId}
-        <if test="adverId !=null ">
-		and a.advertiser_id = #{adverId} 
-		</if>
-		<if test="startDate!=null and endDate!=null"> 
-            and a.act_time &gt;= #{startDate} and #{endDate} &gt;=a.act_time
-		</if>  
-	
-      <!--  <if test="advertiserName!=null"> 
-            and b.name = #{advertiserName}
-	    </if>	 -->
-	    <if test="advertiserId !=null ">
-		and a.advertiser_id = #{advertiserId} 
-		</if>	
-	</select>
-	
-	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.AdvBalance">
-		select 
-		<include refid="base_column" />
-		from t_adv_balance
-		<where>
-			id = #{id} 
-		</where>
-	</select>
-
-</mapper>

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

@@ -1,100 +0,0 @@
-<?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="advertiser.advAgentSqlMapper">
-
-	<sql id="base_column">
-		id,
-		name,
-		contacts,
-		tel,
-		mobile,
-		homepage as homePage,
-		address,
-		zip,
-		email,
-		title,
-		admin_id as adminId,
-		status
-	</sql>
-	
-	<select id="findById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.AdvAgent">
-		select 
-		<include refid="base_column" />
-		from t_adv_agent
-		<where>
-			id = #{id} and
-			status != -1
-		</where>
-	</select>
-	
-	<select id="findAll" resultType="com.cloudcross.ssp.advertiser.model.AdvAgent">
-		select 
-		<include refid="base_column" />
-		from t_adv_agent
-		<where>
-			status != -1
-		</where>
-	</select>
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(id)
-		from t_adv_agent where status != -1
-		<if test="value!=null">
-			and name like #{value}
-		</if>
-	</select>
-	
-	
-	<select id="findByParams" parameterType="map" resultType="int">
-		select 
-		<include refid="base_column" />
-		from t_adv_agent where status != -1
-		<if test="value!=null">
-			and name like #{value}
-		</if>
-		order by  id   desc
-	limit #{pager.offset}, #{pager.limit}
-	</select>
-	<select id="getNew" parameterType="com.cloudcross.ssp.advertiser.model.AdvAgent" resultType="com.cloudcross.ssp.advertiser.model.AdvAgent">
-		select 
-		<include refid="base_column" />
-		from t_adv_agent
-		<where>
-			status != -1 
-			and admin_id = #{adminId} 
-			and name = #{name}  
-		</where>
-	</select>
-	
-	<insert id="addAdvAgent" parameterType="com.cloudcross.ssp.advertiser.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="com.cloudcross.ssp.advertiser.model.AdvAgent">
-		update t_adv_agent
-		set name=#{name},
-			contacts=#{contacts},
-			tel=#{tel},
-			mobile=#{mobile},
-			homepage=#{homePage},
-			address=#{address},
-			zip=#{zip},
-			email=#{email},
-			title=#{title},
-			admin_id=#{adminId},
-			status=#{status}
-		where id=#{id}
-	</update>
-	
-	<update id="updateAdvAgentStatus" parameterType="HashMap">
-		update t_adv_agent
-			set status = #{status}
-			where id in
-			<foreach item="advAgentId" collection="advAgentIdList"
-		      open="(" separator="," close=")">
-		        #{advAgentId}
-			</foreach>
-	</update>
-	
-</mapper>

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

@@ -1,201 +0,0 @@
-<?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="advertiser.advertiserSqlMapper">
-	
-	<sql id="base_column">
-		t_advertiser.id as id,
-		t_advertiser.agent_id as agentId,
-		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.balance as balance,
-		t_advertiser.status as status,
-		t_advertiser.memo as memo,
-		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,
-		t_advertiser.admin_id as adminId,
-		t_advertiser.updated as updated
-	</sql>
-	
-	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.Advertiser">
-		select 
-		<include refid="base_column" />
-		from t_advertiser
-		<where>
-			id = #{id} and
-			status != -1
-		</where>
-	</select>
-	
-	<select id="selectByAgentId" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.Advertiser">
-		select 
-		<include refid="base_column" />
-		from t_advertiser
-		<where>
-			agent_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.advertiser.model.Advertiser">
-		select 
-		<include refid="base_column" />
-		from t_advertiser
-		<where>
-			agent_id = #{operatorId} and
-			status != -1.
-		</where>
-	</select>
-		
-	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Advertiser">
-		select 
-		<include refid="base_column" />
-		,b.name as industryName, count(c.advertiser_id) as orderNum from t_industry b,t_advertiser left join t_order c
-		 on t_advertiser.id = c.advertiser_id and c.status != -1
-		 where 1 = 1 
-		 <if test="value!=null">
-			and t_advertiser.name like #{value}
-		</if>
-		 <if test="status!=null">	
-			and t_advertiser.status = #{status}
-		</if>
-		 <if test="industryId!=null">	
-			and t_advertiser.industry_id = #{industryId}
-		</if>
-		 <if test="agentId!=null">	
-			and t_advertiser.agent_id = #{agentId}
-		</if>
-		 and t_advertiser.status != -1
-		 and t_advertiser.industry_id = b.id 
-		group by t_advertiser.id
-		order by t_advertiser.id   desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="selectByStatus"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.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="value!=null">
-			and a.name like #{value}
-		</if>
-		 <if test="status!=null">	
-			and a.status = #{status}
-		</if>
-		 <if test="industryId!=null">	
-			and a.industry_id = #{industryId}
-		</if>
-		 <if test="agentId!=null">	
-			and a.agent_id = #{agentId}
-		</if>
-	</select>
-	
-	<insert id="addAdvertiser" parameterType="com.cloudcross.ssp.advertiser.model.Advertiser">
-		insert into t_advertiser(industry_id,agent_id,name,reg_name,homepage,contacts,tel,email,memo
-		,cpi_path,licence_path,id_path,org_path,check_memo,updated)
-		values(#{industryId},#{agentId},#{name},#{regName},#{homePage},#{contacts},#{tel}, #{email},#{memo}
-		,#{cpiPath},#{licencePath},#{idPath}, #{orgPath},#{checkMemo},NOW())
-	</insert>
-	
-	<update id="editAdvertiser" parameterType="com.cloudcross.ssp.advertiser.model.Advertiser">
-		update t_advertiser 
-		set industry_id = #{industryId},name = #{name},reg_name = #{regName},homepage = #{homePage},contacts = #{contacts},tel=#{tel}
-		,email = #{email},memo = #{memo},updated = NOW(),admin_id = #{adminId}
-		,cpi_path = #{cpiPath},licence_path = #{licencePath},id_path = #{idPath},org_path = #{orgPath},check_memo = #{checkMemo}
-		where t_advertiser.id=#{id}
-	</update>
-	
-	<update id="updateAdvertiserStatus" parameterType="HashMap">
-		update t_advertiser 
-			set status = #{status},updated = NOW()
-			where t_advertiser.id in
-			<foreach item="advertiserId" collection="advertiserIdList"
-		      open="(" separator="," close=")">
-		        #{advertiserId}
-			</foreach>
-	</update>
-	
-	<update id="updateSupdated" parameterType="HashMap">
-		update t_adgroup
-			set t_adgroup.supdated= NOW()
-			where  t_adgroup.advertiser_id in
-			<foreach item="advertiserId" collection="advertiserIdList"
-		      open="(" separator="," close=")">
-		        #{advertiserId}
-			</foreach>
-	</update>
-	
-	<select id="sumBalanceById" parameterType="map" resultType="double">
-		 select sum(ad.balance) from t_advertiser ad
-		 where status != -1
-		<if test="agentId != null">		    
-		  and ad.agent_id=#{agentId} 
-	   </if>  
-	</select>
-	
-	<!-- 导出Excel用 -->
-	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.advertiser.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
-	</select>
-	
-	<select id="selectAdvertiserNameById" parameterType="int" resultType="String">
-		select name from t_advertiser where id = #{id}
-	</select>
-</mapper>

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

@@ -1,236 +0,0 @@
-<?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="advertiser.bannerTemplateSqlMapper">
-	<sql id="base_column">
-		t_banner_template.id,
-		agent_id as agentId,
-		advertiser_id as advertiserId,
-		name,
-		path,
-		path_small as smallPath,
-		type,
-		width,
-		height,
-		t_banner_template.status,
-		t_banner_template.updated
-	</sql>
-	
-	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.advertiser.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>
-	
-	<update id="updateBannerTime" parameterType="HashMap">
-		update t_banner 
-		set supdated=#{updataTime}
-		where banner_template_id in 
-		<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-		</foreach>
-	</update>
-	
-	<!-- 模板状态改变,更形t_banner_operator时间 -->
-	<update id="updateBannerOperatorTime" parameterType="HashMap">
-		update t_banner_operator 
-		set supdated=#{updataTime}
-		where banner_id in (select id from t_banner 
-		where t_banner.banner_template_id in
-		<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-		</foreach>)
-	</update>
-	
-<update id="updataDeleteBannerTemplateStatus" parameterType="HashMap">
-update t_banner_template a,t_banner b 
-set a.status=#{status},b.status=#{status},a.updated = #{updated}, b.updated = #{updated},b.supdated = #{updated} 
-where b.banner_template_id = a.id and a.id in 
-<foreach close=")" separator="," open="(" collection="idList" item="id"> #{id} </foreach>
-
-</update>
-	
-	<select id="findByCampaignId" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.AdGroup">
-	    select
-		<include refid="base_column"/>
-		from t_adgroup 
-		where campaign_id=#{campaignId} and t_adgroup.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.advertiser.model.BannerTemplate">
-		update t_banner_template 
-		set name = #{name},
-		path = #{path},
-		path_small = #{pathSmall},
-		width = #{width},
-		height = #{height},
-		type = ${type},
-		updated = #{updated}
-		WHERE id = #{id}
-	</update>
-	
-	<!-- 替换素材对应创意审核状态更新 -->
-	<update id="updataBannerReplace" parameterType="map">
-	update t_banner 
-	set checked = 0,
-		updated = #{supdated},
-		supdated = #{supdated}	
-	where banner_template_id = #{id}
-	</update>
-	<update id="updataBannerOperatorReplace" parameterType="map">
-	update t_banner_operator 
-	set checked = 0,
-		supdated = #{supdated}	
-	where banner_id in (select id from t_banner where banner_template_id =#{id})
-	</update>
-	<update id="updataIds" parameterType="com.cloudcross.ssp.advertiser.model.BannerTemplate">
-		update t_banner_template a
-		set a.advertiser_id = #{advertiserId},
-		a.agent_id = #{agentId}	
-		WHERE a.id = #{id}
-	</update>
-	
-	<select id="countByParams2" parameterType="map" resultType="int">
-		select count(t_banner_template.id)
-		from t_banner_template
-		<where>
-			<if test="status != null">
-			t_banner_template.status=#{status}
-			</if>
-			<if test="status == null">
-				t_banner_template.status in (0,1)
-			</if>
-			<if test="agentId != null">
-				and agent_id = #{agentId} 
-			</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="advertiserId != null">
-				and advertiser_id = #{advertiserId}
-			</if>
-			<if test="value != null">
-				and name like #{value}
-			</if>
-		</where>
-
-	</select>
-
-	<select id="findByParams2" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.BannerTemplate">
-		select <include refid="base_column"/>
-		from t_banner_template
-		<where>
-			<if test="status != null">
-				t_banner_template.status=#{status}
-			</if>
-			<if test="status == null">
-				t_banner_template.status in (0,1)
-			</if>
-			<if test="agentId != null">
-				and agent_id = #{agentId} 
-			</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="advertiserId != null">
-				and advertiser_id = #{advertiserId}
-			</if>
-			<if test="value != null">
-				and name like #{value}
-			</if>
-		</where>
-		order by t_banner_template.id desc
-		limit #{pager.offset}, #{pager.limit}
-	</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 t_banner_template.status != -1
-			<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="findByParams4" parameterType="map" resultType="com.cloudcross.ssp.advertiser.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 t_banner_template.status != -1
-			<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>
-
-	<insert id="addBannerTemplate" parameterType="com.cloudcross.ssp.advertiser.model.BannerTemplate" useGeneratedKeys="true"
-        keyProperty="id">
-insert into t_banner_template (agent_id,advertiser_id,name,path,path_small,type,width,height,status,updated) 
-values(#{agentId},#{advertiserId},#{name},#{path},#{pathSmall},#{type},#{width},#{height},#{status},#{updated})	
-
-</insert>
-	
-</mapper>

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

@@ -1,333 +0,0 @@
-<?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="advertiser.bannerSqlMapper">
-	<sql id="base_column">
-		id,
-		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
-		status,
-		checked,
-		updated,
-		supdated
-	</sql>
-	
-	<delete id="deleteBanner" parameterType="HashMap">
-		delete from t_banner where
-		id in
-		<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-		</foreach>
-	</delete>
-	
-	<update id="updateBannerStatus" parameterType="HashMap">
-		update t_banner 
-		set status=#{status},updated = #{updated},supdated = #{supdated} 
-		where id in
-		<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-		</foreach>
-		
-	</update>
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-	select count(a.id) from t_banner a ,t_banner_template b 
-		<where>
-				a.banner_template_id = b.id and a.adgroup_id=#{adGroupId}
-				<if test="value !=null">
-				and name like #{value}
-				</if>
-		</where>
-		and  a.status != -1
-	</select>
-	
-	<select id="countByAdGroupId" parameterType="long" resultType="int">
-	select count(id) from t_banner
-	where adgroup_id = #{adGroupId}
-	</select>
-	
-	<select id="findById1" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.Banner">
-		select
-		<include refid="base_column"/>
-		from t_banner
-		<where>
-		adgroup_id = #{adGroupId}
-		</where>
-	</select>
-	
-	<select id="findById" parameterType="long" resultMap="Banner">
-		select a.id as id,a.banner_template_id as bannerTemplateId,a.order_id as orderId,a.campaign_id as campaignId,a.adgroup_id as adGroupId,a.visit_address as visitAddress,
-	a.click_address as clickAddress,a.impression_address as impressionAddress,a.status as status1,a.checked as checked,a.updated as updated, b.id as bannerTemplateId,b.agent_id as agentId,b.advertiser_id as advertiserId,b.name as name,b.path as path,b.path_small as pathSmall,b.type as type,b.width as width,b.height as height,b.status as status,b.updated as updated from t_banner a LEFT JOIN t_banner_template b on a.banner_template_id=b.id   
-		<where>
-				a.id=#{id}
-		</where>
-	</select>
-	
-	<select id="findByParams" parameterType="map" resultMap="Banner">  
-		select a.id as id,a.banner_template_id as bannerTemplateId,a.order_id as orderId,a.campaign_id as campaignId,a.adgroup_id as adGroupId,a.visit_address as visitAddress,
-	a.click_address as clickAddress,a.impression_address as impressionAddress,a.status as status1,a.checked as checked,a.updated as updated,a.supdated as supdated,b.id as bannerTemplateId,b.agent_id as agentId,b.advertiser_id as advertiserId,b.agent_id as agentId,b.name as name,b.path as path,b.path_small as pathSmall,b.type as type,b.width as width,b.height as height,b.status as status,b.updated as updated from t_banner a LEFT JOIN t_banner_template b on a.banner_template_id=b.id   
-		<where>
-				a.adgroup_id=#{adGroupId}
-				<if test="value !=null">
-				and name like #{value}
-				
-				</if>
-		</where>
-		and  a.status != -1
-		order by a.id   desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-<resultMap type="com.cloudcross.ssp.advertiser.model.Banner" id="Banner">
-	<id property="id" column="id"/>
-	  <result property="bannerTemplateId" column="bannerTemplateId"/> 
-	   <result property="status" column="status1"/>   
-	<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="updated" column="updated"/>
-    <result property="supdated" column="supdated"/>  
-    <association property="bannerTemplate" javaType="com.cloudcross.ssp.advertiser.model.BannerTemplate" resultMap="bannerTemplate"/>
-</resultMap>  
-<resultMap type="com.cloudcross.ssp.advertiser.model.BannerTemplate" id="bannerTemplate">  
-   <id property="id" column="bannerTemplateId"/>  
-   <result property="advertiserId" column="advertiserId"/>
-   <result property="agentId" column="agentId"/>  
-   <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="updated"/>     
-</resultMap>  
-
-
-	<insert id="addBanner" parameterType="com.cloudcross.ssp.advertiser.model.Banner" useGeneratedKeys="true"
-		keyProperty="id">
-		insert into
-		t_banner(banner_template_id,order_id,campaign_id,adgroup_id,visit_address,click_address,impression_address,checked,memo,updated,supdated
-		)
-		values (
-		#{bannerTemplateId},#{orderId},#{campaignId},#{adGroupId},#{visitAddress},#{clickAddress},#{impressionAddress},#{checked},#{memo},#{updated},#{supdated}
-		)
-	</insert>
-	
-	<update id="editBanner" parameterType="com.cloudcross.ssp.advertiser.model.Banner">		 
-		update t_banner a,t_banner_template b
-		set b.name = #{bannerTemplate.name},
-		b.updated = #{bannerTemplate.updated},
-		a.visit_address = #{visitAddress},
-		a.click_address = #{clickAddress},
-		a.impression_address = #{impressionAddress},
-		a.checked = 0,
-		a.updated = #{updated},
-		a.supdated = #{supdated}
-		WHERE b.id = a.banner_template_id and a.id = #{id}
-	</update>
-	
-	<update id="updataBanner" parameterType="com.cloudcross.ssp.advertiser.model.Banner">		 
-		update t_banner a,t_banner_template b
-		set a.banner_template_id = #{bannerTemplateId},	
-		b.name = #{bannerTemplate.name},
-		b.updated = #{bannerTemplate.updated},
-		a.visit_address = #{visitAddress},
-		a.click_address = #{clickAddress},
-		a.impression_address = #{impressionAddress},
-		a.checked = 0,
-		a.updated = #{updated},
-		a.supdated = #{supdated}
-		WHERE b.id = #{bannerTemplate.id} and a.id = #{id}
-	</update>
-	
-	<update id="updataOperatorBanner" parameterType="HashMap">		 
-		update t_banner_operator
-		set checked = 0,supdated = #{supdated}
-		WHERE banner_id in
-		<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-		</foreach>
-	</update>
-<!-- 根据adgroupId修改banner的supdated -->
-	<update id="updateBannerSupdated" parameterType="HashMap">
-		update t_banner
-			set t_banner.supdated= #{modifyDate}
-			where  t_banner.adgroup_id in
-			<foreach item="adgroupId" collection="adGroupIdList"
-		      open="(" separator="," close=")">
-		        #{adgroupId}
-			</foreach>
-	</update>
-	
-	<!-- 根据orderId修改banner的supdated -->
-	<update id="updateBannerSupdatedByOrderId" parameterType="HashMap">
-		update t_banner
-			set t_banner.supdated=#{modifyDate}
-			where  t_banner.order_id in
-			<foreach item="orderId" collection="orderIdList"
-		      open="(" separator="," close=")">
-		        #{orderId}
-			</foreach>
-	</update>
-	
-	<!-- 根据campaignid修改banner的supdated -->
-	<update id="updateBannerSupdatedByCampaignId" parameterType="HashMap">
-		update t_banner
-			set t_banner.supdated=#{modifyDate}
-			where  t_banner.campaign_id in
-			<foreach item="campaignId" collection="campaignIdList"
-		      open="(" separator="," close=")">
-		        #{campaignId}
-			</foreach>
-	</update>
-	
-	
-	<update id="updateStatusByOrderId" parameterType="HashMap">
-		update t_banner a,t_banner_template b
-		set b.status=#{status},b.updated = #{modifyDate},a.updated = #{modifyDate} 
-		where
-		a.banner_template_id = b.id and
-		a.order_id in
-		<foreach item="orderId" collection="orderIdList" open="(" separator="," close=")">
-			#{orderId}
-		</foreach>
-	</update>
-	
-	<update id="updateStatusByCampaignId" parameterType="HashMap">
-		update t_banner a,t_banner_template b
-		set b.status=#{status},b.updated = #{modifyDate},a.updated = #{modifyDate} 
-		where
-		a.banner_template_id = b.id and
-		a.campaign_id in
-		<foreach item="campaignId" collection="campaignIdList" open="(" separator="," close=")">
-			#{campaignId}
-		</foreach>
-	</update>
-	
-	<update id="updateStatusByAdGroupId" parameterType="HashMap">
-		update t_banner a,t_banner_template b
-		set b.status=#{status},b.updated = #{modifyDate},a.updated = #{modifyDate} 
-		where
-		a.banner_template_id = b.id and
-		a.adgroup_id in
-		<foreach item="adGroupId" collection="adGroupIdList" open="(" separator="," close=")">
-			#{adGroupId}
-		</foreach>
-	</update>
-	
-	
-	<select id="countByParams1" parameterType="map" resultType="int">
-		select count(a.id)
-	 from t_banner a LEFT JOIN t_banner_template b on a.banner_template_id=b.id   
-					<where>
-					 a.status != -1 and b.status != -1
-					<if test="orderMark == null">
-					and a.order_id = #{orderId}
-					</if>
-					<if test="campaignMark == null">
-					and a.campaign_id = #{campaignId}
-					</if>
-					<if test="adGroupMark == null">
-					and a.adgroup_id = #{adGroupId}
-					</if>
-					<if test="status!=null">
-					 and a.status = #{status} and b.status = #{status}
-					</if>
-		<if test="bannerTemplateName != null">
-			and b.name like #{bannerTemplateName}
-		</if>
-		<if test="agentId!=null">
-			 and b.agent_id = #{agentId}
-		</if>
-		<if test="agentId == null">
-			and b.advertiser_id = #{advertiserId}
-		</if>
-					</where>
-	</select>
-	
-	<select id="findByParams1" parameterType="map" resultMap="Banner">  
-		select a.status as status1,a.id as id,a.banner_template_id as bannerTemplateId,a.order_id as orderId,a.campaign_id as campaignId,a.adgroup_id as adGroupId,a.visit_address as visitAddress,
-	a.click_address as clickAddress,a.impression_address as impressionAddress, a.checked as checked,a.updated as updated,b.id as bannerTemplateId,b.agent_id as agentId,b.advertiser_id as advertiserId,b.agent_id as agentId,b.name as name,b.path as path,b.path_small as pathSmall,b.type as type,b.width as width,b.height as height,b.status as status,b.updated as updated from t_banner a LEFT JOIN t_banner_template b on a.banner_template_id=b.id   
-					<where>
-					 a.status != -1 and b.status != -1
-					<if test="orderMark == null">
-					and a.order_id = #{orderId}
-					</if>
-					<if test="campaignMark == null">
-					and a.campaign_id = #{campaignId}
-					</if>
-					<if test="adGroupMark == null">
-					and a.adgroup_id = #{adGroupId}
-					</if>
-					<if test="status!=null">
-					 and a.status = #{status} and b.status = #{status}
-					</if>
-		<if test="bannerTemplateName != null">
-			and b.name like #{bannerTemplateName}
-		</if>
-		<if test="agentId!=null">
-			 and b.agent_id = #{agentId}
-		</if>
-		<if test="agentId == null">
-			and b.advertiser_id = #{advertiserId}
-		</if>
-					</where>
-		order by a.id   desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-	<select id="findByParams2" parameterType="map" resultMap="Banner">  
-		select a.status as status1,a.id as id,a.banner_template_id as bannerTemplateId,a.order_id as orderId,a.campaign_id as campaignId,a.adgroup_id as adGroupId,a.visit_address as visitAddress,
-	a.click_address as clickAddress,a.impression_address as impressionAddress, a.checked as checked,a.updated as updated,b.id as bannerTemplateId,b.agent_id as agentId,b.advertiser_id as advertiserId,b.agent_id as agentId,b.name as name,b.path as path,b.path_small as pathSmall,b.type as type,b.width as width,b.height as height,b.status as status,b.updated as updated from t_banner a LEFT JOIN t_banner_template b on a.banner_template_id=b.id   
-					<where>
-					 a.status != -1 and b.status != -1
-					<if test="orderMark == null">
-					and a.order_id = #{orderId}
-					</if>
-					<if test="campaignMark == null">
-					and a.campaign_id = #{campaignId}
-					</if>
-					<if test="adGroupMark == null">
-					and a.adgroup_id = #{adGroupId}
-					</if>
-					<if test="status!=null">
-					 and a.status = #{status} and b.status = #{status}
-					</if>
-		<if test="bannerTemplateName != null">
-			and b.name like #{bannerTemplateName}
-		</if>
-		<if test="agentId!=null">
-			 and b.agent_id = #{agentId}
-		</if>
-		<if test="agentId == null">
-			and b.advertiser_id = #{advertiserId}
-		</if>
-					</where>
-		order by a.id   desc
-	</select>
-	<update id="updateOperatorBannerTime" parameterType="HashMap">
-			update t_banner_operator 
-			set supdated = #{supdated}
-			where banner_id in 
-			<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-			</foreach>
-	
-	</update>
-	
-</mapper>

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

@@ -1,226 +0,0 @@
-<?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="advertiser.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.advertiser.model.Campaign">
-		insert into t_campaign
-			(name,agent_id,advertiser_id,
-			order_id,activate_time,expire_time,totalbudget,
-			<if test="dailyBudget !=null">dailybudget,</if>
-			<if test="impression!=null">impression,</if>
-			<if test="click !=null">click,</if>
-			<if test="conversion !=null">conversion,</if>
-			<if test="dailyImpression !=null">daily_impression,</if>
-			<if test="dailyClick !=null">daily_click,</if>
-			<if test="dailyConversion !=null">daily_conversion,</if>
-			<if test="memo !=null">memo,</if>
-			 updated)
-		values
-			(#{name},#{agentId},#{advertiserId},
-			#{orderId},#{activeTime},#{expireTime},#{totalBudget},
-			<if test="dailyBudget !=null">#{dailyBudget},</if>
-			<if test="impression!=null">#{impression},</if>
-			<if test="click !=null">#{click},</if>
-			<if test="conversion !=null">#{conversion},</if>
-			<if test="dailyImpression !=null">#{dailyImpression},</if>
-			<if test="dailyClick !=null">#{dailyClick},</if>
-			<if test="dailyConversion !=null">#{dailyConversion},</if>
-			<if test="memo !=null">#{memo},</if>
-			NOW())
-	</insert>
-	
-	<update id="editCampaign" parameterType="com.cloudcross.ssp.advertiser.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 = #{dailyConversion},
-		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.advertiser.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 and t_adgroup.status != -1
-		    where 1=1
-		<if test="advMark!=null">
-			and t_campaign.agent_id = #{agentId}
-		</if> 
-		<if test="advMark==null">
-			and t_campaign.advertiser_id = #{advertiserId}
-		</if> 
-		<if test="orderMark==null">
-			and t_campaign.order_id = #{orderId}
-		</if> 
-	 
-		 and t_campaign.status != -1
-		 	<if test="value!=null">
-				and t_campaign.name like #{value}
-			</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 1=1
-		<if test="advMark!=null">
-			and t_campaign.agent_id = #{agentId}
-		</if> 
-		<if test="advMark==null">
-			and t_campaign.advertiser_id = #{advertiserId}
-		</if> 
-		<if test="orderMark==null">
-			and t_campaign.order_id = #{orderId}
-		</if> 
-		and status != -1
-			<if test="value!=null">
-				and name like #{value}
-			</if>
-						
-		<if test="status!=null">	
-			and t_campaign.status = #{status}
-		</if>
-	</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>
-	
-	<update id="updateSupdated" parameterType="HashMap">
-		update t_adgroup
-			set t_adgroup.supdated= NOW()
-			where  t_adgroup.campaign_id in
-			<foreach item="id" collection="idList" open="(" separator=","
-			close=")">
-			#{id}
-		</foreach>
-	</update>
-	
-	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.advertiser.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.advertiser.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.advertiser.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>	
-	
-	<!-- 导出Excel用 -->
-	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.advertiser.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
-	</select>
-	
-	<update id="updateStatusByAdvertiserId" parameterType="HashMap">
-		update t_campaign
-			set status = #{status},updated = NOW()
-			where t_campaign.advertiser_id in
-			<foreach item="advertiserId" collection="advertiserIdList"
-		      open="(" separator="," close=")">
-		        #{advertiserId}
-			</foreach>
-	</update>
-	
-	<update id="updateStatusByOrderId" parameterType="HashMap">
-		update t_campaign 
-			set status = #{status},updated = #{modifyDate}
-			where t_campaign.order_id in
-			<foreach item="orderId" collection="orderIdList"
-		      open="(" separator="," close=")">
-		        #{orderId}
-			</foreach>
-	</update>
-
-</mapper>

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

@@ -1,114 +0,0 @@
-<?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="advertiser.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.advertiser.model.CodeClass">
-		select 
-		<include refid="base_column" />
-		from t_code_class
-		<where>
-			name = #{codeName}
-		</where>
-		order by id  desc
-	</select>
-	
-		<!--  根据id从数据库中查询代码分类对象-->
-	 <select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.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.advertiser.model.CodeClass">
-		select 
-		<include refid="base_column" />
-		from t_code_class 
-		<where>
-		<if test="advertiserId!=null and advertiserId != '' and advertiserId!=-1 ">
-		advertiser_id=#{advertiserId}
-		</if>	
-		
-	    <if test="codeName!=null">
-		and name like #{codeName}
-		</if>
-		
-		
-		
-		<!--  
-		<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>-->
-		</where>
-		
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-	<!--  计算总行数获取列表 -->
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(id)
-		from t_code_class 
-		<where>
-			1=1
-			<if test="advertiserId != null and advertiserId != '' and advertiserId!=-1 ">
-				and advertiser_Id = #{advertiserId}
-			</if>
-			
-			<if test="codeName != null and codeName != ''">
-				and name like #{codeName}
-			</if>
-		</where>	
-	</select>
-	
-	
-	
-	  <insert id="addCodeClass" parameterType="com.cloudcross.ssp.advertiser.model.CodeClass">
-		insert into t_code_class(advertiser_id, name, para, updated )
-		values(#{advertiserId},#{codeName},#{codePara},#{updated})
-	</insert>
-	
-	
-	<update id="editCodeClass" parameterType="com.cloudcross.ssp.advertiser.model.CodeClass">
-		update t_code_class 
-		set name=#{codeName}, para=#{codePara}, updated=#{updated}
-		<!--  set name=#{codeName}, para=#{codePara}, updated=#{updated} , script_code=#{script}, pic_code=#{picture}-->
-		where id = #{id}
-	</update>
-	
-	<!-- 根据id查询代码值 -->
-	<select id="getScriptById"  parameterType="int" resultType="String">
-		select 
-		script_code
-		from t_code_class where id = #{id}
-	</select>
-	<!-- 根据id查询图片值 -->
-	<select id="getPicyureById"  parameterType="int" resultType="String">
-		select 
-		pic_code
-		from t_code_class where id = #{id}
-	</select>
-	
-</mapper>

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

@@ -1,119 +0,0 @@
-<?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="advertiser.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.advertiser.model.CodeConvert">
-		select 
-		<include refid="base_column" />
-		from t_code_convert
-		<where>
-			name = #{convertName}
-		</where>
-	</select>
-	
-	
-	 <select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.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.advertiser.model.CodeConvert">
-		select 
-		<include refid="base_column" />
-		from t_code_convert 
-		<where>
-		<if test="advertiserId!=null and advertiserId != '' and advertiserId!=-1 ">
-		advertiser_id=#{advertiserId}
-		</if>	
-		
-		<if test="convertName!=null">
-		and name like #{convertName}
-		</if>	
-		
-		<!--  
-		<if test="key!=null and value!=null">
-			<choose>
-				<when test="key=='convertName'">
-					and name like #{convertName}
-				</when>
-				
-			</choose>	
-		</if>
-		-->
-		</where>
-		
-		limit #{pager.offset}, #{pager.limit}
-		
-	</select>
-	
-
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(id)
-		from t_code_convert 	
-		<where>
-		<if test="advertiserId!=null and advertiserId != '' and advertiserId!=-1 ">
-		advertiser_id=#{advertiserId}
-		</if>	
-		
-		<if test="convertName!=null">
-		and name like #{convertName}
-		</if>
-		</where>
-		<!--	<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.advertiser.model.CodeConvert">
-		insert into t_code_convert(advertiser_Id, name, type, updated )
-		values(#{advertiserId},#{convertName},#{convertType},#{updated})
-	</insert>
-	
-	
-	<update id="editCodeConvert" parameterType="com.cloudcross.ssp.advertiser.model.CodeConvert">
-		update t_code_convert 
-		set name=#{convertName}, type=#{convertType}, updated=#{updated}
-		<!-- set name=#{convertName}, type=#{convertType}, updated=#{updated}, script_code=#{script}, pic_code=#{picture}  -->
-		where id = #{id}
-	</update>
-	
-	<!-- 根据id查询代码值 -->
-	<select id="getScriptById"  parameterType="int" resultType="String">
-		select 
-		script_code
-		from t_code_convert where id = #{id}
-	</select>
-	<!-- 根据id查询图片值 -->
-	<select id="getPicyureById"  parameterType="int" resultType="String">
-		select 
-		pic_code
-		from t_code_convert where id = #{id}
-	</select>
-	
-</mapper>

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

@@ -1,62 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.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.advertiser.model.CodeSite">
-		select 
-		 script_code as script
-	    	
-		 from t_code_site 
-		
-		<where>
-		
-		 <if test="advertiserId!=null">
-			 advertiser_id = #{advertiserId}
-		</if>
-		 
-         </where>		
-		</select>
-	
-	
-	 <!-- select script_code , pic_code from t_code_site where advertiser_id=1
-	  -->
-	<select id="getScriptByAdId"  parameterType="int" resultType="String">
-		select 
-		script_code
-		from t_code_site where advertiser_id = #{advertiserId}
-	</select>
-	
-	<select id="getPicyureByAdId"  parameterType="int" resultType="String">
-		select 
-		pic_code
-		from t_code_site where advertiser_id = #{advertiserId}
-	</select>
-	
-	
-</mapper>

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

@@ -1,107 +0,0 @@
-<?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="advertiser.dimensionSqlMapper">
-	
-	<!-- 报表维度 -->
-	<!-- 维度字段 -->
-	<sql id="base_column">
-		id,name,account_id as accountId,content,is_default as isDefault	
-	</sql>
-	
-	<!-- 根据account_id查询维度不带分页 -->
-	<select id="queryDimensionByAccountId" parameterType="java.lang.Long" resultType="com.cloudcross.ssp.advertiser.model.Dimension">
-		select id,name,content,is_default as isDefault from t_rpt_adv_schema where account_id = #{accountId} 
-	</select>
-	
-	<!-- 根据account_id查询维度带分页 -->
-	<select id="queryDimensionByAccountIdWithPage" parameterType="java.lang.Long" resultType="com.cloudcross.ssp.advertiser.model.Dimension">
-		select id,name,content,is_default as isDefault from t_rpt_adv_schema where account_id = #{accountId} limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<!--查询满足条件的记录数  -->
-	<select id="queryDimensionCountByAccountId" parameterType="java.util.Map" resultType="java.lang.Integer">
-		select count(id) from t_rpt_adv_schema where account_id = #{accountId}
-	</select>
-	
-	<!-- 插入一条维度信息 -->
-	<insert id="insertDimension" parameterType="com.cloudcross.ssp.advertiser.model.Dimension">
-		insert into t_rpt_adv_schema(account_id,name,content,is_default) values (#{accountId},#{name},#{content},#{isDefault})
-	</insert>
-	
-	<!-- 根据ID查询维度信息 -->
-	<select id="selectDimensionById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.Dimension">
-		select <include refid="base_column"/> from t_rpt_adv_schema where id = #{id} 
-	</select>
-	
-	<!-- 根据ID删除维度 -->
-	<delete id="deleteDimensionById" parameterType="java.util.Map">
-		delete from t_rpt_adv_schema where id in
-		<foreach item="id" collection="idList" open="(" separator="," close=")">
-			#{id}
-		</foreach>
-	</delete>
-	
-	<!-- 根据ID修改维度 -->
-	<update id="editDimension" parameterType="com.cloudcross.ssp.advertiser.model.Dimension">
-		update t_rpt_adv_schema set name=#{name},content=#{content} where id = #{id}
-	</update>
-	 
-	<insert id="addDimension" parameterType="com.cloudcross.ssp.advertiser.model.Dimension">
-		insert into t_rpt_adv_schema(account_id,name,content,is_default)
-		values(#{accountId},#{name},#{content},#{isDefault})
-	</insert>
-	
-	<!-- 将否改为是 -->
-	<update id="updateDimensionDefaulToTrue" parameterType="com.cloudcross.ssp.advertiser.model.Dimension">
-		update t_rpt_adv_schema set is_default=1 where id = #{id} and account_id = #{accountId};
-	</update>
-	
-	<!-- 将是改为否 -->
-	<update id="updateDimensionDefaultToFalse" parameterType="com.cloudcross.ssp.advertiser.model.Dimension">
-		update t_rpt_adv_schema set is_default=0 where is_default = 1 and account_id = #{accountId};
-	</update>
-	
-	<select id="queryDimensionByNameAndAccountId" parameterType="java.util.Map" resultType="com.cloudcross.ssp.advertiser.model.Dimension">
-		select <include refid="base_column"/> from t_rpt_adv_schema where name = #{name} and account_id = #{accountId}
-	</select>
-	
-	<select id="queryDimensionByContentAndAccountId" parameterType="java.util.Map" resultType="com.cloudcross.ssp.advertiser.model.Dimension">
-		select <include refid="base_column"/> from t_rpt_adv_schema where content = #{content} and account_id = #{accountId}
-	</select>
-	
-	<select id="selectDimensionIdBydefault" parameterType="java.lang.Integer" resultType="java.util.Map">
-		select count(id) as num,id,name from t_rpt_adv_schema where is_default=1 and account_id = #{accountId}
-	</select>
-	
-	
-	<select id="selectByName"  parameterType="string" resultType="com.cloudcross.ssp.advertiser.model.Dimension">
-		select 
-		<include refid="base_column" />
-		from t_rpt_adv_schema
-		<where>
-			name = #{name}
-		</where>
-		order by id  desc
-	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-</mapper>

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

@@ -1,42 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.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.advertiser.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>

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

@@ -1,96 +0,0 @@
-<?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="advertiser.financeSqlMapper">
-	
-	<sql id="base_column">
-		id,
-		account_id as accountId,
-		act_time as actTime,
-		num,
-	    t_advertiser.name as advertiserName,                    
-		memo,
-		agent_id as agentId,
-		advertiser_id as advertiserId,
-		charge,
-		allocate,
-		consume,
-		balance
-	</sql>
-	
-	<!-- 此时加入了帐号管理,只有该帐号下的广告主显示 -->
-	<select id="findByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Finance">
-	    select a.id,b.name as advertiserName,(sum(a.allocate)-sum(a.consume)) as adBalance,sum(a.allocate) as sumAllocation,max(a.act_time) as upDated from t_adv_balance a,t_advertiser b 
-        where a.advertiser_id=b.id and a.agent_id=b.agent_id
-        and a.agent_id=#{agentId}
-     <!--     and a.account_id=#{accountId} -->
-        <if test="advertiserId !=null ">
-		and a.advertiser_id = #{advertiserId} 
-		</if>		
-		<if test="adverId !=null ">
-		and a.advertiser_id = #{adverId} 
-		</if>	
-     <!--     <if test="advertiserName !=null ">
-		and b.name = #{advertiserName} 
-		</if> 
-     -->
-        group by a.advertiser_id		
-		order by  b.name   desc
-	limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(1)
-		from (( select distinct a.advertiser_id from  t_adv_balance a,t_advertiser b  
-        where a.advertiser_id=b.id and a.agent_id=b.agent_id
-        and a.agent_id=#{agentId}
-     <!--  and a.account_id=#{accountId}  -->
-        <if test="advertiserId !=null ">
-		and a.advertiser_id = #{advertiserId} 
-		</if>	
-		<if test="adverId !=null ">
-		and a.advertiser_id = #{adverId} 
-		</if>
-   	 group by a.advertiser_id ) c)
-		
-	</select>
-	
-	<!-- 最主要的是下面的balance,此时的balance对应为广告主的余额 -->
-	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.Finance">
-		select 
-		id,
-		account_id as accountId,
-		act_time as actTime,
-		num,                  
-		memo,
-		agent_id as agentId,
-		advertiser_id as advertiserId,
-		charge,
-		allocate,
-		consume,
-		balance
-		from t_adv_balance
-		where id = #{id}
-	</select>
-	
-	<insert id="editFinance"  parameterType="com.cloudcross.ssp.advertiser.model.Finance">
-          insert into t_adv_balance
-          (account_id,agent_id,advertiser_id,charge,allocate,consume,memo,num,balance,act_time)
-          values
-          (#{accountId},#{agentId},#{advertiserId},0,#{allocate},0,#{memo},#{num},#{balance}+#{allocate},NOW())                    
-	</insert>
-	
-	<insert id="addFinance"  parameterType="com.cloudcross.ssp.advertiser.model.Finance">
-	      insert into t_adv_balance
-          (account_id,agent_id,advertiser_id,allocate,balance,act_time)
-          values
-          (#{accountId},#{agentId},0,#{allocate},#{agentBalance}-#{allocate},NOW())    	
-	</insert>
-	
-	<select id="findByBalance"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Finance" >
-	     select a.balance as agentBalance from t_adv_balance a 
-	     where a.agent_id = #{agentId} and a.advertiser_id = 0
-	     and a.account_id = #{accountId}
-	     order by a.act_time desc limit 1
-	</select>
-
-</mapper>

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

@@ -1,25 +0,0 @@
-<?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="advertiser.industrySqlMapper">
-
-<sql id="base_column">
-	id,
-	name
-</sql>
-
-	<select id="findAllIndustry"  resultType="com.cloudcross.ssp.advertiser.model.Industry">
-	    select
-	    <include refid="base_column" />
-	    from t_industry
-	</select>
-	
-	<select id="findByIndustryId" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.Industry">
-		select 
-		 <include refid="base_column" />
-		from t_industry
-		<where>
-			id = #{id}
-		</where>
-	</select>
-	
-</mapper>

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

@@ -1,40 +0,0 @@
-<?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="advertiser.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.advertiser.model.Location">
-		select
-		<include refid="base_column" />
-		from t_location where country = #{country}  
-	</select>
-	
-	<select id="findByProvince" resultType="com.cloudcross.ssp.advertiser.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.advertiser.model.Location">
-		select <include refid="base_column" /> 
-		from t_location
-		where location_t = #{locationT}
-	</select>
-</mapper>

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

@@ -1,85 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.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>
-	
-	<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.advertiser.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.advertiser.model.Log">
-		select 
-		<include refid="base_column" />
-		from t_log where
-		module = #{module}
-	</select>
-	
-	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.Log">
-		select 
-		<include refid="base_column" />
-		from t_log
-		<where>
-			id = #{id}
-		</where>
-	</select>
-	
-	<update id="editLog" parameterType="com.cloudcross.ssp.advertiser.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>	
-	<!-- 导出Excel用 -->
-	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Log">
-		select 
-		<include refid="base_column" />
-		from t_log 	where 
-		 table_name=#{tableName}
-		and record_id=#{recordId}
-		order by id   desc
-	</select>
-</mapper>
-	

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

@@ -1,82 +0,0 @@
-<?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="advertiser.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.advertiser.model.Message">
-		insert into t_message(content,send_time,type)
-		values(#{content},#{sendTime},#{type})
-	</insert>
-	
-	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.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.advertiser.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>
-	

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

@@ -1,69 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.model.Operator">
-		select 
-		<include refid="base_column" />
-		from t_operator
-		<where>
-			 status !=-1
-		</where>
-	</select>
-	
-	<update id="editOperator" parameterType="com.cloudcross.ssp.advertiser.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>

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

@@ -1,182 +0,0 @@
-<?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="advertiser.orderSqlMapper">
-	
-	<sql id="base_column">
-		t_order.id as id,
-		t_order.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="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.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 
-        and t_campaign.status != -1 and t_campaign.advertiser_id = #{advertiserId}
-		where 1=1
-		<if test="advMark!=null">
-			and t_order.agent_id = #{agentId}
-		</if> 
-		<if test="advMark==null">
-			and t_order.advertiser_id = #{advertiserId}
-		</if> 
-		and t_order.status != -1
-		<if test="value!=null">
-			and t_order.name like #{value}
-		</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
-		<if test="advMark!=null">
-			and t_order.agent_id = #{agentId}
-		</if> 
-		<if test="advMark==null">
-			and t_order.advertiser_id = #{advertiserId}
-		</if> 
-		<if test="value!=null">
-			and t_order.name like #{value}
-		</if>
-		<if test="status!=null">	
-			and t_order.status = #{status}
-		</if>
-	</select>
-	
-	  <select id="selectByAdvertiserType" parameterType="string" resultType="com.cloudcross.ssp.advertiser.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.advertiser.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.advertiser.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.advertiser.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.advertiser.model.Order">
-		insert into t_order(name,budget,comment,updated,advertiser_id,agent_id)
-		values(#{name},#{budget},#{comment},#{updated},#{advertiserId},#{agentId})
-	</insert>
-	
-	<update id="editOrder" parameterType="com.cloudcross.ssp.advertiser.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>
-	
-	<update id="updateSupdated" parameterType="HashMap">
-		update t_adgroup
-			set t_adgroup.supdated= NOW()
-			where  t_adgroup.order_id in
-			<foreach item="orderId" collection="orderIdList"
-		      open="(" separator="," close=")">
-		        #{orderId}
-			</foreach>
-	</update>
-	
-	<!-- 导出Excel用 -->
-	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.advertiser.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
-	</select>
-	
-	<select id="selectOrderNameById" parameterType="int" resultType="String">
-		select name from t_order where id = #{id}
-	</select>
-	<update id="updateStatusByAdvertiserId" parameterType="HashMap">
-		update t_order
-			set status = #{status},updated = NOW()
-			where t_order.advertiser_id in
-			<foreach item="advertiserId" collection="advertiserIdList"
-		      open="(" separator="," close=")">
-		        #{advertiserId}
-			</foreach>
-	</update>
-</mapper>
-	

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

@@ -1,21 +0,0 @@
-<?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="advertiser.placeSqlMapper">
-	<sql id="base_column">
-		id,
-		name
-	</sql>
-	
-	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.Place">
-		select
-		<include refid="base_column"/>
-		from t_place
-	</select>
-	
-	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.Place">
-		select
-		<include refid="base_column"/>
-		from t_place
-		where id = #{id}
-	</select>
-</mapper>

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

@@ -1,693 +0,0 @@
-<?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="advertiser.adReportSqlMapper">
-	
-	<sql id="base_column">
-		id, 
-		advertiser_id as advertiserId,
-		order_id as orderId,
-		campaign_id as campaignId,
-		adgroup_id  as adGroupId,
-		 banner.id as bannerId,
-		t_banner.banner_template_id as bannerTemplateId,
-		t_advertiser.name as advertiserName,
-		t_order.name as orderName,
-		t_campaign.name as campaignName,
-		t_adgroup.name  as adGroupName,
-		t_banner_template.name as bannerName,
-		date as reportDate,
-		request,
-		impression,
-		impressionRate,
-		click,
-		visit,
-		conversion,
-		conversionRate,
-		clickRate,
-		visitRate,
-		conversionRate,
-		ecmp as eCmp,
-		consume,
-		os,
-		location,
-		impressionSum,
-		clickSum,
-		visitSum,
-		conversionSum,
-		eCmpSum,
-		consumeSum,
-		clickRatesum,
-		visitRatesum,
-		conversionRatesum
-		
-	</sql>
-	
-	<select id="findCountForDeliverEffectAnalysis" parameterType="map" resultType="int">
-		select count(1) from (
-		select b.name advertiserName,c.name orderName,d.name campaignName,e.name adgroupName,g.name bannerName,a.date reportDate,sum(a.impression) as impression,sum(a.click) as click,100*sum(a.click)/sum(a.impression) as clickRate,sum(a.visit) as visit,100*sum(a.visit)/sum(a.click) as visitRate,sum(a.conversion) as conversion,100*sum(a.conversion)/sum(a.visit) as conversionRate,sum(a.ecmp) as ecmp,sum(a.consume) as consume 
-		from t_rpt_advertiser a,t_advertiser b,t_order c,t_campaign d,t_adgroup e,t_banner f,t_banner_template g
-		where a.advertiser_id=b.id and a.order_id=c.id and a.campaign_id=d.id and a.adgroup_id=e.id and a.banner_id=f.id and f.banner_template_id=g.id
-		<if test="advertiserId != null and advertiserId ">
-			and a.advertiser_id = #{advertiserId}
-		</if>
-		<if test="orderId != null and orderId != ''">
-			and a.order_id = #{orderId}
-		</if>
-		<if test="campaginId != null and campaginId != ''">
-			and a.campagin_id = #{campaginId}
-		</if>
-		<if test="adgroupId != null and adgroupId != ''">
-			and a.adgroup_id = #{adgroupId}
-		</if>
-		<if test="startDate != null and startDate != ''and endDate != nul and endDate != ''">
-			and a.date &gt;=#{startDate} and a.date &lt;=#{endDate}
-		</if>
-		<choose>
-			<when test="dimensionStr != null and dimensionStr != ''">
-				GROUP BY ${dimensionStr}
-			</when>
-			<otherwise>
-				group by reportDate order by reportDate desc
-			</otherwise>
-		</choose>
-		) t	
-	</select>
-	
-	
-	
-	
-	
-	
-		<select id="findCountForLocation" parameterType="map" resultType="int">
-		select count(location) from ( select location
-		from t_rpt_adv_location a, t_advertiser b
-       	<where>	
-       	a.advertiser_id = b.id and a.date &gt;= #{startDate} and #{endDate} &gt;=a.date
-			<if test="advertiserId ==null">
-			 and b.agent_id=#{agentId}
-			</if>
-			<if test="advertiserId != null">
-			and a.advertiser_id = #{advertiserId}	
-			</if>
-			<if test="orderId !=null">
-			 and a.order_id=#{orderId}
-			</if>
-		     <if test="campaignId !=null">
-			 and a.campaign_id=#{campaignId}
-			</if>
-			<if test="adGroupId !=null">
-			 and a.adgroup_id=#{adGroupId}
-			</if>
-		</where>
-		group by a.location
-		) as c
-	</select>
-	
-    <select id="findCountForOs" parameterType="map" resultType="int">
-		select count(1) 
-		from t_rpt_adv_os ros, t_advertiser, t_order, t_campaign, t_adgroup        
-        <where>	          
-           ros.advertiser_id = t_advertiser.id  and  ros.order_id =  t_order.id and ros.campaign_id = t_campaign.id  and ros.adgroup_id =  t_adgroup.id
-	 	   
-			<if test="advertiserId !=null">
-			 and ros.advertiser_id=#{advertiserId}
-			</if>
-			
-			<if test="orderId !=null">
-			 and ros.order_id=#{orderId}
-			</if>
-			  
-		     <if test="campaignId !=null">
-			 and ros.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and ros.adgroup_id=#{adGroupId}
-			</if>
-		 
-			<if test="startDate!=null and endDate!=null"> 
-	            and ros.date &gt;= #{startDate} and #{endDate} &gt;=ros.date
-			</if>
-		
-		</where>
-	</select>
-	
-	
-    <select id="findCountForScene" parameterType="map" resultType="int">
-		select count(1) 
-		from t_rpt_adv_place rp, t_advertiser, t_order, t_campaign, t_adgroup , t_place      
-
-        <where>      
-            rp.place_id = t_place.id and  rp.advertiser_id = t_advertiser.id  
-            and  rp.order_id = t_order.id and rp.campaign_id = t_campaign.id  and rp.adgroup_id =  t_adgroup.id
-			<if test="advertiserId !=null">
-			 and rp.advertiser_id=#{advertiserId}
-			</if>
-			
-			<if test="orderId !=null">
-			 and rp.order_id=#{orderId}
-			</if>
-			  
-		     <if test="campaignId !=null">
-			 and rp.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and rp.adgroup_id=#{adGroupId}
-			</if>
-		 
-			<if test="startDate!=null and endDate!=null"> 
-	         and rp.date &gt;= #{startDate} and rp.date &lt;= #{endDate}
-			</if>
-		
-		</where>
-	</select>
-	
-	
-	 <select id="findByTotalReport" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select b.name advertiserName,c.name orderName,d.name campaignName,e.name adgroupName,g.name bannerName,a.date reportDate,sum(a.impression) as impression,sum(a.click) as click,100*sum(a.click)/sum(a.impression) as clickRate,sum(a.visit) as visit,100*sum(a.visit)/sum(a.click) as visitRate,sum(a.conversion) conversion,100*sum(a.conversion)/sum(a.visit) as conversionRate,sum(a.ecmp) ecmp,sum(a.consume) as consume 
-		from t_rpt_advertiser a,t_advertiser b,t_order c,t_campaign d,t_adgroup e,t_banner f,t_banner_template g
-		where a.advertiser_id=b.id and a.order_id=c.id and a.campaign_id=d.id and a.adgroup_id=e.id and a.banner_id=f.id and f.banner_template_id=g.id
-		<if test="advertiserId != null and advertiserId ">
-			and a.advertiser_id = #{advertiserId}
-		</if>
-		<if test="orderId != null and orderId != ''">
-			and a.order_id = #{orderId}
-		</if>
-		<if test="campaginId != null and campaginId != ''">
-			and a.campagin_id = #{campaginId}
-		</if>
-		<if test="adgroupId != null and adgroupId != ''">
-			and a.adgroup_id = #{adgroupId}
-		</if>
-		<if test="startDate != null and startDate != ''and endDate != nul and endDate != ''">
-			and a.date &gt;=#{startDate} and a.date &lt;=#{endDate}
-		</if>
-		<choose>
-			<when test="dimensionStr != null and dimensionStr != ''">
-				GROUP BY ${dimensionStr}
-			</when>
-			<otherwise>
-				group by reportDate
-			</otherwise>
-		</choose>		
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-	
-	
-	
-	<select id="findByTotalReport2" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select 
-		t_advertiser.name as advertiserName,  t_order.name as orderName, t_campaign.name as campaignName, t_adgroup.name  as adGroupName, t_banner_template.name as bannerName, 
-        
-         ad.date as reportDate,   ad.hour as hour,  
-        (select sum(impression) from t_rpt_advertiser_hour) as impressionSum,ad.impression,ad.click,visit,ad.conversion, 
-        100*ad.click/ad.impression as clickRate ,100*visit/ad.click as visitRate ,100*ad.conversion/visit as conversionRate ,ecmp as eCmp,ad.consume,
-		(select sum(click) from t_rpt_advertiser_hour) as clickSum, (select sum(visit) from t_rpt_advertiser_hour) as visitSum,
-        (select sum(conversion) from t_rpt_advertiser_hour) as conversionSum, 
-		(select sum(ecmp) from t_rpt_advertiser_hour) as eCmpSum, (select sum(consume) from t_rpt_advertiser_hour) as consumeSum, 
-        100*(select sum(click) from t_rpt_advertiser_hour)/(select sum(impression) from t_rpt_advertiser_hour) as clickRatesum, 
-		100*(select sum(visit) from t_rpt_advertiser_hour)/(select sum(click) from t_rpt_advertiser_hour) as visitRatesum,
-		100*(select sum(conversion) from t_rpt_advertiser_hour)/(select sum(visit) from t_rpt_advertiser_hour) as conversionRatesum
-		
-		from t_rpt_advertiser_hour ad,t_advertiser,t_order, t_campaign, t_banner, t_adgroup, t_banner_template
-           
-           
-           <where>
-	 	    ad.advertiser_id=t_advertiser.id  and  ad.order_id = t_order.id  and ad.campaign_id= t_campaign.id   
-	 	    and  ad.adgroup_id=t_adgroup.id
-            and  ad.banner_id=t_banner.id 
-            and  t_banner.banner_template_id = t_banner_template.id
-
-			<if test="advertiserId !=null">
-			 and ad.advertiser_id=#{advertiserId}
-			</if>
-			
-			<if test="orderId !=null">
-			 and ad.order_id=#{orderId}
-			</if>
-			  
-		     <if test="campaignId !=null">
-			 and ad.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and ad.adgroup_id=#{adGroupId}
-			</if>
-		 
-		 <if test="startDate!=null and endDate!=null"> 
-            and date &gt;= #{startDate} and #{endDate} &gt;=date
-		</if>
-		 
-		  </where> 
-		
-		  limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-	<select id="findByLocation" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select t_location.cn_city as location, 100 * sum(impression) /(select sum(impression) from t_rpt_adv_location a1,t_advertiser b1	
-		<where>	
-       	a1.advertiser_id = b1.id and a1.date &gt;= #{startDate} and #{endDate} &gt;=a1.date
-			<if test="advertiserId ==null">
-			 and b1.agent_id=#{agentId}
-			</if>
-			<if test="advertiserId != null">
-			and a1.advertiser_id = #{advertiserId}	
-			</if>
-			<if test="orderId !=null">
-			 and a1.order_id=#{orderId}
-			</if>
-		     <if test="campaignId !=null">
-			 and a1.campaign_id=#{campaignId}
-			</if>
-			<if test="adGroupId !=null">
-			 and a1.adgroup_id=#{adGroupId}
-			</if>
-		</where>
-		) as impressionRate, sum(impression) as impression, sum(click) as click, 100 * sum(click) / sum(impression) as clickRate,
-		sum(visit) as visit, 100 * sum(visit) / sum(click) as visitRate, 100 * sum(conversion) / sum(visit) as conversionRate,
-		sum(conversion) as conversion, sum(ecmp) as eCmp, sum(consume) as consume from t_rpt_adv_location a, t_advertiser b,t_location
-		 	<where>	
-       	a.advertiser_id = b.id and a.location = t_location.location and a.date &gt;= #{startDate} and #{endDate} &gt;=a.date
-			<if test="advertiserId ==null">
-			 and b.agent_id=#{agentId}
-			</if>
-			<if test="advertiserId != null">
-			and a.advertiser_id = #{advertiserId}	
-			</if>
-			<if test="orderId !=null">
-			 and a.order_id=#{orderId}
-			</if>
-		     <if test="campaignId !=null">
-			 and a.campaign_id=#{campaignId}
-			</if>
-			<if test="adGroupId !=null">
-			 and a.adgroup_id=#{adGroupId}
-			</if>
-		</where>
-		group by a.location
-		limit #{pager.offset}, #{pager.limit}
-	   </select>
-	
-	
-	
-	<select id="findByOs" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select 
-		t_advertiser.name as advertiserName,  t_order.name as orderName, t_campaign.name as campaignName, t_adgroup.name  as adGroupName,
-
-              ros.date as reportDate,
-        ros.impression,ros.click,visit,ros.conversion,os,
-        100*ros.impression/(select sum(t_rpt_adv_os.impression) from t_rpt_adv_os, t_advertiser, t_order, t_campaign, t_adgroup        
-
-
-            where	          
-         
-           t_rpt_adv_os.advertiser_id = t_advertiser.id  and  t_rpt_adv_os.order_id =  t_order.id and t_rpt_adv_os.campaign_id = t_campaign.id  and t_rpt_adv_os.adgroup_id =  t_adgroup.id
-		     	   
-			<if test="advertiserId !=null">
-			 and t_rpt_adv_os.advertiser_id=#{advertiserId}
-			</if> 
-			
-			<if test="orderId !=null">
-			 and t_rpt_adv_os.order_id=#{orderId}
-			</if>
-		     
-		     <if test="campaignId !=null">
-			 and t_rpt_adv_os.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and t_rpt_adv_os.adgroup_id=#{adGroupId}
-			</if>
-			
-	 		<if test="startDate!=null and endDate!=null"> 
-            and t_rpt_adv_os.date &gt;= #{startDate} and #{endDate} &gt;=t_rpt_adv_os.date
-		     </if>
-	) as impressionRate,100*ros.click/ros.impression as clickRate ,
-        100*visit/ros.click as visitRate ,100*ros.conversion/visit as conversionRate,ecmp as eCmp,consume   
-        from t_rpt_adv_os ros, t_advertiser, t_order, t_campaign, t_adgroup        
-
-
-            <where>	          
-         
-           ros.advertiser_id = t_advertiser.id  and  ros.order_id =  t_order.id and ros.campaign_id = t_campaign.id  and ros.adgroup_id =  t_adgroup.id
-		     	   
-			<if test="advertiserId !=null">
-			 and ros.advertiser_id=#{advertiserId}
-			</if> 
-			
-			<if test="orderId !=null">
-			 and ros.order_id=#{orderId}
-			</if>
-		     
-		     <if test="campaignId !=null">
-			 and ros.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and ros.adgroup_id=#{adGroupId}
-			</if>
-			
-	 		<if test="startDate!=null and endDate!=null"> 
-            and ros.date &gt;= #{startDate} and #{endDate} &gt;=ros.date
-		     </if>
-	
-		   </where> 
-
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	
-	
-
-	
-	 <select id="findByPlaceName" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select 
-	             t_place.name as placeName,	t_advertiser.name as advertiserName,  t_order.name as orderName, 
-	             t_campaign.name as campaignName, t_adgroup.name as adGroupName,
-	             
-	              rp.date as reportDate,
-                  rp.impression,rp.click,visit,rp.conversion,
-              100*rp.impression/(select sum(t_rpt_adv_place.impression) from t_rpt_adv_place , t_advertiser, t_order, t_campaign, t_adgroup , t_place      
-
-
-             where      
-            t_rpt_adv_place.place_id = t_place.id and  t_rpt_adv_place.advertiser_id = t_advertiser.id  
-            and  t_rpt_adv_place.order_id = t_order.id and t_rpt_adv_place.campaign_id = t_campaign.id  and t_rpt_adv_place.adgroup_id =  t_adgroup.id
-	   
-			<if test="advertiserId !=null">
-			 and t_rpt_adv_place.advertiser_id=#{advertiserId}
-			</if> 
-			
-			<if test="orderId !=null">
-			 and t_rpt_adv_place.order_id=#{orderId}
-			</if>
-		     
-		     <if test="campaignId !=null">
-			 and t_rpt_adv_place.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and t_rpt_adv_place.adgroup_id=#{adGroupId}
-			</if>
-		 
-	  		 <if test="startDate!=null and endDate!=null"> 
-            and t_rpt_adv_place.date &gt;= #{startDate} and #{endDate} &gt;=t_rpt_adv_place.date
-		        </if>) as impressionRate,100*rp.click/rp.impression as clickRate ,
-              100*visit/rp.click as visitRate ,100*rp.conversion/visit as conversionRate,ecmp as eCmp,consume   
-            from t_rpt_adv_place rp, t_advertiser, t_order, t_campaign, t_adgroup , t_place      
-
-
-              <where>      
-            rp.place_id = t_place.id and  rp.advertiser_id = t_advertiser.id  
-            and  rp.order_id = t_order.id and rp.campaign_id = t_campaign.id  and rp.adgroup_id =  t_adgroup.id
-	   
-			<if test="advertiserId !=null">
-			 and rp.advertiser_id=#{advertiserId}
-			</if> 
-			
-			<if test="orderId !=null">
-			 and rp.order_id=#{orderId}
-			</if>
-		     
-		     <if test="campaignId !=null">
-			 and rp.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and rp.adgroup_id=#{adGroupId}
-			</if>
-		 
-	  		 <if test="startDate!=null and endDate!=null"> 
-            and rp.date &gt;= #{startDate} and #{endDate} &gt;=rp.date
-		        </if>
-		     
-		  </where> 
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-
-	
-	<!--<select id="findByOrderName" parameterType="map" resultType="DeliverAnalysis">
-		select 
-		t_order.name as orderName,impression,click,visit,conversion,click/impression as clickRate ,visit/click as visitRate ,conversion/visit as conversionRate,eCmp,income
-		from t_rpt_daily
-		left join t_order
-		ON t_rpt_daily.order_id=t_order.id
-		order by order_id desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="findByCampaignName" parameterType="map" resultType="DeliverAnalysis">
-		select 
-		t_campaign.name as campaignName,impression,click,visit,conversion,click/impression as clickRate ,visit/click as visitRate ,conversion/visit as conversionRate ,eCmp,income
-		from t_rpt_daily
-		left join t_campaign
-		ON t_rpt_daily.campaign_id=t_campaign.id
-		order by campaign_id desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="findByAdGroupName" parameterType="map" resultType="DeliverAnalysis">
-		select 
-		t_adgroup.name as adGroupName,impression,click,visit,conversion,click/impression as clickRate ,visit/click as visitRate ,conversion/visit as conversionRate ,eCmp,income
-		from t_rpt_daily
-		left join t_adgroup
-		ON t_rpt_daily.adgroup_id=t_adgroup.id
-		order by adgroup_id desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="findByBannerName" parameterType="map" resultType="DeliverAnalysis">
-		select 
-		t_banner.name as bannerName,impression,click,visit,conversion,click/impression as clickRate ,visit/click as visitRate ,conversion/visit as conversionRate ,eCmp,income
-		from t_rpt_daily
-		left join t_banner
-		ON t_rpt_daily.banner_id=t_banner.id
-		order by banner_id desc
-		limit #{pager.offset}, #{pager.limit}
-	</select>  -->
-	
-	
-	
-	
-	<select id="findByAdvertiser" parameterType="map" resultType="map">
-		select ad.name as advertiserName,date as reportDate,sum(a.consume) as totalConsume,sum(a.impression) as totalImpression,
-sum(click) as totalClick, if(sum(a.impression) > 0,sum(a.click)/sum(a.impression),0)
-		as clickRate from t_rpt_advertiser as a left join t_advertiser ad on a.advertiser_id=ad.id
-		where a.advertiser_id=#{advertiserId}
-		and a.date >= #{startDate} and a.date &lt;=#{endDate}
-		group by date(a.date)
-	</select>
-	
-	<select id="findByAdvertiser3" parameterType="map" resultType="map">
-		select ad.name as advertiserName,date as reportDate,sum(a.consume) as totalConsume,sum(a.impression) as totalImpression,
-sum(click) as totalClick, if(sum(a.impression) > 0,sum(a.click)/sum(a.impression),0)
-		as clickRate from t_rpt_advertiser as a left join t_advertiser ad on a.advertiser_id=ad.id
-		where a.advertiser_id=#{advertiserId}
-		and a.date >= #{startDate} and a.date &lt;=#{endDate}
-		group by date(a.date)
-		limit #{pager.offset}, #{pager.limit} 
-	</select>
-	
-	
-	<select id="findByAdvertiser1" parameterType="map" resultType="map">
-		select ad.name as advertiserName,date as reportDate, a.hour as hour,sum(a.consume) as totalConsume,sum(a.impression) as totalImpression,
-sum(click) as totalClick, if(sum(a.impression) > 0,sum(a.click)/sum(a.impression),0)
-		as clickRate from t_rpt_advertiser_hour as a left join t_advertiser ad on a.advertiser_id=ad.id
-		where a.advertiser_id=#{advertiserId} and a.date = #{startDate}
-		group by a.hour
-	</select>
-	
-	
-	<select id="findByAdvertiser2" parameterType="map" resultType="map">
-		select ad.name as advertiserName,date as reportDate, a.hour as hour,sum(a.consume) as totalConsume,sum(a.impression) as totalImpression,
-sum(click) as totalClick, if(sum(a.impression) > 0,sum(a.click)/sum(a.impression),0)
-		as clickRate from t_rpt_advertiser_hour as a left join t_advertiser ad on a.advertiser_id=ad.id
-		where a.advertiser_id=#{advertiserId} and a.date = #{startDate}
-		group by a.hour
-		limit #{pager.offset}, #{pager.limit} 
-	</select>
-	
-	<select id="findCountForChart" parameterType="map" resultType="int">
-	select count(date) from((select distinct date from t_rpt_advertiser where advertiser_id=#{advertiserId}
-		and date >= #{startDate} and date &lt;=#{endDate}) as a)
-	</select>
-	
-	<select id="findCountForChart1" parameterType="map" resultType="int">
-		select count(hour) from ((select distinct hour from t_rpt_advertiser_hour where advertiser_id=#{advertiserId} and date = #{startDate}) as a) 
-	</select>
-	
-	<select id="findTotalImpressionAndClickByAdvertiserId" parameterType="map" resultType="map">
-		select sum(impression) as totalImpression, sum(click) as totalClick
-		from t_rpt_advertiser 
-		where advertiser_id = #{advertiserId} and date = #{date}
-	</select>
-	
-	
-	<select id="findTotalImpressionAndClickByAgentId" parameterType="map" resultType="map">
-		select sum(a.impression) as totalImpression, sum(a.click) as totalClick
-		from t_rpt_advertiser  a,t_advertiser b
-		where b.id = a.advertiser_id and b.agent_id = #{agentId}
-		and a.date = #{date}
-	
-	</select>
-	
-	<!--数据报表 导出excel -->
-	<select id="findByTotalForExcel" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select b.name advertiserName,c.name orderName,d.name campaignName,e.name adgroupName,g.name bannerName,a.date reportDate,sum(a.impression) as impression,sum(a.click) as click,100*sum(a.click)/sum(a.impression) as clickRate,sum(a.visit) as visit,100*sum(a.visit)/sum(a.click) as visitRate,sum(a.conversion) conversion,100*sum(a.conversion)/sum(a.visit) as conversionRate,sum(a.ecmp) ecmp,sum(a.consume) as consume 
-		from t_rpt_advertiser a,t_advertiser b,t_order c,t_campaign d,t_adgroup e,t_banner f,t_banner_template g
-		where a.advertiser_id=b.id and a.order_id=c.id and a.campaign_id=d.id and a.adgroup_id=e.id and a.banner_id=f.id and f.banner_template_id=g.id
-		<if test="advertiserId != null and advertiserId ">
-			and a.advertiser_id = #{advertiserId}
-		</if>
-		<if test="orderId != null and orderId != ''">
-			and a.order_id = #{orderId}
-		</if>
-		<if test="campaginId != null and campaginId != ''">
-			and a.campagin_id = #{campaginId}
-		</if>
-		<if test="adgroupId != null and adgroupId != ''">
-			and a.adgroup_id = #{adgroupId}
-		</if>
-		<if test="startDate != null and startDate != ''and endDate != nul and endDate != ''">
-			and a.date &gt;=#{startDate} and a.date &lt;=#{endDate}
-		</if>
-		<choose>
-			<when test="dimensionStr != null and dimensionStr != ''">
-				GROUP BY ${dimensionStr}
-			</when>
-			<otherwise>
-				group by reportDate 
-			</otherwise>
-		</choose>		
-	</select>
-	
-	<select id="findByLocationForExcel" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select t_location.cn_city as location, 100 * sum(impression) /(select sum(impression) from t_rpt_adv_location a1,t_advertiser b1	
-		<where>	
-       	a1.advertiser_id = b1.id and a1.date &gt;= #{startDate} and #{endDate} &gt;=a1.date
-			<if test="advertiserId ==null">
-			 and b1.agent_id=#{agentId}
-			</if>
-			<if test="advertiserId != null">
-			and a1.advertiser_id = #{advertiserId}	
-			</if>
-			<if test="orderId !=null">
-			 and a1.order_id=#{orderId}
-			</if>
-		     <if test="campaignId !=null">
-			 and a1.campaign_id=#{campaignId}
-			</if>
-			<if test="adGroupId !=null">
-			 and a1.adgroup_id=#{adGroupId}
-			</if>
-		</where>
-		) as impressionRate, sum(impression) as impression, sum(click) as click, 100 * sum(click) / sum(impression) as clickRate,
-		sum(visit) as visit, 100 * sum(visit) / sum(click) as visitRate, 100 * sum(conversion) / sum(visit) as conversionRate,
-		sum(conversion) as conversion, sum(ecmp) as eCmp, sum(consume) as consume from t_rpt_adv_location a, t_advertiser b,t_location
-		 	<where>	
-       	a.advertiser_id = b.id and a.location = t_location.location and a.date &gt;= #{startDate} and #{endDate} &gt;=a.date
-			<if test="advertiserId ==null">
-			 and b.agent_id=#{agentId}
-			</if>
-			<if test="advertiserId != null">
-			and a.advertiser_id = #{advertiserId}	
-			</if>
-			<if test="orderId !=null">
-			 and a.order_id=#{orderId}
-			</if>
-		     <if test="campaignId !=null">
-			 and a.campaign_id=#{campaignId}
-			</if>
-			<if test="adGroupId !=null">
-			 and a.adgroup_id=#{adGroupId}
-			</if>
-		</where>
-		group by a.location
-	   </select>
-	
-	
-	
-	<select id="findByOsForExcel" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select 
-		t_advertiser.name as advertiserName,  t_order.name as orderName, t_campaign.name as campaignName, t_adgroup.name  as adGroupName,
-
-              ros.date as reportDate,
-        ros.impression,ros.click,visit,ros.conversion,os,
-        100*ros.impression/(select sum(impression) from t_rpt_adv_os) as impressionRate,100*ros.click/ros.impression as clickRate ,
-        100*visit/ros.click as visitRate ,100*ros.conversion/visit as conversionRate,ecmp as eCmp,consume   
-        from t_rpt_adv_os ros, t_advertiser, t_order, t_campaign, t_adgroup        
-
-
-            <where>	          
-         
-           ros.advertiser_id = t_advertiser.id  and  ros.order_id =  t_order.id and ros.campaign_id = t_campaign.id  and ros.adgroup_id =  t_adgroup.id
-		     	   
-			<if test="advertiserId !=null">
-			 and ros.advertiser_id=#{advertiserId}
-			</if> 
-			
-			<if test="orderId !=null">
-			 and ros.order_id=#{orderId}
-			</if>
-		     
-		     <if test="campaignId !=null">
-			 and ros.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and ros.adgroup_id=#{adGroupId}
-			</if>
-			
-	 		<if test="startDate!=null and endDate!=null"> 
-            and ros.date &gt;= #{startDate} and #{endDate} &gt;=ros.date
-		     </if>
-	
-		   </where> 
-
-	</select>
-	
-	 <select id="findByPlaceNameForExcel" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.DeliverAnalysis">
-		select 
-	             t_place.name as placeName,	t_advertiser.name as advertiserName,  t_order.name as orderName, 
-	             t_campaign.name as campaignName, t_adgroup.name as adGroupName,
-	             
-	              rp.date as reportDate,
-                  rp.impression,rp.click,visit,rp.conversion,
-              100*rp.impression/(select sum(impression) from t_rpt_adv_place) as impressionRate,100*rp.click/rp.impression as clickRate ,
-              100*visit/rp.click as visitRate ,100*rp.conversion/visit as conversionRate,ecmp as eCmp,consume   
-            from t_rpt_adv_place rp, t_advertiser, t_order, t_campaign, t_adgroup , t_place      
-
-
-              <where>      
-            rp.place_id = t_place.id and  rp.advertiser_id = t_advertiser.id  
-            and  rp.order_id = t_order.id and rp.campaign_id = t_campaign.id  and rp.adgroup_id =  t_adgroup.id
-	   
-			<if test="advertiserId !=null">
-			 and rp.advertiser_id=#{advertiserId}
-			</if> 
-			
-			<if test="orderId !=null">
-			 and rp.order_id=#{orderId}
-			</if>
-		     
-		     <if test="campaignId !=null">
-			 and rp.campaign_id=#{campaignId}
-			</if>
-			
-			<if test="adGroupId !=null">
-			 and rp.adgroup_id=#{adGroupId}
-			</if>
-		 
-	  		 <if test="startDate!=null and endDate!=null"> 
-            and rp.date &gt;= #{startDate} and #{endDate} &gt;=rp.date
-		        </if>
-		     
-		  </where> 
-	</select>
-	
-</mapper>

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

@@ -1,170 +0,0 @@
-<?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="advertiser.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.advertiser.model.Resources" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.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.advertiser.model.Resources" parameterType="String">
-		select
-		<include refid="selectId" />
-		from t_resources
-		where name = #{accountName}
-	</select>
-	<!-- 新增 -->
-	<insert id="add" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.model.Resources">
-		SELECT 
-		<include refid="selectId" />
-		 from t_resources where id=#{id}
-	</select>
-	
-	<select id="queryByParentId" parameterType="java.util.HashMap" resultType="com.cloudcross.ssp.advertiser.model.Resources">
-		SELECT 
-		<include refid="selectId" />
-		 from t_resources where  type =  convert(#{type},SIGNED) - 1
-	</select>
-	
-	
-	<!-- 更新 -->
-	<update id="update" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.model.Resources">
-	    update t_resources
-	    set level = #{level}
-	   where id = #{id}
-	</update>
-	<!-- 根据部门Id获取该用户的权限-->
-	<select id="findRoleRes" parameterType="String" resultType="com.cloudcross.ssp.advertiser.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.advertiser.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.advertiser.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.advertiser.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.advertiser.model.AccountResources">
-	insert into t_res_accounts (account_id,res_id) value (#{accountId},#{resourceId})
-	</insert>
-</mapper>

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

@@ -1,92 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.model.Roles" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.model.Roles" parameterType="String">
-		select
-		<include refid="selectId" />
-		from t_ly_role
-		where name = #{name}
-	</select>
-	
-	<insert id="add" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.model.Roles">
-		select
-		<include refid="selectId" />
-		from t_ly_role where id=#{id}
-	</select>
-	<update id="update" parameterType="com.cloudcross.ssp.advertiser.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.advertiser.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.advertiser.model.RoleAccount">
-	insert into t_acc_role (acc_id,role_id) value (#{accountId},#{roleId})
-	</insert>
-</mapper>

+ 0 - 23
src/main/java/com/cloudcross/ssp/advertiser/model/mapper/rpt-advertiser-hour.sql.xml

@@ -1,23 +0,0 @@
-<?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="advertiser.rptAdvertiserHourSqlMapper">
-	
-	<select id="findEveryHourData" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.RptAdvertiserHour">
-		select hour,sum(impression) as impression,sum(click) as click,sum(visit) as visit, sum(conversion) as conversion, sum(ecmp) as ecmp,sum(consume) as consume
-		from t_rpt_advertiser_hour where  date = #{startDate}
-		<if test="advertiserId!=null">
-        	and advertiser_id = #{advertiserId}
-        </if>   
-        <if test="campaignId!=null">
-        	and campaign_id = #{campaignId}
-        </if>     
-        <if test="adgroupId!=null">
-        	and adgroup_id = #{adgroupId}
-        </if>    
-        <if test="bannerId!=null">
-        	and banner_id = #{bannerId}
-        </if>    
-		group by hour
-	</select>
-
-</mapper>

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

@@ -1,12 +0,0 @@
-<?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="advertiser.rptZoneSqlMapper">
-
-	<select id="findByOperatorIdAndDate" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.RptZone">
-		select operator_id as operatorId, date, sum(pv) as totalPv, sum(uv) as totalUv,
-        sum(impression) as totalImpression, sum(click) as totalClick,sum(income) as totalIncome from t_rpt_zone
-        where  operator_id = #{operatorId} and date=#{date}
-	</select>
-	
-	
-</mapper>

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

@@ -1,32 +0,0 @@
-<?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="advertiser.sizeSqlMapper">
-	<sql id="base_column">
-		id,
-		width,
-		height
-	</sql>
-
-	<select id="findAllSize"  resultType="com.cloudcross.ssp.advertiser.model.Size">
-		select * from t_size order by id desc
-	</select>
-	
-	
-	
-	
-	<select id="findSize" parameterType="int" resultType="com.cloudcross.ssp.advertiser.model.Size">
-		select * from t_size 
-		
-		<where> id = #{id} </where>
-		
-	</select>
-	
-	
-	
-	<select id="findSizeId" parameterType = "map" resultType="com.cloudcross.ssp.advertiser.model.Size">
-		select * from t_size 
-		
-		<where> width = #{width} and height = #{height} </where>
-		
-	</select>
-</mapper>

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

@@ -1,25 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.model.UserGroup">
-	    select
-	    <include refid="base_column" />
-	    from rv_accounts
-	    <where>
-	    	account_id = #{id}
-	    </where>
-	</select>
-</mapper>

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

@@ -1,123 +0,0 @@
-<?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="advertiser.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.advertiser.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.advertiser.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.advertiser.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.advertiser.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.advertiser.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.advertiser.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>

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

@@ -1,46 +0,0 @@
-<?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="advertiser.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.advertiser.model.UserLogin" parameterType="java.util.HashMap">
-		select
-		<include refid="selectId" />
-		from t_userloginlist where 1=1
-		
-	</select>
-	
-	<select id="getById" resultType="com.cloudcross.ssp.advertiser.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.advertiser.model.UserLogin">
-		insert into t_userloginlist ( userId,userName,
-		loginIP)
-		values (#{userId},#{userName},
-		#{loginIP})
-	</insert>
-
-	
-</mapper>

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

@@ -1,85 +0,0 @@
-<?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="advertiser.wifiSqlMapper">
-	<sql id="base_column">
-		id,
-		location,
-		address,
-		longitude,
-		latitude
-	</sql>
-	
-	<select id="findAddress" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
-       select 
-		<include refid="base_column" />
-		from t_wifi where 1 = 1
-		<if test="key!=null and value!=null">
-			<choose>
-				<when test="key=='address'">
-					and address like #{value}
-				</when>
-			</choose>	
-		</if>
-		order by  id				
-	</select>
-	
-  	<select id="findWifi" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
-       select 
-       <include refid="base_column" />
-       from t_wifi where location in (select location from t_wifi where location = #{location})
-       and latitude &lt;= #{maxlat} and latitude &gt;= #{minlat} 
-       and longitude &lt;= #{maxlng}	and longitude &gt;= #{minlng}			
-	</select>
-	
-	<select id="findLocation" parameterType="String" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
-       select 
-       <include refid="base_column" />
-       from t_wifi where location = #{location}			
-	</select>
-	
-	<select id="findAllAdgroupWifi" parameterType="Long" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
-       select 
-       <include refid="base_column" />
-       from t_wifi where id in (select wifi_id from t_adgroup_wifi where adgroup_id = #{adGroupId})
-       order by id		
-	</select>
-	
-	
-	<insert id="addAdgroupWifi" parameterType="map">
-		insert into
-		t_adgroup_wifi (adgroup_id,wifi_id)
-		values (#{adGroupId},#{wifiId})
-	</insert>
-	
-	<delete id="deleteAdgroupWifi" parameterType="long"> 
-	delete from t_adgroup_wifi where adgroup_id = #{adGroupId} 
-	</delete>
-	
-	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
-		select 
-		<include refid="base_column" />
-		from t_wifi where 1 = 1
-		<if test="key!=null and value!=null">
-			<choose>
-				<when test="key=='address'">
-					and address like #{value}
-				</when>
-			</choose>	
-		</if>
-		order by  id
-		limit #{pager.offset}, #{pager.limit}
-	</select>
-	
-	<select id="countByParams" parameterType="map" resultType="int">
-		select count(id)
-		from t_wifi where 1 = 1
-		<if test="key!=null and value!=null">
-			<choose>
-				<when test="key=='address'">
-					and address like #{value}
-				</when>
-			</choose>	
-		</if>
-	</select>
-
-</mapper>

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

@@ -1,34 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.HashMap;
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Account;
-import com.cloudcross.ssp.base.service.BaseService;
-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);
-}

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

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

+ 0 - 14
src/main/java/com/cloudcross/ssp/advertiser/service/IAdGroupPlaceService.java

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

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

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

+ 0 - 50
src/main/java/com/cloudcross/ssp/advertiser/service/IAdGroupService.java

@@ -1,50 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.AdGroup;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.common.utils.Pager;
-
-
-/**
- * 投放服务接口定义
- * @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);
-	boolean updatedAdgroupSupdated(Long id);
-	
-	List<AdGroup> findByParams(Map<String, Object> paramMap);
-	
-	List<Long>findAllAdGroudByAdvertiserId(Long advertiserId);
-	public boolean updateSupdatedByAdvertiserId(List<Long> advertiserIdList, Date date);
-	public boolean updateSupdatedByOrderId(List<Long> orderIdList, Date date);
-	public boolean updateSupdatedByCampaignId(List<Long> campaignIdList,Date date);
-	public boolean updateStatusByAdvertiserId(List<Long> AdvertiseIdList, int status);
-	public boolean updateStatusByOrderId(List<Long> AdvertiseIdList, int status);
-	public boolean updateStatusByCampaignId(List<Long> campaignIdList, int status);
-	public boolean updateStatusAll(List<Long> adGroupIdList, int status);
-}

+ 0 - 71
src/main/java/com/cloudcross/ssp/advertiser/service/IAdReportService.java

@@ -1,71 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.DeliverAnalysis;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.common.utils.Pager;
-
-/**
- * 报表服务
- * @author chenyou
- *
- */
-public interface IAdReportService extends IGenericService<DeliverAnalysis>{
-	
-    int findCountForDeliverEffectAnalysis(Map<String, Object> paramMap);
-    
-    int findCountForDeliverEffectAnalysis2(Map<String, Object> paramMap);
-	
-	int findCountForLocation(Map<String, Object> paramMap);
-	
-	int findCountForOs(Map<String, Object> paramMap);
-	
-	int findCountForScene(Map<String, Object> paramMap);
-	
-
-	
-	List<DeliverAnalysis> findByTotalReport(Map<String, Object> paramMap, Pager pager);
-	
-	
-	List<DeliverAnalysis> findByTotalReport2(Map<String, Object> paramMap, Pager pager);
-	
-	
-    List<DeliverAnalysis> findByPlaceName(Map<String, Object> paramMap, Pager pager);
-    List<DeliverAnalysis> findByLocation(Map<String, Object> paramMap, Pager pager);
-    
-    List<DeliverAnalysis> findByOs(Map<String, Object> paramMap, Pager pager);
-
-	
-	//首页顶部统计数据查询
-	Map<String,Object> findCompare(Map<String, Object> paramMap);
-	
-	//查询首页图表
-	List<HashMap<String, Object>> findChart(String startDate, String endDate, Long advertiserId);
-	
-	int findCountForChart(String startDate, String endDate, Long advertiserId);
-	
-	List<HashMap<String, Object>> findChart(String startDate, String endDate, Long advertiserId, Pager pager);
-	/**
-	 * 根据广告主id和时间查询它的总的曝光数和点击数
-	 */
-	HashMap<String, Object> findTotalImpressionAndClickByAdvertiserId(Map<String, Object> paramMap);
-	
-	/**
-	 * 根据代理商id查询该代理商下的所有广告主的曝光数和点击数的总和
-	 */
-	HashMap<String, Object> findTotalImpressionAndClickByAgentId(Map<String, Object> paramMap);
-	
-	/**
-	 * 导出excel报表
-	 */
-	List<DeliverAnalysis> findByTotalReport(Map<String, Object> paramMap);
-	
-    List<DeliverAnalysis> findByPlaceName(Map<String, Object> paramMap);
-    
-    List<DeliverAnalysis> findByLocation(Map<String, Object> paramMap);
-    
-    List<DeliverAnalysis> findByOs(Map<String, Object> paramMap);
-}

+ 0 - 8
src/main/java/com/cloudcross/ssp/advertiser/service/IAdvAgentService.java

@@ -1,8 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import com.cloudcross.ssp.advertiser.model.AdvAgent;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IAdvAgentService extends IGenericService<AdvAgent>{
-	public AdvAgent getNew(AdvAgent t);
-}

+ 0 - 22
src/main/java/com/cloudcross/ssp/advertiser/service/IAdvBalanceService.java

@@ -1,22 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.AdvBalance;
-import com.cloudcross.ssp.advertiser.service.IAdvBalanceService;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.common.utils.Pager;
-
-/**
- * 用户服务接口定义。
- * 
- * @author
- */
-public interface IAdvBalanceService extends IGenericService<AdvBalance> {
-	 AdvBalance findAdvertiserName(String advertiserName);
-	 int countByParams(Map<String, Object> paramMap);
-	 int countByParams2(Map<String, Object> paramMap);
-	 List<AdvBalance> findByParams(Map<String, Object> paramMap, Pager pager);
-	 List<AdvBalance> findByParams2(Map<String, Object> paramMap, Pager pager);
-}

+ 0 - 43
src/main/java/com/cloudcross/ssp/advertiser/service/IAdvertiserService.java

@@ -1,43 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.cloudcross.ssp.advertiser.model.Account;
-import com.cloudcross.ssp.advertiser.model.Advertiser;
-import com.cloudcross.ssp.advertiser.model.Order;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.base.web.result.AjaxResult;
-
-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);
-	
-	Double sumBalanceById(Map<String, Object> paramMap);
-	
-	public List<Advertiser> findByAgentId(Long id);
-	//向t_adgroup里面插入Supdated
-	public boolean updateSupdated(List<Long> advertiserIdList, int status);
-	
-	//导出Excel用
-	public List<Advertiser> findDeliverEffectAnalysis(Map<String, Object> paramMap);
-	
-	//文件上传
-	public AjaxResult fileUpload(HttpServletRequest request,HttpServletResponse response);
-	
-	public String selectAdvertiserNameById(Long id);
-	
-	//更新所有的supdated
-	public boolean updateSupdatedAll(List<Long> advertiserIdList, Date date);
-	//删除所有(逻辑删除)
-	public boolean updateStatusAll(List<Long> advertiserIdList, int status);
-}

+ 0 - 36
src/main/java/com/cloudcross/ssp/advertiser/service/IBannerService.java

@@ -1,36 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.Banner;
-import com.cloudcross.ssp.advertiser.model.BannerTemplate;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.common.utils.Pager;
-
-/**
- * 投放活动对应创意表的服务接口
- * @author chenyou
- *
- */
-public interface IBannerService extends IGenericService<Banner> {
-	int countByAdGroupId(Long adGroupId);
-	//定义复制模板方法
-	boolean cloneBanner(Map<String,Object> paramMap);
-	boolean edit(Map<String,Object> paramMap);
-	boolean updata(Banner t);
-	
-	public boolean updateSupdated(List<Long> adGroupIdList, Date date);
-	public boolean updateSupdatedByOrderId(List<Long> orderIdList, Date date);
-	public boolean updateSupdatedByCampaignId(List<Long> campaignIdList,Date date);
-	public boolean updateStatusByOrderId(List<Long> orderIdList, int status);
-	public boolean updateStatusByCampaignId(List<Long> campaignIdList, int status);
-	public boolean updateStatusByAdGroupId(List<Long> adGroupIdList, int status);
-	
-	int countByParams1(Map<String, Object> paramMap);
-	List<Banner> findByParams1(Map<String, Object> paramMap, Pager pager);
-	List<Banner> findByParams1(Map<String, Object> paramMap);
-	boolean updateStatus1(List<Long> idList, int status);
-	
-}

+ 0 - 38
src/main/java/com/cloudcross/ssp/advertiser/service/IBannerTemplateService.java

@@ -1,38 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.*;
-
-import com.cloudcross.ssp.advertiser.model.BannerTemplate;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.common.utils.Pager;
-
-
-/**
- * 创意服务模板表服务接口
- * @author chenyou
- *
- */
-
-public interface IBannerTemplateService extends IGenericService<BannerTemplate> {
-	/**
-	 * 编辑新增创意信息
-	 * @param bannerTemplate
-	 * @param targetParamsMap
-	 * @return 
-	 */
-	boolean save(BannerTemplate bannerTemplate, Map<String, Object> targetParamsMap);
-	 
-	public boolean alterName(Map<String, Object> paramMap);
-
-	int countByParams2(Map<String, Object> paramMap);
-	
-	int countByParams3(Map<String, Object> paramMap);
-
-	List<BannerTemplate> findByParams2(Map<String, Object> paramMap, Pager pager);
-	
-	List<BannerTemplate> findByParams4(Map<String, Object> paramMap, Pager pager);
-
-	boolean updataIds(BannerTemplate t);
-
-	boolean deleteUpdata(List<Long> idList, int status);
-}

+ 0 - 28
src/main/java/com/cloudcross/ssp/advertiser/service/ICampaignService.java

@@ -1,28 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.Campaign;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-
-public interface ICampaignService extends IGenericService<Campaign>{
-	public List<Campaign> findByOrderId(Long orderId);
-	public long findByName(String name);
-	public boolean deleteByID(long id);//通过活动id来查对应的活动
-	public List<Campaign> findByStatus(Map<String, Object> paramMap);
-	//向t_adgroup里面插入supdated
-	public boolean updateUpstatus(List<Long> idList, int status);
-	//导出Excel用
-	public List<Campaign> findDeliverEffectAnalysis(Map<String, Object> paramMap);
-	
-	public boolean updateSupdatedAll(List<Long> campaignIdList,Date date);
-	
-	public boolean updateStatusByAdvertiserId(List<Long> AdvertiseIdList, int status);
-	
-	public boolean updateStatusByOrderId(List<Long> orderIdList,int status);
-	
-	public boolean updateStatusAll(List<Long> campaignIdList, int status);
-}

+ 0 - 17
src/main/java/com/cloudcross/ssp/advertiser/service/ICodeClassService.java

@@ -1,17 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import com.cloudcross.ssp.advertiser.model.CodeClass;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-
-
-/**
- * 用户服务接口定义。
- * 
- * @author qaohao
- */
-public interface ICodeClassService extends IGenericService<CodeClass> {
-	CodeClass findByName(String codeName);
-	
-	public String getCode(Long id,int type);
-}

+ 0 - 17
src/main/java/com/cloudcross/ssp/advertiser/service/ICodeConvertService.java

@@ -1,17 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import com.cloudcross.ssp.advertiser.model.CodeConvert;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-
-
-/**
- * 用户服务接口定义。
- * 
- * @author heng
- */
-public interface ICodeConvertService extends IGenericService<CodeConvert> {
-	CodeConvert findByName(String convertName);
-
-	public String getCode(Long id,int type);
-}

+ 0 - 18
src/main/java/com/cloudcross/ssp/advertiser/service/ICodeSiteService.java

@@ -1,18 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import com.cloudcross.ssp.advertiser.model.CodeSite;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-
-
-/**
- * 用户服务接口定义。
- * 
- * @author heng
- */
-public interface ICodeSiteService extends IGenericService<CodeSite> {
-	public CodeSite findByAdvertiserId(Long AdvertiserId);
-	
-	public String getCode(Long AdvertiserId,int type);
-	
-}

+ 0 - 22
src/main/java/com/cloudcross/ssp/advertiser/service/IDimensionService.java

@@ -1,22 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.HashMap;
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Dimension;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-
-
-/**
- * 用户服务接口定义。
- * 
- * @author qaohao
- */
-public interface IDimensionService extends IGenericService<Dimension> {
-	boolean deleteById(HashMap<String,Object> paraMap);
-	public boolean updateDimensionDefault(Dimension dimension);
-	public HashMap<String,Object> selectDimensionIdBydefault(Integer accountId);
-	
-	Dimension findByName(String name);
-}

+ 0 - 12
src/main/java/com/cloudcross/ssp/advertiser/service/IDirectService.java

@@ -1,12 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Direct;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IDirectService extends IGenericService<Direct> {
-	Direct findByadGroupId(Long adGroupId,Integer directType) ;
-	List<Direct> findByBatch(Long adGroupId) ;
-	boolean deleteByadGroupId(Long adGroupId,Integer directType);
-}

+ 0 - 11
src/main/java/com/cloudcross/ssp/advertiser/service/IFinanceService.java

@@ -1,11 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.Finance;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-// 此处的User需要修改为数据库中对应的model
-public interface IFinanceService extends IGenericService<Finance>{
-	public Finance findByBalance(Map<String, Object> paramMap);
-}

+ 0 - 11
src/main/java/com/cloudcross/ssp/advertiser/service/IIndustryService.java

@@ -1,11 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Industry;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IIndustryService extends IGenericService<Industry> {
-	public Industry findByIndustryId(Long industryId);
-	public List<Industry> findAll();
-}

+ 0 - 15
src/main/java/com/cloudcross/ssp/advertiser/service/ILocationService.java

@@ -1,15 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Location;
-
-public interface ILocationService {
-
-	//搜索所有城市
-	List<Location>	findAll(String country);
-	//搜索省份下的所有城市
-	List<Location> findByProvince(String str);
-	//根据表里的location_t查找这一行数据
-	Location findByLocationT(String locationT);
-}

+ 0 - 40
src/main/java/com/cloudcross/ssp/advertiser/service/ILogService.java

@@ -1,40 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.Log;
-import com.cloudcross.ssp.advertiser.model.Order;
-import com.cloudcross.ssp.base.service.IGenericService;
-import com.cloudcross.ssp.common.utils.Pager;
-
-public interface ILogService extends IGenericService<Log>{
-	/**
-	 * 通过模块查找信息修改记录
-	 * @param module
-	 * @return
-	 */
-	
-	public Log findByModule(String module);
-	/**
-	 * 
-	 * @param paramMap 搜索条件
-	 * @param module 对应模块条件
-	 * @return
-	 */
-	public int countByParams(Map<String, Object> paramMap,String module);
-	
-	/**
-	 * 
-	 * @param paramMap
-	 * @param pager 页数
-	 * @param module 对应模块条件
-	 * @return
-	 */
-	public List<Log> findByParams(Map<String, Object> paramMap, Pager pager,String module);
-	//导出Excel用
-	public List<Log> findDeliverEffectAnalysis(Map<String, Object> paramMap);
-	
-	
-	
-}

+ 0 - 25
src/main/java/com/cloudcross/ssp/advertiser/service/IMessageService.java

@@ -1,25 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.Message;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IMessageService extends IGenericService<Message> {
-
-	/**
-	 * 用状态和搜索条件查找消息
-	 */
-	public int countByStatus(Map<String, Object> paramMap);
-	/**
-	 * 
-	 * @param type 对应消息类型
-	 * @return
-	 */
-	public List<Message> findByType(int type);
-
-	boolean updateRead(List<Long> IdList, int read);
-	
-	
-}

+ 0 - 7
src/main/java/com/cloudcross/ssp/advertiser/service/IOperatorService.java

@@ -1,7 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import com.cloudcross.ssp.advertiser.model.Operator;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IOperatorService extends IGenericService<Operator>{
-}

+ 0 - 37
src/main/java/com/cloudcross/ssp/advertiser/service/IOrderService.java

@@ -1,37 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import com.cloudcross.ssp.advertiser.model.Order;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IOrderService extends IGenericService<Order> {
-
-	/**
-	 * 按条件查找订单
-	 * @param advertiserType
-	 * @return
-	 */
-	public List<Order> findByAdvertiserType(String advertiserType);
-	//按advertiserId查找订单
-	public List<Order> findByAdvertiserId(Long advertiserId);
-	//按订单名查找订单
-	public long findByName(String name);
-	//按订单状态查找订单
-	public List<Order> findByStatus(Map<String, Object> paramMap);
-	//导出Excel用
-	public List<Order> findDeliverEffectAnalysis(Map<String, Object> paramMap);
-	//向t_adgroup里面插入Supdated
-	public boolean updateSupdated(List<Long> orderIdList, int status);
-	
-	public String selectOrderNameById(Long id);
-	
-	public boolean updateSupdatedAll(List<Long> orderIdList,Date date);
-	
-	public boolean updateStatusByAdvertiserId(List<Long> AdvertiseIdList, int status);
-	
-	public boolean updateStatusAll(List<Long> orderIdList, int status);
-
-}

+ 0 - 12
src/main/java/com/cloudcross/ssp/advertiser/service/IPlaceService.java

@@ -1,12 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Place;
-import com.cloudcross.ssp.base.service.IGenericService;
-
-public interface IPlaceService extends IGenericService<Place> {
-
-	List<Place> findPlace();
-	public List<Place> findAll();
-}

+ 0 - 36
src/main/java/com/cloudcross/ssp/advertiser/service/IResourcesService.java

@@ -1,36 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.Resources;
-import com.cloudcross.ssp.base.service.BaseService;
-
-public interface IResourcesService extends BaseService<Resources>{
-	//<!-- 根据账号Id获取该用户的权限-->
-	public boolean addAccountResourcess(Long accountId, List<Long> list);
-	public List<Resources> findAccountResourcess(String accountId);
-	/**
-	 * @author lanyuan
-	 * Email:mmm333zzz520@163.com
-	 * date:2014-2-25
-	 * @return
-	 */
-	//这个方法主要是为了直接通过账户查询对应的权限,和上面的那个方法的区别在于,这个方法是在res_account表中直接查询相应的
-	public List<Resources> findResourcesByAccount(Long id);
-	public List<Resources> findRoleRes(String roleId);
-	
-	public List<Resources> queryByParentId(Resources resources);
-	/**
-	 * 更新菜单排序号
-	 * @author lanyuan
-	 * Email:mmm333zzz520@163.com
-	 * date:2014-04-12
-	 * @param resourceVOs
-	 */
-	void updateSortOrder(List<Resources> menus);
-	public void addRoleRes(String roleId,List<String> list);
-
-	public Resources isExist(String menuName);
-	public  int  getMaxLevel();
-}

+ 0 - 16
src/main/java/com/cloudcross/ssp/advertiser/service/IRolesService.java

@@ -1,16 +0,0 @@
-package com.cloudcross.ssp.advertiser.service;
-
-
-import java.util.List;
-
-import com.cloudcross.ssp.advertiser.model.RoleAccount;
-import com.cloudcross.ssp.advertiser.model.Roles;
-import com.cloudcross.ssp.base.service.BaseService;
-
-public interface IRolesService extends BaseService<Roles>{
-	public Roles isExist(String name);
-	public Roles findbyAccountRole(String accountId);
-	public void addAccRole(RoleAccount roleAccount);
-
-	public void addAccRole(String accountId, List<String> ids);
-}

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