|
@@ -45,6 +45,7 @@ import com.cloudcross.ssp.common.consts.Status;
|
|
|
import com.cloudcross.ssp.common.utils.Common;
|
|
|
import com.cloudcross.ssp.common.utils.LangUtil;
|
|
|
import com.cloudcross.ssp.common.utils.Pager;
|
|
|
+import com.cloudcross.ssp.common.utils.Pager1;
|
|
|
import com.cloudcross.ssp.model.BannerTemplate;
|
|
|
import com.cloudcross.ssp.model.Industry;
|
|
|
import com.cloudcross.ssp.model.Log;
|
|
@@ -152,7 +153,8 @@ public class ZoneController extends SimpleController {
|
|
|
|
|
|
@RequestMapping("/create")
|
|
|
public String create(Model model,HttpServletRequest request) {
|
|
|
- List<Industry> industryList = industryService.findAll();
|
|
|
+ Map<String,Object> paramMap = new HashMap<String, Object>();
|
|
|
+ List<Industry> industryList = industryService.findAllFatherIndustry(paramMap);
|
|
|
List<Size> sizeList = sizeService.findAllSizeForZone();
|
|
|
System.out.println("abc"+sizeList.toString());
|
|
|
model.addAttribute("sizeList", sizeList);
|
|
@@ -180,7 +182,8 @@ public class ZoneController extends SimpleController {
|
|
|
|
|
|
|
|
|
//查询所有的行业
|
|
|
- List<Industry> industryList = industryService.findAll();
|
|
|
+ Map<String,Object> paramMap = new HashMap<String, Object>();
|
|
|
+ List<Industry> industryList = industryService.findAllFatherIndustry(paramMap);
|
|
|
//查询所有的尺寸
|
|
|
List<Size> SizeList = sizeService.findAllSizeForZone();
|
|
|
//根据广告位的宽高查询广告位的ID
|
|
@@ -198,8 +201,8 @@ public class ZoneController extends SimpleController {
|
|
|
//设置广告位的sizeID
|
|
|
//查询开启状态广告位行业黑名单
|
|
|
List<ZoneIndustry> zoneIndustryList = zoneIndustryService.findAll(zone.getId());
|
|
|
- //查询没有在黑名单里的行业
|
|
|
- List<Industry> notzoneIndustryList = industryService.findAllByZoneIdOperator(zone.getId());
|
|
|
+ //查询没有在黑名单里的行业 改为显示所有的大行业
|
|
|
+ //List<Industry> notzoneIndustryList = industryService.findAllByZoneIdOperator(zone.getId());
|
|
|
String industryStr = "";
|
|
|
for(ZoneIndustry a : zoneIndustryList) {
|
|
|
industryStr += a.getIndustryId()+",";
|
|
@@ -213,7 +216,7 @@ public class ZoneController extends SimpleController {
|
|
|
model.addAttribute("industryList",industryList);
|
|
|
model.addAttribute("zoneIndustryList",zoneIndustryList);
|
|
|
model.addAttribute("SizeList", SizeList);
|
|
|
- model.addAttribute("notzoneIndustryList",notzoneIndustryList);
|
|
|
+ model.addAttribute("notzoneIndustryList",industryList);
|
|
|
model.addAttribute("zoneDomainStr", zoneDomainStr);
|
|
|
model.addAttribute("industryStr", industryStr);
|
|
|
model.addAttribute("sessionid", request.getSession().getId());
|
|
@@ -956,6 +959,51 @@ public class ZoneController extends SimpleController {
|
|
|
zone.setHeight(_height[n]);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取父层下的子行业
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/getIndustry")
|
|
|
+ public String getIndustry(Model model, @RequestParam(defaultValue = "1") int page,
|
|
|
+ @RequestParam Map<String, Object> paramMap) {
|
|
|
+ Integer count = this.industryService.countIndustryByFatherId(paramMap);
|
|
|
+ Pager1 pager = new Pager1();
|
|
|
+ pager.setPage(page);
|
|
|
+ pager.setTotalRow(count);
|
|
|
+ paramMap.put("pager", pager);
|
|
|
+ List<Industry> industryList = this.industryService.findIndustryByFatherId(paramMap);
|
|
|
+ model.addAttribute("pager", pager);
|
|
|
+ model.addAttribute("fatherId", "");
|
|
|
+ model.addAttribute("industryId", paramMap.get("industry"));
|
|
|
+ model.addAttribute("industryList", industryList);
|
|
|
+ return page("industry");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取父层下的子行业
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/getAllIndustry")
|
|
|
+ @ResponseBody
|
|
|
+ public List<Industry> getAllIndustry(Model model,@RequestParam Map<String, Object> paramMap) {
|
|
|
+ List<Industry> industryList = this.industryService.findAll();
|
|
|
+ return industryList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否有子行业
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/isExistIndustry")
|
|
|
+ @ResponseBody
|
|
|
+ public Boolean isExistIndustry(Model model,@RequestParam Map<String, Object> paramMap) {
|
|
|
+ Integer count = this.industryService.countIndustryByFatherId(paramMap);
|
|
|
+ if(count == 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|