|
@@ -268,7 +268,7 @@ public class OperatorAdGroupController extends SimpleController{
|
|
|
/**
|
|
|
* 媒体自投修改
|
|
|
* @param model
|
|
|
- * @param paramMap
|
|
|
+ * @param id 投放Id
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/edit")
|
|
@@ -281,9 +281,20 @@ public class OperatorAdGroupController extends SimpleController{
|
|
|
|
|
|
//找到所有的大场景场景,并且显示出来
|
|
|
List<PlaceClassInformation> placeList = placeClassInformationService.findAll();
|
|
|
+ //找到已选场景,拼接ID字符串
|
|
|
+ List<PlaceClassInformation> selectedPlaceList = this.placeClassInformationService.queryPlaceClassInformationByAdgroupId(id);
|
|
|
+ String placeIdStr = "";
|
|
|
+ for(PlaceClassInformation pci:selectedPlaceList){
|
|
|
+ placeIdStr = placeIdStr + pci.getId()+",";
|
|
|
+ }
|
|
|
+ if(null != placeIdStr && !"".equals(placeIdStr)){
|
|
|
+ placeIdStr = placeIdStr.substring(0, placeIdStr.length()-1);
|
|
|
+ }
|
|
|
+ model.addAttribute("placeIdStr", placeIdStr);
|
|
|
+ model.addAttribute("placeList", placeList);
|
|
|
|
|
|
//已选广告位
|
|
|
- List<Zone> selectZoneList = this.zoneService.queryZoneByAdgroupId(id);;
|
|
|
+ List<Zone> selectZoneList = this.zoneService.queryZoneByAdgroupId(id);
|
|
|
//未选广告位
|
|
|
List<Zone> unselectZoneList = getUnSelectZoneList(selectZoneList);
|
|
|
model.addAttribute("selectZoneList", selectZoneList);
|
|
@@ -293,18 +304,19 @@ public class OperatorAdGroupController extends SimpleController{
|
|
|
Map<String,Object>condition = new HashMap<String,Object>();
|
|
|
condition.put("operatorId", getLoginUser().getOperatorId());
|
|
|
List<WifiGroupInfo> allWifiGroupInfoList = this.wifiGroupInfoService.queryWifiGroupInfoByCondition(condition);
|
|
|
+ //已选分组,字符串拼接
|
|
|
+ List<WifiGroupInfo> selectGroupList = this.wifiGroupInfoService.queryWifiGroupInfoByadgroupId(id);
|
|
|
+ String groupIdStr = "";
|
|
|
+ for(WifiGroupInfo group:selectGroupList){
|
|
|
+ groupIdStr = groupIdStr + group.getId() + ",";
|
|
|
+ }
|
|
|
+ if(null != groupIdStr && !"".equals(groupIdStr)){
|
|
|
+ groupIdStr = groupIdStr.substring(0,groupIdStr.length()-1);
|
|
|
+ }
|
|
|
+ model.addAttribute("groupIdStr", groupIdStr);
|
|
|
model.addAttribute("allWifiGroupInfoList", allWifiGroupInfoList);
|
|
|
|
|
|
- //获取所有已选择的场景并且用,分割存放到place里面
|
|
|
- String place = "0,";
|
|
|
- List<AdGroupPlace> adGroupPlaceList = adGroupPlaceService.findAll(adGroup.getId());
|
|
|
- for(AdGroupPlace pc:adGroupPlaceList) {
|
|
|
- if(pc != adGroupPlaceList) {
|
|
|
- place += pc.getPlaceId() + ",";
|
|
|
- }else {
|
|
|
- place += adGroupPlaceList;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
// 千次转换
|
|
|
adGroup.setMaxImpression(adGroup.getMaxImpression() / 1000);
|
|
|
adGroup.setDailyMaxImpression(adGroup.getDailyMaxImpression() / 1000);
|
|
@@ -362,15 +374,11 @@ public class OperatorAdGroupController extends SimpleController{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- model.addAttribute("placeList",placeList);
|
|
|
model.addAttribute("areas", areas);
|
|
|
model.addAttribute("selectedwifi", selectedWifi);
|
|
|
model.addAttribute("cacheSelected", cacheSelected);
|
|
|
model.addAttribute("activeTime", activeTime);
|
|
|
- model.addAttribute("place",place);
|
|
|
model.addAttribute("adGroup", adGroup);
|
|
|
- model.addAttribute("adGroupPlaceList",adGroupPlaceList);
|
|
|
return page("edit");
|
|
|
}
|
|
|
|
|
@@ -394,22 +402,22 @@ public class OperatorAdGroupController extends SimpleController{
|
|
|
* @param adgroupId
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping("/selectedPlace")
|
|
|
+ /*@RequestMapping("/selectedPlace")
|
|
|
@ResponseBody
|
|
|
public List<PlaceClassInformation> queryPlaceClassInformationByAdgroupId(Long adgroupId){
|
|
|
return this.placeClassInformationService.queryPlaceClassInformationByAdgroupId(adgroupId);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* 已选分组
|
|
|
* @param adgroupId
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping("/selectedWifigroup")
|
|
|
+ /*@RequestMapping("/selectedWifigroup")
|
|
|
@ResponseBody
|
|
|
public List<WifiGroupInfo> queryWifiGroupInfobByAdgroupId(Long adgroupId){
|
|
|
return this.wifiGroupInfoService.queryWifiGroupInfoByadgroupId(adgroupId);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
@RequestMapping("/enable")
|
|
|
@ResponseBody
|