|
@@ -11,18 +11,25 @@ import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.cloudcross.ssp.base.web.SimpleController;
|
|
import com.cloudcross.ssp.base.web.SimpleController;
|
|
import com.cloudcross.ssp.common.utils.Pager;
|
|
import com.cloudcross.ssp.common.utils.Pager;
|
|
import com.cloudcross.ssp.model.Account;
|
|
import com.cloudcross.ssp.model.Account;
|
|
import com.cloudcross.ssp.model.Location;
|
|
import com.cloudcross.ssp.model.Location;
|
|
import com.cloudcross.ssp.model.Operator;
|
|
import com.cloudcross.ssp.model.Operator;
|
|
|
|
+import com.cloudcross.ssp.model.Place;
|
|
|
|
+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.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;
|
|
import com.cloudcross.ssp.service.IOperatorService;
|
|
import com.cloudcross.ssp.service.IOperatorService;
|
|
|
|
+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.IWifiService;
|
|
|
|
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping("/advertiser/main/ad/target/ad-group-alloperator")
|
|
@RequestMapping("/advertiser/main/ad/target/ad-group-alloperator")
|
|
@@ -36,6 +43,12 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
private IOperatorService operatorService;
|
|
private IOperatorService operatorService;
|
|
@Autowired
|
|
@Autowired
|
|
private IPlaceOperatorService placeOperatorService;
|
|
private IPlaceOperatorService placeOperatorService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IPlaceClassInformationService placeClassInformationService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IPlaceService placeService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IWifiService wifiService;
|
|
|
|
|
|
@RequestMapping("create")
|
|
@RequestMapping("create")
|
|
public String create(Model model, @RequestParam Long campaignId) {
|
|
public String create(Model model, @RequestParam Long campaignId) {
|
|
@@ -70,7 +83,8 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@RequestMapping("chooseOperator")
|
|
@RequestMapping("chooseOperator")
|
|
- public String chooseOperatorWindow(Model model,@RequestParam(defaultValue = "1") int page){
|
|
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public List<Operator> chooseOperatorWindow(Model model,@RequestParam(defaultValue = "1") int page){
|
|
Integer count = this.operatorService.queryAllOperatorCount();
|
|
Integer count = this.operatorService.queryAllOperatorCount();
|
|
Pager pager = new Pager();
|
|
Pager pager = new Pager();
|
|
pager.setPage(page);
|
|
pager.setPage(page);
|
|
@@ -79,9 +93,8 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
Map<String,Object> condition = new HashMap<String,Object>();
|
|
Map<String,Object> condition = new HashMap<String,Object>();
|
|
condition.put("pager", pager);
|
|
condition.put("pager", pager);
|
|
List<Operator> list = this.operatorService.queryAllOperator(condition);
|
|
List<Operator> list = this.operatorService.queryAllOperator(condition);
|
|
- model.addAttribute("pager", pager);
|
|
|
|
- model.addAttribute("list", list);
|
|
|
|
- return page("operatorwindow");
|
|
|
|
|
|
+
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -89,6 +102,7 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
* 选择媒体场景
|
|
* 选择媒体场景
|
|
* 创建人:周俊
|
|
* 创建人:周俊
|
|
* 创建时间:2015.12.11 17:52
|
|
* 创建时间:2015.12.11 17:52
|
|
|
|
+ * 每个运营商场景显示:{场景ID,运营商名+运营商场景,数聚小场景}即:{id,getOperatorShowName(),placeId}其中placeId要传到后台
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@RequestMapping("chooseOperatorPlace")
|
|
@RequestMapping("chooseOperatorPlace")
|
|
@@ -105,4 +119,80 @@ public class AdGroupAlloperatorController extends SimpleController{
|
|
model.addAttribute("list", list);
|
|
model.addAttribute("list", list);
|
|
return page("operatorPlaceWindow");
|
|
return page("operatorPlaceWindow");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 选择大场景
|
|
|
|
+ * 创建人:周俊
|
|
|
|
+ * 创建时间:2015-12-14 11.30
|
|
|
|
+ * @param model
|
|
|
|
+ * @param page
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping("choosePlaceClass")
|
|
|
|
+ public String choosePlaceClassWindow(Model model,@RequestParam(defaultValue = "1") int page){
|
|
|
|
+ Integer count = this.placeClassInformationService.queryPlaceClassCount();
|
|
|
|
+ Pager pager = new Pager();
|
|
|
|
+ pager.setPage(page);
|
|
|
|
+ pager.setTotalRow(count);
|
|
|
|
+
|
|
|
|
+ Map<String,Object> condition = new HashMap<String,Object>();
|
|
|
|
+ condition.put("pager", pager);
|
|
|
|
+ List<PlaceClassInformation> list = this.placeClassInformationService.queryPlaceClass(condition);
|
|
|
|
+ model.addAttribute("pager", pager);
|
|
|
|
+ model.addAttribute("list", list);
|
|
|
|
+ return page("placeClassWindow");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 选择小场景
|
|
|
|
+ * @param model
|
|
|
|
+ * @param page
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping("choosePlace")
|
|
|
|
+ public String choosePlaceWindow(Model model,@RequestParam(defaultValue = "1") int page){
|
|
|
|
+ Integer count = this.placeService.queryPlaceCount();
|
|
|
|
+ Pager pager = new Pager();
|
|
|
|
+ pager.setPage(page);
|
|
|
|
+ pager.setTotalRow(count);
|
|
|
|
+
|
|
|
|
+ Map<String,Object> condition = new HashMap<String,Object>();
|
|
|
|
+ condition.put("pager", pager);
|
|
|
|
+ List<Place> list = this.placeService.queryPlace(condition);
|
|
|
|
+ model.addAttribute("pager", pager);
|
|
|
|
+ model.addAttribute("list", list);
|
|
|
|
+ return page("placeWindow");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 选择终端
|
|
|
|
+ * @param model
|
|
|
|
+ * @param page
|
|
|
|
+ * @param cnCity
|
|
|
|
+ * @param cn
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping("chooseWifi")
|
|
|
|
+ public String chooseWifiWindow(Model model,@RequestParam(defaultValue = "1") int page,String cnCity,String cn){
|
|
|
|
+ Map<String,Object> condition = new HashMap<String,Object>();
|
|
|
|
+ if( null != cnCity && !"".equals(cnCity)){
|
|
|
|
+ condition.put("cnCity", cnCity);
|
|
|
|
+ }
|
|
|
|
+ if( null != cn && !"".equals(cn)){
|
|
|
|
+ condition.put("cn", cn);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Integer count = this.wifiService.queryWifiCount(condition);
|
|
|
|
+ Pager pager = new Pager();
|
|
|
|
+ pager.setPage(page);
|
|
|
|
+ pager.setTotalRow(count);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ condition.put("pager", pager);
|
|
|
|
+ List<Wifi> list = this.wifiService.queryWifi(condition);
|
|
|
|
+ model.addAttribute("pager", pager);
|
|
|
|
+ model.addAttribute("list", list);
|
|
|
|
+ return page("wifiWindow");
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|