29个文件已删除
78个文件已修改
4个文件已添加
| | |
| | | ServletRequestAttributes servletContainer = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); |
| | | |
| | | HttpServletRequest request = servletContainer.getRequest(); |
| | | // AdminInfo admin = (AdminInfo) request.getSession().getAttribute(Constant.ADMIN); |
| | | // if(admin==null){ |
| | | // return null; |
| | | // } |
| | | AdminInfo admin = (AdminInfo) request.getSession().getAttribute(Constant.ADMIN); |
| | | if(admin==null){ |
| | | return null; |
| | | } |
| | | Object[] args = joinPoint.getArgs(); |
| | | Object obj = null; |
| | | try { |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | import org.yeshi.utils.StringUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.util.*; |
| | | |
| | | @Component |
| | | @Aspect |
| | |
| | | HttpServletRequest request = servletContainer.getRequest(); |
| | | HttpServletResponse response = servletContainer.getResponse(); |
| | | PrintWriter out = null; |
| | | |
| | | AcceptData acceptData = null; |
| | | Object[] args = joinPoint.getArgs(); |
| | | for (Object obj : args) { |
| | | if (obj instanceof AcceptData) { |
| | | AcceptData acceptData = (AcceptData) obj; |
| | | acceptData = (AcceptData) obj; |
| | | if (acceptData != null) { |
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) { |
| | | acceptData.setChannel("appstore"); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //如果是Android新版本则调用新的签名方法 |
| | | //布丸3.8.7之后调用新的签名方法 |
| | | if (acceptData != null && "android".equalsIgnoreCase(acceptData.getPlatform()) && acceptData.getVersion() >= 105) { |
| | | Map<String, String[]> params = request.getParameterMap(); |
| | | //签名 |
| | | List<String> list = new ArrayList<>(); |
| | | for (Iterator<String> its = params.keySet().iterator(); its.hasNext(); ) { |
| | | String key = its.next(); |
| | | if ("sign".equalsIgnoreCase(key)) |
| | | continue; |
| | | list.add(key + "=" + params.get(key)[0]); |
| | | } |
| | | Collections.sort(list); |
| | | String str = StringUtil.concat(list, "&"); |
| | | String sign = StringUtil.Md5(str + "8888B&*@-uWan88/',@@^"); |
| | | if (!sign.equalsIgnoreCase(acceptData.getSign())) { |
| | | if (out == null) |
| | | out = response.getWriter(); |
| | | System.out.println("签名错误"); |
| | | out.print(JsonUtil.loadFalseJson("签名错误")); |
| | | } |
| | | |
| | | } else { |
| | | if (!Utils.signIsRight(request)) { |
| | | if (out == null) |
| | | out = response.getWriter(); |
| | | out.print(JsonUtil.loadFalseJson("签名错误")); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | Object obj = null; |
| | | try { |
| | |
| | | @Resource |
| | | private HomeNoticeService homeNoticeService; |
| | | |
| | | public BanQuanService getBanQuanService() { |
| | | return banQuanService; |
| | | } |
| | | |
| | | public void setBanQuanService(BanQuanService banQuanService) { |
| | | this.banQuanService = banQuanService; |
| | | } |
| | | |
| | | public HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | public HomeTypeService getHomeTypeService() { |
| | | return homeTypeService; |
| | | } |
| | | |
| | | public void setHomeTypeService(HomeTypeService homeTypeService) { |
| | | this.homeTypeService = homeTypeService; |
| | | } |
| | | |
| | | public ClassService getClassService() { |
| | | return classService; |
| | | } |
| | | |
| | | public void setClassService(ClassService classService) { |
| | | this.classService = classService; |
| | | } |
| | | |
| | | public AdService getAdService() { |
| | | return adService; |
| | | } |
| | | |
| | | public void setAdService(AdService adService) { |
| | | this.adService = adService; |
| | | } |
| | | |
| | | public SearchService getSearchService() { |
| | | return searchService; |
| | | } |
| | | |
| | | public void setSearchService(SearchService searchService) { |
| | | this.searchService = searchService; |
| | | } |
| | | |
| | | public HotVideoTypeService getHotVideoTypeService() { |
| | | return hotVideoTypeService; |
| | | } |
| | | |
| | | public void setHotVideoTypeService(HotVideoTypeService hotVideoTypeService) { |
| | | this.hotVideoTypeService = hotVideoTypeService; |
| | | } |
| | | |
| | | public UserBannerService getUserBannerService() { |
| | | return userBannerService; |
| | | } |
| | | |
| | | public void setUserBannerService(UserBannerService userBannerService) { |
| | | this.userBannerService = userBannerService; |
| | | } |
| | | |
| | | public HomeNoticeService getHomeNoticeService() { |
| | | return homeNoticeService; |
| | | } |
| | | |
| | | public void setHomeNoticeService(HomeNoticeService homeNoticeService) { |
| | | this.homeNoticeService = homeNoticeService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/BanQuanServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest request, PrintWriter out) { |
| | |
| | | package com.yeshi.buwan.controller.admin; |
| | | |
| | | import java.io.PrintWriter; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.HomeVideo; |
| | | import com.yeshi.buwan.domain.HotVideoType; |
| | | import com.yeshi.buwan.domain.SuperHotType; |
| | | import com.yeshi.buwan.domain.SuperVideoType; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.web.CategoryRecommendVideoAdmin; |
| | | import com.yeshi.buwan.service.imp.ClassService; |
| | | import com.yeshi.buwan.service.imp.HomeTypeService; |
| | | import com.yeshi.buwan.service.imp.HotVideoTypeService; |
| | | import com.yeshi.buwan.service.imp.SystemService; |
| | | import com.yeshi.buwan.service.imp.recommend.CategoryRecommendVideoService; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import com.yeshi.buwan.web.tag.PageEntity; |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.PrintWriter; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Controller |
| | | @RequestMapping("") |
| | |
| | | @Resource |
| | | private CategoryRecommendVideoService categoryRecommendVideoService; |
| | | |
| | | @Resource |
| | | private SystemService systemService; |
| | | |
| | | private String key; |
| | | private int pageIndex; |
| | | private int detailsystem; |
| | | |
| | | |
| | | public CategoryRecommendVideoService getCategoryRecommendVideoService() { |
| | | return categoryRecommendVideoService; |
| | | } |
| | | |
| | | public void setCategoryRecommendVideoService( |
| | | CategoryRecommendVideoService categoryRecommendVideoService) { |
| | | this.categoryRecommendVideoService = categoryRecommendVideoService; |
| | | } |
| | | |
| | | public SystemService getSystemService() { |
| | | return systemService; |
| | | } |
| | | |
| | | public void setSystemService(SystemService systemService) { |
| | | this.systemService = systemService; |
| | | } |
| | | |
| | | public String getKey() { |
| | | return key; |
| | |
| | | this.detailsystem = detailsystem; |
| | | } |
| | | |
| | | public HotVideoTypeService getHotVideoTypeService() { |
| | | return hotVideoTypeService; |
| | | } |
| | | |
| | | public void setHotVideoTypeService(HotVideoTypeService hotVideoTypeService) { |
| | | this.hotVideoTypeService = hotVideoTypeService; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | @RequestMapping(value = "/ClassAdminServlet", method = RequestMethod.GET) |
| | | public String get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping("/search") |
| | | public void categoryRecommendVideoList(HttpServletRequest request,PrintWriter out) { |
| | | public void categoryRecommendVideoList(HttpServletRequest request, HttpSession session, PrintWriter out) { |
| | | if (pageIndex == 0) |
| | | pageIndex = 1; |
| | | key = request.getParameter("key"); |
| | |
| | | videotype = StringUtil.isNullOrEmpty(videotype) ? "150" : videotype; |
| | | |
| | | List<CategoryRecommendVideoAdmin> list = categoryRecommendVideoService.getCategoryRecommendVideoAdmin(key, |
| | | Integer.parseInt(videotype), detailsystem, pageIndex); |
| | | Integer.parseInt(videotype), SystemUtil.getAdminSelectedSystemId(session), detailsystem, pageIndex); |
| | | long count = categoryRecommendVideoService.getCategoryRecommendVideoAdminCount(key, Integer.parseInt(videotype), |
| | | detailsystem); |
| | | SystemUtil.getAdminSelectedSystemId(session), detailsystem); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(pageIndex); |
| | | pe.setPageSize(1); |
| | |
| | | System.out.println(root.toString()); |
| | | out.print(root); |
| | | // dataMap.put("categoryRecommendVideoAdminList", list); |
| | | List<DetailSystem> detailSystemList = systemService.getDetailSystemList(); |
| | | // dataMap.put("detailSystemList", detailSystemList); |
| | | List<VideoType> typeList = classService.getFirstTypeList(""); |
| | | // dataMap.put("videoTypeList", typeList); |
| | | // json.put("data", data); |
| | | // System.out.println("jsonStr---------"+jsonStr); |
| | |
| | | @Resource |
| | | private HomeAdService homeAdService; |
| | | |
| | | public HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/HomeAdAdminServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | 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; |
| | |
| | | @Resource |
| | | private AdService adService; |
| | | |
| | | public HomeTypeService getHomeTypeService() { |
| | | return homeTypeService; |
| | | } |
| | | |
| | | public void setHomeTypeService(HomeTypeService homeTypeService) { |
| | | this.homeTypeService = homeTypeService; |
| | | } |
| | | |
| | | public ClassService getClassService() { |
| | | return classService; |
| | | } |
| | | |
| | | public void setClassService(ClassService classService) { |
| | | this.classService = classService; |
| | | } |
| | | |
| | | public IntersectionService getIntersectionService() { |
| | | return intersectionService; |
| | | } |
| | | |
| | | public void setIntersectionService(IntersectionService intersectionService) { |
| | | this.intersectionService = intersectionService; |
| | | } |
| | | |
| | | public HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | public WeiXinService getWeiXinService() { |
| | | return weiXinService; |
| | | } |
| | | |
| | | public void setWeiXinService(WeiXinService weiXinService) { |
| | | this.weiXinService = weiXinService; |
| | | } |
| | | |
| | | public HomeNoticeService getHomeNoticeService() { |
| | | return homeNoticeService; |
| | | } |
| | | |
| | | public void setHomeNoticeService(HomeNoticeService homeNoticeService) { |
| | | this.homeNoticeService = homeNoticeService; |
| | | } |
| | | |
| | | public AdService getAdService() { |
| | | return adService; |
| | | } |
| | | |
| | | public void setAdService(AdService adService) { |
| | | this.adService = adService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/HomeTypeAdminServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/HomeTypeAdminServlet", 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"; |
| | | } else if (type.equalsIgnoreCase("updateHomeType")) { |
| | |
| | | ad.setParams(obj.toString()); |
| | | } |
| | | |
| | | ad.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | |
| | | homeAdService.addHomeAd(ad); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | 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; |
| | |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @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"))); |
| | |
| | | @Resource |
| | | private StarService starService; |
| | | |
| | | public StarService getStarService() { |
| | | return starService; |
| | | } |
| | | |
| | | public void setStarService(StarService starService) { |
| | | this.starService = starService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/HotStarAdminServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest req, PrintWriter out) { |
| | | try { |
| | |
| | | @Resource |
| | | private SpecialService specialService; |
| | | |
| | | public SpecialService getSpecialService() { |
| | | return specialService; |
| | | } |
| | | |
| | | public void setSpecialService(SpecialService specialService) { |
| | | this.specialService = specialService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/SpecialAdminServlet", method = RequestMethod.GET) |
| | | public String get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | 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; |
| | |
| | | @Resource |
| | | private HomeNoticeService homeNoticeService; |
| | | |
| | | public UserBannerService getUserBannerService() { |
| | | return userBannerService; |
| | | } |
| | | |
| | | public void setUserBannerService(UserBannerService userBannerService) { |
| | | this.userBannerService = userBannerService; |
| | | } |
| | | |
| | | 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 HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | 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 HomeNoticeService getHomeNoticeService() { |
| | | return homeNoticeService; |
| | | } |
| | | |
| | | public void setHomeNoticeService(HomeNoticeService homeNoticeService) { |
| | | this.homeNoticeService = homeNoticeService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/UserBannerAdminServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/UserBannerAdminServlet", 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"))); |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.yeshi.buwan.util.*; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | import com.yeshi.buwan.service.imp.VideoManager; |
| | | import com.yeshi.buwan.service.imp.VideoService; |
| | | import com.yeshi.buwan.service.imp.WeiXinService; |
| | | import com.yeshi.buwan.util.DouBanUtil; |
| | | import com.yeshi.buwan.util.FileUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | |
| | | @Resource |
| | | private VideoService videoService; |
| | | |
| | | public VideoManager getVideoManager() { |
| | | return videoManager; |
| | | } |
| | | |
| | | public void setVideoManager(VideoManager videoManager) { |
| | | this.videoManager = videoManager; |
| | | } |
| | | |
| | | public HomeTypeService getHomeTypeService() { |
| | | return homeTypeService; |
| | | } |
| | | |
| | | public void setHomeTypeService(HomeTypeService homeTypeService) { |
| | | this.homeTypeService = homeTypeService; |
| | | } |
| | | |
| | | public HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | public WeiXinService getWeiXinService() { |
| | | return weiXinService; |
| | | } |
| | | |
| | | public void setWeiXinService(WeiXinService weiXinService) { |
| | | this.weiXinService = weiXinService; |
| | | } |
| | | |
| | | public AdService getAdService() { |
| | | return adService; |
| | | } |
| | | |
| | | public void setAdService(AdService adService) { |
| | | this.adService = adService; |
| | | } |
| | | |
| | | public HomeNoticeService getHomeNoticeService() { |
| | | return homeNoticeService; |
| | | } |
| | | |
| | | public void setHomeNoticeService(HomeNoticeService homeNoticeService) { |
| | | this.homeNoticeService = homeNoticeService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/VideoServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/VideoServlet", 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"; |
| | | } else if (type.equalsIgnoreCase("updateHomeType")) { |
| | |
| | | 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"))); |
| | |
| | | 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; |
| | |
| | | @Resource |
| | | private WeiXinService weiXinService; |
| | | |
| | | public VideoResourceService getVideoResourceService() { |
| | | return videoResourceService; |
| | | } |
| | | |
| | | public void setVideoResourceService(VideoResourceService videoResourceService) { |
| | | this.videoResourceService = videoResourceService; |
| | | } |
| | | |
| | | 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 HomeAdService getHomeAdService() { |
| | | return homeAdService; |
| | | } |
| | | |
| | | public void setHomeAdService(HomeAdService homeAdService) { |
| | | this.homeAdService = homeAdService; |
| | | } |
| | | |
| | | public AdService getAdService() { |
| | | return adService; |
| | | } |
| | | |
| | | public void setAdService(AdService adService) { |
| | | this.adService = adService; |
| | | } |
| | | |
| | | public HomeNoticeService getHomeNoticeService() { |
| | | return homeNoticeService; |
| | | } |
| | | |
| | | public void setHomeNoticeService(HomeNoticeService homeNoticeService) { |
| | | this.homeNoticeService = homeNoticeService; |
| | | } |
| | | |
| | | public WeiXinService getWeiXinService() { |
| | | return weiXinService; |
| | | } |
| | | |
| | | public void setWeiXinService(WeiXinService weiXinService) { |
| | | this.weiXinService = weiXinService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/VideoTypeServlet", method = RequestMethod.GET) |
| | | public void get(HttpServletRequest req, PrintWriter out) { |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/VideoTypeServlet", 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"; |
| | | } else if (type.equalsIgnoreCase("updateHomeType")) { |
| | |
| | | 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"))); |
| | |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | |
| | | import com.yeshi.buwan.util.*; |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | |
| | |
| | | import com.yeshi.buwan.service.imp.HomeTypeService; |
| | | import com.yeshi.buwan.service.imp.SystemService; |
| | | import com.yeshi.buwan.service.imp.recommend.CategoryRecommendVideoService; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.EhcacheUtil; |
| | | import com.yeshi.buwan.util.JsonUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.web.tag.PageEntity; |
| | | |
| | | @Controller |
| | |
| | | object.put("data", array); |
| | | out.print(object); |
| | | } |
| | | |
| | | @RequestMapping("getAllFirstClass") |
| | | public void getAllFirstClass(PrintWriter out){ |
| | | List<VideoType> list = classService.getAllVideoType(); |
| | |
| | | |
| | | /** |
| | | * 搜索 |
| | | * |
| | | * @param key |
| | | * @param detailsystem |
| | | * @param videotype |
| | |
| | | */ |
| | | @RequestMapping(value = "/getseachList",method=RequestMethod.POST) |
| | | public void categoryRecommendVideoList(String key, String detailsystem, |
| | | String videotype, String page, PrintWriter out) { |
| | | String videotype, String page, HttpSession session, PrintWriter out) { |
| | | |
| | | if(detailsystem==null || "".equals(detailsystem.trim())){ |
| | | detailsystem="0"; |
| | |
| | | |
| | | List<CategoryRecommendVideoAdmin> list = categoryRecommendVideoService |
| | | .getCategoryRecommendVideoAdmin(key, |
| | | Integer.parseInt(videotype), Integer.parseInt(detailsystem), pageIndex); |
| | | Integer.parseInt(videotype), SystemUtil.getAdminSelectedSystemId(session), Integer.parseInt(detailsystem), pageIndex); |
| | | long count = categoryRecommendVideoService |
| | | .getCategoryRecommendVideoAdminCount(key, |
| | | Integer.parseInt(videotype), Integer.parseInt(detailsystem)); |
| | | Integer.parseInt(videotype), SystemUtil.getAdminSelectedSystemId(session), Integer.parseInt(detailsystem)); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(pageIndex); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | root.put("pageEntity", pe); |
| | | String json = gson.toJson(list); |
| | | root.put("crv", json); |
| | | // for (CategoryRecommendVideoAdmin categoryRecommendVideoAdmin : list) |
| | | // { |
| | | // System.out.println(categoryRecommendVideoAdmin.getCategoryRecommendVideo().getCategoryRecommendVideo()); |
| | | // root.put("categoryRecommendVideoAdmin", |
| | | // gson.toJson(categoryRecommendVideoAdmin.getCategoryRecommendVideo().getCategoryRecommendVideo())); |
| | | // } |
| | | System.out.println(root.toString()); |
| | | out.print(root); |
| | | // dataMap.put("categoryRecommendVideoAdminList", list); |
| | | // List<DetailSystem> detailSystemList = systemService |
| | | // .getDetailSystemList(); |
| | | // dataMap.put("detailSystemList", detailSystemList); |
| | | // List<VideoType> typeList = classService.getFirstTypeList(""); |
| | | // dataMap.put("videoTypeList", typeList); |
| | | // json.put("data", data); |
| | | // System.out.println("jsonStr---------"+jsonStr); |
| | | // out.print(jsonStr); |
| | | } |
| | | |
| | | @RequestMapping(value="/deleteCategoryRecommendVideo",method=RequestMethod.POST) |
| | |
| | | } |
| | | |
| | | @RequestMapping(value="/setCategoryRecommendVideo",method=RequestMethod.POST) |
| | | public void updateCategoryRecommendVideo(String id,String beizhu,String desc,int orderby,String picture,String videoid,String videotype,PrintWriter out) { |
| | | public void updateCategoryRecommendVideo(String id, String beizhu, String desc, int orderby, String picture, String videoid, String videotype, HttpSession session, PrintWriter out) { |
| | | |
| | | //id为空则新加 |
| | | if(id == null || "".equals(id.trim())){ |
| | |
| | | newCategoryRecommendVideo.setBeizhu(beizhu); |
| | | newCategoryRecommendVideo.setCreatetime(System.currentTimeMillis() + ""); |
| | | newCategoryRecommendVideo.setDesc(desc); |
| | | // categoryRecommendVideo.setJpos(jpos); |
| | | newCategoryRecommendVideo.setOrderby(orderby); |
| | | newCategoryRecommendVideo.setPicture(picture); |
| | | newCategoryRecommendVideo.setVideoInfo(new VideoInfo(videoid)); |
| | | newCategoryRecommendVideo.setVideoType(new VideoType(Long.parseLong(videotype))); |
| | | newCategoryRecommendVideo.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | |
| | | categoryRecommendVideoService.addCategoryRecommendVideo(newCategoryRecommendVideo); |
| | | |
| | | SuperCategoryRecommendVideo sz=null; |
| | | List<DetailSystem> list = systemService.getDetailSystemList(); |
| | | List<DetailSystem> list = systemService.getDetailSystemList(SystemUtil.getAdminSelectedSystem(session).getId()); |
| | | for (DetailSystem ds : list) { |
| | | sz= new SuperCategoryRecommendVideo(); |
| | | sz.setDetailSystem(new DetailSystem(ds.getId())); |
| | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | 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; |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/detailsystemlist", method = RequestMethod.POST) |
| | | public void detailSystemList(String key, PrintWriter out) { |
| | | List<DetailSystem> list = systemService.getDetailSystemList(); |
| | | public void detailSystemList(String key, HttpSession session, PrintWriter out) { |
| | | List<DetailSystem> list = systemService.getDetailSystemList(SystemUtil.getAdminSelectedSystem(session).getId()); |
| | | JSONArray array = new JSONArray(); |
| | | if (list != null) |
| | | for (DetailSystem system : list) { |
| | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | 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; |
| | |
| | | private SpecialService specialService; |
| | | |
| | | @RequestMapping(value = "/gethomeadlistadmin", method = RequestMethod.POST) |
| | | public void getHomeBannerListAdmin(int page, int detailsystem, String key, PrintWriter out) { |
| | | public void getHomeBannerListAdmin(int page, int detailsystem, String key, HttpSession session, PrintWriter out) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | |
| | | List<HomeAdAdmin> list = homeAdService.getHomeAdAdmin(key, detailsystem, page); |
| | | List<HomeAdAdmin> list = homeAdService.getHomeAdAdmin(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem, page); |
| | | |
| | | long count = homeAdService.getHomeAdAdminCount(key, detailsystem); |
| | | long count = homeAdService.getHomeAdAdminCount(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(page); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpSession; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/gethometypelistadmin", method = RequestMethod.POST) |
| | | public void getHomeTypeListAdmin(int page, int detailsystem, String key, PrintWriter out) { |
| | | public void getHomeTypeListAdmin(int page, int detailsystem, String key, HttpSession session, PrintWriter out) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | |
| | | List<HomeTypeAdmin> list = homeTypeService.getHomeTypeAdmin(key, detailsystem, page); |
| | | long count = homeTypeService.getHomeTypeAdminCount(key, detailsystem); |
| | | List<HomeTypeAdmin> list = homeTypeService.getHomeTypeAdmin(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem, page); |
| | | long count = homeTypeService.getHomeTypeAdminCount(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(page); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | Gson gson = new GsonBuilder().create(); |
| | | for (HomeTypeAdmin ht : list) { |
| | | JSONObject root = new JSONObject(); |
| | | ht.getHomeType().getHomeType().getSystem().setAdmin(null); |
| | | root.put("homeType", gson.toJson(ht.getHomeType().getHomeType())); |
| | | JSONArray darray = new JSONArray(); |
| | | for (DetailSystemSelect dss : ht.getDetailSystemList()) { |
| | |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private SystemService systemService; |
| | | |
| | | @RequestMapping("hotSearchList") |
| | | public void hotSearchList(int pageIndex,int detailsystem,String key,PrintWriter out) { |
| | | public void hotSearchList(int pageIndex, int detailsystem, String key, HttpSession session, PrintWriter out) { |
| | | |
| | | if (pageIndex == 0) |
| | | pageIndex = 1; |
| | | |
| | | List<HotSearchAdmin> list = searchService.getHotSearchAdmin(key, detailsystem, pageIndex); |
| | | List<HotSearchAdmin> list = searchService.getHotSearchAdmin(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem, pageIndex); |
| | | Gson gson =new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); |
| | | long count = searchService.getHotSearchAdminCount(key, detailsystem); |
| | | long count = searchService.getHotSearchAdminCount(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(pageIndex); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value="addHotSearch",method=RequestMethod.POST) |
| | | public void addHotSearch(String name,String beizhu,String detailsystems,PrintWriter out ) { |
| | | public void addHotSearch(String name, String beizhu, String detailsystems, HttpSession session, PrintWriter out) { |
| | | |
| | | System.out.println("name-"+name); |
| | | System.out.println("beizhu-"+beizhu); |
| | |
| | | hotSearch.setCreatetime(System.currentTimeMillis() + ""); |
| | | hotSearch.setName(name); |
| | | hotSearch.setBeizhu(beizhu); |
| | | hotSearch.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | searchService.addHotSearch(hotSearch); |
| | | if (!StringUtil.isNullOrEmpty(detailsystems)) { |
| | | String[] idst = detailsystems.split(","); |
| | |
| | | searchService.addSuperHotSearch(sz); |
| | | } |
| | | } |
| | | |
| | | out.print("yes"); |
| | | return ; |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private SystemService systemService; |
| | | |
| | | @RequestMapping(value = "/hotStarList", method = RequestMethod.POST) |
| | | public void hotStarList(int pageIndex, String key, int detailsystem, |
| | | public void hotStarList(int pageIndex, String key, int detailsystem, HttpSession session, |
| | | PrintWriter out) { |
| | | if (pageIndex <= 0) { |
| | | pageIndex = 1; |
| | | } |
| | | List<HotStarAdmin> list = starService.getHotStarAdmin(key, |
| | | List<HotStarAdmin> list = starService.getHotStarAdmin(key, SystemUtil.getAdminSelectedSystemId(session), |
| | | detailsystem, pageIndex); |
| | | long count = starService.getHotStarAdminCount(key, detailsystem); |
| | | long count = starService.getHotStarAdminCount(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(pageIndex); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | } |
| | | |
| | | @RequestMapping("/addHotStar") |
| | | public void addHotStar(String detailSystems,String beizhu,String country,String job,String name,String orderby,String portrait,String works,PrintWriter out) { |
| | | public void addHotStar(String detailSystems, String beizhu, String country, String job, String name, String orderby, String portrait, String works, HttpSession session, PrintWriter out) { |
| | | List<String> sysList = new ArrayList<>(); |
| | | if (!StringUtil.isNullOrEmpty(detailSystems)) { |
| | | if (detailSystems.contains(",")) { |
| | |
| | | hotStar.setOrderby(Integer.parseInt(orderby)); |
| | | hotStar.setPortrait(portrait); |
| | | hotStar.setWorks(works); |
| | | hotStar.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | hotStar = starService.addStar(hotStar); |
| | | for (String ds : sysList) { |
| | | SuperHotStar ss = new SuperHotStar(); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | 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; |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/specialList", method = RequestMethod.POST) |
| | | public void specialList(int pageIndex,String key,int detailsystem,PrintWriter out) { |
| | | public void specialList(int pageIndex, String key, int detailsystem, HttpSession session, PrintWriter out) { |
| | | |
| | | if (pageIndex == 0) |
| | | pageIndex = 1; |
| | | |
| | | List<SpecialAdmin> list = specialService.getSpecialAdmin(key, detailsystem, pageIndex); |
| | | long count = specialService.getSpecialAdminCount(key, detailsystem); |
| | | List<SpecialAdmin> list = specialService.getSpecialAdmin(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem, pageIndex); |
| | | long count = specialService.getSpecialAdminCount(key, SystemUtil.getAdminSelectedSystemId(session), detailsystem); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(pageIndex); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | out.print(json); |
| | | return ; |
| | | } |
| | | |
| | | @RequestMapping(value = "/updateSpecial", method = RequestMethod.POST) |
| | | public void updateSpecial(String id,String introduction,String name,int orderby,String picture,String show,String showonmain,PrintWriter out) { |
| | | |
| | |
| | | out.print("yes"); |
| | | return ; |
| | | } |
| | | |
| | | @RequestMapping(value = "/addSpecial", method = RequestMethod.POST) |
| | | public void addSpecial(String detailSystems,String introduction,String name,int orderby,String picture,String show,String showonmain,PrintWriter out) { |
| | | public void addSpecial(String detailSystems, String introduction, String name, int orderby, String picture, String show, String showonmain, HttpSession session, PrintWriter out) { |
| | | |
| | | System.out.println("name:"+name); |
| | | System.out.println("detailSystems:"+detailSystems); |
| | |
| | | else |
| | | special.setShowonmain(false); |
| | | |
| | | |
| | | special.setSystem(SystemUtil.getAdminSelectedSystem(session)); |
| | | |
| | | specialService.addSpecial(special); |
| | | |
| | | for (String ds : sysList) { |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping("detailSystemList") |
| | | public void detailSystemList(int pageIndex,String key,PrintWriter out) { |
| | | public void detailSystemList(int pageIndex, String key, HttpSession session, PrintWriter out) { |
| | | pageIndex = pageIndex <= 0 ? 1 : pageIndex; |
| | | List<DetailSystem> list = systemService.getDetailSystemList(key, pageIndex); |
| | | long count = systemService.getDetailSystemListCount(key); |
| | | List<DetailSystem> list = systemService.getDetailSystemList(key, SystemUtil.getAdminSelectedSystem(session).getId(), pageIndex); |
| | | long count = systemService.getDetailSystemListCount(key,SystemUtil.getAdminSelectedSystem(session).getId()); |
| | | PageEntity pe = new PageEntity(); |
| | | pe.setPageIndex(pageIndex); |
| | | pe.setPageSize(Constant.pageCount); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/videolist", method = RequestMethod.POST) |
| | | public void videoList(int videotype, int page, String key, String resourceIds, int contenttype, PrintWriter out) { |
| | | public void videoList(int videotype, int page, String key, String type, String resourceIds, int contenttype, PrintWriter out) { |
| | | |
| | | if (StringUtil.isNullOrEmpty(type)) { |
| | | type = "name"; |
| | | } |
| | | |
| | | |
| | | List<VideoInfo> list = null; |
| | | long count = 0; |
| | |
| | | //正片搜索 |
| | | if (contenttype == 1) { |
| | | SolrVideoSearchFilter filter = new SolrVideoSearchFilter(); |
| | | |
| | | switch (type) { |
| | | case "name": |
| | | filter.setKey(key); |
| | | break; |
| | | case "actor": |
| | | filter.setActor(key); |
| | | break; |
| | | case "director": |
| | | filter.setDirector(key); |
| | | break; |
| | | } |
| | | |
| | | |
| | | filter.setVideoType(videotype == 0 ? null : videotype); |
| | | filter.setContentType(1); |
| | | if (!StringUtil.isNullOrEmpty(resourceIds)) { |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletContext; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private static final String IMGPATH="/upload/class"; |
| | | |
| | | @RequestMapping("videoTypeList") |
| | | public void videoTypeList(int pageIndex,int detailsystem,int pid,PrintWriter out) { |
| | | public void videoTypeList(int pageIndex, int detailsystem, int pid, HttpSession session, PrintWriter out) { |
| | | if (pageIndex == 0) |
| | | pageIndex = 1; |
| | | |
| | | List<com.yeshi.buwan.domain.web.VideoTypeAdmin> list = classService.getVideoTypeAdmin(detailsystem, pid, |
| | | List<com.yeshi.buwan.domain.web.VideoTypeAdmin> list = classService.getVideoTypeAdmin(SystemUtil.getAdminSelectedSystemId(session), detailsystem, pid, |
| | | pageIndex); |
| | | |
| | | long count = classService.getVideoTypeAdminCount(detailsystem, pid); |
| | |
| | | */ |
| | | @RequestMapping("bindDeviceToken") |
| | | @ResponseBody |
| | | public String bindDeviceToken(AcceptData acceptData, String loginUid, @NotEmpty(message = "type不能为空") String type, @NotEmpty(message = "regId不能为空") String regId, BindingResult bindingResult) { |
| | | public String bindDeviceToken(AcceptData acceptData, String loginUid, @NotEmpty(message = "type不能为空") String type, @NotEmpty(message = "regId不能为空") String regId, String model, String androidVersion, BindingResult bindingResult) { |
| | | if (bindingResult.hasErrors()) { |
| | | String msg = bindingResult.getFieldError().getDefaultMessage(); |
| | | return JsonUtil.loadFalseJson(msg); |
| | |
| | | token.setToken(regId); |
| | | token.setVersion(acceptData.getVersion()); |
| | | token.setLoginUid(loginUid); |
| | | token.setBuildModel(model); |
| | | token.setBuildVersion(androidVersion); |
| | | try { |
| | | pushDeviceTokenService.addDeviceToken(token); |
| | | return JsonUtil.loadTrueJson(""); |
| | |
| | | @Resource |
| | | private AdService adService; |
| | | |
| | | public AdService getAdService() { |
| | | return adService; |
| | | } |
| | | |
| | | public void setAdService(AdService adService) { |
| | | this.adService = adService; |
| | | } |
| | | |
| | | @RequireUid |
| | | public void getMineAdList(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String key = request.getParameter("Key"); |
| | |
| | | @Resource |
| | | private AttentionService attentionService; |
| | | |
| | | public AttentionService getAttentionService() { |
| | | return attentionService; |
| | | } |
| | | |
| | | public void setAttentionService(AttentionService attentionService) { |
| | | this.attentionService = attentionService; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.google.gson.GsonBuilder; |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.exception.LoginUserException; |
| | | import com.yeshi.buwan.dto.user.LoginInfoDto; |
| | | import com.yeshi.buwan.dto.user.QQUserInfo; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.SMSException; |
| | | import com.yeshi.buwan.exception.user.RegisterUserException; |
| | | import com.yeshi.buwan.service.imp.CommentService; |
| | | import com.yeshi.buwan.service.imp.MaskKeyService; |
| | | import com.yeshi.buwan.service.imp.SystemService; |
| | |
| | | return; |
| | | } |
| | | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | LoginUser lu = userService.getLoginUser(openid, detailSystem.getId(), Integer.parseInt(loginType), portrait, |
| | | name, UserParser.getIp(request) + ":" + request.getRemotePort()); |
| | | LoginInfoDto loginInfoDto = new LoginInfoDto(); |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | |
| | | int loginTypeInt = Integer.parseInt(loginType); |
| | | loginInfoDto.setLoginType(loginTypeInt); |
| | | |
| | | switch (loginTypeInt) { |
| | | case LoginUser.LOGIN_TYPE_EMAIL: |
| | | loginInfoDto.setEmail(openid); |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_QQ: |
| | | QQUserInfo qqUserInfo = new QQUserInfo(); |
| | | qqUserInfo.setName(name); |
| | | qqUserInfo.setOpenId(openid); |
| | | qqUserInfo.setPortrait(portrait); |
| | | qqUserInfo.setSex(sex); |
| | | loginInfoDto.setQqUserInfo(qqUserInfo); |
| | | break; |
| | | } |
| | | |
| | | |
| | | try { |
| | | LoginUser lu = userService.login(loginInfoDto); |
| | | if (lu != null) { |
| | | JSONObject object = new JSONObject(); |
| | | object.put("LoginUid", lu.getId()); |
| | |
| | | } else { |
| | | out.print(JsonUtil.loadFalseJson("登录失败")); |
| | | } |
| | | } catch (LoginUserException e) { |
| | | //用户不存在 |
| | | if (e.getCode() == LoginUserException.CODE_NO_USER && loginTypeInt == LoginUser.LOGIN_TYPE_EMAIL) { |
| | | //注册 |
| | | try { |
| | | userService.register(loginInfoDto); |
| | | } catch (RegisterUserException e1) { |
| | | out.print(JsonUtil.loadFalseJson("登录失败")); |
| | | } |
| | | |
| | | } else { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | LoginInfoDto loginInfoDto = new LoginInfoDto(); |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | loginInfoDto.setLoginType(LoginUser.LOGIN_TYPE_WX); |
| | | loginInfoDto.setWeiXinUser(weiXinUser); |
| | | |
| | | |
| | | LoginUser lu = userService.getLoginUser(weiXinUser.getOpenid(), detailSystem.getId(), 2, weiXinUser.getHeadimgurl(), |
| | | weiXinUser.getNickname(), UserParser.getIp(request) + ":" + request.getRemotePort()); |
| | | try { |
| | | LoginUser lu = userService.login(loginInfoDto); |
| | | if (lu != null) { |
| | | JSONObject object = new JSONObject(); |
| | | object.put("user", new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create().toJson(lu)); |
| | |
| | | } else { |
| | | out.print(JsonUtil.loadFalseJson("登录失败")); |
| | | } |
| | | |
| | | } catch (LoginUserException e) { |
| | | //用户不存在 |
| | | if (e.getCode() == LoginUserException.CODE_NO_USER) { |
| | | //注册 |
| | | try { |
| | | userService.register(loginInfoDto); |
| | | } catch (RegisterUserException e1) { |
| | | out.print(JsonUtil.loadFalseJson("登录失败")); |
| | | } |
| | | } else { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | @Resource |
| | | private NewsService newsService; |
| | | |
| | | public NewsService getNewsService() { |
| | | return newsService; |
| | | } |
| | | |
| | | public void setNewsService(NewsService newsService) { |
| | | this.newsService = newsService; |
| | | } |
| | | |
| | | public SystemService getSystemService() { |
| | | return systemService; |
| | | } |
| | | |
| | | public void setSystemService(SystemService systemService) { |
| | | this.systemService = systemService; |
| | | } |
| | | |
| | | public void getNewsTypeList(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | |
| | |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.Collection; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.dto.user.LoginInfoDto; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.RegisterUserException; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.*; |
| | |
| | | if (StringUtil.isNullOrEmpty(nickName)) |
| | | nickName = "无名氏"; |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | // 注册 --用户名,昵称,密码 |
| | | LoginUser user = new LoginUser(); |
| | | user.setCreatetime(System.currentTimeMillis() + ""); |
| | | user.setDetailsystem(ds.getId()); |
| | | user.setDevice(acceptData.getDevice()); |
| | | user.setLoginType(3); |
| | | user.setName(nickName); |
| | | user.setOpenid(account); |
| | | user.setPwd(StringUtil.Md5(pwd)); |
| | | user.setPortrait(savePortrait(portrait, request.getSession())); |
| | | user.setIpinfo(ip + ":" + port); |
| | | |
| | | String result = userService.registerByEmail(user); |
| | | if (result.contains("成功")) |
| | | LoginInfoDto loginInfoDto = new LoginInfoDto(); |
| | | loginInfoDto.setEmail(account); |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | loginInfoDto.setLoginType(LoginUser.LOGIN_TYPE_EMAIL); |
| | | loginInfoDto.setPwd(StringUtil.Md5(pwd)); |
| | | loginInfoDto.setIpInfo(ip + ":" + port); |
| | | loginInfoDto.setNickName(nickName); |
| | | |
| | | |
| | | try { |
| | | userService.register(loginInfoDto); |
| | | out.print(JsonUtil.loadTrueJson("注册成功")); |
| | | else |
| | | out.print(JsonUtil.loadFalseJson(result)); |
| | | } catch (RegisterUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | // systemService.getDetailSystemByPackage(packageName); |
| | | // 注册 --用户名,昵称,密码 |
| | | |
| | | LoginUser user = new LoginUser(); |
| | | user.setDevice(acceptData.getDevice()); |
| | | user.setLoginType(3); |
| | | user.setOpenid(account); |
| | | user.setPwd(StringUtil.Md5(pwd)); |
| | | user.setPortrait("http://buwan-1255749512.file.myqcloud.com/resource/ic_portrait_default.png"); |
| | | user = userService.loginByEmail(user); |
| | | if (user == null || user.getState() != LoginUser.STATE_NORMAL) |
| | | out.print(JsonUtil.loadFalseJson("账号或密码错误")); |
| | | else |
| | | LoginInfoDto loginInfoDto = new LoginInfoDto(); |
| | | loginInfoDto.setLoginType(LoginUser.LOGIN_TYPE_EMAIL); |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | loginInfoDto.setEmail(account); |
| | | loginInfoDto.setPwd(StringUtil.Md5(pwd)); |
| | | try { |
| | | LoginUser user = userService.login(loginInfoDto); |
| | | out.print(JsonUtil.loadTrueJson(StringUtil.outPutResultJson(user))); |
| | | } catch (LoginUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); |
| | | |
| | | LoginUser lu = userService.getLoginUser(openid, detailSystem.getId(), Integer.parseInt(loginType), portrait, |
| | | name,UserParser.getIp(request)+":"+request.getRemotePort()); |
| | | if (lu != null) { |
| | | JSONObject object = new JSONObject(); |
| | | object.put("LoginUid", lu.getId()); |
| | | object.put("Name", lu.getName()); |
| | | object.put("Portrait", lu.getPortrait()); |
| | | out.print(JsonUtil.loadTrueJsonNoencript(object.toString())); |
| | | } else { |
| | | // LoginUser lu = userService.getLoginUser(openid, detailSystem.getId(), Integer.parseInt(loginType), portrait, |
| | | // name,UserParser.getIp(request)+":"+request.getRemotePort()); |
| | | // if (lu != null) { |
| | | // JSONObject object = new JSONObject(); |
| | | // object.put("LoginUid", lu.getId()); |
| | | // object.put("Name", lu.getName()); |
| | | // object.put("Portrait", lu.getPortrait()); |
| | | // out.print(JsonUtil.loadTrueJsonNoencript(object.toString())); |
| | | // } else { |
| | | out.print(JsonUtil.loadFalseJsonNoencript("登录失败")); |
| | | } |
| | | // } |
| | | } |
| | | |
| | | private String savePortrait(HttpServletRequest request) { |
| | |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | private Integer version; |
| | | private String buildModel;//手机型号 |
| | | private String buildVersion;//手机系统版本 |
| | | |
| | | private String loginUid; |
| | | |
| | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | |
| | | public String getBuildModel() { |
| | | return buildModel; |
| | | } |
| | | |
| | | public void setBuildModel(String buildModel) { |
| | | this.buildModel = buildModel; |
| | | } |
| | | |
| | | public String getBuildVersion() { |
| | | return buildVersion; |
| | | } |
| | | |
| | | public void setBuildVersion(String buildVersion) { |
| | | this.buildVersion = buildVersion; |
| | | } |
| | | } |
| | |
| | | import java.io.Serializable; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.yeshi.buwan.domain.SystemInfo; |
| | | import com.yeshi.buwan.domain.ad.CommonAd; |
| | | |
| | | public class Special implements Serializable{ |
| | |
| | | @Expose |
| | | private CommonAd commonAd;// 常规广告 |
| | | |
| | | |
| | | private SystemInfo system; |
| | | |
| | | |
| | | public SystemInfo getSystem() { |
| | | return system; |
| | | } |
| | | |
| | | public void setSystem(SystemInfo system) { |
| | | this.system = system; |
| | | } |
| | | |
| | | public CommonAd getCommonAd() { |
| | | return commonAd; |
| | | } |
| | |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | |
| | | public LoginUserExtra() { |
| | | } |
| | | |
| | | public LoginUserExtra(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | |
| | | |
| | | public class SolrVideoSearchFilter { |
| | | private String key; |
| | | //演员 |
| | | private String actor; |
| | | //导演 |
| | | private String director; |
| | | |
| | | private Integer contentType; |
| | | private Integer videoType; |
| | | private String[] resourceIds; |
| | | private String sortKey; |
| | | |
| | | public String getDirector() { |
| | | return director; |
| | | } |
| | | |
| | | public void setDirector(String director) { |
| | | this.director = director; |
| | | } |
| | | |
| | | public String getActor() { |
| | | return actor; |
| | | } |
| | | |
| | | public void setActor(String actor) { |
| | | this.actor = actor; |
| | | } |
| | | |
| | | |
| | | public String getSortKey() { |
| | | return sortKey; |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dto.user; |
| | | |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | |
| | | public class LoginInfoDto { |
| | | |
| | | private String systemId; |
| | | private int loginType; |
| | | private QQUserInfo qqUserInfo; |
| | | private WeiXinUser weiXinUser; |
| | | private String email; |
| | | private String pwd; |
| | | private String phone; |
| | | private String smsCode; |
| | | //注册时使用 |
| | | private String ipInfo; |
| | | private String nickName; |
| | | |
| | | |
| | | public String getIpInfo() { |
| | | return ipInfo; |
| | | } |
| | | |
| | | public void setIpInfo(String ipInfo) { |
| | | this.ipInfo = ipInfo; |
| | | } |
| | | |
| | | public String getNickName() { |
| | | return nickName; |
| | | } |
| | | |
| | | public void setNickName(String nickName) { |
| | | this.nickName = nickName; |
| | | } |
| | | |
| | | public String getSystemId() { |
| | | return systemId; |
| | | } |
| | | |
| | | public void setSystemId(String systemId) { |
| | | this.systemId = systemId; |
| | | } |
| | | |
| | | public int getLoginType() { |
| | | return loginType; |
| | | } |
| | | |
| | | public void setLoginType(int loginType) { |
| | | this.loginType = loginType; |
| | | } |
| | | |
| | | public QQUserInfo getQqUserInfo() { |
| | | return qqUserInfo; |
| | | } |
| | | |
| | | public void setQqUserInfo(QQUserInfo qqUserInfo) { |
| | | this.qqUserInfo = qqUserInfo; |
| | | } |
| | | |
| | | public WeiXinUser getWeiXinUser() { |
| | | return weiXinUser; |
| | | } |
| | | |
| | | public void setWeiXinUser(WeiXinUser weiXinUser) { |
| | | this.weiXinUser = weiXinUser; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getPwd() { |
| | | return pwd; |
| | | } |
| | | |
| | | public void setPwd(String pwd) { |
| | | this.pwd = pwd; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getSmsCode() { |
| | | return smsCode; |
| | | } |
| | | |
| | | public void setSmsCode(String smsCode) { |
| | | this.smsCode = smsCode; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dto.user; |
| | | |
| | | public class QQUserInfo { |
| | | |
| | | private String name; |
| | | private String portrait; |
| | | private String openId; |
| | | private String sex; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPortrait() { |
| | | return portrait; |
| | | } |
| | | |
| | | public void setPortrait(String portrait) { |
| | | this.portrait = portrait; |
| | | } |
| | | |
| | | public String getOpenId() { |
| | | return openId; |
| | | } |
| | | |
| | | public void setOpenId(String openId) { |
| | | this.openId = openId; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.exception.user; |
| | | |
| | | public class LoginUserException extends Exception { |
| | | |
| | | |
| | | //参数不完整 |
| | | public final static int CODE_PARAMS_NOT_ENOUGH = 1; |
| | | |
| | | //密码错误 |
| | | public final static int CODE_PWD_WRONG = 10; |
| | | |
| | | //用户不存在 |
| | | public final static int CODE_NO_USER = 20; |
| | | |
| | | //用户被封禁 |
| | | public final static int CODE_FORBIDDEN = 101; |
| | | |
| | | |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public LoginUserException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | |
| | | public LoginUserException(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return msg; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.exception.user; |
| | | |
| | | public class RegisterUserException extends Exception { |
| | | |
| | | //参数不完整 |
| | | public final static int CODE_PARAMS_NOT_ENOUGH = 1; |
| | | |
| | | //用户已存在 |
| | | public final static int CODE_USER_EXIST = 20; |
| | | |
| | | //用户被封禁 |
| | | public final static int CODE_FORBIDDEN = 101; |
| | | |
| | | |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public RegisterUserException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | |
| | | public RegisterUserException(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return msg; |
| | | } |
| | | } |
| | |
| | | @Resource |
| | | private CommonAdPositionDao commonAdPositionDao; |
| | | |
| | | public CommonAdDao getCommonAdDao() { |
| | | return commonAdDao; |
| | | } |
| | | |
| | | public void setCommonAdDao(CommonAdDao commonAdDao) { |
| | | this.commonAdDao = commonAdDao; |
| | | } |
| | | |
| | | public CommonAdStatisticsDao getCommonAdStatisticsDao() { |
| | | return commonAdStatisticsDao; |
| | | } |
| | | |
| | | public void setCommonAdStatisticsDao(CommonAdStatisticsDao commonAdStatisticsDao) { |
| | | this.commonAdStatisticsDao = commonAdStatisticsDao; |
| | | } |
| | | |
| | | public CommonAdPositionAdDao getCommonAdPositionAdDao() { |
| | | return commonAdPositionAdDao; |
| | | } |
| | | |
| | | public void setCommonAdPositionAdDao(CommonAdPositionAdDao commonAdPositionAdDao) { |
| | | this.commonAdPositionAdDao = commonAdPositionAdDao; |
| | | } |
| | | |
| | | public SuperRecommendAdDao getSuperRecommendAdDao() { |
| | | return superRecommendAdDao; |
| | | } |
| | | |
| | | public void setSuperRecommendAdDao(SuperRecommendAdDao superRecommendAdDao) { |
| | | this.superRecommendAdDao = superRecommendAdDao; |
| | | } |
| | | |
| | | public WXStatisticsDao getWxStatisticsDao() { |
| | | return wxStatisticsDao; |
| | | } |
| | | |
| | | public void setWxStatisticsDao(WXStatisticsDao wxStatisticsDao) { |
| | | this.wxStatisticsDao = wxStatisticsDao; |
| | | } |
| | | |
| | | public WXAdDao getWxAdDao() { |
| | | return wxAdDao; |
| | | } |
| | | |
| | | public void setWxAdDao(WXAdDao wxAdDao) { |
| | | this.wxAdDao = wxAdDao; |
| | | } |
| | | |
| | | public AdStatisticsDao getAdStatisticsDao() { |
| | | return adStatisticsDao; |
| | | } |
| | | |
| | | public void setAdStatisticsDao(AdStatisticsDao adStatisticsDao) { |
| | | this.adStatisticsDao = adStatisticsDao; |
| | | } |
| | | |
| | | public MineAdDao getMineAdDao() { |
| | | return mineAdDao; |
| | | } |
| | | |
| | | public void setMineAdDao(MineAdDao mineAdDao) { |
| | | this.mineAdDao = mineAdDao; |
| | | } |
| | | |
| | | public RecommendAdDao getRecommendAdDao() { |
| | | return recommendAdDao; |
| | | } |
| | | |
| | | public void setRecommendAdDao(RecommendAdDao recommendAdDao) { |
| | | this.recommendAdDao = recommendAdDao; |
| | | } |
| | | |
| | | // 获取广告 |
| | | public List<RecommendAd> getRecommendAdList() { |
| | |
| | | @Resource |
| | | private AdminUserDao adminUserDao; |
| | | |
| | | public AdminUserDao getAdminUserDao() { |
| | | return adminUserDao; |
| | | } |
| | | |
| | | public void setAdminUserDao(AdminUserDao adminUserDao) { |
| | | this.adminUserDao = adminUserDao; |
| | | } |
| | | |
| | | /** |
| | | * 用户登录 |
| | | * |
| | |
| | | @Resource |
| | | private LoginUserDao loginUserDao; |
| | | |
| | | public VideoDetailUtil getVideoDetailUtil() { |
| | | return videoDetailUtil; |
| | | } |
| | | |
| | | public void setVideoDetailUtil(VideoDetailUtil videoDetailUtil) { |
| | | this.videoDetailUtil = videoDetailUtil; |
| | | } |
| | | |
| | | public AttentionDao getAttentionDao() { |
| | | return attentionDao; |
| | | } |
| | | |
| | | public void setAttentionDao(AttentionDao attentionDao) { |
| | | this.attentionDao = attentionDao; |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Caching(evict = { |
| | | @CacheEvict(value = "attentionCache", key = "'isAddAttention'+'-'+#attention.loginUser.id+'-'+#attention.videoInfo.id"), |
| | |
| | | @Resource |
| | | private WebVideoDao webVideoDao; |
| | | |
| | | public VideoBanQuanVideoDao getVideoBanQuanVideoDao() { |
| | | return videoBanQuanVideoDao; |
| | | } |
| | | |
| | | public void setVideoBanQuanVideoDao(VideoBanQuanVideoDao videoBanQuanVideoDao) { |
| | | this.videoBanQuanVideoDao = videoBanQuanVideoDao; |
| | | } |
| | | |
| | | public VideoBanQuanDao getVideoBanQuanDao() { |
| | | return videoBanQuanDao; |
| | | } |
| | | |
| | | public void setVideoBanQuanDao(VideoBanQuanDao videoBanQuanDao) { |
| | | this.videoBanQuanDao = videoBanQuanDao; |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void addBanQuanVideo(final List<VideoBanQuanVideo> list) { |
| | |
| | | @Resource |
| | | private CategoryContryDao categoryContryDao; |
| | | |
| | | public CategoryContryDao getCategoryContryDao() { |
| | | return categoryContryDao; |
| | | } |
| | | |
| | | public void setCategoryContryDao(CategoryContryDao categoryContryDao) { |
| | | this.categoryContryDao = categoryContryDao; |
| | | } |
| | | |
| | | public ClassService getClassService() { |
| | | return classService; |
| | | } |
| | | |
| | | public void setClassService(ClassService classService) { |
| | | this.classService = classService; |
| | | } |
| | | |
| | | @Cacheable(value = "classCache", key = "'categoryContryList'+'-'+#cid") |
| | | public List<CategoryContry> categoryContryList(String cid) { |
| | | |
| | |
| | | @Resource |
| | | private CategoryRecommendCacheVideoNumberDao categoryRecommendCacheVideoNumberDao; |
| | | |
| | | public CategoryRecommendCacheVideoNumberDao getCategoryRecommendCacheVideoNumberDao() { |
| | | return categoryRecommendCacheVideoNumberDao; |
| | | } |
| | | |
| | | public void setCategoryRecommendCacheVideoNumberDao( |
| | | CategoryRecommendCacheVideoNumberDao categoryRecommendCacheVideoNumberDao) { |
| | | this.categoryRecommendCacheVideoNumberDao = categoryRecommendCacheVideoNumberDao; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | // 分区榜首数量 |
| | | public int getRankVideoNumber(long videotype) { |
| | |
| | | */ |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<com.yeshi.buwan.domain.web.VideoTypeAdmin> getVideoTypeAdmin(final int detailSystem, final int pid, |
| | | public List<com.yeshi.buwan.domain.web.VideoTypeAdmin> getVideoTypeAdmin(final String systemId, final int detailSystem, final int pid, |
| | | final int page) { |
| | | return (List<com.yeshi.buwan.domain.web.VideoTypeAdmin>) videoTypeDao |
| | | .excute(new HibernateCallback<List<com.yeshi.buwan.domain.web.VideoTypeAdmin>>() { |
| | |
| | | throws HibernateException { |
| | | List<com.yeshi.buwan.domain.web.VideoTypeAdmin> hotTypeList = new ArrayList<com.yeshi.buwan.domain.web.VideoTypeAdmin>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem ds where ds.system.id=" + systemId).list(); |
| | | String where = ""; |
| | | |
| | | List<VideoType> list = null; |
| | |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public CollectionDao getCollectionDao() { |
| | | return collectionDao; |
| | | } |
| | | |
| | | public void setCollectionDao(CollectionDao collectionDao) { |
| | | this.collectionDao = collectionDao; |
| | | } |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | @Cacheable(value = "userCache", key = "'getCollectVideo'+'-'+#uid+'-'+#page") |
| | | public List<VideoInfo> getCollectVideo(String uid, String loginUid, int page) { |
| | |
| | | @Resource |
| | | private CommentReplyDao commentReplyDao; |
| | | |
| | | public CommentReplyDao getCommentReplyDao() { |
| | | return commentReplyDao; |
| | | } |
| | | |
| | | public void setCommentReplyDao(CommentReplyDao commentReplyDao) { |
| | | this.commentReplyDao = commentReplyDao; |
| | | } |
| | | |
| | | public CommentDao getCommentDao() { |
| | | return commentDao; |
| | | } |
| | | |
| | | public void setCommentDao(CommentDao commentDao) { |
| | | this.commentDao = commentDao; |
| | | } |
| | | |
| | | public void addComment2(Comment2 c) { |
| | | |
| | | commentDao.create(c); |
| | |
| | | @Resource |
| | | private ConfigDao configDao; |
| | | |
| | | public ConfigDao getConfigDao() { |
| | | return configDao; |
| | | } |
| | | |
| | | public void setConfigDao(ConfigDao configDao) { |
| | | this.configDao = configDao; |
| | | } |
| | | |
| | | // 获取配置文件 |
| | | public List<Config> getConfig(Long systemId, int version) { |
| | | return configDao.listBySystemIdAndMaxVersion(systemId, version); |
| | |
| | | @Resource |
| | | private SuperHomeAdDao superHomeAdDao; |
| | | |
| | | public SuperHomeAdDao getSuperHomeAdDao() { |
| | | return superHomeAdDao; |
| | | } |
| | | |
| | | public void setSuperHomeAdDao(SuperHomeAdDao superHomeAdDao) { |
| | | this.superHomeAdDao = superHomeAdDao; |
| | | } |
| | | |
| | | public HomeAdDao getHomeAdDao() { |
| | | return homeAdDao; |
| | | } |
| | | |
| | | public void setHomeAdDao(HomeAdDao homeAdDao) { |
| | | this.homeAdDao = homeAdDao; |
| | | } |
| | | |
| | | public List<HomeAd> getHomeAdList(SystemInfo system) { |
| | | List<HomeAd> list = homeAdDao |
| | | .list("from HomeAd h where h.system.id=" + system.getId() + " order by h.orderby desc"); |
| | |
| | | |
| | | // 后台操作 |
| | | @SuppressWarnings("unchecked") |
| | | public List<HomeAdAdmin> getHomeAdAdmin(final String key, final int detailSystem, final int page) { |
| | | public List<HomeAdAdmin> getHomeAdAdmin(final String key, final String systemId, final int detailSystem, final int page) { |
| | | return (List<HomeAdAdmin>) homeAdDao.excute(new HibernateCallback<List<HomeAdAdmin>>() { |
| | | public List<HomeAdAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<HomeAdAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem ds where ds.system.id=" + systemId).list(); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select sh.homeAd from SuperHomeAd sh where sh.detailSystem.id=" + detailSystem |
| | | + " order by sh.homeAd.createtime desc"; |
| | | else |
| | | sql = "from HomeAd zb order by zb.createtime desc"; |
| | | sql = "from HomeAd zb where zb.system.id=" + systemId + " order by zb.createtime desc"; |
| | | |
| | | List<HomeAd> list = session.createQuery(sql).setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | |
| | | }); |
| | | } |
| | | |
| | | public long getHomeAdAdminCount(String key, int detailSystem) { |
| | | public long getHomeAdAdminCount(String key, String systemId, int detailSystem) { |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select count(*) from (select count(*) from wk_video_super_homead zb left join wk_video_homead c on c.id=zb.homeadid where zb.detailsystemid=" |
| | | + detailSystem + " group by zb.homeadid) s"; |
| | | else |
| | | sql = "select count(*) from wk_video_homead"; |
| | | sql = "select count(*) from wk_video_homead where system="+systemId; |
| | | return homeAdDao.getCountSQL(sql); |
| | | } |
| | | |
| | |
| | | @Resource |
| | | private SuperHomeNoticeDao superHomeNoticeDao; |
| | | |
| | | public SuperHomeNoticeDao getSuperHomeNoticeDao() { |
| | | return superHomeNoticeDao; |
| | | } |
| | | |
| | | public void setSuperHomeNoticeDao(SuperHomeNoticeDao superHomeNoticeDao) { |
| | | this.superHomeNoticeDao = superHomeNoticeDao; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public HomeNoticeDao getHomeNoticeDao() { |
| | | return homeNoticeDao; |
| | | } |
| | | |
| | | public void setHomeNoticeDao(HomeNoticeDao homeNoticeDao) { |
| | | this.homeNoticeDao = homeNoticeDao; |
| | | } |
| | | |
| | | // 首页公告 |
| | | public List<HomeNotice> getHomeNoticeList(SystemInfo system) { |
| | | List<HomeNotice> list = homeNoticeDao |
| | |
| | | */ |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<HomeTypeAdmin> getHomeTypeAdmin(final String key, final int detailSystem, final int page) { |
| | | public List<HomeTypeAdmin> getHomeTypeAdmin(final String key, final String systemId, final int detailSystem, final int page) { |
| | | |
| | | return (List<HomeTypeAdmin>) homeTypeDao.excute(new HibernateCallback<List<HomeTypeAdmin>>() { |
| | | public List<HomeTypeAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<HomeTypeAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem ds where ds.system.id=" + systemId).list(); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select sh.homeType from SuperHomeType sh where sh.homeType.name like ? and sh.detailSystem.id=" |
| | | + detailSystem + " order by sh.homeType.orderby desc"; |
| | | else |
| | | sql = "from HomeType zb where zb.name like ? order by zb.orderby desc"; |
| | | sql = "from HomeType zb where zb.name like ? and zb.system.id=" + systemId + " order by zb.orderby desc"; |
| | | |
| | | List<HomeType> list = session.createQuery(sql).setParameter(0, "%" + key + "%") |
| | | .setFirstResult((page - 1) * Constant.pageCount).setMaxResults(Constant.pageCount).list(); |
| | |
| | | |
| | | } |
| | | |
| | | public long getHomeTypeAdminCount(String key, int detailSystem) { |
| | | public long getHomeTypeAdminCount(String key, String systemId,int detailSystem) { |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select count(*) from (select count(*) from wk_video_super_hometype zb left join wk_video_hometype c on c.id=zb.hometypeid where zb.detailsystemid=" |
| | | + detailSystem + " and c.name like '%" + key + "%' group by zb.hometypeid) s"; |
| | | else |
| | | sql = "select count(*) from (select count(*) from wk_video_super_hometype zb left join wk_video_hometype c on c.id=zb.hometypeid where c.name like '%" |
| | | + key + "%' group by zb.hometypeid) s"; |
| | | + key + "%' and c.system="+systemId+" group by zb.hometypeid) s"; |
| | | |
| | | return homeTypeDao.getCountSQL(sql); |
| | | } |
| | |
| | | @Resource |
| | | private SuperHotTypeDao superHotTypeDao; |
| | | |
| | | public SuperHotTypeDao getSuperHotTypeDao() { |
| | | return superHotTypeDao; |
| | | } |
| | | |
| | | public void setSuperHotTypeDao(SuperHotTypeDao superHotTypeDao) { |
| | | this.superHotTypeDao = superHotTypeDao; |
| | | } |
| | | |
| | | public HotTypeDao getHotTypeDao() { |
| | | return hotTypeDao; |
| | | } |
| | | |
| | | public void setHotTypeDao(HotTypeDao hotTypeDao) { |
| | | this.hotTypeDao = hotTypeDao; |
| | | } |
| | | |
| | | // 获取热门频道 |
| | | public List<HotVideoType> getHotTypeList() { |
| | | |
| | |
| | | @Resource |
| | | private ImageInfoDao imageInfoDao; |
| | | |
| | | public ImageInfoDao getImageInfoDao() { |
| | | return imageInfoDao; |
| | | } |
| | | |
| | | public void setImageInfoDao(ImageInfoDao imageInfoDao) { |
| | | this.imageInfoDao = imageInfoDao; |
| | | } |
| | | |
| | | public void addImage(ImageInfo image) { |
| | | |
| | | imageInfoDao.create(image); |
| | |
| | | @Resource |
| | | private VideoIntersectionVideoDao videoIntersectionVideoDao; |
| | | |
| | | public VideoIntersectionVideoDao getVideoIntersectionVideoDao() { |
| | | return videoIntersectionVideoDao; |
| | | } |
| | | |
| | | public void setVideoIntersectionVideoDao(VideoIntersectionVideoDao videoIntersectionVideoDao) { |
| | | this.videoIntersectionVideoDao = videoIntersectionVideoDao; |
| | | } |
| | | |
| | | public VideoIntersectionDao getVideoIntersectionDao() { |
| | | return videoIntersectionDao; |
| | | } |
| | | |
| | | public void setVideoIntersectionDao(VideoIntersectionDao videoIntersectionDao) { |
| | | this.videoIntersectionDao = videoIntersectionDao; |
| | | } |
| | | |
| | | // 添加合集 |
| | | public void addIntersection(VideoIntersection section) { |
| | |
| | | import com.yeshi.buwan.dao.user.LoginUserExtraDao; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUserExtra; |
| | | import com.yeshi.buwan.exception.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.PPTVException; |
| | | import com.yeshi.buwan.pptv.PPTVApiUtil; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.service.inter.LoginUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.yeshi.utils.StringUtil; |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | |
| | |
| | | @Resource |
| | | private ContactDao contactDao; |
| | | |
| | | public ContactDao getContactDao() { |
| | | return contactDao; |
| | | } |
| | | |
| | | public void setContactDao(ContactDao contactDao) { |
| | | this.contactDao = contactDao; |
| | | } |
| | | |
| | | public AdviceDao getAdviceDao() { |
| | | return adviceDao; |
| | | } |
| | | |
| | | public void setAdviceDao(AdviceDao adviceDao) { |
| | | this.adviceDao = adviceDao; |
| | | } |
| | | |
| | | // 提交建议 |
| | | public void advice(String uid, String content) { |
| | | Advice advice = new Advice(); |
| | |
| | | @Resource |
| | | private CategoryContryDao categoryContryDao; |
| | | |
| | | public BanQuanService getBanQuanService() { |
| | | return banQuanService; |
| | | } |
| | | |
| | | public void setBanQuanService(BanQuanService banQuanService) { |
| | | this.banQuanService = banQuanService; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | @Cacheable(value = "userCache", key = "'guessLike'+'-'+#videoId+'-'+#detailSystem+'-'+#cachemd5") |
| | | public List<VideoInfo> guessLike(String videoId, String detailSystem, List<Long> resourceList, String cachemd5) { |
| | | String resourceWhere = ""; |
| | |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<HotSearchAdmin> getHotSearchAdmin(String key, int detailSystem, int page) { |
| | | public List<HotSearchAdmin> getHotSearchAdmin(String key, String systemId, int detailSystem, int page) { |
| | | List<HotSearchAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem ds where ds.system.id=" + systemId); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select sh.hotSearch from SuperHotSearch sh where sh.hotSearch.name like ? and sh.detailSystem.id=" |
| | | + detailSystem + " order by sh.createtime desc"; |
| | | else |
| | | sql = "from HotSearch zb where zb.name like ? order by zb.createtime desc"; |
| | | sql = "from HotSearch zb where zb.name like ? and zb.system.id=" + systemId + " order by zb.createtime desc"; |
| | | |
| | | List<HotSearch> list = hotSearchDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new Serializable[]{"%" + key + "%"}); |
| | |
| | | return zhiBoClassList; |
| | | } |
| | | |
| | | public long getHotSearchAdminCount(String key, int detailSystem) { |
| | | public long getHotSearchAdminCount(String key,String systemId, int detailSystem) { |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select count(*) from (select count(*) from wk_video_super_hotsearch zb left join wk_video_hotsearch c on c.id=zb.hotsearchid where zb.detailsystem=" |
| | | + detailSystem + " and c.name like '%" + key + "%' group by zb.hotsearchid) s"; |
| | | else |
| | | sql = "select count(*) from wk_video_hotsearch h where h.name like '%" + key + "%'"; |
| | | sql = "select count(*) from wk_video_hotsearch h where h.name like '%" + key + "%' and h.system="+systemId; |
| | | |
| | | return videoBanQuanVideoDao.getCountSQL(sql); |
| | | } |
| | |
| | | @Resource |
| | | private ShareContentDao shareContentDao; |
| | | |
| | | public ShareContentDao getShareContentDao() { |
| | | return shareContentDao; |
| | | } |
| | | |
| | | public void setShareContentDao(ShareContentDao shareContentDao) { |
| | | this.shareContentDao = shareContentDao; |
| | | } |
| | | |
| | | /** |
| | | * 添加分享内容 |
| | | * |
| | |
| | | @Resource |
| | | private DetailSystemDao detailSystemDao; |
| | | |
| | | public SuperSpecialDao getSuperSpecialDao() { |
| | | return superSpecialDao; |
| | | } |
| | | |
| | | public void setSuperSpecialDao(SuperSpecialDao superSpecialDao) { |
| | | this.superSpecialDao = superSpecialDao; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public SpecialVideoDao getSpecialVideoDao() { |
| | | return specialVideoDao; |
| | | } |
| | | |
| | | public void setSpecialVideoDao(SpecialVideoDao specialVideoDao) { |
| | | this.specialVideoDao = specialVideoDao; |
| | | } |
| | | |
| | | public SpecialDao getSpecialDao() { |
| | | return specialDao; |
| | | } |
| | | |
| | | public void setSpecialDao(SpecialDao specialDao) { |
| | | this.specialDao = specialDao; |
| | | } |
| | | |
| | | @Cacheable(value = "classCache",key="'getSpecialList'+'-'+#detailSystemId+'-'+#page") |
| | | public List<Special> getSpecialList(String detailSystemId, int page) { |
| | |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<SpecialAdmin> getSpecialAdmin(String key, int detailSystem, int page) { |
| | | public List<SpecialAdmin> getSpecialAdmin(String key, String systemId, int detailSystem, int page) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | List<SpecialAdmin> zhiBoClassList = new ArrayList<>(); |
| | | |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem ds where ds.system.id=" + systemId); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select sh.special from SuperSpecial sh where sh.special.name like ? and sh.detailSystem.id=" |
| | | + detailSystem + " order by sh.special.orderby desc"; |
| | | else |
| | | sql = "from Special zb where zb.name like ? order by zb.orderby desc"; |
| | | sql = "from Special zb where zb.name like ? and zb.system.id=" + systemId + " order by zb.orderby desc"; |
| | | |
| | | List<Special> list = specialDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new Serializable[] { "%" + key + "%" }); |
| | |
| | | return zhiBoClassList; |
| | | } |
| | | |
| | | public long getSpecialAdminCount(String key, int detailSystem) { |
| | | public long getSpecialAdminCount(String key, String systemId, int detailSystem) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | |
| | | String sql = ""; |
| | |
| | | sql = "select count(*) from (select count(*) from wk_video_super_special zb left join wk_video_special c on c.id=zb.specialid where zb.detailsystemid=" |
| | | + detailSystem + " and c.name like '%" + key + "%' group by zb.specialid) s"; |
| | | else |
| | | sql = "select count(*) from (select count(*) from wk_video_super_special zb left join wk_video_special c on c.id=zb.specialid where c.name like '%" |
| | | sql = "select count(*) from (select count(*) from wk_video_super_special zb left join wk_video_special c on c.id=zb.specialid where c.system=" + systemId + " and c.name like '%" |
| | | + key + "%' group by zb.specialid) s"; |
| | | |
| | | return specialVideoDao.getCountSQL(sql); |
| | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | public SuperHotStarDao getSuperHotStarDao() { |
| | | return superHotStarDao; |
| | | } |
| | | |
| | | public void setSuperHotStarDao(SuperHotStarDao superHotStarDao) { |
| | | this.superHotStarDao = superHotStarDao; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public HotStarDao getHotStarDao() { |
| | | return hotStarDao; |
| | | } |
| | | |
| | | public void setHotStarDao(HotStarDao hotStarDao) { |
| | | this.hotStarDao = hotStarDao; |
| | | } |
| | | |
| | | public StarService() { |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<HotStarAdmin> getHotStarAdmin(String key, int detailSystem, int page) { |
| | | public List<HotStarAdmin> getHotStarAdmin(String key, String systemId, int detailSystem, int page) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | List<HotStarAdmin> zhiBoClassList = new ArrayList<>(); |
| | | |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem ds where ds.system.id=" + systemId); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select sh.hotStar from SuperHotStar sh where sh.detailSystem.id=" + detailSystem |
| | | + " and sh.hotStar.name like ? order by sh.hotStar.orderby desc"; |
| | | else |
| | | sql = "from HotStar zb where zb.name like ? order by zb.orderby desc"; |
| | | sql = "from HotStar zb where zb.name like ? and zb.system.id=" + systemId + " order by zb.orderby desc"; |
| | | |
| | | List<HotStar> list = hotStarDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new Serializable[]{"%" + key + "%"}); |
| | |
| | | return zhiBoClassList; |
| | | } |
| | | |
| | | public long getHotStarAdminCount(String key, int detailSystem) { |
| | | public long getHotStarAdminCount(String key, String systemId, int detailSystem) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | |
| | | String sql = ""; |
| | |
| | | + detailSystem + " and c.name like '%" + key + "%' group by zb.hotstarid) s"; |
| | | else |
| | | sql = "select count(*) from (select count(*) from wk_video_hotstar zb left join wk_video_hotstar c on c.id=zb.id where c.name like '%" |
| | | + key + "%' group by zb.id) s"; |
| | | + key + "%' and zb.system=" + systemId + " group by zb.id) s"; |
| | | |
| | | return hotStarDao.getCountSQL(sql); |
| | | } |
| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.buwan.dao.DetailSystemDao; |
| | | import com.yeshi.buwan.dao.SystemInfoDao; |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.special.Special; |
| | | import com.yeshi.buwan.domain.special.SuperSpecial; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import org.apache.log4j.Logger; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.DetailSystemDao; |
| | | import com.yeshi.buwan.dao.SystemInfoDao; |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.HomeAd; |
| | | import com.yeshi.buwan.domain.HomeType; |
| | | import com.yeshi.buwan.domain.HotSearch; |
| | | import com.yeshi.buwan.domain.HotStar; |
| | | import com.yeshi.buwan.domain.HotVideoType; |
| | | import com.yeshi.buwan.domain.ShareContent; |
| | | import com.yeshi.buwan.domain.SuperHomeAd; |
| | | import com.yeshi.buwan.domain.SuperHomeNotice; |
| | | import com.yeshi.buwan.domain.SuperHomeType; |
| | | import com.yeshi.buwan.domain.SuperHotSearch; |
| | | import com.yeshi.buwan.domain.SuperHotStar; |
| | | import com.yeshi.buwan.domain.SuperHotType; |
| | | import com.yeshi.buwan.domain.SuperRecommendAd; |
| | | import com.yeshi.buwan.domain.SuperUserBanner; |
| | | import com.yeshi.buwan.domain.SuperVideoType; |
| | | import com.yeshi.buwan.domain.SystemInfo; |
| | | import com.yeshi.buwan.domain.UserBanner; |
| | | import com.yeshi.buwan.domain.VideoBanQuan; |
| | | import com.yeshi.buwan.domain.VideoBanQuanVideo; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | | import com.yeshi.buwan.domain.special.Special; |
| | | import com.yeshi.buwan.domain.special.SuperSpecial; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 系统分类服务 |
| | |
| | | @Resource |
| | | private SpecialService specialService; |
| | | |
| | | public ClassService getClassService() { |
| | | return classService; |
| | | } |
| | | |
| | | public void setClassService(ClassService classService) { |
| | | this.classService = classService; |
| | | } |
| | | |
| | | public StarService getStarService() { |
| | | return starService; |
| | | } |
| | | |
| | | public void setStarService(StarService starService) { |
| | | this.starService = starService; |
| | | } |
| | | |
| | | public SpecialService getSpecialService() { |
| | | return specialService; |
| | | } |
| | | |
| | | public void setSpecialService(SpecialService specialService) { |
| | | this.specialService = specialService; |
| | | } |
| | | |
| | | public SystemInfoDao getSystemInfoDao() { |
| | | return systemInfoDao; |
| | | } |
| | | |
| | | public void setSystemInfoDao(SystemInfoDao systemInfoDao) { |
| | | this.systemInfoDao = systemInfoDao; |
| | | } |
| | | |
| | | public DetailSystemDao getDetailSystemDao() { |
| | | return detailSystemDao; |
| | | } |
| | | |
| | | public void setDetailSystemDao(DetailSystemDao detailSystemDao) { |
| | | this.detailSystemDao = detailSystemDao; |
| | | } |
| | | |
| | | public List<DetailSystem> getDetailSystemList() { |
| | | List<DetailSystem> list = detailSystemDao.list("from DetailSystem"); |
| | | public List<DetailSystem> getDetailSystemList(String systemId) { |
| | | List<DetailSystem> list = detailSystemDao.list("from DetailSystem ds where ds.system.id=?", systemId); |
| | | return list; |
| | | } |
| | | |
| | | public List<DetailSystem> getDetailSystemList(String key, int pageIndex) { |
| | | public List<DetailSystem> getDetailSystemList(String key, String systemId, int pageIndex) { |
| | | List<DetailSystem> list = detailSystemDao.list( |
| | | "from DetailSystem ds where ds.appName like ? order by ds.createtime desc", |
| | | (pageIndex - 1) * Constant.pageCount, Constant.pageCount, new String[]{"%" + key + "%"}); |
| | | "from DetailSystem ds where ds.appName like ? and ds.system.id=? order by ds.createtime desc", |
| | | (pageIndex - 1) * Constant.pageCount, Constant.pageCount, new String[]{"%" + key + "%", systemId}); |
| | | return list; |
| | | } |
| | | |
| | | public long getDetailSystemListCount(String key) { |
| | | return detailSystemDao.getCount("select count(*) from DetailSystem d where d.appName like ?", |
| | | new String[]{"%" + key + "%"}); |
| | | public long getDetailSystemListCount(String key, String systemId) { |
| | | return detailSystemDao.getCount("select count(*) from DetailSystem d where d.appName like ? and d.system.id=?", |
| | | new String[]{"%" + key + "%", systemId}); |
| | | } |
| | | |
| | | @Cacheable(value = "homeCache", key = "'getDetailSystemByPackage'+'-'+#packageName") |
| | |
| | | @Resource |
| | | private SuperUserBannerDao superUserBannerDao; |
| | | |
| | | public SuperUserBannerDao getSuperUserBannerDao() { |
| | | return superUserBannerDao; |
| | | } |
| | | |
| | | public void setSuperUserBannerDao(SuperUserBannerDao superUserBannerDao) { |
| | | this.superUserBannerDao = superUserBannerDao; |
| | | } |
| | | |
| | | public UserBannerDao getUserBannerDao() { |
| | | return userBannerDao; |
| | | } |
| | | |
| | | public void setUserBannerDao(UserBannerDao userBannerDao) { |
| | | this.userBannerDao = userBannerDao; |
| | | } |
| | | |
| | | public List<UserBanner> getUserBanner() { |
| | | List<UserBanner> list = userBannerDao.list("from UserBanner"); |
| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.buwan.dao.user.LoginUserExtraDao; |
| | | import com.yeshi.buwan.domain.user.LoginUserExtra; |
| | | import com.yeshi.buwan.dto.user.LoginInfoDto; |
| | | import com.yeshi.buwan.dto.user.QQUserInfo; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.RegisterUserException; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | |
| | | import com.yeshi.buwan.domain.UserInfo; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | |
| | | @Service |
| | | public class UserService { |
| | |
| | | @Resource |
| | | private LoginUserDao loginUserDao; |
| | | |
| | | public UserDao getUserDao() { |
| | | return userDao; |
| | | } |
| | | @Resource |
| | | private LoginUserExtraDao loginUserExtraDao; |
| | | |
| | | public void setUserDao(UserDao userDao) { |
| | | this.userDao = userDao; |
| | | } |
| | | |
| | | // 用户操作 |
| | | public List<UserInfo> getUserList(int system, int page) { |
| | |
| | | |
| | | |
| | | /** |
| | | * 登录 |
| | | * |
| | | * @param openid |
| | | * @param detailSystem |
| | | * @param type 1-QQ 2-微信 |
| | | * @param portrait |
| | | * @param name |
| | | * @param ipInfo |
| | | * @param dto |
| | | * @return |
| | | * @throws LoginUserException |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public LoginUser getLoginUser(final String openid, final String detailSystem, final int type, final String portrait, |
| | | final String name, final String ipInfo) { |
| | | return (LoginUser) userDao.excute(new HibernateCallback<LoginUser>() { |
| | | public LoginUser doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<LoginUser> list = session |
| | | .createQuery("from LoginUser lu where lu.openid=? and lu.loginType=?") |
| | | .setParameter(0, openid).setParameter(1, type).list(); |
| | | public LoginUser login(LoginInfoDto dto) throws LoginUserException { |
| | | |
| | | if (list != null && list.size() > 0) |
| | | return list.get(0); |
| | | else { |
| | | session.getTransaction().begin(); |
| | | LoginUser lu = new LoginUser(); |
| | | lu.setCreatetime(System.currentTimeMillis() + ""); |
| | | lu.setDetailsystem(detailSystem); |
| | | lu.setLoginType(type); |
| | | lu.setName(name); |
| | | lu.setOpenid(openid); |
| | | lu.setPortrait(portrait); |
| | | lu.setIpinfo(ipInfo); |
| | | lu.setState(LoginUser.STATE_NORMAL); |
| | | session.save(lu); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | return lu; |
| | | LoginUser loginUser = null; |
| | | |
| | | LoginUserExtra loginUserExtra = null; |
| | | switch (dto.getLoginType()) { |
| | | case LoginUser.LOGIN_TYPE_EMAIL: { |
| | | if (StringUtil.isNullOrEmpty(dto.getEmail()) || StringUtil.isNullOrEmpty(dto.getPwd())) { |
| | | throw new LoginUserException(LoginUserException.CODE_PARAMS_NOT_ENOUGH, "邮箱和密码不能为空"); |
| | | } |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.email=? and lu.state=?", dto.getSystemId(), dto.getEmail(), LoginUser.STATE_NORMAL); |
| | | if (userList == null || userList.size() == 0) { |
| | | throw new LoginUserException(LoginUserException.CODE_NO_USER, "用户不存在"); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | if (!dto.getPwd().equalsIgnoreCase(userList.get(0).getPwd())) { |
| | | throw new LoginUserException(LoginUserException.CODE_PWD_WRONG, "密码错误"); |
| | | } |
| | | return null; |
| | | loginUser = userList.get(0); |
| | | loginUserExtra = new LoginUserExtra(loginUser.getId()); |
| | | loginUserExtra.setEmail(dto.getEmail()); |
| | | } |
| | | }); |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_QQ: { |
| | | if (dto.getQqUserInfo() == null || StringUtil.isNullOrEmpty(dto.getQqUserInfo().getOpenId())) { |
| | | throw new LoginUserException(LoginUserException.CODE_PARAMS_NOT_ENOUGH, "QQ授权信息为空"); |
| | | } |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.qqOpenId=? and lu.state=?", dto.getSystemId(), dto.getQqUserInfo().getOpenId(), LoginUser.STATE_NORMAL); |
| | | if (userList == null || userList.size() == 0) { |
| | | throw new LoginUserException(LoginUserException.CODE_NO_USER, "用户不存在"); |
| | | } |
| | | loginUser = userList.get(0); |
| | | loginUserExtra = new LoginUserExtra(loginUser.getId()); |
| | | loginUserExtra.setQqPortrait(dto.getQqUserInfo().getPortrait()); |
| | | loginUserExtra.setQqOpenId(dto.getQqUserInfo().getOpenId()); |
| | | loginUserExtra.setQqNickName(dto.getQqUserInfo().getName()); |
| | | } |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_WX: { |
| | | if (dto.getWeiXinUser() == null || StringUtil.isNullOrEmpty(dto.getWeiXinUser().getOpenid())) { |
| | | throw new LoginUserException(LoginUserException.CODE_PARAMS_NOT_ENOUGH, "微信授权信息为空"); |
| | | } |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.wxOpenId=? and lu.state=?", dto.getSystemId(), dto.getWeiXinUser().getOpenid(), LoginUser.STATE_NORMAL); |
| | | if (userList == null || userList.size() == 0) { |
| | | throw new LoginUserException(LoginUserException.CODE_NO_USER, "用户不存在"); |
| | | } |
| | | loginUser = userList.get(0); |
| | | |
| | | //更新微信信息 |
| | | loginUser.setWxUnionId(dto.getWeiXinUser().getUnionid()); |
| | | |
| | | loginUserExtra = new LoginUserExtra(loginUser.getId()); |
| | | loginUserExtra.setWxPortrait(dto.getWeiXinUser().getHeadimgurl()); |
| | | loginUserExtra.setWxOpenId(dto.getWeiXinUser().getOpenid()); |
| | | loginUserExtra.setWxNickName(dto.getWeiXinUser().getNickname()); |
| | | loginUserExtra.setWxSex(dto.getWeiXinUser().getSex()); |
| | | loginUserExtra.setWxUnionId(dto.getWeiXinUser().getUnionid()); |
| | | } |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_PHONE: { |
| | | |
| | | if (StringUtil.isNullOrEmpty(dto.getPhone())) { |
| | | throw new LoginUserException(LoginUserException.CODE_PARAMS_NOT_ENOUGH, "手机号为空"); |
| | | } |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.phone=? and lu.state=?", dto.getSystemId(), dto.getPhone(), LoginUser.STATE_NORMAL); |
| | | if (userList == null || userList.size() == 0) { |
| | | throw new LoginUserException(LoginUserException.CODE_NO_USER, "用户不存在"); |
| | | } |
| | | loginUser = userList.get(0); |
| | | loginUserExtra = new LoginUserExtra(loginUser.getId()); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (loginUser != null) { |
| | | loginUser.setLoginType(dto.getLoginType()); |
| | | loginUserDao.update(loginUser); |
| | | } |
| | | |
| | | if (loginUserExtra != null) { |
| | | loginUserExtraDao.updateSelective(loginUserExtra); |
| | | } |
| | | |
| | | return loginUser; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 注册 |
| | | * |
| | | * @param dto |
| | | */ |
| | | public void register(LoginInfoDto dto) throws RegisterUserException { |
| | | LoginUser loginUser = null; |
| | | LoginUserExtra loginUserExtra = null; |
| | | switch (dto.getLoginType()) { |
| | | case LoginUser.LOGIN_TYPE_EMAIL: { |
| | | if (StringUtil.isNullOrEmpty(dto.getEmail()) || StringUtil.isNullOrEmpty(dto.getPwd())) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_PARAMS_NOT_ENOUGH, "邮箱和密码不能为空"); |
| | | } |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.email=? and lu.state=?", dto.getSystemId(), dto.getEmail(), LoginUser.STATE_NORMAL); |
| | | if (userList != null && userList.size() > 0) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_USER_EXIST, "用户已存在"); |
| | | } |
| | | |
| | | loginUser = new LoginUser(); |
| | | loginUser.setLoginType(LoginUser.LOGIN_TYPE_EMAIL); |
| | | loginUser.setEmail(dto.getEmail()); |
| | | loginUser.setPwd(dto.getPwd()); |
| | | loginUser.setName(dto.getNickName()); |
| | | loginUser.setState(LoginUser.STATE_NORMAL); |
| | | loginUser.setSystemId(dto.getSystemId()); |
| | | loginUserExtra = new LoginUserExtra(); |
| | | loginUserExtra.setEmail(dto.getEmail()); |
| | | } |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_QQ: { |
| | | if (dto.getQqUserInfo() == null || StringUtil.isNullOrEmpty(dto.getQqUserInfo().getOpenId())) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_PARAMS_NOT_ENOUGH, "QQ授权信息为空"); |
| | | } |
| | | |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.qqOpenId=? and lu.state=?", dto.getSystemId(), dto.getQqUserInfo().getOpenId(), LoginUser.STATE_NORMAL); |
| | | if (userList != null && userList.size() > 0) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_USER_EXIST, "用户已存在"); |
| | | } |
| | | |
| | | loginUser = new LoginUser(); |
| | | loginUser.setLoginType(LoginUser.LOGIN_TYPE_QQ); |
| | | loginUser.setQqOpenId(dto.getQqUserInfo().getOpenId()); |
| | | loginUser.setName(dto.getQqUserInfo().getName()); |
| | | |
| | | |
| | | loginUserExtra = new LoginUserExtra(); |
| | | loginUserExtra.setQqPortrait(dto.getQqUserInfo().getPortrait()); |
| | | loginUserExtra.setQqOpenId(dto.getQqUserInfo().getOpenId()); |
| | | loginUserExtra.setQqNickName(dto.getQqUserInfo().getName()); |
| | | } |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_WX: { |
| | | if (dto.getWeiXinUser() == null || StringUtil.isNullOrEmpty(dto.getWeiXinUser().getOpenid())) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_PARAMS_NOT_ENOUGH, "微信授权信息为空"); |
| | | } |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.wxOpenId=? and lu.state=?", dto.getSystemId(), dto.getWeiXinUser().getOpenid(), LoginUser.STATE_NORMAL); |
| | | if (userList != null && userList.size() > 0) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_USER_EXIST, "用户已存在"); |
| | | } |
| | | loginUser = new LoginUser(); |
| | | loginUser.setLoginType(LoginUser.LOGIN_TYPE_WX); |
| | | loginUser.setWxUnionId(dto.getWeiXinUser().getUnionid()); |
| | | loginUser.setName(dto.getWeiXinUser().getNickname()); |
| | | loginUser.setWxOpenId(dto.getWeiXinUser().getOpenid()); |
| | | |
| | | |
| | | loginUserExtra = new LoginUserExtra(); |
| | | loginUserExtra.setWxPortrait(dto.getWeiXinUser().getHeadimgurl()); |
| | | loginUserExtra.setWxOpenId(dto.getWeiXinUser().getOpenid()); |
| | | loginUserExtra.setWxNickName(dto.getWeiXinUser().getNickname()); |
| | | loginUserExtra.setWxSex(dto.getWeiXinUser().getSex()); |
| | | loginUserExtra.setWxUnionId(dto.getWeiXinUser().getUnionid()); |
| | | } |
| | | break; |
| | | case LoginUser.LOGIN_TYPE_PHONE: { |
| | | |
| | | if (StringUtil.isNullOrEmpty(dto.getPhone())) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_PARAMS_NOT_ENOUGH, "手机号为空"); |
| | | } |
| | | |
| | | List<LoginUser> userList = loginUserDao.list("from LoginUser lu where lu.systemId=? and lu.phone=? and lu.state=?", dto.getSystemId(), dto.getPhone(), LoginUser.STATE_NORMAL); |
| | | if (userList != null && userList.size() > 0) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_USER_EXIST, "用户已存在"); |
| | | } |
| | | |
| | | loginUser = new LoginUser(); |
| | | loginUser.setLoginType(LoginUser.LOGIN_TYPE_PHONE); |
| | | loginUser.setName(null); |
| | | loginUser.setPhone(dto.getPhone()); |
| | | |
| | | loginUserExtra = new LoginUserExtra(); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (loginUser == null) { |
| | | throw new RegisterUserException(RegisterUserException.CODE_PARAMS_NOT_ENOUGH, "注册类型出错"); |
| | | } |
| | | |
| | | |
| | | loginUser.setIpinfo(dto.getIpInfo()); |
| | | loginUser.setState(LoginUser.STATE_NORMAL); |
| | | loginUser.setSystemId(dto.getSystemId()); |
| | | loginUser.setCreatetime(System.currentTimeMillis() + ""); |
| | | |
| | | Serializable uid = loginUserDao.save(loginUser); |
| | | loginUser.setId(uid + ""); |
| | | |
| | | if (StringUtil.isNullOrEmpty(loginUser.getName())) { |
| | | //设置默认用户昵称 |
| | | String nickName = "无名氏"; |
| | | LoginUser update = new LoginUser(); |
| | | update.setId(uid + ""); |
| | | update.setName(nickName); |
| | | loginUserDao.updateSelective(update); |
| | | } |
| | | |
| | | loginUserExtra.setId(loginUser.getId()); |
| | | loginUserExtra.setCreateTime(new Date()); |
| | | loginUserExtraDao.save(loginUserExtra); |
| | | } |
| | | |
| | | public LoginUser getLoginUser(String id) { |
| | |
| | | private VideoResourceDao videoResourceDao; |
| | | |
| | | @Resource |
| | | private ResourceVideoDao resourceVideoDao; |
| | | |
| | | @Resource |
| | | private ClassService classServcie; |
| | | |
| | | @Resource |
| | | private CategoryVideoDao categoryVideoDao; |
| | | |
| | | public CategoryVideoDao getCategoryVideoDao() { |
| | | return categoryVideoDao; |
| | | } |
| | | |
| | | public void setCategoryVideoDao(CategoryVideoDao categoryVideoDao) { |
| | | this.categoryVideoDao = categoryVideoDao; |
| | | } |
| | | |
| | | public ClassService getClassServcie() { |
| | | return classServcie; |
| | | } |
| | | |
| | | public void setClassServcie(ClassService classServcie) { |
| | | this.classServcie = classServcie; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public VideoService() { |
| | | |
| | |
| | | @Resource |
| | | private ImageInfoDao imageInfoDao; |
| | | |
| | | public ImageInfoDao getImageInfoDao() { |
| | | return imageInfoDao; |
| | | } |
| | | |
| | | public void setImageInfoDao(ImageInfoDao imageInfoDao) { |
| | | this.imageInfoDao = imageInfoDao; |
| | | } |
| | | |
| | | public ImageService getImageService() { |
| | | return imageService; |
| | | } |
| | | |
| | | public void setImageService(ImageService imageService) { |
| | | this.imageService = imageService; |
| | | } |
| | | |
| | | public WeiXinImageDao getWeiXinImageDao() { |
| | | return weiXinImageDao; |
| | | } |
| | | |
| | | public void setWeiXinImageDao(WeiXinImageDao weiXinImageDao) { |
| | | this.weiXinImageDao = weiXinImageDao; |
| | | } |
| | | |
| | | public WeiXinInfoDao getWeiXinInfoDao() { |
| | | return weiXinInfoDao; |
| | | } |
| | | |
| | | public void setWeiXinInfoDao(WeiXinInfoDao weiXinInfoDao) { |
| | | this.weiXinInfoDao = weiXinInfoDao; |
| | | } |
| | | |
| | | public void addWeiXinImage(WeiXinInfo info, String lastPic) { |
| | | if (info.getType().equalsIgnoreCase("1")) {// 个人号 |
| | |
| | | |
| | | } |
| | | |
| | | ConfigService configService; |
| | | |
| | | public ConfigService getConfigService() { |
| | | return configService; |
| | | } |
| | | |
| | | public void setConfigService(ConfigService configService) { |
| | | this.configService = configService; |
| | | } |
| | | @Resource |
| | | private ConfigService configService; |
| | | |
| | | private WeiXinInfo getWeiXin(List<WeiXinInfo> list) { |
| | | OtherService service = new OtherService(); |
| | |
| | | @Resource |
| | | private ResourceVideoDao resourceVideoDao; |
| | | |
| | | public PushService getPushService() { |
| | | return pushService; |
| | | } |
| | | |
| | | public void setPushService(PushService pushService) { |
| | | this.pushService = pushService; |
| | | } |
| | | |
| | | public StatisticsService getStatisticsService() { |
| | | return statisticsService; |
| | | } |
| | | |
| | | public void setStatisticsService(StatisticsService statisticsService) { |
| | | this.statisticsService = statisticsService; |
| | | } |
| | | |
| | | public VideoIqiyiDao getVideoIqiyiDao() { |
| | | return videoIqiyiDao; |
| | | } |
| | | |
| | | public void setVideoIqiyiDao(VideoIqiyiDao videoIqiyiDao) { |
| | | this.videoIqiyiDao = videoIqiyiDao; |
| | | } |
| | | |
| | | public IqiyiVideoInfoDao getIqiyiVideoInfoDao() { |
| | | return iqiyiVideoInfoDao; |
| | | } |
| | | |
| | | public void setIqiyiVideoInfoDao(IqiyiVideoInfoDao iqiyiVideoInfoDao) { |
| | | this.iqiyiVideoInfoDao = iqiyiVideoInfoDao; |
| | | } |
| | | |
| | | static { |
| | | // PropertyConfigurator.configure(".\\src\\log4j.properties"); |
| | |
| | | @Resource |
| | | private CategoryVideoDao categoryVideoDao; |
| | | |
| | | public PushService getPushService() { |
| | | return pushService; |
| | | } |
| | | |
| | | public void setPushService(PushService pushService) { |
| | | this.pushService = pushService; |
| | | } |
| | | |
| | | public StatisticsService getStatisticsService() { |
| | | return statisticsService; |
| | | } |
| | | |
| | | public void setStatisticsService(StatisticsService statisticsService) { |
| | | this.statisticsService = statisticsService; |
| | | } |
| | | |
| | | public SoHuVideoDao getSoHuVideoDao() { |
| | | return soHuVideoDao; |
| | | } |
| | | |
| | | public void setSoHuVideoDao(SoHuVideoDao soHuVideoDao) { |
| | | this.soHuVideoDao = soHuVideoDao; |
| | | } |
| | | |
| | | public SoHuAlbumDao getSoHuAlbumDao() { |
| | | return soHuAlbumDao; |
| | | } |
| | | |
| | | public void setSoHuAlbumDao(SoHuAlbumDao soHuAlbumDao) { |
| | | this.soHuAlbumDao = soHuAlbumDao; |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public String addAlbum(final SoHuAlbum album) { |
| | | // 对VideoList去重 |
| | |
| | | package com.yeshi.buwan.service.imp.news; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.news.FoundNewsDao; |
| | | import com.yeshi.buwan.dao.news.NewsDao; |
| | | import com.yeshi.buwan.dao.news.NewsImageDao; |
| | | import com.yeshi.buwan.dao.news.NewsTypeContentDao; |
| | | import com.yeshi.buwan.dao.news.NewsTypeDao; |
| | | import com.yeshi.buwan.dao.news.SuperFoundNewsDao; |
| | | import com.yeshi.buwan.domain.news.FoundNews; |
| | |
| | | import com.yeshi.buwan.domain.news.NewsType; |
| | | import com.yeshi.buwan.domain.news.SuperFoundNews; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class NewsService { |
| | |
| | | @Resource |
| | | private NewsTypeDao newsTypeDao; |
| | | @Resource |
| | | private NewsImageDao newsImageDao; |
| | | @Resource |
| | | private NewsTypeContentDao newsTypeContentDao; |
| | | @Resource |
| | | private FoundNewsDao foundNewsDao; |
| | | @Resource |
| | | private SuperFoundNewsDao superFoundNewsDao; |
| | | |
| | | public FoundNewsDao getFoundNewsDao() { |
| | | return foundNewsDao; |
| | | } |
| | | |
| | | public void setFoundNewsDao(FoundNewsDao foundNewsDao) { |
| | | this.foundNewsDao = foundNewsDao; |
| | | } |
| | | |
| | | public NewsDao getNewsDao() { |
| | | return newsDao; |
| | | } |
| | | |
| | | public void setNewsDao(NewsDao newsDao) { |
| | | this.newsDao = newsDao; |
| | | } |
| | | |
| | | public NewsTypeDao getNewsTypeDao() { |
| | | return newsTypeDao; |
| | | } |
| | | |
| | | public void setNewsTypeDao(NewsTypeDao newsTypeDao) { |
| | | this.newsTypeDao = newsTypeDao; |
| | | } |
| | | |
| | | public NewsImageDao getNewsImageDao() { |
| | | return newsImageDao; |
| | | } |
| | | |
| | | public void setNewsImageDao(NewsImageDao newsImageDao) { |
| | | this.newsImageDao = newsImageDao; |
| | | } |
| | | |
| | | public NewsTypeContentDao getNewsTypeContentDao() { |
| | | return newsTypeContentDao; |
| | | } |
| | | |
| | | public void setNewsTypeContentDao(NewsTypeContentDao newsTypeContentDao) { |
| | | this.newsTypeContentDao = newsTypeContentDao; |
| | | } |
| | | |
| | | // 获取发现页面的图文数据 |
| | | @Cacheable(value = "foundCache",key="'getNewsOnMain'+'-'+#detailSystemId") |
| | |
| | | @Resource |
| | | private NewsService newsService; |
| | | |
| | | public NewsDao getNewsDao() { |
| | | return newsDao; |
| | | } |
| | | |
| | | public void setNewsDao(NewsDao newsDao) { |
| | | this.newsDao = newsDao; |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public String addWeiXinArticle(final News wx, final List<NewsImage> imgList) { |
| | |
| | | @Resource |
| | | private CommentService commentService; |
| | | |
| | | public VideoPushHistoryDao getVideoPushHistoryDao() { |
| | | return videoPushHistoryDao; |
| | | } |
| | | |
| | | public void setVideoPushHistoryDao(VideoPushHistoryDao videoPushHistoryDao) { |
| | | this.videoPushHistoryDao = videoPushHistoryDao; |
| | | } |
| | | |
| | | public void addVideoPushHistory(VideoPushHistory vh) { |
| | | videoPushHistoryDao.create(vh); |
| | |
| | | |
| | | // 后台操作 |
| | | @SuppressWarnings({ "unchecked" }) |
| | | public List<CategoryRecommendVideoAdmin> getCategoryRecommendVideoAdmin(final String key, final int videoTypeId, |
| | | public List<CategoryRecommendVideoAdmin> getCategoryRecommendVideoAdmin(final String key, final int videoTypeId, final String systemId, |
| | | final int detailSystem, final int page) { |
| | | return (List<CategoryRecommendVideoAdmin>) categoryRecommendVideoDao |
| | | .excute(new HibernateCallback<List<CategoryRecommendVideoAdmin>>() { |
| | | public List<CategoryRecommendVideoAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<CategoryRecommendVideoAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem ds where ds.system.id=" + systemId).list(); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | // on sh.categoryRecommendVideo.videoInfo= vi.id |
| | |
| | | else |
| | | // sql = "from CategoryRecommendVideo zb where zb.videoType.id=" + videoTypeId + " and sh.categoryRecommendVideo.videoInfo.name like '%"+key+"%'" |
| | | // + " order by zb.createtime desc"; |
| | | sql = "from CategoryRecommendVideo zb where zb.videoType.id=" + videoTypeId + " and zb.videoInfo.name like '%"+key+"%'" |
| | | sql = "from CategoryRecommendVideo zb where zb.videoType.id=" + videoTypeId + " and zb.system.id=" + systemId + " and zb.videoInfo.name like '%" + key + "%'" |
| | | + " order by zb.createtime desc"; |
| | | |
| | | List<CategoryRecommendVideo> list = session.createQuery(sql) |
| | |
| | | |
| | | } |
| | | |
| | | public long getCategoryRecommendVideoAdminCount(String key, int videoTypeId, int detailSystem) { |
| | | public long getCategoryRecommendVideoAdminCount(String key, int videoTypeId,String systemId, int detailSystem) { |
| | | String sql = ""; |
| | | //sql = "select count(*) from (select count(*) from wk_video_super_recommend_category_video zb left join wk_recommend_category_video c on c.id=zb.rcvid where c.videotypeid=" |
| | | //+ videoTypeId + " and zb.detailsystemid=" + detailSystem + " group by zb.rcvid) s"; |
| | | if (detailSystem > 0) |
| | | // sql = "select count(*) from (select count(*) from wk_video_super_recommend_category_video zb left join wk_recommend_category_video c on c.id=zb.rcvid left join wk_video_video vi on vi.id=c.videoid where c.videotypeid=" |
| | | // + videoTypeId + " and zb.detailsystemid=" + detailSystem + " and vi.name like '%"+key+"%' group by zb.rcvid) s"; |
| | | sql = "select count(*) from (select count(*) from wk_video_super_recommend_category_video zb left join wk_recommend_category_video c on c.id=zb.rcvid where c.videotypeid=" |
| | | + videoTypeId + " and zb.detailsystemid=" + detailSystem + " group by zb.rcvid) s"; |
| | | else |
| | | // sql = "select count(*) from wk_video_super_recommend_category_video zb left join wk_recommend_category_video c on c.id=zb.rcvid left join wk_video_video vi on vi.id=c.videoid where c.videotypeid=" |
| | | // + videoTypeId + " and vi.name like '%"+key+"%'"; |
| | | sql = "select count(*) from (select count(*) from wk_video_super_recommend_category_video zb left join wk_recommend_category_video c on c.id=zb.rcvid where c.videotypeid=" |
| | | + videoTypeId + " group by zb.rcvid) s"; |
| | | + videoTypeId + " and c.system="+systemId+" group by zb.rcvid) s"; |
| | | |
| | | return categoryRecommendVideoDao.getCountSQL(sql); |
| | | } |
| | |
| | | |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUserExtra; |
| | | import com.yeshi.buwan.exception.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.PPTVException; |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | |
| | |
| | | import com.yeshi.buwan.service.inter.juhe.AlbumVideoMapService; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.factory.SolrVideoFactory; |
| | | import net.sf.ehcache.search.expression.BaseCriteria; |
| | | import org.apache.solr.client.solrj.response.UpdateResponse; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.solr.core.SolrTemplate; |
| | | import org.springframework.data.solr.core.query.Criteria; |
| | | import org.springframework.data.solr.core.query.Query; |
| | | import org.springframework.data.solr.core.query.SimpleQuery; |
| | | import org.springframework.data.solr.core.query.SolrDataQuery; |
| | | import org.springframework.data.solr.core.query.*; |
| | | import org.springframework.data.solr.core.query.result.ScoredPage; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | } |
| | | |
| | | public SolrResultDTO find(SolrVideoSearchFilter filter, int page, int pageSize) { |
| | | if (filter.getKey() == null) { |
| | | filter.setKey(""); |
| | | } |
| | | logger.info(filter.getKey() + "#" + page); |
| | | Query query = new SimpleQuery("name:\"" + filter.getKey() + "\""); |
| | | |
| | | Query query = null; |
| | | if (!StringUtil.isNullOrEmpty(filter.getKey())) { |
| | | //solr精准检索需要带引号 |
| | | query = new SimpleQuery("name:\"" + filter.getKey() + "\""); |
| | | } else { |
| | | query = new SimpleQuery(); |
| | | } |
| | | Criteria criteria = new Criteria("contenttype").is(filter.getContentType()); |
| | | |
| | | if (filter.getVideoType() != null) { |
| | | criteria = criteria.and("root_video_type").is(filter.getVideoType()); |
| | | } |
| | | |
| | | if (filter.getActor() != null) { |
| | | criteria = criteria.and("mainactor").expression("\""+filter.getActor()+"\""); |
| | | } |
| | | |
| | | if (filter.getDirector() != null) { |
| | | criteria = criteria.and("director").expression("\""+filter.getDirector()+"\""); |
| | | } |
| | | |
| | | if (filter.getResourceIds() != null && filter.getResourceIds().length > 0) { |
| | | criteria = criteria.and("resourceIds").contains(filter.getResourceIds()); |
| | | } |
| | | |
| | | |
| | | /** 添加条件 */ |
| | | if (criteria != null) |
| | | query.addCriteria(criteria); |
| | |
| | | @Resource |
| | | private VideoResourceDao videoResourceDao; |
| | | |
| | | public SoHuVideoDao getSoHuVideoDao() { |
| | | return soHuVideoDao; |
| | | } |
| | | |
| | | public void setSoHuVideoDao(SoHuVideoDao soHuVideoDao) { |
| | | this.soHuVideoDao = soHuVideoDao; |
| | | } |
| | | |
| | | public SoHuService getSoHuService() { |
| | | return soHuService; |
| | | } |
| | | |
| | | public void setSoHuService(SoHuService soHuService) { |
| | | this.soHuService = soHuService; |
| | | } |
| | | |
| | | public static List<RootCategory> getCategory() { |
| | | List<RootCategory> list = SoHuApi.rootCategoryList(); |
| | |
| | | return systemInfo; |
| | | } |
| | | |
| | | |
| | | public static String getAdminSelectedSystemId(HttpSession session) { |
| | | return getAdminSelectedSystem(session).getId(); |
| | | } |
| | | |
| | | /** |
| | | * 保存System |
| | | * |
| | |
| | | @Resource |
| | | private SouGouService souGouService; |
| | | |
| | | public SouGouService getSouGouService() { |
| | | return souGouService; |
| | | } |
| | | |
| | | public void setSouGouService(SouGouService souGouService) { |
| | | this.souGouService = souGouService; |
| | | } |
| | | |
| | | public static String REMEN = "http://weixin.sogou.com/wapindex/wap/0612/wap_0/#.html";// 热门 |
| | | public static String TUIJIAN = "http://weixin.sogou.com/wapindex/wap/0612/wap_1/#.html";// 推荐 |
| | | public static String DUANZISHOU = "http://weixin.sogou.com/wapindex/wap/0612/wap_2/#.html";// 段子手 |
| | |
| | | <property name="orderby" type="integer"></property> |
| | | <property name="show" column="`show`" type="boolean"></property> |
| | | <property name="showonmain" column="`showonmain`" type="boolean"></property> |
| | | <many-to-one name="system" column="system" lazy="false"></many-to-one> |
| | | </class> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </hibernate-mapping> |
| | |
| | | |
| | | <logger name="org.hibernate.type" level="ALL" /> |
| | | <logger name="org.hibernate" level="DEBUG" /> |
| | | <logger name="org.springframework.transaction" level="DEBUG" /> |
| | | <logger name="org.springframework.transaction" level="INFO" /> |
| | | <logger name="org.springframework.data.solr" level="DEBUG" /> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 一切logger都会继承自root,root默认的层级level为debug --> |
| | |
| | | </action> |
| | | |
| | | |
| | | <!-- 热门明星 --> |
| | | |
| | | <action name="hotStarList" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="hotStarList"> |
| | | <result name="success">/admin/frontedit/hotstar_list.jsp</result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | <action name="getHotStarDetailSystem" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="getHotStarDetailSystem"> |
| | | <result name="success">/admin/frontedit/hotstar_add.jsp</result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | |
| | | <action name="getHotStar" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="getHotStar"> |
| | | <result name="success">/admin/frontedit/hotstar_edit.jsp</result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | <action name="updateHotStar" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="updateHotStar"> |
| | | <result name="success" type="chain">getHotStar</result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | <action name="addHotStar" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="addHotStar"> |
| | | <result name="success" type="chain">getHotStarDetailSystem |
| | | </result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | <action name="deleteHotStar" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="deleteHotStar"> |
| | | <result name="success" type="chain">hotStarList</result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | <action name="deleteHotStarList" class="com.yeshi.buwan.web.action.HotStarAction" |
| | | method="deleteHotStarList"> |
| | | <result name="success" type="chain">hotStarList</result> |
| | | <interceptor-ref name="mydefault" /> |
| | | </action> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 专题 --> |
| | | |
| | | <action name="specialList" class="com.yeshi.buwan.web.action.SpecialAction" |
| | |
| | | </select> |
| | | |
| | | <select name="select" class="form-control search resourceIds"> |
| | | <option value="0">全部</option> |
| | | <option value="0">全部来源</option> |
| | | <option value="24">风行2</option> |
| | | <option value="19">风行</option> |
| | | <option value="13">爱奇艺</option> |
| | |
| | | <option value="21">Acfun</option> |
| | | <option value="25">PPTV</option> |
| | | </select> |
| | | |
| | | <select name="select" class="form-control search type"> |
| | | <option value="name" selected>片名</option> |
| | | <option value="actor">主演</option> |
| | | <option value="director">导演</option> |
| | | </select> |
| | | |
| | | <div class="form-group search" role="search"> |
| | | <input type="text" class="form-control search" id="kw" style="width: 200px;" placeholder="搜索"> |
| | | </div> |
| | |
| | | "page": page, |
| | | "videotype": $(".search-div .videotypes select:last").val(), |
| | | "detailsystem": $(".search-div .select-detailsystem").val(), |
| | | "type": $(".search-div .type").val(), |
| | | "contenttype": $(".contenttype").val(), |
| | | "key": $("#kw").val(), |
| | | "resourceIds": JSON.stringify(resourceIds) |
| | |
| | | import com.yeshi.buwan.domain.video.VideoResourceVersionMap; |
| | | import com.yeshi.buwan.service.inter.video.VideoResourceVersionMapService; |
| | | import org.yeshi.utils.generater.SpringComponentGenerater; |
| | | import org.yeshi.utils.generater.entity.ExceptionData; |
| | | import org.yeshi.utils.generater.entity.MongoDBDaoData; |
| | | import org.yeshi.utils.generater.entity.ServiceData; |
| | | |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import java.io.File; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.dao.UserDao; |
| | | import com.yeshi.buwan.domain.AdminInfo; |
| | | import com.yeshi.buwan.domain.UserInfo; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.util.news.SouGouParser; |
| | | import org.apache.commons.httpclient.HttpClient; |
| | | import org.apache.commons.httpclient.methods.GetMethod; |
| | | import org.hibernate.Session; |
| | | |
| | | import com.yeshi.buwan.dao.UserDao; |
| | | import com.yeshi.buwan.domain.AdminInfo; |
| | | import com.yeshi.buwan.domain.HomeType; |
| | | import com.yeshi.buwan.domain.UserInfo; |
| | | import com.yeshi.buwan.service.imp.AttentionService; |
| | | import com.yeshi.buwan.service.imp.HomeTypeService; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | | import com.yeshi.buwan.util.CacheUtil; |
| | | import com.yeshi.buwan.util.OSSManager; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.util.JuHe.VideoResourceUtil; |
| | | import com.yeshi.buwan.util.email.MailSenderUtil; |
| | | import com.yeshi.buwan.util.news.SouGouParser; |
| | | import java.util.List; |
| | | |
| | | public class HelloWordTest { |
| | | |