|
@@ -6,6 +6,8 @@ import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
@@ -22,6 +24,7 @@ import com.cloudcross.ssp.model.Place;
|
|
import com.cloudcross.ssp.model.PlaceClassInformation;
|
|
import com.cloudcross.ssp.model.PlaceClassInformation;
|
|
import com.cloudcross.ssp.model.PlaceOperator;
|
|
import com.cloudcross.ssp.model.PlaceOperator;
|
|
import com.cloudcross.ssp.model.Wifi;
|
|
import com.cloudcross.ssp.model.Wifi;
|
|
|
|
+import com.cloudcross.ssp.model.Zone;
|
|
import com.cloudcross.ssp.model.pojo.CampaignPojo;
|
|
import com.cloudcross.ssp.model.pojo.CampaignPojo;
|
|
import com.cloudcross.ssp.service.ICampaignService;
|
|
import com.cloudcross.ssp.service.ICampaignService;
|
|
import com.cloudcross.ssp.service.ILocationService;
|
|
import com.cloudcross.ssp.service.ILocationService;
|
|
@@ -30,6 +33,7 @@ import com.cloudcross.ssp.service.IPlaceClassInformationService;
|
|
import com.cloudcross.ssp.service.IPlaceOperatorService;
|
|
import com.cloudcross.ssp.service.IPlaceOperatorService;
|
|
import com.cloudcross.ssp.service.IPlaceService;
|
|
import com.cloudcross.ssp.service.IPlaceService;
|
|
import com.cloudcross.ssp.service.IWifiService;
|
|
import com.cloudcross.ssp.service.IWifiService;
|
|
|
|
+import com.cloudcross.ssp.service.IZoneService;
|
|
|
|
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping("/advertiser/main/ad/target/ad-group-alloperator")
|
|
@RequestMapping("/advertiser/main/ad/target/ad-group-alloperator")
|
|
@@ -49,6 +53,8 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
private IPlaceService placeService;
|
|
private IPlaceService placeService;
|
|
@Autowired
|
|
@Autowired
|
|
private IWifiService wifiService;
|
|
private IWifiService wifiService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IZoneService zoneService;
|
|
|
|
|
|
@RequestMapping("create")
|
|
@RequestMapping("create")
|
|
public String create(Model model, @RequestParam Long campaignId) {
|
|
public String create(Model model, @RequestParam Long campaignId) {
|
|
@@ -76,6 +82,50 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
return page("create");
|
|
return page("create");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 选择广告位
|
|
|
|
+ * @param model
|
|
|
|
+ * @param operatorId 运营商ID {id1,id2,id3,...}
|
|
|
|
+ * @param position 位置{position1,position2,position3,...}
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping("chooseZone")
|
|
|
|
+ public String queryZoneByCondition(Model model,String operatorId,String position,@RequestParam(defaultValue = "1") int page){
|
|
|
|
+ Map<String,Object> condition = new HashMap<String,Object>();
|
|
|
|
+ //测试
|
|
|
|
+ operatorId = "1,2,3,4";
|
|
|
|
+ //处理operatorID
|
|
|
|
+ if(operatorId != null && !"".equals(operatorId)){
|
|
|
|
+ /*List<Long> operatorIdList = new ArrayList<Long>();
|
|
|
|
+ String []operatorIdStr = operatorId.split(",");
|
|
|
|
+ for(int i=0;i<operatorIdStr.length;i++){
|
|
|
|
+ operatorIdList.add(Long.parseLong(operatorIdStr[i].trim()));
|
|
|
|
+ }*/
|
|
|
|
+ condition.put("operatorId", operatorId);
|
|
|
|
+ }
|
|
|
|
+ //测试
|
|
|
|
+ position = "1,2";
|
|
|
|
+ //处理position
|
|
|
|
+ if(position != null && !"".equals(position)){
|
|
|
|
+ /*List<Integer> positionList = new ArrayList<Integer>();
|
|
|
|
+ String[] positionStr = position.split(",");
|
|
|
|
+ for(int i=0;i<positionStr.length;i++){
|
|
|
|
+ positionList.add(Integer.parseInt(positionStr[i].trim()));
|
|
|
|
+ }*/
|
|
|
|
+ condition.put("position", position);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //查询广告位总记录数
|
|
|
|
+ Integer count = this.zoneService.queryZoneCount(condition);
|
|
|
|
+ Pager pager = new Pager();
|
|
|
|
+ pager.setPage(page);
|
|
|
|
+ pager.setTotalRow(count);
|
|
|
|
+ condition.put("pager", pager);
|
|
|
|
+ List<Zone> zoneList = this.zoneService.queryZone(condition);
|
|
|
|
+ model.addAttribute("pager", pager);
|
|
|
|
+ model.addAttribute("zoneList", zoneList);
|
|
|
|
+ return OK;
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 到选择媒体弹窗
|
|
* 到选择媒体弹窗
|
|
* 创建人:周俊
|
|
* 创建人:周俊
|
|
@@ -195,4 +245,15 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
return page("wifiWindow");
|
|
return page("wifiWindow");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 保存方法
|
|
|
|
+ * @param request
|
|
|
|
+ * @param model
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping("/save")
|
|
|
|
+ public String save(HttpServletRequest request, Model model){
|
|
|
|
+ return OK;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|