| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import com.yeshi.buwan.domain.AdminInfo; |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.system.DetailSystem; |
| | | import com.yeshi.buwan.domain.HomeAd; |
| | | import com.yeshi.buwan.domain.HomeNotice; |
| | | import com.yeshi.buwan.domain.HomeType; |
| | | import com.yeshi.buwan.domain.HomeVideo; |
| | | import com.yeshi.buwan.domain.HotSearch; |
| | | import com.yeshi.buwan.domain.SuperHotSearch; |
| | | import com.yeshi.buwan.domain.SystemInfo; |
| | | import com.yeshi.buwan.domain.system.SystemInfo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoIntersection; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | |
| | | @Resource |
| | | private HomeNoticeService homeNoticeService; |
| | | |
| | | public SearchService getSearchService() { |
| | | return searchService; |
| | | } |
| | | |
| | | public void setSearchService(SearchService searchService) { |
| | | this.searchService = searchService; |
| | | } |
| | | |
| | | public ClassService getClassService() { |
| | | return classService; |
| | | } |
| | | |
| | | public void setClassService(ClassService classService) { |
| | | this.classService = classService; |
| | | } |
| | | |
| | | public HomeTypeService getHomeTypeService() { |
| | | return homeTypeService; |
| | | } |
| | | |
| | | public void setHomeTypeService(HomeTypeService homeTypeService) { |
| | | this.homeTypeService = homeTypeService; |
| | | } |
| | | |
| | | public AdService getAdService() { |
| | | return adService; |
| | | } |
| | | |
| | | public void setAdService(AdService adService) { |
| | | this.adService = adService; |
| | | } |
| | | |
| | | public WeiXinService getWeiXinService() { |
| | | return weiXinService; |
| | | } |
| | | |
| | | public void setWeiXinService(WeiXinService weiXinService) { |
| | | this.weiXinService = weiXinService; |
| | | } |
| | | |
| | | public HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | public HomeNoticeService getHomeNoticeService() { |
| | | return homeNoticeService; |
| | | } |
| | | |
| | | public void setHomeNoticeService(HomeNoticeService homeNoticeService) { |
| | | this.homeNoticeService = homeNoticeService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/HotSearchAdminServlet", method = RequestMethod.GET) |
| | | public String get(HttpServletRequest req, PrintWriter out) { |
| | | try { |
| | |
| | | } else if (type.equalsIgnoreCase("getAllParentType")) {// 根据子分类得到所有的上级分类 |
| | | String id = req.getParameter("id"); |
| | | if (!StringUtil.isNullOrEmpty(id)) { |
| | | List<Long> idsList = new ArrayList<Long>(); |
| | | List<Long> idsList = new ArrayList<>(); |
| | | if (StringUtil.isNullOrEmpty(id) || id.contains("undefined") || Long.parseLong(id) == 0) |
| | | id = "1"; |
| | | VideoType vt = classService.getTypeById(Long.parseLong(id)); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/HotSearchAdminServlet", method = RequestMethod.POST) |
| | | public String post(HttpServletRequest req, HttpServletResponse resp, PrintWriter out) { |
| | | public String post(HttpServletRequest req, HttpServletResponse resp, HttpSession session, PrintWriter out) { |
| | | try { |
| | | req.setCharacterEncoding("UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | |
| | | homeType.setHasMore(false); |
| | | } else |
| | | homeType.setHasMore(false); |
| | | homeType.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | homeTypeService.addHomeType(homeType); |
| | | |
| | | return "hometype_add"; |
| | |
| | | String ovideoid = map.get("ovideoid"); |
| | | String ointersection = map.get("ointersection"); |
| | | HomeAd ad = new HomeAd(); |
| | | ad.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | ad.setAdmin((AdminInfo) req.getSession().getAttribute("ADMIN_INFO")); |
| | | |
| | | ad.setSystem(new SystemInfo(map.get("system"))); |