46个文件已添加
103个文件已修改
2 文件已重命名
40个文件已删除
| | |
| | | <version>${logback.version}</version> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>ch.qos.logback</groupId> |
| | | <artifactId>logback-access</artifactId> |
| | | <version>${logback.version}</version> |
| | | </dependency> |
| | | |
| | | <!-- 阿里云 --> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-core</artifactId> |
| | | <version>4.4.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-dypnsapi</artifactId> |
| | | <version>1.0.5</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | <build> |
New file |
| | |
| | | package com.yeshi.buwan.aspect; |
| | | |
| | | import com.yeshi.buwan.log.LogHelper; |
| | | import net.sf.ehcache.CacheManager; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.lang.reflect.Method; |
| | | |
| | | /** |
| | | * 跨域 |
| | | */ |
| | | @Component |
| | | @Aspect() |
| | | public class CrossOriginAspect { |
| | | private final Logger logger = LoggerFactory.getLogger(CrossOriginAspect.class); |
| | | |
| | | @Around("execution(public * com.yeshi.buwan.controller..*.*(..))") |
| | | public Object crossOrigin(ProceedingJoinPoint joinPoint) throws Throwable { |
| | | ServletRequestAttributes servletContainer = (ServletRequestAttributes) RequestContextHolder |
| | | .getRequestAttributes(); |
| | | HttpServletResponse response = servletContainer.getResponse(); |
| | | HttpServletRequest request = servletContainer.getRequest(); |
| | | String origin = request.getHeader("Origin"); |
| | | response.setHeader("Access-Control-Allow-Origin", origin); |
| | | response.setHeader("Access-Control-Allow-Methods", "*"); // 任何方法 |
| | | response.setHeader("Access-Control-Allow-Credentials", "true");// 允许传递cookie |
| | | response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); |
| | | |
| | | return joinPoint.proceed(); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | @Component |
| | | @Aspect() |
| | | public class LogAspect { |
| | | |
| | | private final Logger logger = LoggerFactory.getLogger(LogAspect.class); |
| | | |
| | | private String getMethodName(ProceedingJoinPoint pjp) { |
| | | try { |
| | |
| | | try { |
| | | obj = joinPoint.proceed(args); |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | logger.error("客户端接口访问出错:", e); |
| | | } |
| | | LogHelper.countTime(getMethodName(joinPoint) + "#" + (System.currentTimeMillis() - starttime) + ""); |
| | | return obj; |
| | |
| | | package com.yeshi.buwan.aspect; |
| | | |
| | | import com.yeshi.buwan.domain.AdminInfo; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | |
| | | @Aspect |
| | | public class SignAspect { |
| | | |
| | | |
| | | //签名验证 |
| | | @Around("execution(public * com.yeshi.buwan.controller.api.*.*(..))") |
| | | public Object verifySign(ProceedingJoinPoint joinPoint) throws IOException { |
New file |
| | |
| | | package com.yeshi.buwan.controller; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.internal.util.AlipaySignature; |
| | | import com.yeshi.buwan.util.RedisManager; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.user.VipUtil; |
| | | import org.json.JSONObject; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.yeshi.utils.entity.alipay.AlipayAppInfo; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | |
| | | @Controller |
| | | @RequestMapping("alipay") |
| | | public class AlipayController { |
| | | Logger logger = LoggerFactory.getLogger(AlipayController.class); |
| | | |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | @RequestMapping("printPayForm") |
| | | public void printPayForm(String formId, HttpServletResponse response) { |
| | | String form = redisManager.getCommonString(formId); |
| | | if (StringUtil.isNullOrEmpty(form)) { |
| | | form = "出错了,请稍后再试"; |
| | | } |
| | | |
| | | response.setContentType("text/html;charset=GBK"); |
| | | try { |
| | | response.getWriter().write(form);//直接将完整的表单html输出到页面 |
| | | response.getWriter().flush(); |
| | | response.getWriter().close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping("pay") |
| | | public void pay(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | request.setCharacterEncoding("GBK"); |
| | | response.setCharacterEncoding("GBK"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | Map<String, String[]> params = request.getParameterMap(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | for (Iterator<String> its = params.keySet().iterator(); its.hasNext(); ) { |
| | | String key = its.next(); |
| | | map.put(key, params.get(key)[0]); |
| | | } |
| | | String outTradeNo = map.get("out_trade_no"); |
| | | String tradeStatus = map.get("trade_status"); |
| | | |
| | | //支付成功 |
| | | if ("TRADE_SUCCESS".equalsIgnoreCase(tradeStatus)) { |
| | | |
| | | } |
| | | |
| | | logger.info("支付回调:" + new JSONObject(map).toString()); |
| | | AlipayAppInfo app = VipUtil.getAlipayApp(); |
| | | |
| | | try { |
| | | boolean right = AlipaySignature.rsaCheckV1(map, app.getAlipayPublicKey(), "GBK", map.get("sign_type")); |
| | | if (right) { |
| | | response.getWriter().print("success"); |
| | | response.getWriter().close(); |
| | | } |
| | | logger.info("签名是否正确:" + right); |
| | | } catch (AlipayApiException | IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.funtv.FunTVUtil; |
| | | import com.yeshi.buwan.service.imp.ConfigService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.PrintWriter; |
| | | import java.util.Map; |
| | | |
| | | @Controller |
| | |
| | | @Resource |
| | | private FunTVUtil funTVUtil; |
| | | |
| | | Logger logger = LoggerFactory.getLogger(TestController.class); |
| | | |
| | | @RequestMapping("config") |
| | | public void config() { |
| | | Map<String, String> map = configService.getConfigAsMap(new DetailSystem(44 + ""), 1); |
| | |
| | | funTVUtil.startParseAll(); |
| | | } |
| | | |
| | | @RequestMapping("logback") |
| | | public void logback(PrintWriter out) { |
| | | logger.error("测试"); |
| | | out.print("success"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | String[] idss = ids.split(","); |
| | | List<VideoBanQuanVideo> list = new ArrayList<VideoBanQuanVideo>(); |
| | | List<VideoBanQuanVideo> list = new ArrayList<>(); |
| | | for (String sy : systems) |
| | | for (String st : idss) { |
| | | VideoBanQuanVideo video = new VideoBanQuanVideo(); |
| | |
| | | systems = system.split(","); |
| | | } |
| | | String[] idss = ids.split(","); |
| | | List<VideoBanQuan> list = new ArrayList<VideoBanQuan>(); |
| | | List<VideoBanQuan> list = new ArrayList<>(); |
| | | if (systems != null) |
| | | for (String sy : systems) |
| | | for (String st : idss) { |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads.length > 0)// 添加广告 |
| | | { |
| | | List<HomeAd> list = new ArrayList<HomeAd>(); |
| | | List<HomeAd> list = new ArrayList<>(); |
| | | for (String ad : ads) { |
| | | list.add(new HomeAd(ad)); |
| | | } |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<HomeType> list = new ArrayList<HomeType>(); |
| | | List<HomeType> list = new ArrayList<>(); |
| | | for (String ad : ads) { |
| | | list.add(new HomeType(ad)); |
| | | } |
| | |
| | | String[] pictures = req.getParameterValues("pictures"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<SuperVideoType> list = new ArrayList<SuperVideoType>(); |
| | | List<SuperVideoType> list = new ArrayList<>(); |
| | | for (int i = 0; i < ads.length; i++) { |
| | | SuperVideoType vt = new SuperVideoType(); |
| | | vt.setCreatetime(System.currentTimeMillis() + ""); |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<SuperHotType> list = new ArrayList<SuperHotType>(); |
| | | List<SuperHotType> list = new ArrayList<>(); |
| | | for (int i = 0; i < ads.length; i++) { |
| | | SuperHotType vt = new SuperHotType(); |
| | | vt.setCreatetime(System.currentTimeMillis() + ""); |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<SuperHotSearch> list = new ArrayList<SuperHotSearch>(); |
| | | List<SuperHotSearch> list = new ArrayList<>(); |
| | | for (int i = 0; i < ads.length; i++) { |
| | | SuperHotSearch vt = new SuperHotSearch(); |
| | | vt.setCreatetime(System.currentTimeMillis() + ""); |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<SuperRecommendAd> list = new ArrayList<SuperRecommendAd>(); |
| | | List<SuperRecommendAd> list = new ArrayList<>(); |
| | | for (int i = 0; i < ads.length; i++) { |
| | | SuperRecommendAd vt = new SuperRecommendAd(); |
| | | vt.setCreatetime(System.currentTimeMillis() + ""); |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<SuperUserBanner> list = new ArrayList<SuperUserBanner>(); |
| | | List<SuperUserBanner> list = new ArrayList<>(); |
| | | for (int i = 0; i < ads.length; i++) { |
| | | SuperUserBanner vt = new SuperUserBanner(); |
| | | vt.setCreatetime(System.currentTimeMillis() + ""); |
| | |
| | | String[] ads = req.getParameterValues("homeadids"); |
| | | if (ads != null && ads.length > 0)// 添加广告 |
| | | { |
| | | List<SuperHomeNotice> list = new ArrayList<SuperHomeNotice>(); |
| | | List<SuperHomeNotice> list = new ArrayList<>(); |
| | | for (int i = 0; i < ads.length; i++) { |
| | | SuperHomeNotice vt = new SuperHomeNotice(); |
| | | vt.setCreatetime(System.currentTimeMillis() + ""); |
| | |
| | | } else if (type.equalsIgnoreCase("getAllParentType")) {// 根据子分类得到所有的上级分类 |
| | | String id = req.getParameter("id"); |
| | | if (!StringUtil.isNullOrEmpty(id)) { |
| | | List<Long> idsList = new ArrayList<Long>(); |
| | | List<Long> idsList = new ArrayList<>(); |
| | | if (StringUtil.isNullOrEmpty(id) || id.contains("undefined") || Long.parseLong(id) == 0) |
| | | id = "1"; |
| | | VideoType vt = classService.getTypeById(Long.parseLong(id)); |
| | |
| | | } else if (type.equalsIgnoreCase("getAllParentType")) {// 根据子分类得到所有的上级分类 |
| | | String id = req.getParameter("id"); |
| | | if (!StringUtil.isNullOrEmpty(id)) { |
| | | List<Long> idsList = new ArrayList<Long>(); |
| | | List<Long> idsList = new ArrayList<>(); |
| | | if (StringUtil.isNullOrEmpty(id) || id.contains("undefined") || Long.parseLong(id) == 0) |
| | | id = "1"; |
| | | VideoType vt = classService.getTypeById(Long.parseLong(id)); |
| | |
| | | } else if (type.equalsIgnoreCase("getAllParentType")) {// 根据子分类得到所有的上级分类 |
| | | String id = req.getParameter("id"); |
| | | if (!StringUtil.isNullOrEmpty(id)) { |
| | | List<Long> idsList = new ArrayList<Long>(); |
| | | List<Long> idsList = new ArrayList<>(); |
| | | if (StringUtil.isNullOrEmpty(id) || id.contains("undefined") || Long.parseLong(id) == 0) |
| | | id = "1"; |
| | | VideoType vt = classService.getTypeById(Long.parseLong(id)); |
| | |
| | | |
| | | @RequestMapping("/addHotStar") |
| | | public void addHotStar(String detailSystems,String beizhu,String country,String job,String name,String orderby,String portrait,String works,PrintWriter out) { |
| | | List<String> sysList = new ArrayList<String>(); |
| | | List<String> sysList = new ArrayList<>(); |
| | | if (!StringUtil.isNullOrEmpty(detailSystems)) { |
| | | if (detailSystems.contains(",")) { |
| | | for (String st : detailSystems.split(",")) |
| | |
| | | package com.yeshi.buwan.controller.admin.api; |
| | | |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.yeshi.buwan.domain.SolrVideo; |
| | | import com.yeshi.buwan.dto.search.SolrResultDTO; |
| | | import com.yeshi.buwan.dto.search.SolrVideoSearchFilter; |
| | | import com.yeshi.buwan.iqiyi.IqiYiNewAPI; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.vo.video.VideoAdminInfoVO; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping("admin/new/api/video") |
| | | public class VideoAdminController { |
| | | |
| | | @Resource |
| | | private VideoManager videoManager; |
| | | @Resource |
| | | private VideoManager videoManager; |
| | | |
| | | @Resource |
| | | private ClassService classService; |
| | | @Resource |
| | | private ClassService classService; |
| | | |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | |
| | | @Resource |
| | | private IqiyiUtil iqiyiUtil; |
| | | @Resource |
| | | private IqiyiUtil iqiyiUtil; |
| | | |
| | | @Resource |
| | | private AcFunUtil acFunUtil; |
| | | @Resource |
| | | private AcFunUtil acFunUtil; |
| | | |
| | | @Resource |
| | | private ThreadPoolTaskExecutor taskExecutor; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor taskExecutor; |
| | | |
| | | @RequestMapping(value = "/changevideoshow", method = RequestMethod.POST) |
| | | public void changeVideoShow(String id, int show, PrintWriter out) { |
| | | VideoInfo vi = videoManager.getVideoInfo(id); |
| | | if (vi != null) { |
| | | vi.setShow(show + ""); |
| | | videoManager.changeVideoShow(vi); |
| | | } |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | object.put("msg", "修改成功"); |
| | | out.print(object); |
| | | } |
| | | @Resource |
| | | private SolrAlbumDataManager solrAlbumDataManager; |
| | | |
| | | @RequestMapping(value = "/deletevideo", method = RequestMethod.POST) |
| | | public void deleteVideo(String id, PrintWriter out) { |
| | | String[] ids = id.split(","); |
| | | for (String idStr : ids) |
| | | videoManager.deleteVideo(idStr); |
| | | @RequestMapping(value = "/changevideoshow", method = RequestMethod.POST) |
| | | public void changeVideoShow(String id, int show, PrintWriter out) { |
| | | VideoInfo vi = videoManager.getVideoInfo(id); |
| | | if (vi != null) { |
| | | vi.setShow(show + ""); |
| | | videoManager.changeVideoShow(vi); |
| | | } |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | object.put("msg", "修改成功"); |
| | | out.print(object); |
| | | } |
| | | |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | object.put("msg", "删除成功"); |
| | | out.print(object); |
| | | } |
| | | @RequestMapping(value = "/deletevideo", method = RequestMethod.POST) |
| | | public void deleteVideo(String id, PrintWriter out) { |
| | | String[] ids = id.split(","); |
| | | for (String idStr : ids) |
| | | videoManager.deleteVideo(idStr); |
| | | |
| | | @RequestMapping(value = "/videolist", method = RequestMethod.POST) |
| | | public void videoList(int videotype, int page, String key, int contenttype, PrintWriter out) { |
| | | List<VideoInfo> list = classService.getTypeVideoListAdmin(videotype == 0 ? "" : videotype + "", page, key, |
| | | contenttype); |
| | | long count = classService.getTypeVideoListAdminCount(videotype == 0 ? "" : videotype + "", key, contenttype); |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | JSONObject data = new JSONObject(); |
| | | JSONArray array = new JSONArray(); |
| | | for (VideoInfo vi : list) { |
| | | JSONObject item = new JSONObject(); |
| | | item.put("id", vi.getId()); |
| | | item.put("name", vi.getName()); |
| | | item.put("picture", vi.getHpicture()); |
| | | item.put("updatetime", |
| | | TimeUtil.getGernalTime( |
| | | Long.parseLong( |
| | | StringUtil.isNullOrEmpty(vi.getCreatetime() + "") ? "0" : vi.getCreatetime() + ""), |
| | | "yyyy-MM-dd")); |
| | | item.put("show", vi.getShow()); |
| | | array.add(item); |
| | | } |
| | | PageEntity entity = new PageEntity(); |
| | | entity.setPageIndex(page); |
| | | entity.setPageSize(20); |
| | | entity.setTotalCount((int) count); |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | object.put("msg", "删除成功"); |
| | | out.print(object); |
| | | } |
| | | |
| | | data.put("pageEntity", new GsonBuilder().create().toJson(entity)); |
| | | data.put("data", array); |
| | | object.put("data", data); |
| | | out.println(object); |
| | | } |
| | | @RequestMapping(value = "/videolist", method = RequestMethod.POST) |
| | | public void videoList(int videotype, int page, String key, String resourceIds, int contenttype, PrintWriter out) { |
| | | |
| | | @RequestMapping("updateVideos") |
| | | public void updateVideos(PrintWriter out) { |
| | | iqiyiUtil.updateAll(""); |
| | | out.print(JsonUtil.loadTrueAdmin("执行成功")); |
| | | } |
| | | List<VideoInfo> list = null; |
| | | long count = 0; |
| | | List<VideoAdminInfoVO> voList = new ArrayList<>(); |
| | | //正片搜索 |
| | | if (contenttype == 1) { |
| | | SolrVideoSearchFilter filter = new SolrVideoSearchFilter(); |
| | | filter.setKey(key); |
| | | filter.setVideoType(videotype == 0 ? null : videotype); |
| | | filter.setContentType(1); |
| | | if (!StringUtil.isNullOrEmpty(resourceIds)) { |
| | | JSONArray array = JSONArray.fromObject(resourceIds); |
| | | String[] rids = new String[array.size()]; |
| | | for (int i = 0; i < array.size(); i++) { |
| | | rids[i] = array.optString(i); |
| | | } |
| | | filter.setResourceIds(rids); |
| | | } |
| | | |
| | | @RequestMapping("updateIqiyiAlbum") |
| | | public void updateIqiyiAlbum(String url, PrintWriter out) { |
| | | String aid = IqiYiNewAPI.getAidByUrl(url); |
| | | if (StringUtil.isNullOrEmpty(aid)) { |
| | | out.print(JsonUtil.loadFalseAdmin("未能获取到专辑")); |
| | | } else { |
| | | iqiyiUtil.updateAlbum(aid); |
| | | out.print(JsonUtil.loadTrueAdmin("专辑更新成功")); |
| | | } |
| | | } |
| | | filter.setSortKey("updateTime"); |
| | | |
| | | @RequestMapping("addIqiyiShortVideo") |
| | | public void addIqiyiShortVideo(String urlJson, PrintWriter out) { |
| | | SolrResultDTO dto = solrAlbumDataManager.find(filter, page, Constant.pageCount); |
| | | if (dto.getVideoList() != null) |
| | | for (SolrVideo videoInfo : dto.getVideoList()) |
| | | voList.add(VideoAdminInfoVO.create(videoInfo)); |
| | | count = dto.getTotalCount(); |
| | | } else { |
| | | list = classService.getTypeVideoListAdmin(videotype == 0 ? "" : videotype + "", page, key, |
| | | contenttype); |
| | | count = classService.getTypeVideoListAdminCount(videotype == 0 ? "" : videotype + "", key, contenttype); |
| | | if (list != null) |
| | | for (VideoInfo videoInfo : list) |
| | | voList.add(VideoAdminInfoVO.create(videoInfo)); |
| | | } |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | JSONObject data = new JSONObject(); |
| | | JSONArray array = new JSONArray(); |
| | | |
| | | PageEntity entity = new PageEntity(); |
| | | entity.setPageIndex(page); |
| | | entity.setPageSize(20); |
| | | entity.setTotalCount((int) count); |
| | | |
| | | data.put("pageEntity", new GsonBuilder().create().toJson(entity)); |
| | | data.put("data", new Gson().toJson(voList)); |
| | | object.put("data", data); |
| | | out.println(object); |
| | | } |
| | | |
| | | @RequestMapping("updateVideos") |
| | | public void updateVideos(PrintWriter out) { |
| | | iqiyiUtil.updateAll(""); |
| | | out.print(JsonUtil.loadTrueAdmin("执行成功")); |
| | | } |
| | | |
| | | @RequestMapping("updateIqiyiAlbum") |
| | | public void updateIqiyiAlbum(String url, PrintWriter out) { |
| | | String aid = IqiYiNewAPI.getAidByUrl(url); |
| | | if (StringUtil.isNullOrEmpty(aid)) { |
| | | out.print(JsonUtil.loadFalseAdmin("未能获取到专辑")); |
| | | } else { |
| | | iqiyiUtil.updateAlbum(aid); |
| | | out.print(JsonUtil.loadTrueAdmin("专辑更新成功")); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping("addIqiyiShortVideo") |
| | | public void addIqiyiShortVideo(String urlJson, PrintWriter out) { |
| | | // JSONArray array = JSONArray.fromObject(urlJson); |
| | | // int count = 0; |
| | | // for (int i = 0; i < array.size(); i++) { |
| | |
| | | // iqiyiUtil.updateAlbum(aid); |
| | | // out.print(JsonUtil.loadTrueAdmin("专辑更新成功")); |
| | | // } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping("iqiyiUpdate") |
| | | public void iqiyiUpdate(PrintWriter out) { |
| | | taskExecutor.execute(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | iqiyiUtil.updateAll(""); |
| | | } |
| | | }); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("msg", "正在后台更新中"); |
| | | out.print(data); |
| | | } |
| | | @RequestMapping("iqiyiUpdate") |
| | | public void iqiyiUpdate(PrintWriter out) { |
| | | taskExecutor.execute(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | iqiyiUtil.updateAll(""); |
| | | } |
| | | }); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("msg", "正在后台更新中"); |
| | | out.print(data); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private BaiduParser baiduParser; |
| | | |
| | | @Resource |
| | | private VipParser vipParser; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @RequestMapping(value = "/ad", method = RequestMethod.POST) |
| | |
| | | otherParser.addContact(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("adRecommendRight")) { |
| | | otherParser.adRecommendRight(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("playStatistic")) { |
| | | otherParser.playStatistic(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("getFuntvAuthCode")) { |
| | | otherParser.getFuntvAuthCode(acceptData, request, out); |
| | | } |
| | | out.close(); |
| | | } |
| | |
| | | userParser.setPwd(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("unRegister")) {//注销 |
| | | userParser.unRegister(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("sendBindVerifyCode")) { |
| | | //发送电话绑定验证码 |
| | | commentParser.sendBindVerifyCode(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("bindPhone")) { |
| | | //绑定电话号码 |
| | | commentParser.bindPhone(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("bindQQ")) { |
| | | commentParser.bindQQ(acceptData, request, out); |
| | | } else if (method.equalsIgnoreCase("bindWX")) { |
| | | commentParser.bindWX(acceptData, request, out); |
| | | } |
| | | |
| | | out.close(); |
| | | |
| | | } |
| | | |
| | | @RequestMapping(value = "/attention", method = RequestMethod.POST) |
| | |
| | | out.close(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/vip", method = RequestMethod.POST) |
| | | public void vip(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String method = request.getParameter("Method"); |
| | | if (StringUtil.isNullOrEmpty(method)) |
| | | return; |
| | | if (!Utils.signIsRight(request)) |
| | | out.print(JsonUtil.loadFalseJson("签名错误")); |
| | | |
| | | switch (method) { |
| | | case "buy": |
| | | vipParser.buy(acceptData, request, out); |
| | | break; |
| | | } |
| | | out.close(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.yeshi.buwan.controller.parser; |
| | | |
| | | import com.yeshi.buwan.domain.Attention; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.service.imp.AttentionService; |
| | | import com.yeshi.buwan.util.JsonUtil; |
| | |
| | | } |
| | | list.add(hv.getVideo()); |
| | | } |
| | | |
| | | count = (new StringBuilder(String.valueOf(homeTypeService.getVideoCountByTypes(homeType, pageIndex)))) |
| | | .toString(); |
| | | } else if (!StringUtil.isNullOrEmpty(videoType)) { |
| | |
| | | Long startTime = System.currentTimeMillis(); |
| | | List<VideoInfo> list1 = classService.getTypeVideoList(videoType, detailSystem, pageIndex, 20, |
| | | Integer.parseInt(order), resourceList, CacheUtil.getMD5Long(resourceList)); |
| | | list = new ArrayList<VideoInfo>(); |
| | | list = new ArrayList<>(); |
| | | if (list1 != null) |
| | | for (VideoInfo info : list1) |
| | | list.add(info); |
| | |
| | | } else { |
| | | List<VideoInfo> list1 = classService.getTypeVideoList(videoType, detailSystem, pageIndex, 20, 1, |
| | | resourceList, CacheUtil.getMD5Long(resourceList)); |
| | | list = new ArrayList<VideoInfo>(); |
| | | list = new ArrayList<>(); |
| | | if (list1 != null) |
| | | for (VideoInfo info : list1) |
| | | list.add(info); |
| | |
| | | public void getRecommendCategoryVideoList(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String typeid = request.getParameter("Type"); |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | // int count = |
| | | // categoryRecommendVideoService.getRankVideoNumber(Integer.parseInt(typeid)); |
| | | List<VideoInfo> rankList = categoryRecommendCacheVideoService.getVideoListByRank(Integer.parseInt(typeid), |
| | | detailSystem.getId()); |
| | | detailSystem.getId(), acceptData.getPlatform(), acceptData.getVersion()); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | list.addAll(rankList); |
| | | // List<VideoInfo> list1 = |
| | | // recommendService.getCategoryRecommendVideoList(Integer.parseInt(typeid), |
| | | // count); |
| | | // int crvs = list1.size(); |
| | | // for (CategoryRecommendCacheVideo crcv : rankList) { |
| | | // int rank = crcv.getRank(); |
| | | // if(crvs > 0 && rank > 0 && rank <= crvs ){ |
| | | // list1.add(rank-1, crcv.getVideoInfo()); |
| | | // } |
| | | // } |
| | | // list.addAll(list1.subList(0, list1.size()>count?count:list1.size())); |
| | | // |
| | | // list = banQuanService.getBanQuanVideo(list, detailSystem.getId(), |
| | | // CacheUtil.getMD5VideoInfo(list)); |
| | | for (VideoInfo vi : list) {// 清除无用数据,防止浪费带宽,更改图片 |
| | | vi.setIntroduction(""); |
| | | vi.setMainActor(""); |
| | |
| | | |
| | | 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.exception.SMSException; |
| | | import com.yeshi.buwan.service.imp.CommentService; |
| | | import com.yeshi.buwan.service.imp.MaskKeyService; |
| | | import com.yeshi.buwan.service.imp.SystemService; |
| | | import com.yeshi.buwan.service.imp.UserService; |
| | | import com.yeshi.buwan.service.imp.push.PushService; |
| | | import com.yeshi.buwan.service.inter.LoginUserService; |
| | | import com.yeshi.buwan.service.inter.SMSService; |
| | | import com.yeshi.buwan.util.AliyunOneKeyLoginUtil; |
| | | import com.yeshi.buwan.util.JsonUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.annotation.RequireUid; |
| | |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | import org.yeshi.utils.wx.WXUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | private PushService pushService; |
| | | @Resource |
| | | private MaskKeyService maskKeyService; |
| | | |
| | | @Resource |
| | | private LoginUserService loginUserService; |
| | | |
| | | @Resource |
| | | private SMSService smsService; |
| | | |
| | | @RequireUid |
| | | public void getReadState(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 电话号码绑定 |
| | | * |
| | | * @param acceptData |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void bindPhone(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | Long loginUid = StringUtil.isNullOrEmpty(request.getParameter("loginUid")) ? null : Long.parseLong(request.getParameter("loginUid")); |
| | | String phone = request.getParameter("phone"); |
| | | String code = request.getParameter("code"); |
| | | String accessToken = request.getParameter("accessToken"); |
| | | String systemId = request.getParameter("system"); |
| | | |
| | | |
| | | if (loginUid == null || loginUid == 0L) { |
| | | out.print(JsonUtil.loadFalseJson("登录失败")); |
| | | return; |
| | | } |
| | | |
| | | String mobile = null; |
| | | if (!StringUtil.isNullOrEmpty(accessToken)) { |
| | | //一键登录 |
| | | mobile = AliyunOneKeyLoginUtil.getMobile(accessToken, ""); |
| | | } else { |
| | | //通过验证码登录 |
| | | //判断验证码是否正确 |
| | | |
| | | if (StringUtil.isNullOrEmpty(phone)) { |
| | | out.print(JsonUtil.loadFalseJson("电话号码不能为空")); |
| | | return; |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(code)) { |
| | | out.print(JsonUtil.loadFalseJson("验证码不能为空")); |
| | | return; |
| | | } |
| | | |
| | | if (smsService.verifyBindVCode(phone, code)) { |
| | | out.print(JsonUtil.loadFalseJson("验证码错误")); |
| | | return; |
| | | } |
| | | mobile = phone; |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(code)) { |
| | | out.print(JsonUtil.loadFalseJson("code为空")); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | loginUserService.bindPhone(loginUid + "", mobile); |
| | | out.print(JsonUtil.loadTrueJson("")); |
| | | } catch (LoginUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 绑定QQ |
| | | * |
| | | * @param acceptData |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void bindQQ(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | Long loginUid = StringUtil.isNullOrEmpty(request.getParameter("loginUid")) ? null : Long.parseLong(request.getParameter("loginUid")); |
| | | String name = request.getParameter("Name"); |
| | | String portrait = request.getParameter("Portrait"); |
| | | String openId = request.getParameter("OpenId"); |
| | | String systemId = request.getParameter("system"); |
| | | if (loginUid == null || loginUid == 0L) { |
| | | out.print(JsonUtil.loadFalseJson("尚未登录")); |
| | | return; |
| | | } |
| | | if (StringUtil.isNullOrEmpty(openId)) { |
| | | out.print(JsonUtil.loadFalseJson("授权信息为空")); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | loginUserService.bindQQ(loginUid + "", openId, name, portrait); |
| | | out.print(JsonUtil.loadTrueJson("")); |
| | | } catch (LoginUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 绑定微信 |
| | | * |
| | | * @param acceptData |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void bindWX(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | Long loginUid = StringUtil.isNullOrEmpty(request.getParameter("loginUid")) ? null : Long.parseLong(request.getParameter("loginUid")); |
| | | String code = request.getParameter("code"); |
| | | if (loginUid == null || loginUid == 0L) { |
| | | out.print(JsonUtil.loadFalseJson("尚未登录")); |
| | | return; |
| | | } |
| | | if (StringUtil.isNullOrEmpty(code)) { |
| | | out.print(JsonUtil.loadFalseJson("code为空")); |
| | | return; |
| | | } |
| | | |
| | | //通过code换取个人信息 |
| | | WeiXinUser weiXinUser = MyWXLoginUtil.getUserInfo(code, MyWXLoginUtil.WEIXIN_APPID, MyWXLoginUtil.WEIXIN_SECRET); |
| | | |
| | | if (weiXinUser == null) { |
| | | out.print(JsonUtil.loadFalseJson("获取授权信息失败")); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | loginUserService.bindWX(loginUid + "", weiXinUser); |
| | | out.print(JsonUtil.loadTrueJson("")); |
| | | } catch (LoginUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 发送电话号码绑定验证码 |
| | | * |
| | | * @param acceptData |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void sendBindVerifyCode(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String loginUid = request.getParameter("loginUid"); |
| | | String phone = request.getParameter("phone"); |
| | | |
| | | |
| | | if (StringUtil.isNullOrEmpty(phone)) { |
| | | out.print(JsonUtil.loadFalseJson("电话号码不能为空")); |
| | | return; |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(loginUid)) { |
| | | out.print(JsonUtil.loadFalseJson("用户尚未登录")); |
| | | return; |
| | | } |
| | | |
| | | LoginUser loginUser = userService.getLoginUser(loginUid + ""); |
| | | if (loginUser == null) { |
| | | out.print(JsonUtil.loadFalseJson("用户不存在")); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | smsService.sendBindVCode(Long.parseLong(loginUid), phone, 6); |
| | | } catch (SMSException e) { |
| | | e.printStackTrace(); |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | return; |
| | | } catch (Exception e) { |
| | | out.print(JsonUtil.loadFalseJson("短信发送出错,请稍后再试")); |
| | | return; |
| | | } |
| | | out.print(JsonUtil.loadTrueJson("")); |
| | | } |
| | | |
| | | public void getVideoCommentList(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | |
| | | String videoId = request.getParameter("VideoId"); |
| | |
| | | |
| | | List<HomeAd> list = homeAdService.getHomeAdList(detailSystem); |
| | | |
| | | // 测试跳转小程序 |
| | | // JSONObject xcx = new JSONObject(); |
| | | // xcx.put("thumb", |
| | | // "http://img.zcool.cn/community/0169235af03daea801206aba8664d7.jpeg@260w_195h_1c_1e_1o_100sh.jpg"); |
| | | // xcx.put("title", "测试标题"); |
| | | // xcx.put("desc", "简介"); |
| | | // xcx.put("path", "pages/index/index"); |
| | | // xcx.put("username", "gh_33b9bea57aff"); |
| | | // xcx.put("url", "http://video.yeshitv.com"); |
| | | |
| | | // 测试标题 |
| | | // HomeAd homeAd = new HomeAd(); |
| | | // homeAd.setClazz("com"); |
| | | // homeAd.setLinkType(5); |
| | | // homeAd.setOrderby(0); |
| | | // homeAd.setPicture( |
| | | // "http://img.zcool.cn/community/0169235af03daea801206aba8664d7.jpeg@260w_195h_1c_1e_1o_100sh.jpg"); |
| | | // homeAd.setVideo(new VideoInfo(1 + "")); |
| | | // homeAd.setParams(xcx.toString()); |
| | | // homeAd.setTitle("标题"); |
| | | // list.add(homeAd); |
| | | |
| | | if (acceptData.getPlatform().equalsIgnoreCase("ios"))// IOS测试 |
| | | { |
| | | |
| | |
| | | } else { |
| | | classParser.getRecommendCategoryVideoBanner(acceptData, request, out); |
| | | } |
| | | |
| | | } |
| | | |
| | | // 首页类型获取 |
| | |
| | | return; |
| | | } |
| | | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getPlatform(), acceptData.getVersion()); |
| | | |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(videoId, resourceId, resourceList, |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(detailSystem.getId(), videoId, resourceId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList))); |
| | | |
| | | List<VideoType> typeList = classService.getVideoTypeList(info.getId()); |
| | |
| | | // version)); |
| | | |
| | | // 过滤版权视频关键字 |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | |
| | | // 统计添加 |
| | | // statisticsService.addStatistics(detailSystem.getId(), videoId); |
| | | |
| | |
| | | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | |
| | | PlayUrl pu = videoDeailUtil.getPlayUrl(acceptData,detailSystem.getId(), id, type, Integer.parseInt(resourceId), videoId); |
| | | PlayUrl pu = videoDeailUtil.getPlayUrl(acceptData, detailSystem.getId(), id, type, Integer.parseInt(resourceId), videoId); |
| | | |
| | | if (pu != null) { |
| | | if (!StringUtil.isNullOrEmpty(pu.getUrl())) |
| | |
| | | import com.yeshi.buwan.domain.jump.JumpDetail; |
| | | import com.yeshi.buwan.domain.jump.JumpTypeEnum; |
| | | import com.yeshi.buwan.domain.recommend.AdRecommendRight; |
| | | import com.yeshi.buwan.funtv.FunTVNewApi; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.imp.recommend.AdRecommendRightService; |
| | | import com.yeshi.buwan.service.inter.jump.JumpDetailService; |
| | | import com.yeshi.buwan.util.*; |
| | | import com.yeshi.buwan.util.annotation.RequireUid; |
| | | import com.yeshi.buwan.util.log.VideoLogFactory; |
| | | import com.yeshi.buwan.util.zhibo.MeiNvZhiBoUtil; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Controller |
| | | public class OtherParser { |
| | | private final Logger playLogger = LoggerFactory.getLogger("videoPlay"); |
| | | private String[] sdks = {"4.0.1", "4.0.2", "4.1.0", "4.2.2", "4.2.4", "4.4.2", "4.4.4", "5.0.1", "5.1.0"}; |
| | | private String[] fbl = {"720x1280", "480x800", "480x854", "640x960", "1080x1920"}; |
| | | @Resource |
| | |
| | | private AdRecommendRightService adRecommendRightService; |
| | | @Resource |
| | | private JumpDetailService jumpDetailService; |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | @RequireUid |
| | | public void advice(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | |
| | | |
| | | if (notice != null && acceptData.getVersion() >= 98 && "android".equalsIgnoreCase(acceptData.getPlatform())) { |
| | | content = notice.getContent(); |
| | | url = notice.getUrl().split("\\?")[1].replace("url=","").trim(); |
| | | url = notice.getUrl().split("\\?")[1].replace("url=", "").trim(); |
| | | jumpDetail = jumpDetailService.selectByTypeCache(JumpTypeEnum.baichuan); |
| | | } |
| | | |
| | |
| | | } |
| | | return; |
| | | } |
| | | |
| | | public void playStatistic(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String videoId = request.getParameter("VideoId"); |
| | | String resourceId = request.getParameter("ResourceId"); |
| | | playLogger.info(VideoLogFactory.createStatisticLog("", Integer.parseInt(resourceId), videoId)); |
| | | |
| | | out.print(JsonUtil.loadTrueJson("")); |
| | | return; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取风行授权码 |
| | | * |
| | | * @param acceptData |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void getFuntvAuthCode(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String authCode = null; |
| | | // try { |
| | | // authCode = redisManager.getCommonString("funtv_authcode"); |
| | | // } catch (Exception e) { |
| | | // } |
| | | // |
| | | // if (!StringUtil.isNullOrEmpty(authCode)) { |
| | | // out.print(JsonUtil.loadTrueJson(authCode)); |
| | | // } else { |
| | | authCode = FunTVNewApi.getAuthCode(); |
| | | // if (!StringUtil.isNullOrEmpty(authCode)) { |
| | | // redisManager.cacheCommonString("funtv_authcode", authCode, 60 * 5);//缓存5分钟 |
| | | // } |
| | | out.print(JsonUtil.loadTrueJson(authCode)); |
| | | } |
| | | // } |
| | | } |
| | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.UserInfo; |
| | | import com.yeshi.buwan.domain.shop.ShopGoodsItem; |
| | | import com.yeshi.buwan.domain.shop.ShopItemCollect; |
| | |
| | | |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.Collection; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.*; |
| | |
| | | if (acceptData.getPlatform().equalsIgnoreCase("ios")) { |
| | | if (Constant.IOSTest) { |
| | | if (acceptData.getVersion() == 1) { |
| | | list = new ArrayList<String>(); |
| | | list = new ArrayList<>(); |
| | | } |
| | | } |
| | | } |
| | |
| | | list1 = videoInfoService.simpleRandomVideoList(4); |
| | | } |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | list.addAll(list1); |
| | | |
| | | if ("android".equalsIgnoreCase(acceptData.getPlatform()) && acceptData.getVersion() < 35) { |
| | |
| | | list1 = videoInfoService.simpleRandomVideoList(4); |
| | | } |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | list.addAll(list1); |
| | | |
| | | if ("android".equalsIgnoreCase(acceptData.getPlatform()) && acceptData.getVersion() < 35) { |
New file |
| | |
| | | package com.yeshi.buwan.controller.parser; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.yeshi.buwan.util.JsonUtil; |
| | | import com.yeshi.buwan.util.RedisManager; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.util.user.VipUtil; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | import org.json.JSONObject; |
| | | import org.springframework.stereotype.Component; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | | import org.yeshi.utils.entity.alipay.AlipayAppInfo; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.PrintWriter; |
| | | import java.math.BigDecimal; |
| | | import java.util.UUID; |
| | | |
| | | @Component |
| | | public class VipParser { |
| | | |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | /** |
| | | * 购买VIP |
| | | * |
| | | * @param acceptData |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void buy(AcceptData acceptData, HttpServletRequest request, PrintWriter out) { |
| | | String form = VipUtil.getVipChargeAlipayForm(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMddHHmm"), new BigDecimal("0.01")); |
| | | //暂存2分钟 |
| | | String id = StringUtil.Md5(UUID.randomUUID().toString() + "#" + System.currentTimeMillis()); |
| | | redisManager.cacheCommonString(id, form, 120); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("payUrl", "http://192.168.3.122:8080/BuWan/alipay/printPayForm?formId=" + id); |
| | | out.print(JsonUtil.loadTrueJson(data.toString())); |
| | | } |
| | | |
| | | } |
| | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(platform, 0); |
| | | List<HomeType> list1 = homeTypeService.getHomeType(detailsystemid, resourceList, |
| | | CacheUtil.getMD5Long(resourceList),10,309); |
| | | List<HomeType> list = new ArrayList<HomeType>(); |
| | | List<HomeType> list = new ArrayList<>(); |
| | | for (HomeType ht : list1) |
| | | list.add(ht); |
| | | |
| | |
| | | DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); |
| | | |
| | | List<SuperVideoType> clist = classService.getSuperVideoTypeList(detailSystem.getId()); |
| | | List<SuperVideoType> list = new ArrayList<SuperVideoType>(); |
| | | List<SuperVideoType> list = new ArrayList<>(); |
| | | list.addAll(clist); |
| | | |
| | | List<VideoType> typelist = new ArrayList<VideoType>(); |
| | | List<VideoType> typelist = new ArrayList<>(); |
| | | for (SuperVideoType sv : list) { |
| | | if (!StringUtil.isNullOrEmpty(sv.getPicture())) { |
| | | sv.getType().setIcon(sv.getPicture()); |
| | |
| | | List<VideoType> typeList = getFirstType(pid); |
| | | JSONArray data = new JSONArray(); |
| | | for (VideoType vt : typeList) { |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | if (StringUtil.isNullOrEmpty(vt.getCategoryType()) || "genre".equalsIgnoreCase(vt.getCategoryType())) {// 按分类检索数据 |
| | | Long startTime = System.currentTimeMillis(); |
| | | List<VideoInfo> list1 = classService.getTypeVideoList(vt.getId() + "", detailSystem, 1, 20, 2, |
| | | resourceList, CacheUtil.getMD5Long(resourceList)); |
| | | list = new ArrayList<VideoInfo>(); |
| | | list = new ArrayList<>(); |
| | | if (list1 != null) |
| | | for (VideoInfo info : list1) |
| | | list.add(info); |
| | |
| | | } |
| | | |
| | | private List<VideoType> getFirstType(String parentId) { |
| | | List<VideoType> list = new ArrayList<VideoType>(); |
| | | List<VideoType> list = new ArrayList<>(); |
| | | |
| | | if ("150".equalsIgnoreCase(parentId) || "151".equalsIgnoreCase(parentId) || "152".equalsIgnoreCase(parentId) |
| | | || "153".equalsIgnoreCase(parentId)) { |
| | |
| | | |
| | | } else { |
| | | List<VideoType> clist = classService.getFirstTypeList(parentId); |
| | | list = new ArrayList<VideoType>(); |
| | | list = new ArrayList<>(); |
| | | if (clist != null) |
| | | for (VideoType vt : clist) { |
| | | vt.setCategoryType("genre"); |
| | |
| | | } |
| | | |
| | | public HomeType convertHomeVideoList(HomeType type) { |
| | | List<VideoInfo> vlist = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> vlist = new ArrayList<>(); |
| | | List<HomeVideo> list = type.getHomeVideoList(); |
| | | if (list != null) |
| | | for (HomeVideo hv : list) { |
| | |
| | | |
| | | List<HomeVideo> homeVideoList = homeTypeService.getVideoByTypes(type, pageIndex, detailSystem); |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | for (int i = 0; i < homeVideoList.size(); i++) { |
| | | HomeVideo hv = (HomeVideo) homeVideoList.get(i); |
| | | if (detailSystem.getPackageName().contains("doudou")) { |
| | |
| | | |
| | | List<RecommendAd> list = adService.getRecommendAdList(detailSystem.getId()); |
| | | if (list == null) |
| | | list = new ArrayList<RecommendAd>(); |
| | | list = new ArrayList<>(); |
| | | JSONObject object = new JSONObject(); |
| | | |
| | | JSONArray array = new JSONArray(); |
| | |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(platform, Integer.parseInt(version)); |
| | | |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(videoId, resourceId, resourceList, |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(null,videoId, resourceId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList))); |
| | | |
| | | List<VideoType> typeList = classService.getVideoTypeList(info.getId()); |
| | |
| | | } |
| | | |
| | | public List<HomeVideo> getZhiBoVideoList() throws Exception { |
| | | List<HomeVideo> list = new ArrayList<HomeVideo>(); |
| | | List<HomeVideo> list = new ArrayList<>(); |
| | | String result = get("http://www.kktv1.com/CDN/output/M/3/I/10002002/P/start-0_offset-6_platform-2/json.js"); |
| | | JSONObject object = JSONObject.fromObject(result); |
| | | JSONArray array = object.optJSONArray("roomList"); |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID; |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | import com.yeshi.buwan.controller.parser.UserParser; |
| | |
| | | import com.yeshi.buwan.domain.Comment2; |
| | | import com.yeshi.buwan.domain.CommentReply; |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.service.imp.AttentionService; |
| | | import com.yeshi.buwan.service.imp.CommentService; |
| | |
| | | int pageIndex = Integer.parseInt(page); |
| | | |
| | | java.util.List<Comment2> list1 = commentService.getComment2List(videoId, thirdType, pageIndex); |
| | | List<Comment2> list = new ArrayList<Comment2>(); |
| | | List<Comment2> list = new ArrayList<>(); |
| | | if (list1 != null) |
| | | for (Comment2 cm : list1) |
| | | list.add(cm); |
| | |
| | | CacheUtil.getMD5Long(resourceList)); |
| | | } |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | list.addAll(list1); |
| | | JSONArray array = new JSONArray(); |
| | | for (VideoInfo info : list) |
| | |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(platform, 0); |
| | | |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(videoId, resourceId, resourceList, |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(null,videoId, resourceId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList))); |
| | | if (info == null) |
| | | return; |
| | |
| | | ? recommendService.guessLikeList(ds.getId(), 10, resourceList, CacheUtil.getMD5Long(resourceList)) |
| | | : recommendService.guessLikeList(ds.getId(), 10, videoId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList)); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | list.addAll(list1); |
| | | |
| | | // 相关视频 |
| | | List<VideoInfo> list2 = recommendService.getRelativeVideoList(ds.getId(), 10, videoId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList)); |
| | | List<VideoInfo> xlist = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> xlist = new ArrayList<>(); |
| | | xlist.addAll(list2); |
| | | |
| | | // 大家都在看 |
| | | List<VideoInfo> list3 = recommendService.peopleSee(ds.getId(), 10, videoId, resourceList, |
| | | CacheUtil.getMD5Long(resourceList)); |
| | | List<VideoInfo> plist = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> plist = new ArrayList<>(); |
| | | plist.addAll(list3); |
| | | JSONArray garray = new JSONArray(); |
| | | JSONArray xarray = new JSONArray(); |
New file |
| | |
| | | package com.yeshi.buwan.dao; |
| | | |
| | | import com.yeshi.buwan.dao.base.BaseDao; |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public class VideoResourceMapExtraInfoDao extends BaseDao<VideoResourceMapExtraInfo> { |
| | | |
| | | /** |
| | | * 根据主键查询 |
| | | * |
| | | * @param idList |
| | | * @return |
| | | */ |
| | | public List<VideoResourceMapExtraInfo> listByIds(List<String> idList) { |
| | | String where = ""; |
| | | for (String id : idList) { |
| | | where += " vi.id = ? or"; |
| | | } |
| | | if (where.endsWith("or")) |
| | | where = where.substring(0, where.length() - 2); |
| | | String[] params = new String[idList.size()]; |
| | | idList.toArray(params); |
| | | return list("from VideoResourceMapExtraInfo vi where " + where, params); |
| | | } |
| | | |
| | | } |
| | |
| | | return (List<T>) hibernateTemplate.find(hql, params); |
| | | } |
| | | |
| | | public T findOne(String hql, Serializable... params) { |
| | | List<T> list = (List<T>) hibernateTemplate.find(hql, params); |
| | | if (list != null && list.size() > 0) |
| | | return list.get(0); |
| | | return null; |
| | | } |
| | | |
| | | @SuppressWarnings({"unchecked", "rawtypes"}) |
| | | public List<T> list(String hql, final int start, final int count, final Serializable[] params) { |
| | | final String tempsql = hql; |
| | |
| | | return findList(query); |
| | | } |
| | | |
| | | |
| | | public void deleteByVideoId(Long videoId){ |
| | | Query query = Query.query(Criteria.where("_id").is(videoId)); |
| | | mongoTemplate.remove(query, getEntityClass()); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dao.juhe.pptv; |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.pptv.entity.PPTVProgram; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public class PPTVProgramDao extends MongodbBaseDao<PPTVProgram> { |
| | | |
| | | public List<PPTVProgram> list(List<String> programCodeList) { |
| | | |
| | | Query query = new Query(); |
| | | List<Criteria> whereList = new ArrayList<>(); |
| | | for (String id : programCodeList) { |
| | | whereList.add(Criteria.where("programCode").is(id)); |
| | | } |
| | | Criteria[] wheres = new Criteria[whereList.size()]; |
| | | whereList.toArray(wheres); |
| | | query.addCriteria(new Criteria().orOperator(wheres)); |
| | | return findList(query); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dao.juhe.pptv; |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Repository |
| | | public class PPTVSeriesDao extends MongodbBaseDao<PPTVSeries> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dao.juhe.pptv; |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.pptv.PPTVQuery; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeriesProgramMap; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public class PPTVSeriesProgramMapDao extends MongodbBaseDao<PPTVSeriesProgramMap> { |
| | | |
| | | public List<PPTVSeriesProgramMap> list(PPTVQuery pptvQuery) { |
| | | Query query = new Query(); |
| | | List<Criteria> whereList = new ArrayList<>(); |
| | | if (pptvQuery.programCode != null) { |
| | | whereList.add(Criteria.where("programCode").is(pptvQuery.programCode)); |
| | | } |
| | | |
| | | if (pptvQuery.infoId != null) { |
| | | whereList.add(Criteria.where("infoId").is(pptvQuery.infoId)); |
| | | } |
| | | |
| | | if (pptvQuery.seriesCode != null) { |
| | | whereList.add(Criteria.where("seriesCode").is(pptvQuery.seriesCode)); |
| | | } |
| | | Criteria[] wheres = new Criteria[whereList.size()]; |
| | | whereList.toArray(wheres); |
| | | query.addCriteria(new Criteria().andOperator(wheres)); |
| | | query.skip(pptvQuery.start); |
| | | query.limit(pptvQuery.count); |
| | | List<Sort.Order> orders = new ArrayList<>(); |
| | | orders.add(new Sort.Order(Sort.Direction.ASC, "rank")); |
| | | query.with(new Sort(orders)); |
| | | return findList(query); |
| | | } |
| | | |
| | | /** |
| | | * 获取最近最近的节目 |
| | | * |
| | | * @param infoId |
| | | * @return |
| | | */ |
| | | public PPTVSeriesProgramMap getLatestByInfoId(String infoId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("infoId").is(infoId)); |
| | | List<Sort.Order> orders = new ArrayList<>(); |
| | | orders.add(new Sort.Order(Sort.Direction.DESC, "rank")); |
| | | query.with(new Sort(orders)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | public long count(PPTVQuery pptvQuery) { |
| | | Query query = new Query(); |
| | | List<Criteria> whereList = new ArrayList<>(); |
| | | if (pptvQuery.programCode != null) { |
| | | whereList.add(Criteria.where("programCode").is(pptvQuery.programCode)); |
| | | } |
| | | |
| | | if (pptvQuery.infoId != null) { |
| | | whereList.add(Criteria.where("infoId").is(pptvQuery.infoId)); |
| | | } |
| | | |
| | | if (pptvQuery.seriesCode != null) { |
| | | whereList.add(Criteria.where("seriesCode").is(pptvQuery.seriesCode)); |
| | | } |
| | | Criteria[] wheres = new Criteria[whereList.size()]; |
| | | whereList.toArray(wheres); |
| | | query.addCriteria(new Criteria().andOperator(wheres)); |
| | | return count(query); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dao.juhe.pptv; |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.pptv.entity.VideoPPTVMap; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Repository |
| | | public class VideoPPTVMapDao extends MongodbBaseDao<VideoPPTVMap> { |
| | | |
| | | public VideoPPTVMap selectByInfoId(String infoId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("infoId").is(infoId)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | |
| | | } |
File was renamed from src/main/java/com/yeshi/buwan/dao/LoginUserDao.java |
| | |
| | | package com.yeshi.buwan.dao; |
| | | package com.yeshi.buwan.dao.user; |
| | | |
| | | import com.yeshi.buwan.dao.base.BaseDao; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | @Repository |
| | | public class LoginUserDao extends BaseDao<LoginUser> { |
New file |
| | |
| | | package com.yeshi.buwan.dao.user; |
| | | |
| | | import com.yeshi.buwan.domain.user.LoginUserExtra; |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.data.mongodb.core.query.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Repository |
| | | public class LoginUserExtraDao extends MongodbBaseDao<LoginUserExtra> { |
| | | |
| | | public void updateSelective(LoginUserExtra bean) { |
| | | Query query = new Query(); |
| | | Update update = new Update(); |
| | | query.addCriteria(Criteria.where("id").is(bean.getId())); |
| | | if (bean.getIpinfo() != null) { |
| | | update.set("ipinfo", bean.getIpinfo()); |
| | | } |
| | | if (bean.getDevice() != null) { |
| | | update.set("device", bean.getDevice()); |
| | | } |
| | | if (bean.getSex() != null) { |
| | | update.set("sex", bean.getSex()); |
| | | } |
| | | if (bean.getBirthday() != null) { |
| | | update.set("birthday", bean.getBirthday()); |
| | | } |
| | | if (bean.getSign() != null) { |
| | | update.set("sign", bean.getSign()); |
| | | } |
| | | if (bean.getQqOpenId() != null) { |
| | | update.set("qqOpenId", bean.getQqOpenId()); |
| | | } |
| | | if (bean.getQqNickName() != null) { |
| | | update.set("qqNickName", bean.getQqNickName()); |
| | | } |
| | | if (bean.getQqPortrait() != null) { |
| | | update.set("qqPortrait", bean.getQqPortrait()); |
| | | } |
| | | if (bean.getWxOpenId() != null) { |
| | | update.set("wxOpenId", bean.getWxOpenId()); |
| | | } |
| | | if (bean.getWxUnionId() != null) { |
| | | update.set("wxUnionId", bean.getWxUnionId()); |
| | | } |
| | | if (bean.getWxNickName() != null) { |
| | | update.set("wxNickName", bean.getWxNickName()); |
| | | } |
| | | if (bean.getWxPortrait() != null) { |
| | | update.set("wxPortrait", bean.getWxPortrait()); |
| | | } |
| | | |
| | | if (bean.getWxSex() != null) { |
| | | update.set("wxSex", bean.getWxSex()); |
| | | } |
| | | |
| | | if (bean.getCreateTime() != null) { |
| | | update.set("createTime", bean.getCreateTime()); |
| | | } |
| | | update.set("updateTime", new Date()); |
| | | update(query, update); |
| | | } |
| | | } |
| | |
| | | package com.yeshi.buwan.domain; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | /** |
| | | * 关注视频 |
| | |
| | | package com.yeshi.buwan.domain; |
| | | |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.ManyToOne; |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | /** |
| | | * 评论-木瓜系 |
| | |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.google.gson.annotations.SerializedName; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | public class CommentReply { |
| | | @Expose |
| | |
| | | package com.yeshi.buwan.domain; |
| | | |
| | | import org.apache.solr.client.solrj.beans.Field; |
| | | import org.springframework.data.solr.core.mapping.Indexed; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | |
| | | private String name; |
| | | @Field |
| | | private String updatetime; |
| | | @Field |
| | | private long updateTime; |
| | | @Field("root_video_type") |
| | | private long rootVideoType;//视频主分类 |
| | | @Field |
| | | private String year; |
| | | @Field |
| | | @Indexed |
| | | private String resourceIds;//视频资源ID列表 |
| | | |
| | | |
| | | public long getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(long updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getResourceIds() { |
| | | return resourceIds; |
| | | } |
| | | |
| | | public void setResourceIds(String resourceIds) { |
| | | this.resourceIds = resourceIds; |
| | | } |
| | | |
| | | public String getYear() { |
| | | return year; |
| | |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.ManyToOne; |
| | | import javax.persistence.OneToMany; |
| | | import javax.persistence.Transient; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | |
| | |
| | | |
| | | private int latestWatchCount; |
| | | private int videocount; |
| | | |
| | | |
| | | @Transient |
| | | private VideoResourceMapExtraInfo videoResourceMapExtraInfo; |
| | | |
| | | |
| | | public VideoResourceMapExtraInfo getVideoResourceMapExtraInfo() { |
| | | return videoResourceMapExtraInfo; |
| | | } |
| | | |
| | | public void setVideoResourceMapExtraInfo(VideoResourceMapExtraInfo videoResourceMapExtraInfo) { |
| | | this.videoResourceMapExtraInfo = videoResourceMapExtraInfo; |
| | | } |
| | | |
| | | public int getVideocount() { |
| | | return videocount; |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.domain; |
| | | |
| | | import javax.persistence.Entity; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 视频附加信息 |
| | | * |
| | | * @author Administrator |
| | | */ |
| | | @Entity |
| | | public class VideoResourceMapExtraInfo implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public VideoResourceMapExtraInfo() { |
| | | } |
| | | |
| | | public VideoResourceMapExtraInfo(String videoId, Long resourceId) { |
| | | this.videoId = videoId; |
| | | this.resourceId = resourceId; |
| | | this.id = videoId + "_" + resourceId; |
| | | } |
| | | |
| | | |
| | | //主键ID |
| | | private String id; |
| | | //0-免费 1-收费 |
| | | private Integer free; |
| | | private Long resourceId; |
| | | private String videoId; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | |
| | | public Long getResourceId() { |
| | | return resourceId; |
| | | } |
| | | |
| | | public void setResourceId(Long resourceId) { |
| | | this.resourceId = resourceId; |
| | | } |
| | | |
| | | public String getVideoId() { |
| | | return videoId; |
| | | } |
| | | |
| | | public void setVideoId(String videoId) { |
| | | this.videoId = videoId; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getFree() { |
| | | return free; |
| | | } |
| | | |
| | | public void setFree(Integer free) { |
| | | this.free = free; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
| | |
| | | private String aid;//专辑ID |
| | | @Expose |
| | | private String vid;//视频ID |
| | | @Expose |
| | | private String code;//风行专用 |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getAid() { |
| | | return aid; |
| | |
| | | import javax.persistence.Table; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | @Entity |
| | | @Table(name = "`yeshi_shop_taobao_item_buwan`") |
| | |
| | | package com.yeshi.buwan.domain.shop; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.UserInfo; |
| | | |
| | | public class ShopItemCollect { |
| | |
| | | package com.yeshi.buwan.domain.shop; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | public class ShopItemComment { |
| | | private long id; |
File was renamed from src/main/java/com/yeshi/buwan/domain/LoginUser.java |
| | |
| | | package com.yeshi.buwan.domain; |
| | | package com.yeshi.buwan.domain.user; |
| | | |
| | | import com.google.gson.annotations.Expose; |
| | | import com.google.gson.annotations.SerializedName; |
| | |
| | | public final static int STATE_NORMAL=0; |
| | | public final static int STATE_UNREGISTER=1;//已经注销 |
| | | |
| | | |
| | | |
| | | |
| | | @Expose |
| | | private String id; |
| | | |
| | | |
| | | private String systemId; |
| | | |
| | | private String qqOpenId; |
| | | |
| | | |
| | | private String wxOpenId; |
| | | private String wxUnionId; |
| | | |
| | | private String email; |
| | | private String phone; |
| | | |
| | | @Expose |
| | | @SerializedName("Nickname") |
| | | private String name; |
| | |
| | | //状态 |
| | | |
| | | private Integer state; |
| | | |
| | | |
| | | |
| | | |
| | | public String getSystemId() { |
| | | return systemId; |
| | | } |
| | | |
| | | public void setSystemId(String systemId) { |
| | | this.systemId = systemId; |
| | | } |
| | | |
| | | public String getQqOpenId() { |
| | | return qqOpenId; |
| | | } |
| | | |
| | | public void setQqOpenId(String qqOpenId) { |
| | | this.qqOpenId = qqOpenId; |
| | | } |
| | | |
| | | |
| | | public String getWxOpenId() { |
| | | return wxOpenId; |
| | | } |
| | | |
| | | public void setWxOpenId(String wxOpenId) { |
| | | this.wxOpenId = wxOpenId; |
| | | } |
| | | |
| | | public String getWxUnionId() { |
| | | return wxUnionId; |
| | | } |
| | | |
| | | public void setWxUnionId(String wxUnionId) { |
| | | this.wxUnionId = wxUnionId; |
| | | } |
| | | |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getState() { |
| | | return state; |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.domain.user; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Document(collection = "loginUserExtra") |
| | | public class LoginUserExtra { |
| | | @Id |
| | | private String id; |
| | | private String ipinfo; |
| | | private String device; |
| | | private String sex; |
| | | private String birthday; |
| | | private String sign; |
| | | |
| | | private String qqOpenId; |
| | | private String qqNickName; |
| | | private String qqPortrait; |
| | | |
| | | private String wxOpenId; |
| | | private String wxUnionId; |
| | | private String wxNickName; |
| | | private String wxPortrait; |
| | | private Integer wxSex; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | |
| | | public Integer getWxSex() { |
| | | return wxSex; |
| | | } |
| | | |
| | | public void setWxSex(Integer wxSex) { |
| | | this.wxSex = wxSex; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getIpinfo() { |
| | | return ipinfo; |
| | | } |
| | | |
| | | public void setIpinfo(String ipinfo) { |
| | | this.ipinfo = ipinfo; |
| | | } |
| | | |
| | | public String getDevice() { |
| | | return device; |
| | | } |
| | | |
| | | public void setDevice(String device) { |
| | | this.device = device; |
| | | } |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public String getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(String birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getSign() { |
| | | return sign; |
| | | } |
| | | |
| | | public void setSign(String sign) { |
| | | this.sign = sign; |
| | | } |
| | | |
| | | public String getQqOpenId() { |
| | | return qqOpenId; |
| | | } |
| | | |
| | | public void setQqOpenId(String qqOpenId) { |
| | | this.qqOpenId = qqOpenId; |
| | | } |
| | | |
| | | public String getQqNickName() { |
| | | return qqNickName; |
| | | } |
| | | |
| | | public void setQqNickName(String qqNickName) { |
| | | this.qqNickName = qqNickName; |
| | | } |
| | | |
| | | public String getQqPortrait() { |
| | | return qqPortrait; |
| | | } |
| | | |
| | | public void setQqPortrait(String qqPortrait) { |
| | | this.qqPortrait = qqPortrait; |
| | | } |
| | | |
| | | public String getWxOpenId() { |
| | | return wxOpenId; |
| | | } |
| | | |
| | | public void setWxOpenId(String wxOpenId) { |
| | | this.wxOpenId = wxOpenId; |
| | | } |
| | | |
| | | public String getWxUnionId() { |
| | | return wxUnionId; |
| | | } |
| | | |
| | | public void setWxUnionId(String wxUnionId) { |
| | | this.wxUnionId = wxUnionId; |
| | | } |
| | | |
| | | public String getWxNickName() { |
| | | return wxNickName; |
| | | } |
| | | |
| | | public void setWxNickName(String wxNickName) { |
| | | this.wxNickName = wxNickName; |
| | | } |
| | | |
| | | public String getWxPortrait() { |
| | | return wxPortrait; |
| | | } |
| | | |
| | | public void setWxPortrait(String wxPortrait) { |
| | | this.wxPortrait = wxPortrait; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dto.config; |
| | | |
| | | import org.yeshi.utils.annotation.Map; |
| | | |
| | | public class TencentSMSConfig { |
| | | @Map("app_id") |
| | | private String appId; |
| | | @Map("app_key") |
| | | private String appKey; |
| | | @Map("sign") |
| | | private String sign; |
| | | @Map("content_bind") |
| | | private String contentBind; |
| | | |
| | | |
| | | public String getAppId() { |
| | | return appId; |
| | | } |
| | | |
| | | public void setAppId(String appId) { |
| | | this.appId = appId; |
| | | } |
| | | |
| | | public String getAppKey() { |
| | | return appKey; |
| | | } |
| | | |
| | | public void setAppKey(String appKey) { |
| | | this.appKey = appKey; |
| | | } |
| | | |
| | | public String getSign() { |
| | | return sign; |
| | | } |
| | | |
| | | public void setSign(String sign) { |
| | | this.sign = sign; |
| | | } |
| | | |
| | | public String getContentBind() { |
| | | return contentBind; |
| | | } |
| | | |
| | | public void setContentBind(String contentBind) { |
| | | this.contentBind = contentBind; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dto.mq; |
| | | |
| | | public class PPTVMQMsg { |
| | | public final static int TYPE_ADD_OR_UPDATE = 1; |
| | | public final static int TYPE_DELETE = 2; |
| | | |
| | | private String handler; |
| | | private String infoId; |
| | | private int type; |
| | | |
| | | public PPTVMQMsg(String infoId, int type) { |
| | | this.infoId = infoId; |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getHandler() { |
| | | return handler; |
| | | } |
| | | |
| | | public void setHandler(String handler) { |
| | | this.handler = handler; |
| | | } |
| | | |
| | | public String getInfoId() { |
| | | return infoId; |
| | | } |
| | | |
| | | public void setInfoId(String infoId) { |
| | | this.infoId = infoId; |
| | | } |
| | | |
| | | public int getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(int type) { |
| | | this.type = type; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.dto.search; |
| | | |
| | | public class SolrVideoSearchFilter { |
| | | private String key; |
| | | private Integer contentType; |
| | | private Integer videoType; |
| | | private String[] resourceIds; |
| | | private String sortKey; |
| | | |
| | | public String getSortKey() { |
| | | return sortKey; |
| | | } |
| | | |
| | | public void setSortKey(String sortKey) { |
| | | this.sortKey = sortKey; |
| | | } |
| | | |
| | | public String getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(String key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public Integer getContentType() { |
| | | return contentType; |
| | | } |
| | | |
| | | public void setContentType(Integer contentType) { |
| | | this.contentType = contentType; |
| | | } |
| | | |
| | | public Integer getVideoType() { |
| | | return videoType; |
| | | } |
| | | |
| | | public void setVideoType(Integer videoType) { |
| | | this.videoType = videoType; |
| | | } |
| | | |
| | | public String[] getResourceIds() { |
| | | return resourceIds; |
| | | } |
| | | |
| | | public void setResourceIds(String[] resourceIds) { |
| | | this.resourceIds = resourceIds; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.exception; |
| | | |
| | | public class LoginUserException extends Exception { |
| | | |
| | | 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; |
| | | |
| | | public class SMSException extends Exception { |
| | | |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public SMSException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | if (StringUtil.isNullOrEmpty(ab.getPublishTime())) |
| | | ab.setPublishTime(album.getPubDate() + "-01-01"); |
| | | |
| | | List<FunTVVideo> list = new ArrayList<FunTVVideo>(); |
| | | List<FunTVVideo> list = new ArrayList<>(); |
| | | for (FunTVCartoonVideo tv : album.getVideoList()) { |
| | | list.add(FunTVVideoFactory.create(tv)); |
| | | } |
| | |
| | | if (StringUtil.isNullOrEmpty(ab.getPublishTime())) |
| | | ab.setPublishTime(album.getTv_show_time()); |
| | | |
| | | List<FunTVVideo> list = new ArrayList<FunTVVideo>(); |
| | | List<FunTVVideo> list = new ArrayList<>(); |
| | | for (FunTVTVVideo tv : album.getVideoList()) { |
| | | list.add(FunTVVideoFactory.create(tv)); |
| | | } |
| | |
| | | ab.setPublishTime(album.getScreen_show_time()); |
| | | |
| | | FunTVVideo video = FunTVVideoFactory.create(album); |
| | | List<FunTVVideo> list = new ArrayList<FunTVVideo>(); |
| | | List<FunTVVideo> list = new ArrayList<>(); |
| | | list.add(video); |
| | | ab.setVideoList(list); |
| | | |
| | |
| | | ab.setVideoType("综艺"); |
| | | ab.setVpicture(album.getPost_url()); |
| | | |
| | | List<FunTVVideo> list = new ArrayList<FunTVVideo>(); |
| | | List<FunTVVideo> list = new ArrayList<>(); |
| | | for (FunTVShowVideo tv : album.getVideoList()) { |
| | | list.add(FunTVVideoFactory.create(tv)); |
| | | } |
| | |
| | | import com.yeshi.buwan.funtv.entity.FunTVAlbum2; |
| | | import com.yeshi.buwan.funtv.entity.FunTVShortVideo2; |
| | | import com.yeshi.buwan.funtv.entity.FunTVVideo2; |
| | | import com.yeshi.buwan.funtv.vo.*; |
| | | import com.yeshi.buwan.util.HttpUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | |
| | | public class FunTVNewApi { |
| | | private static final String CP = "fk84vly"; |
| | | private static final String SECRET_KEY = "eD*r3dZNQ%7"; |
| | | |
| | | private static final String APP_ID = "b22whcwhkc4uczk7"; |
| | | private static final String APP_SECRET = "wrLDM2QLJWPM1Oem"; |
| | | |
| | | private static String accessToken; |
| | | private static long accessTokenInvalidTime; |
| | |
| | | * @param pageSize |
| | | * @param startTime 开始时间 |
| | | * @param endTime 结束时间 |
| | | * @param channelId 频道ID 1-电影 2-电视剧 3-动漫 4-综艺 5-少儿 |
| | | * @param status 0表示不可用媒体,1表示可用媒体,2表示全部媒体 |
| | | * @return |
| | | */ |
| | | public static Funtv2ResultVO getAlbums(int page, int pageSize, Long startTime, Long endTime, Integer channelId, Integer status) { |
| | | String url = "http://papi.funshion.com/cp/syncmv"; |
| | | public static Funtv2ResultVO getAlbums(int page, int pageSize, Long startTime, Long endTime, Integer status) { |
| | | String url = "http://pfmg.funshion.com/v1/cp/syncmv"; |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("mtype", "media"); |
| | | if (startTime == null) |
| | | params.put("start", "0"); |
| | | else |
| | | if (startTime != null) |
| | | params.put("start", TimeUtil.getGernalTime(startTime, "yyyyMMddHHmm")); |
| | | if (endTime == null) |
| | | params.put("end", "0"); |
| | | else |
| | | if (endTime != null) |
| | | params.put("end", TimeUtil.getGernalTime(endTime, "yyyyMMddHHmm")); |
| | | |
| | | if (channelId != null) |
| | | params.put("channel", channelId + ""); |
| | | |
| | | if (status != null) |
| | | params.put("status", status + ""); |
| | |
| | | |
| | | try { |
| | | String result = baseRequest(url, params); |
| | | |
| | | System.out.println(result); |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | if (json.optInt("code") == 0) { |
| | | JSONArray array = json.optJSONArray("datas"); |
| | | JSONArray array = json.optJSONArray("data"); |
| | | List<FunTVAlbum2> album2List = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVAlbum2>>() { |
| | | }.getType()); |
| | | for (FunTVAlbum2 album2 : album2List) |
| | | if (album2.getEpisodes() != null) |
| | | for (FunTVVideo2 video2 : album2.getEpisodes()) |
| | | for (FunTVVideo2 video2 : album2.getEpisodes()) { |
| | | video2.setMediaId(album2.getId()); |
| | | video2.setFunH5Url(String.format("http://m.fun.tv/focplay/?mid=%s&vid=%s&malliance=fk84vly", album2.getId(), video2.getId())); |
| | | } |
| | | int totalCount = json.optInt("total"); |
| | | return new Funtv2ResultVO(totalCount, album2List); |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | public static FunTVAlbum2 getAlbumsDetail(String aid) { |
| | | String url = "http://papi.funshion.com/cp/syncmv"; |
| | | // public static FunTVAlbum2 getAlbumsDetail(String aid) { |
| | | // String url = "http://papi.funshion.com/cp/syncmv"; |
| | | // Map<String, String> params = new HashMap<>(); |
| | | // params.put("mtype", "media"); |
| | | // params.put("id", aid); |
| | | // try { |
| | | // String result = baseRequest(url, params); |
| | | // JSONObject json = JSONObject.fromObject(result); |
| | | // if (json.optInt("code") == 0) { |
| | | // JSONArray array = json.optJSONArray("datas"); |
| | | // List<FunTVAlbum2> album2List = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVAlbum2>>() { |
| | | // }.getType()); |
| | | // for (FunTVAlbum2 album2 : album2List) |
| | | // if (album2.getEpisodes() != null) |
| | | // for (FunTVVideo2 video2 : album2.getEpisodes()) |
| | | // video2.setMediaId(album2.getId()); |
| | | // if (album2List != null && album2List.size() > 0) |
| | | // return album2List.get(0); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | // |
| | | // public static Funtv2ResultVO getVideos(int page, int pageSize, Long startTime, Long endTime, Integer channelId, Integer status) { |
| | | // String url = "http://papi.funshion.com/cp/syncmv"; |
| | | // Map<String, String> params = new HashMap<>(); |
| | | // params.put("mtype", "video"); |
| | | // if (startTime == null) |
| | | // params.put("start", "0"); |
| | | // else |
| | | // params.put("start", TimeUtil.getGernalTime(startTime, "yyyyMMddHHmm")); |
| | | // if (endTime == null) |
| | | // params.put("end", "0"); |
| | | // else |
| | | // params.put("end", TimeUtil.getGernalTime(endTime, "yyyyMMddHHmm")); |
| | | // |
| | | // if (channelId != null) |
| | | // params.put("channel", channelId + ""); |
| | | // |
| | | // if (status != null) |
| | | // params.put("status", status + ""); |
| | | // |
| | | // params.put("page_size", pageSize + ""); |
| | | // params.put("page_no", page + ""); |
| | | // |
| | | // try { |
| | | // String result = baseRequest(url, params); |
| | | // JSONObject json = JSONObject.fromObject(result); |
| | | // if (json.optInt("code") == 0) { |
| | | // JSONArray array = json.optJSONArray("datas"); |
| | | // List<FunTVShortVideo2> videoList = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVShortVideo2>>() { |
| | | // }.getType()); |
| | | // int totalCount = json.optInt("total"); |
| | | // return new Funtv2ResultVO(totalCount, videoList); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | // |
| | | // public static FunTVShortVideo2 getVideoDetail(String vid) { |
| | | // String url = "http://papi.funshion.com/cp/syncmv"; |
| | | // Map<String, String> params = new HashMap<>(); |
| | | // params.put("mtype", "video"); |
| | | // params.put("id", vid); |
| | | // |
| | | // try { |
| | | // String result = baseRequest(url, params); |
| | | // JSONObject json = JSONObject.fromObject(result); |
| | | // if (json.optInt("code") == 0) { |
| | | // JSONArray array = json.optJSONArray("datas"); |
| | | // List<FunTVShortVideo2> videoList = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVShortVideo2>>() { |
| | | // }.getType()); |
| | | // if (videoList != null && videoList.size() > 0) |
| | | // return videoList.get(0); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | /** |
| | | * 获取授权码 |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getAuthCode() { |
| | | String url = "http://pfmg.funshion.com/v1/config/authcode"; |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("mtype", "media"); |
| | | params.put("id", aid); |
| | | try { |
| | | String result = baseRequest(url, params); |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | if (json.optInt("code") == 0) { |
| | | JSONArray array = json.optJSONArray("datas"); |
| | | List<FunTVAlbum2> album2List = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVAlbum2>>() { |
| | | }.getType()); |
| | | for (FunTVAlbum2 album2 : album2List) |
| | | if (album2.getEpisodes() != null) |
| | | for (FunTVVideo2 video2 : album2.getEpisodes()) |
| | | video2.setMediaId(album2.getId()); |
| | | if (album2List != null && album2List.size() > 0) |
| | | return album2List.get(0); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static Funtv2ResultVO getVideos(int page, int pageSize, Long startTime, Long endTime, Integer channelId, Integer status) { |
| | | String url = "http://papi.funshion.com/cp/syncmv"; |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("mtype", "video"); |
| | | if (startTime == null) |
| | | params.put("start", "0"); |
| | | else |
| | | params.put("start", TimeUtil.getGernalTime(startTime, "yyyyMMddHHmm")); |
| | | if (endTime == null) |
| | | params.put("end", "0"); |
| | | else |
| | | params.put("end", TimeUtil.getGernalTime(endTime, "yyyyMMddHHmm")); |
| | | |
| | | if (channelId != null) |
| | | params.put("channel", channelId + ""); |
| | | |
| | | if (status != null) |
| | | params.put("status", status + ""); |
| | | |
| | | params.put("page_size", pageSize + ""); |
| | | params.put("page_no", page + ""); |
| | | |
| | | try { |
| | | String result = baseRequest(url, params); |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | if (json.optInt("code") == 0) { |
| | | JSONArray array = json.optJSONArray("datas"); |
| | | List<FunTVShortVideo2> videoList = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVShortVideo2>>() { |
| | | }.getType()); |
| | | int totalCount = json.optInt("total"); |
| | | return new Funtv2ResultVO(totalCount, videoList); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static FunTVShortVideo2 getVideoDetail(String vid) { |
| | | String url = "http://papi.funshion.com/cp/syncmv"; |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("mtype", "video"); |
| | | params.put("id", vid); |
| | | |
| | | try { |
| | | String result = baseRequest(url, params); |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | if (json.optInt("code") == 0) { |
| | | JSONArray array = json.optJSONArray("datas"); |
| | | List<FunTVShortVideo2> videoList = new Gson().fromJson(array.toString(), new TypeToken<List<FunTVShortVideo2>>() { |
| | | }.getType()); |
| | | if (videoList != null && videoList.size() > 0) |
| | | return videoList.get(0); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | params.put("ctime", System.currentTimeMillis() + ""); |
| | | params.put("appid", APP_ID); |
| | | params.put("sign", org.yeshi.utils.StringUtil.Md5(APP_ID + "_" + params.get("ctime") + "_" + APP_SECRET)); |
| | | String result = HttpUtil.get(url, params); |
| | | System.out.println(result); |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | if (json.optInt("retcode") == 200) { |
| | | return json.optJSONObject("data").optString("auth_code"); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | public void update(int channelId,Date startTime,Date endTime){ |
| | | public void update(int channelId, Date startTime, Date endTime) { |
| | | |
| | | } |
| | | |
| | |
| | | * isfee : 是否单独付费片,单独付费的片源即使用户是风行VIP会员也需要单独支付才能观看 |
| | | */ |
| | | |
| | | // "cm_code":"版权媒体唯一标识", |
| | | // "cm_id":"(整型)版权媒体 ID,与 cm_code 一一对应", |
| | | // "media_id":"媒体素材 ID", |
| | | // "name":"中文名称", |
| | | |
| | | @Id |
| | | @SerializedName("media_id") |
| | | private String id; |
| | | |
| | | |
| | | //"版权媒体唯一标识 |
| | | @SerializedName("cm_code") |
| | | private String cmCode; |
| | | //"(整型)版权媒体 ID,与 cm_code 一一对应 |
| | | @SerializedName("cm_id") |
| | | private String cmId; |
| | | |
| | | |
| | | private String name; |
| | | @Indexed |
| | | private String channel; |
| | |
| | | private String area; |
| | | private String aword; |
| | | private String description; |
| | | private String source; |
| | | |
| | | private String totalnum; |
| | | private String update; |
| | | private String isend; |
| | | private String vv; |
| | | private String status; |
| | | //付费模式,取值 0/1/2,0 表示免费,1 表示仅会员免费,2 表示仅单点 |
| | | @SerializedName("fee_mode") |
| | | private String feeMode; |
| | | |
| | | //是否独播 0/1 |
| | | @SerializedName("is_sole") |
| | | private Integer isSole; |
| | | //更新时间 |
| | | @SerializedName("update_time") |
| | | private String updateTime; |
| | | |
| | | |
| | | private String vv; |
| | | private String isvip; |
| | | private String isfee; |
| | | @Transient |
| | |
| | | public void setIsfee(String isfee) { |
| | | this.isfee = isfee; |
| | | } |
| | | |
| | | |
| | | public String getCmCode() { |
| | | return cmCode; |
| | | } |
| | | |
| | | public void setCmCode(String cmCode) { |
| | | this.cmCode = cmCode; |
| | | } |
| | | |
| | | public String getCmId() { |
| | | return cmId; |
| | | } |
| | | |
| | | public void setCmId(String cmId) { |
| | | this.cmId = cmId; |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public String getFeeMode() { |
| | | return feeMode; |
| | | } |
| | | |
| | | public void setFeeMode(String feeMode) { |
| | | this.feeMode = feeMode; |
| | | } |
| | | |
| | | public Integer getIsSole() { |
| | | return isSole; |
| | | } |
| | | |
| | | public void setIsSole(Integer isSole) { |
| | | this.isSole = isSole; |
| | | } |
| | | |
| | | public String getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(String updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
| | |
| | | * ios_deeplink : IOS拉起APP deeplink |
| | | */ |
| | | @Id |
| | | @SerializedName("episode_id") |
| | | private String id; |
| | | |
| | | |
| | | //版权分集唯一标识 |
| | | @SerializedName("ce_code") |
| | | private String ceCode; |
| | | //(整型)版权分集 ID,与 ce_code 一一对应 |
| | | @SerializedName("ce_id") |
| | | private String ceId; |
| | | |
| | | @Indexed |
| | | private String mediaId; |
| | | private String name; |
| | |
| | | private int num; |
| | | private String status; |
| | | private String duration; |
| | | |
| | | @SerializedName("clip_duration") |
| | | private String clipDuration; |
| | | |
| | | private String still; |
| | | @SerializedName("fun_h5_url") |
| | | private String funH5Url; |
| | | private String isvip; |
| | | private String isfee; |
| | | private String isfee;//分集是否是付费资源,取值 0/1 |
| | | @SerializedName("android_deeplink") |
| | | private String androidDeeplink; |
| | | @SerializedName("ios_deeplink") |
| | | private String iosDeeplink; |
| | | |
| | | @SerializedName("update_time") |
| | | private String updateTime; |
| | | |
| | | //"是否可下载,0/1 |
| | | private String downloadable; |
| | | |
| | | public String getCeCode() { |
| | | return ceCode; |
| | | } |
| | | |
| | | public void setCeCode(String ceCode) { |
| | | this.ceCode = ceCode; |
| | | } |
| | | |
| | | public String getCeId() { |
| | | return ceId; |
| | | } |
| | | |
| | | public void setCeId(String ceId) { |
| | | this.ceId = ceId; |
| | | } |
| | | |
| | | public String getClipDuration() { |
| | | return clipDuration; |
| | | } |
| | | |
| | | public void setClipDuration(String clipDuration) { |
| | | this.clipDuration = clipDuration; |
| | | } |
| | | |
| | | public String getDownloadable() { |
| | | return downloadable; |
| | | } |
| | | |
| | | public void setDownloadable(String downloadable) { |
| | | this.downloadable = downloadable; |
| | | } |
| | | |
| | | public String getMediaId() { |
| | | return mediaId; |
| | |
| | | this.isfee = isfee; |
| | | } |
| | | |
| | | public String getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(String updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | //http://pic7.iqiyipic.com/image/20201029/c8/70/a_100417138_m_601_m12.jpg |
| | | //http://pic7.iqiyipic.com/image/20201027/68/fb/v_154231741_m_601.jpg |
| | | public static String getHPicture(String url) { |
| | | String regex = "_m[0-9]+\\.jpg"; |
| | | String regex = "(_m[0-9]+\\.jpg)|(_m_[0-9]+\\.jpg)"; |
| | | Pattern p = Pattern.compile(regex); |
| | | Matcher m = p.matcher(url); |
| | | if (m.find()) { |
| | |
| | | } |
| | | |
| | | public static String getVPicture(String url) { |
| | | String regex = "_m[0-9]+\\.jpg"; |
| | | String regex = "(_m[0-9]+\\.jpg)|(_m_[0-9]+\\.jpg)"; |
| | | Pattern p = Pattern.compile(regex); |
| | | Matcher m = p.matcher(url); |
| | | if (m.find()) { |
| | |
| | | import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.util.log.VideoLogFactory; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import com.yeshi.buwan.util.video.VideoConstant; |
| | | import org.jsoup.Jsoup; |
| | | import org.jsoup.nodes.Document; |
| | | import org.jsoup.nodes.Element; |
| | | import org.jsoup.select.Elements; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Component |
| | | public class IqiyiUtil2 { |
| | | |
| | | private final Logger logger = LoggerFactory.getLogger("iqiyiVideoUpdate"); |
| | | |
| | | public final static int PLAY_NONE = 0;// 不能播放 |
| | | public final static int PLAY_HTML = 1;// 跳转移动端网页播放 |
| | | public final static int PLAY_SWF = 2;// 嵌套网页播放 |
| | |
| | | iqiyi2Service.deleteByAid(album.getId()); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | logger.info(VideoLogFactory.createAddAlbumLog(album)); |
| | | |
| | | if (album.getTvQipuIds() != null && album.getTvQipuIds().size() > 0) { |
| | | //查询最新的一集是否缓存 |
| | | boolean needSaveVideos = true; |
| | |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | //打开vivo应用市场广告 |
| | | |
| | | //打开华为应用市场的广告 |
| | | @XxlJob("ad-vivo-check") |
| | | public ReturnT<String> openVIVOAd(String params) throws Exception { |
| | | JSONObject paramsJson = JSONObject.fromObject(params); |
| | | String appId = paramsJson.optString("appId"); |
| | | String systemId = paramsJson.optString("detailSystemId"); |
| | | //应用市场的版本 |
| | | Integer onLineVersion = AppMarketUtil.getVIVOLatestVersionCode(appId); |
| | | if (onLineVersion == null) { |
| | | throw new Exception("应用市场版本获取失败:" + appId); |
| | | } |
| | | |
| | | //获取正在上线的版本 |
| | | DetailSystem detailSystem = systemService.getDetailSystemById(systemId); |
| | | Map<String, String> map = configService.getConfigAsMap(detailSystem, 1); |
| | | //正在上线的版本 |
| | | String onLiningVersionCode = map.get("ad_click_download_version"); |
| | | //是否已经上线完成 |
| | | if (onLineVersion >= Integer.parseInt(onLiningVersionCode)) { |
| | | //已经上线,设置 |
| | | showAd("vivo", detailSystem, onLineVersion + 1); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 打开广告 |
| | | * |
| | |
| | | import com.yeshi.buwan.iqiyi.entity.IqiyiUpdateQueue; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.log.LogHelper; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.service.imp.juhe.AcfunVideoNewService; |
| | | import com.yeshi.buwan.service.imp.juhe.IqiyiQueueService; |
| | | import com.yeshi.buwan.sohu.SoHuUtil; |
| | |
| | | private IqiyiUtil iqiyiUtil; |
| | | @Resource |
| | | private SoHuUtil soHuUtil; |
| | | |
| | | @Resource |
| | | private PPTVUtil pptvUtil; |
| | | |
| | | @Resource |
| | | private FunTVUtil funTVUtil; |
| | |
| | | |
| | | @Scheduled(cron = "0 0 2 * * ?") |
| | | public void updateAcFun() { |
| | | // if (!Constant.JobTasker) |
| | | // return; |
| | | if (!Constant.JobTasker) |
| | | return; |
| | | |
| | | AcfunVideoResult result = AcfunApiUtil.videoList(""); |
| | | while (result != null && result.pcursor != null && !result.pcursor.equalsIgnoreCase("no_more")) { |
| | |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.push.VideoPushHistory; |
| | | import com.yeshi.buwan.service.imp.AttentionService; |
| | | import com.yeshi.buwan.service.imp.SystemService; |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @XxlJob("video-update-funtv2-updateAlbumById") |
| | | public ReturnT<String> updateAlbumById(String param) throws Exception { |
| | | FunTVAlbum2 album2 = FunTVNewApi.getAlbumsDetail(param); |
| | | if (album2 != null) { |
| | | funTV2Service.saveAlbum(album2); |
| | | if (album2.getEpisodes() != null) |
| | | for (FunTVVideo2 video2 : album2.getEpisodes()) |
| | | funTV2Service.saveVideo(video2); |
| | | CMQManager.getInstance().addFunTVAlbumUpdateMsg(album2.getId()); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | // @XxlJob("video-update-funtv2-updateAlbumById") |
| | | // public ReturnT<String> updateAlbumById(String param) throws Exception { |
| | | // FunTVAlbum2 album2 = FunTVNewApi.getAlbumsDetail(param); |
| | | // if (album2 != null) { |
| | | // funTV2Service.saveAlbum(album2); |
| | | // if (album2.getEpisodes() != null) |
| | | // for (FunTVVideo2 video2 : album2.getEpisodes()) |
| | | // funTV2Service.saveVideo(video2); |
| | | // CMQManager.getInstance().addFunTVAlbumUpdateMsg(album2.getId()); |
| | | // } |
| | | // return ReturnT.SUCCESS; |
| | | // } |
| | | |
| | | /** |
| | | * 获取最近的短视频 |
| | |
| | | */ |
| | | public List<FunTVShortVideo2> getLatestShortVideo(int d) { |
| | | List<FunTVShortVideo2> shortVideo2List = new ArrayList<>(); |
| | | int pageSize = 100; |
| | | long now = System.currentTimeMillis(); |
| | | int page = 1; |
| | | int totalPage = -1; |
| | | while (true) { |
| | | Funtv2ResultVO result = FunTVNewApi.getVideos(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, null); |
| | | if (result != null) { |
| | | for (Serializable a : result.getList()) { |
| | | FunTVShortVideo2 video2 = (FunTVShortVideo2) a; |
| | | shortVideo2List.add(video2); |
| | | } |
| | | } |
| | | int count = result.getCount(); |
| | | if (totalPage < 0) |
| | | totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1; |
| | | if (page > totalPage) |
| | | break; |
| | | page++; |
| | | } |
| | | // int pageSize = 100; |
| | | // long now = System.currentTimeMillis(); |
| | | // int page = 1; |
| | | // int totalPage = -1; |
| | | // while (true) { |
| | | // Funtv2ResultVO result = FunTVNewApi.getVideos(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, null); |
| | | // if (result != null) { |
| | | // for (Serializable a : result.getList()) { |
| | | // FunTVShortVideo2 video2 = (FunTVShortVideo2) a; |
| | | // shortVideo2List.add(video2); |
| | | // } |
| | | // } |
| | | // int count = result.getCount(); |
| | | // if (totalPage < 0) |
| | | // totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1; |
| | | // if (page > totalPage) |
| | | // break; |
| | | // page++; |
| | | // } |
| | | return shortVideo2List; |
| | | } |
| | | |
| | |
| | | int page = 1; |
| | | int totalPage = -1; |
| | | while (true) { |
| | | Funtv2ResultVO result = FunTVNewApi.getAlbums(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, null); |
| | | Funtv2ResultVO result = FunTVNewApi.getAlbums(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null); |
| | | if (result != null) { |
| | | for (Serializable a : result.getList()) { |
| | | FunTVAlbum2 video2 = (FunTVAlbum2) a; |
New file |
| | |
| | | package com.yeshi.buwan.pptv; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.yeshi.buwan.pptv.entity.PPTVProgram; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | import org.apache.commons.httpclient.HttpClient; |
| | | import org.apache.commons.httpclient.NameValuePair; |
| | | import org.apache.commons.httpclient.methods.PostMethod; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.yeshi.utils.HttpUtil; |
| | | |
| | | import java.util.*; |
| | | |
| | | public class PPTVApiUtil { |
| | | static Logger logger = LoggerFactory.getLogger(PPTVApiUtil.class); |
| | | |
| | | private final static String APP_KEY = "eb324ec4439e193c38fd8d7fdbdae9af"; |
| | | private final static String APP_SECRET = "163cf4fa3780091e61a48c6abb6246d3"; |
| | | private final static String CHANNEL_ID = "111111"; |
| | | |
| | | private static String getBase64(String str) { |
| | | String st = StringUtil.getBase64(str).replace("\r\n", ""); |
| | | logger.error(st); |
| | | return st; |
| | | } |
| | | |
| | | private static String post(String url, Map<String, String> params, Map<String, String> headers) { |
| | | HttpClient client = new HttpClient(); |
| | | PostMethod pm = new PostMethod(url); |
| | | |
| | | |
| | | if (headers != null) { |
| | | Iterator<String> its = headers.keySet().iterator(); |
| | | while (its.hasNext()) { |
| | | String key = its.next(); |
| | | pm.setRequestHeader(key, (String) headers.get(key)); |
| | | } |
| | | } |
| | | |
| | | try { |
| | | pm.setRequestBody(JSONObject.fromObject(params).toString()); |
| | | client.executeMethod(pm); |
| | | return pm.getResponseBodyAsString(); |
| | | } catch (Exception var9) { |
| | | var9.printStackTrace(); |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | public static String baseRequest(Map<String, String> params, String method) { |
| | | String url = "https://coapi.pptv.com/coapi-web/api/http/sopRequest"; |
| | | return baseRequest(url, params, method); |
| | | } |
| | | |
| | | |
| | | public static String baseRequest(String url, Map<String, String> params, String method) { |
| | | Map<String, String> headerMap = new HashMap<>(); |
| | | headerMap.put("appMethod", method); |
| | | headerMap.put("appKey", APP_KEY); |
| | | headerMap.put("appRequestTime", TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); |
| | | headerMap.put("signInfo", sign(headerMap, params)); |
| | | |
| | | if (params == null) { |
| | | params = new HashMap<>(); |
| | | } |
| | | |
| | | return post(url, params, headerMap); |
| | | } |
| | | |
| | | private static String sign(Map<String, String> headerMap, Map<String, String> params) { |
| | | logger.info(JSONObject.fromObject(params).toString()); |
| | | String str = APP_SECRET + headerMap.get("appMethod") + headerMap.get("appRequestTime") + APP_KEY; |
| | | if (params != null) { |
| | | str += getBase64(JSONObject.fromObject(params).toString()); |
| | | } |
| | | logger.error(str); |
| | | return StringUtil.Md5(str); |
| | | } |
| | | |
| | | private static List<String> parseUrls(String response) { |
| | | List<String> list = new ArrayList<>(); |
| | | net.sf.json.JSONObject root = net.sf.json.JSONObject.fromObject(response); |
| | | JSONArray array = root.optJSONObject("response").optJSONObject("body").optJSONObject("sitemapindex").optJSONArray("sitemap"); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | String url = array.optJSONObject(i).optString("loc"); |
| | | list.add(url); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private static List<PPTVSeries> requestProgram(String url) { |
| | | List<PPTVSeries> list = new ArrayList<>(); |
| | | |
| | | Gson gson = new Gson(); |
| | | String data = HttpUtil.getAsString(url, "ISO-8859-1", "UTF-8"); |
| | | JSONObject root = JSONObject.fromObject(data); |
| | | JSONArray array = root.optJSONArray("program"); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | JSONObject item = array.optJSONObject(i); |
| | | JSONObject serialinfo = item.optJSONObject("data").optJSONObject("serialinfo"); |
| | | PPTVSeries pptvProgram = gson.fromJson(serialinfo.toString(), PPTVSeries.class); |
| | | list.add(pptvProgram); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private static List<PPTVSeries> getList(String method) { |
| | | String result = baseRequest(null, method); |
| | | logger.error(result); |
| | | List<String> list = parseUrls(result); |
| | | List<PPTVSeries> totalList = new ArrayList<>(); |
| | | for (String url : list) { |
| | | List<PPTVSeries> resultList = requestProgram(url); |
| | | totalList.addAll(resultList); |
| | | } |
| | | return totalList; |
| | | } |
| | | |
| | | /** |
| | | * 获取更新列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public static List<PPTVSeries> getUpdateList() { |
| | | return getList("pptv.channel.content.recent"); |
| | | } |
| | | |
| | | |
| | | public static List<PPTVSeries> getTotalList() { |
| | | return getList("pptv.channel.content.all"); |
| | | } |
| | | |
| | | public static PPTVSeries getDetail(String seriesCodes) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("seriesCodes", seriesCodes); |
| | | String result = baseRequest(params, "pptv.channel.content.detail"); |
| | | System.out.println(result); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取OpenId |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public static String getOpenId(String uid) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("uid", uid); |
| | | String result = baseRequest("https://coapi.pptv.com/coapi-web/api/http/sopRequest", params, "pptv.channel.openid.get"); |
| | | logger.info(result); |
| | | JSONObject resultJSON = JSONObject.fromObject(result); |
| | | return resultJSON.optJSONObject("response").optJSONObject("body").optString("openId"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 登录 |
| | | * |
| | | * @param code |
| | | */ |
| | | public static void login(String code) { |
| | | String url = String.format("https://coapi.pptv.com/coapi-web/api/getUserToken/%s/%s.htm", APP_KEY, code); |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("code", code); |
| | | String result = baseRequest(url, params, ""); |
| | | logger.info(result); |
| | | |
| | | // JSONObject resultJSON = JSONObject.fromObject(result); |
| | | // return resultJSON.optJSONObject("response").optJSONObject("body").optString("openId"); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.pptv; |
| | | |
| | | public class PPTVQuery { |
| | | public String seriesCode; |
| | | public String programCode; |
| | | public String infoId; |
| | | public int start; |
| | | public int count; |
| | | } |
| | |
| | | package com.yeshi.buwan.pptv; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.TreeSet; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.yeshi.buwan.dao.juhe.pptv.PPTVMovieVideoDao; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.pptv.entity.PPTVCartoonDetail; |
| | | import com.yeshi.buwan.pptv.entity.PPTVCartoonVideo; |
| | | import com.yeshi.buwan.pptv.entity.PPTVMovieVideo; |
| | | import com.yeshi.buwan.pptv.entity.PPTVShortVideo; |
| | | import com.yeshi.buwan.pptv.entity.PPTVShowDetail; |
| | | import com.yeshi.buwan.pptv.entity.PPTVShowVideo; |
| | | import com.yeshi.buwan.pptv.entity.PPTVTVDetail; |
| | | import com.yeshi.buwan.pptv.entity.PPTVTVVideo; |
| | | import com.yeshi.buwan.service.imp.juhe.PPTVService; |
| | | import com.yeshi.buwan.util.HttpUtil; |
| | | import com.yeshi.buwan.util.NumberUtil; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | | import com.yeshi.buwan.pptv.entity.PPTVProgram; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.util.video.VideoConstant; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | |
| | | @Component |
| | | public class PPTVUtil { |
| | | |
| | | public final static int RESOURCE_ID = 16; |
| | | public final static String RESOURCE_NAME = "PPTV"; |
| | | public final static int RESOURCE_ID=25; |
| | | |
| | | @Resource |
| | | private PPTVService pptvService; |
| | | @Resource |
| | | private PPTVMovieVideoDao pptvMovieVideoDao; |
| | | public final static int PLAY_NONE = 0;// 不能播放 |
| | | public final static int PLAY_HTML = 1;// 跳转移动端网页播放 |
| | | public final static int PLAY_SDK = 2;// 内嵌SDK播放 |
| | | |
| | | |
| | | private static Long getVideoType(PPTVSeries series) { |
| | | String type = series.getProgramType(); |
| | | if (type.contains("VIP")) { |
| | | type = series.getProgramType2(); |
| | | } |
| | | |
| | | // 解析电影 |
| | | public void startParseMovie() { |
| | | List<String> urlList = PPTVApi.getPageUrl(PPTVApi.PPTV_UPDATE_MOVIE); |
| | | for (String url : urlList) { |
| | | List<PPTVMovieVideo> list = PPTVDataParseUtil.parseMovieListVideo(HttpUtil.get(url)); |
| | | for (PPTVMovieVideo pv : list) { |
| | | if (pv.getOp().equalsIgnoreCase("del")) {// 删除 |
| | | pptvService.deletePPTVMovie(pv); |
| | | } else {// 增加或者更新 |
| | | Serializable id = pptvService.saveOrUpdatePPTVMovie(pv); |
| | | if (id != null) |
| | | pptvService.addPPTVMovieToVideoInfo(pv, false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | int videoType = 0; |
| | | switch (type) { |
| | | case "电影": |
| | | videoType = VideoConstant.VIDEO_CATEGORY_DIANYING; |
| | | break; |
| | | case "电视剧": |
| | | videoType = VideoConstant.VIDEO_CATEGORY_DIANSHIJU; |
| | | break; |
| | | case "综艺": |
| | | videoType = VideoConstant.VIDEO_CATEGORY_ZONGYI; |
| | | break; |
| | | case "动漫": |
| | | videoType = VideoConstant.VIDEO_CATEGORY_DONGMAN; |
| | | break; |
| | | default: |
| | | } |
| | | |
| | | // 解析电视剧 |
| | | public void startParseTV() { |
| | | List<String> urlList = PPTVApi.getPageUrl(PPTVApi.PPTV_UPDATE_TV); |
| | | for (int p = 0; p < urlList.size(); p++) { |
| | | String url = urlList.get(p); |
| | | List<PPTVTVVideo> list = PPTVDataParseUtil.parseTVListVideo(HttpUtil.get(url)); |
| | | System.out.println(list.size()); |
| | | for (int n = 0; n < list.size(); n++) { |
| | | PPTVTVVideo pv = list.get(n); |
| | | if (pv.getOp().equalsIgnoreCase("del")) {// 删除 |
| | | pptvService.deletePPTVTV(pv); |
| | | } else {// 增加或者更新 |
| | | String videoid = pptvService.saveOrUpdatePPTVTV(pv) + ""; |
| | | boolean isUpdate = pptvService.hasTVUpdate(pv.getDetailList()); |
| | | for (PPTVTVDetail pd : pv.getDetailList()) { |
| | | return (long) videoType; |
| | | } |
| | | |
| | | pd.setVideoId(pv.getAid()); |
| | | if (pd.getOp().equalsIgnoreCase("del")) { |
| | | pptvService.deletePPTVTVDetail(pd); |
| | | } else { |
| | | pptvService.saveOrUpdatePPTVTVDetail(pd); |
| | | } |
| | | } |
| | | if (!StringUtil.isNullOrEmpty(videoid)) |
| | | pptvService.addPPTVTVToVideoInfo(pv, isUpdate); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 解析综艺 |
| | | public void startParseShow() { |
| | | List<String> urlList = PPTVApi.getPageUrl(PPTVApi.PPTV_UPDATE_SHOW); |
| | | for (String url : urlList) { |
| | | List<PPTVShowVideo> list = PPTVDataParseUtil.parseShowListVideo(HttpUtil.get(url)); |
| | | for (PPTVShowVideo pv : list) { |
| | | if (pv.getOp().equalsIgnoreCase("del")) {// 删除 |
| | | pptvService.deletePPTVShow(pv); |
| | | } else {// 增加或者更新 |
| | | String videoid = pptvService.saveOrUpdatePPTVShow(pv) + ""; |
| | | boolean isUpdate = pptvService.hasShowUpdate(pv.getDetailList()); |
| | | for (PPTVShowDetail pd : pv.getDetailList()) { |
| | | pd.setVideoId(pv.getAid()); |
| | | if (pd.getOp().equalsIgnoreCase("del")) { |
| | | pptvService.deletePPTVShowDetail(pd); |
| | | } else { |
| | | pptvService.saveOrUpdatePPTVShowDetail(pd); |
| | | } |
| | | } |
| | | if (!StringUtil.isNullOrEmpty(videoid)) |
| | | pptvService.addPPTVShowToVideoInfo(pv, isUpdate); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 视频转换 |
| | | * |
| | | * @param series |
| | | * @return |
| | | */ |
| | | public static VideoInfo convertToVideoInfo(PPTVSeries series) { |
| | | int year = Integer.parseInt(series.getReleaseYear()); |
| | | int month = 1; |
| | | int day = 1; |
| | | String director = series.getDirector(); |
| | | String mainActor = series.getActor(); |
| | | |
| | | // 解析卡通 |
| | | public void startParseCartoon() { |
| | | List<String> urlList = PPTVApi.getPageUrl(PPTVApi.PPTV_UPDATE_CARTON); |
| | | for (String url : urlList) { |
| | | List<PPTVCartoonVideo> list = PPTVDataParseUtil.parseCartoonListVideo(HttpUtil.get(url)); |
| | | for (PPTVCartoonVideo pv : list) { |
| | | if (pv.getOp().equalsIgnoreCase("del")) {// 删除 |
| | | pptvService.deletePPTVCartoon(pv); |
| | | } else {// 增加或者更新 |
| | | String videoid = pptvService.saveOrUpdatePPTVCartoon(pv) + ""; |
| | | boolean isUpdate = pptvService.hasCartoonUpdate(pv.getDetailList()); |
| | | for (PPTVCartoonDetail pd : pv.getDetailList()) { |
| | | pd.setVideoId(pv.getAid()); |
| | | if (pd.getOp().equalsIgnoreCase("del")) { |
| | | pptvService.deletePPTVCartoonDetail(pd); |
| | | } else { |
| | | pptvService.saveOrUpdatePPTVCartoonDetail(pd); |
| | | } |
| | | } |
| | | if (!StringUtil.isNullOrEmpty(videoid)) |
| | | pptvService.addPPTVCartoonToVideoInfo(pv, isUpdate); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | String score = series.getScore(); |
| | | |
| | | // 解析小视频 |
| | | public void startParseShortVideo() { |
| | | List<String> urlList = PPTVApi.getPageUrl(PPTVApi.PPTV_UPDATE_SHORTVIDEO); |
| | | for (String url : urlList) { |
| | | List<PPTVShortVideo> list = PPTVDataParseUtil.parseShortListVideo(HttpUtil.get(url)); |
| | | for (PPTVShortVideo pv : list) { |
| | | if (pv.getOp().equalsIgnoreCase("del")) {// 删除 |
| | | pptvService.deletePPTVShort(pv); |
| | | } else {// 增加或者更新 |
| | | Serializable id = pptvService.saveOrUpdatePPTVShort(pv); |
| | | if (id != null) |
| | | pptvService.addPPTVShortToVideoInfo(pv, false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | String tag = ""; |
| | | VideoType videoType = new VideoType(getVideoType(series)); |
| | | |
| | | // 获取分类 |
| | | public static List<Integer> getTypeList(String rc, String sc) { |
| | | List<Integer> list = new ArrayList<Integer>(); |
| | | if (rc.equalsIgnoreCase("电影")) { |
| | | if ("预告".equalsIgnoreCase(sc)) { |
| | | list.add(281); |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | list.add(281); |
| | | } else { |
| | | list.add(151); |
| | | } |
| | | //电影 |
| | | if (videoType.getId() == VideoConstant.VIDEO_CATEGORY_DIANYING) { |
| | | tag = "评分:" + score; |
| | | } else if (videoType.getId() == VideoConstant.VIDEO_CATEGORY_DIANSHIJU || videoType.getId() == VideoConstant.VIDEO_CATEGORY_DONGMAN) { |
| | | //电视剧,动漫 |
| | | if (series.getSeriesCount().trim().equalsIgnoreCase(series.getCurrentNum().trim())) { |
| | | tag = series.getSeriesCount() + "集全"; |
| | | } else { |
| | | tag = "更新至" + series.getCurrentNum() + "集"; |
| | | } |
| | | } else if (videoType.getId() == VideoConstant.VIDEO_CATEGORY_ZONGYI) { |
| | | //综艺 |
| | | if (!StringUtil.isNullOrEmpty(series.getCurrentNum())) { |
| | | tag = series.getCurrentNum().replace("期", ""); |
| | | } else { |
| | | tag = series.getPublishTime().split(" ")[0]; |
| | | } |
| | | } |
| | | |
| | | } else if (rc.equalsIgnoreCase("电视剧")) { |
| | | if ("预告".equalsIgnoreCase(sc)) { |
| | | list.add(282); |
| | | } else if ("剧八卦".equalsIgnoreCase(sc)) { |
| | | list.add(282); |
| | | } else |
| | | list.add(150); |
| | | |
| | | } else if (rc.equalsIgnoreCase("卡通")) {// 现场 预告 MV 原创 音乐 自制 用户上传 |
| | | if ("现场".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else if ("预告".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else if ("MV".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else if ("原创".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else if ("音乐".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else if ("自制".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | list.add(283); |
| | | } else |
| | | list.add(153); |
| | | String latestHpicture = series.getSeries().get(series.getSeries().size() - 1).getSubHorCover(); |
| | | |
| | | } else if (rc.equalsIgnoreCase("综艺")) { |
| | | list.add(152); |
| | | } else if (rc.equalsIgnoreCase("生活")) {// 美味食刻 萌宠萌宝 新辣生活 健康休闲 生活窍门 用户上传 |
| | | // 猎奇趣闻 |
| | | if ("美味食刻".equalsIgnoreCase(sc)) { |
| | | list.add(228); |
| | | } else if ("萌宠萌宝".equalsIgnoreCase(sc)) { |
| | | } else if ("新辣生活".equalsIgnoreCase(sc)) { |
| | | list.add(230); |
| | | } else if ("健康休闲".equalsIgnoreCase(sc)) { |
| | | list.add(230); |
| | | } else if ("生活窍门".equalsIgnoreCase(sc)) { |
| | | list.add(230); |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | } else if ("猎奇趣闻".equalsIgnoreCase(sc)) { |
| | | } |
| | | long updateTime = System.currentTimeMillis(); |
| | | |
| | | } else if (rc.equalsIgnoreCase("时尚")) {// 秀场传真 媒体专区 美丽课堂 视觉大赏 用户上传 风尚快报 |
| | | // 潮流关键词 时尚人物 品牌风向标 |
| | | if ("秀场传真".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("媒体专区".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("美丽课堂".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("视觉大赏".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | } else if ("风尚快报".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("潮流关键词".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("时尚人物".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } else if ("品牌风向标".equalsIgnoreCase(sc)) { |
| | | list.add(232); |
| | | } |
| | | VideoInfo vi = new VideoInfo(); |
| | | vi.setVideoType(videoType); |
| | | vi.setArea(series.getCountry()); |
| | | vi.setBaseurl(""); |
| | | vi.setCanSave(false); |
| | | vi.setCommentCount(0); |
| | | vi.setContentType(1); |
| | | vi.setCreatetime(System.currentTimeMillis()); |
| | | vi.setDay(day + ""); |
| | | vi.setDirector(director); |
| | | vi.setFocus(""); |
| | | vi.setHpicture(series.getHorCover()); |
| | | vi.setIntroduction(series.getDescription()); |
| | | vi.setLatestHpicture(latestHpicture); |
| | | vi.setLatestVpicture(""); |
| | | vi.setMainActor(mainActor); |
| | | vi.setMonth(month + ""); |
| | | vi.setName(series.getName()); |
| | | vi.setNowNumber(0 + ""); |
| | | vi.setOrderby("0"); |
| | | vi.setPicture(series.getCover()); |
| | | vi.setScore(score); |
| | | vi.setShare("0"); |
| | | vi.setShow(1 + ""); |
| | | vi.setTag(tag); |
| | | vi.setVpicture(series.getCover()); |
| | | vi.setWatchCount(0 + ""); |
| | | vi.setYear(year + ""); |
| | | vi.setUpdatetime(updateTime + ""); |
| | | vi.setVideocount(series.getSeries().size()); |
| | | return vi; |
| | | } |
| | | |
| | | } else if (rc.equalsIgnoreCase("音乐")) {// 舞蹈 不要 音乐节 用户上传 颁奖礼 翻唱猎奇 自制音乐 |
| | | // 乐人无数 戏曲 新歌首发 音乐资讯 内地 港台 台湾音乐 |
| | | // 日本 韩国 欧美 现场 合作比赛 影视原声 其他 |
| | | if ("舞蹈".equalsIgnoreCase(sc)) { |
| | | list.add(303); |
| | | } else if ("不要".equalsIgnoreCase(sc)) { |
| | | } else if ("音乐节".equalsIgnoreCase(sc)) { |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | } else if ("颁奖礼".equalsIgnoreCase(sc)) { |
| | | } else if ("翻唱猎奇".equalsIgnoreCase(sc)) { |
| | | list.add(304); |
| | | } else if ("自制音乐".equalsIgnoreCase(sc)) { |
| | | } else if ("乐人无数".equalsIgnoreCase(sc)) { |
| | | } else if ("戏曲".equalsIgnoreCase(sc)) { |
| | | } else if ("新歌首发".equalsIgnoreCase(sc)) { |
| | | } else if ("音乐资讯".equalsIgnoreCase(sc)) { |
| | | list.add(280); |
| | | } else if ("内地".equalsIgnoreCase(sc)) { |
| | | } else if ("港台".equalsIgnoreCase(sc)) { |
| | | } else if ("台湾音乐".equalsIgnoreCase(sc)) { |
| | | } else if ("日本".equalsIgnoreCase(sc)) { |
| | | } else if ("韩国".equalsIgnoreCase(sc)) { |
| | | } else if ("欧美".equalsIgnoreCase(sc)) { |
| | | } else if ("现场".equalsIgnoreCase(sc)) { |
| | | list.add(303); |
| | | } else if ("合作比赛".equalsIgnoreCase(sc)) { |
| | | } else if ("影视原声".equalsIgnoreCase(sc)) { |
| | | list.add(279); |
| | | } else if ("其他".equalsIgnoreCase(sc)) { |
| | | list.add(280); |
| | | } |
| | | |
| | | } else if (rc.equalsIgnoreCase("旅游")) {// 酒店之选 极致旅游 旷世美景 舌尖美食 用户上传 走遍中国 |
| | | // 香艳之旅 环球畅游 出境游(港澳台) 热点推荐 户外猎奇 |
| | | // 沿途春色 人文风物 旅游焦点 网友攻略 |
| | | list.add(229); |
| | | if ("酒店之选".equalsIgnoreCase(sc)) { |
| | | } else if ("极致旅游".equalsIgnoreCase(sc)) { |
| | | } else if ("旷世美景".equalsIgnoreCase(sc)) { |
| | | } else if ("舌尖美食".equalsIgnoreCase(sc)) { |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | } else if ("走遍中国".equalsIgnoreCase(sc)) { |
| | | } else if ("香艳之旅".equalsIgnoreCase(sc)) { |
| | | } else if ("环球畅游".equalsIgnoreCase(sc)) { |
| | | } else if ("出境游(港澳台)".equalsIgnoreCase(sc)) { |
| | | } else if ("热点推荐".equalsIgnoreCase(sc)) { |
| | | } else if ("户外猎奇".equalsIgnoreCase(sc)) { |
| | | } else if ("沿途春色".equalsIgnoreCase(sc)) { |
| | | } else if ("人文风物".equalsIgnoreCase(sc)) { |
| | | } else if ("旅游焦点".equalsIgnoreCase(sc)) { |
| | | } else if ("网友攻略".equalsIgnoreCase(sc)) { |
| | | } |
| | | |
| | | } else if (rc.equalsIgnoreCase("搞笑")) {// 郭德纲专场 爆笑秀场 周立波专场 囧人囧片 用户上传 |
| | | // 恶搞整蛊 搞笑自拍 相声小品 超萌系列 动物奇趣 开心广告 |
| | | if ("郭德纲专场".equalsIgnoreCase(sc)) { |
| | | list.add(217); |
| | | } else if ("爆笑秀场".equalsIgnoreCase(sc)) { |
| | | list.add(216); |
| | | } else if ("周立波专场".equalsIgnoreCase(sc)) { |
| | | list.add(217); |
| | | } else if ("囧人囧片".equalsIgnoreCase(sc)) { |
| | | list.add(216); |
| | | } else if ("用户上传".equalsIgnoreCase(sc)) { |
| | | } else if ("恶搞整蛊".equalsIgnoreCase(sc)) { |
| | | list.add(216); |
| | | } else if ("搞笑自拍".equalsIgnoreCase(sc)) { |
| | | list.add(216); |
| | | } else if ("相声小品".equalsIgnoreCase(sc)) { |
| | | list.add(217); |
| | | } else if ("超萌系列".equalsIgnoreCase(sc)) { |
| | | list.add(220); |
| | | } else if ("动物奇趣".equalsIgnoreCase(sc)) { |
| | | list.add(220); |
| | | } else if ("开心广告".equalsIgnoreCase(sc)) { |
| | | list.add(216); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private static String getScore(String vid) { |
| | | String result = HttpUtil |
| | | .get("http://epg.api.pptv.com/detail.api?auth=d410fafad87e7bbf6c6dd62434345818&canal=17&userLevel=0&ppi=AgACAAAABwAABOUAAAAHAAAAAFf5GACAuIIVSMh5Qi0t_zR3NmUpIHR91aabBP6RHKxiYkX3RBkET2s_BTUB5ewNFjXCLeUkiUqMCreGl70MnKLhRpth&appid=com.pplive.androidphone&appver=6.1.5&appplt=aph&vid=" |
| | | + vid |
| | | + "&series=1&virtual=1&ver=4&platform=android3&contentType=Preview&vr=3d%2Cvr360%2Cvr180"); |
| | | String score = PPTVDataParseUtil.parseScore(result); |
| | | return score; |
| | | } |
| | | |
| | | public static VideoInfo convertMovieToVideoInfo(PPTVMovieVideo pptv) { |
| | | String score = getScore(pptv.getVid()); |
| | | String showTime = pptv.getShowTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTimeInMillis(TimeUtil.convertGernalTime(showTime, "yyyy-MM-dd")); |
| | | String year = calendar.get(Calendar.YEAR) + ""; |
| | | String month = calendar.get(Calendar.MONTH) + ""; |
| | | String day = calendar.get(Calendar.DAY_OF_MONTH) + ""; |
| | | |
| | | VideoInfo video = new VideoInfo(); |
| | | String area = ""; |
| | | for (String st : pptv.getRegion().split("\\$\\$")) |
| | | area += st + " "; |
| | | video.setArea(area); |
| | | video.setBaseurl(""); |
| | | video.setCanSave(false); |
| | | video.setCommentCount(0); |
| | | video.setContentType(1); |
| | | video.setCreatetime(System.currentTimeMillis()); |
| | | video.setDay(day); |
| | | String director = ""; |
| | | for (String st : pptv.getDirector().split("\\$\\$")) |
| | | director += st + " "; |
| | | |
| | | video.setDirector(director); |
| | | video.setHpicture(pptv.getHorizontalPoster()); |
| | | video.setIntroduction(pptv.getIntroduction()); |
| | | video.setLatestHpicture(pptv.getHorizontalPoster()); |
| | | video.setLatestVpicture(pptv.getNewPoster()); |
| | | video.setLatestWatchCount(0); |
| | | String mainActor = ""; |
| | | for (String st : pptv.getStarring().split("\\$\\$")) |
| | | mainActor += st + " "; |
| | | video.setMainActor(mainActor); |
| | | video.setMonth(month); |
| | | video.setName(pptv.getWorkName()); |
| | | video.setNowNumber(0 + ""); |
| | | video.setOrderby(0 + ""); |
| | | video.setPicture(pptv.getNewPoster()); |
| | | video.setPlayPicture(pptv.getHorizontalPoster()); |
| | | video.setScore(score); |
| | | video.setShare("0"); |
| | | video.setShow("1"); |
| | | video.setTag("评分:" + score); |
| | | video.setThirdType("0"); |
| | | video.setTotalNumber("0"); |
| | | video.setUpdatetime(calendar.getTimeInMillis() + ""); |
| | | video.setVideocount(1); |
| | | video.setVpicture(pptv.getNewPoster()); |
| | | video.setWatchCount(0 + ""); |
| | | video.setYear(year); |
| | | return video; |
| | | } |
| | | |
| | | public static VideoInfo convertTVToVideoInfo(PPTVTVVideo pptv) { |
| | | Comparator<PPTVTVDetail> cm = new Comparator<PPTVTVDetail>() { |
| | | public int compare(PPTVTVDetail o1, PPTVTVDetail o2) { |
| | | return (int) (Long.parseLong(o1.getSeq()) - Long.parseLong(o2.getSeq())); |
| | | } |
| | | }; |
| | | |
| | | Collections.sort(pptv.getDetailList(), cm); |
| | | |
| | | String score = getScore(pptv.getDetailList().get(0).getVid()); |
| | | String showTime = pptv.getDetailList().get(pptv.getDetailList().size() - 1).getResourceTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTimeInMillis(TimeUtil.convertGernalTime(showTime, "yyyy-MM-dd HH:mm:ss")); |
| | | String year = calendar.get(Calendar.YEAR) + ""; |
| | | String month = calendar.get(Calendar.MONTH) + ""; |
| | | String day = calendar.get(Calendar.DAY_OF_MONTH) + ""; |
| | | |
| | | VideoInfo video = new VideoInfo(); |
| | | String area = ""; |
| | | for (String st : pptv.getRegion().split("\\$\\$")) |
| | | area += st + " "; |
| | | video.setArea(area); |
| | | video.setBaseurl(""); |
| | | video.setCanSave(false); |
| | | video.setCommentCount(0); |
| | | video.setContentType(1); |
| | | video.setCreatetime(System.currentTimeMillis()); |
| | | video.setDay(day); |
| | | String director = ""; |
| | | for (String st : pptv.getDirector().split("\\$\\$")) |
| | | director += st + " "; |
| | | |
| | | video.setDirector(director); |
| | | video.setHpicture(pptv.getHorizontalPoster()); |
| | | video.setIntroduction(pptv.getIntroduction()); |
| | | video.setLatestHpicture(pptv.getDetailList().get(pptv.getDetailList().size() - 1).getSingleThumbnails()); |
| | | video.setLatestVpicture(pptv.getDetailList().get(pptv.getDetailList().size() - 1).getPoster()); |
| | | video.setLatestWatchCount(0); |
| | | String mainActor = ""; |
| | | for (String st : pptv.getStarring().split("\\$\\$")) |
| | | mainActor += st + " "; |
| | | video.setMainActor(mainActor); |
| | | video.setMonth(month); |
| | | video.setName(pptv.getWorkName()); |
| | | video.setNowNumber(0 + ""); |
| | | video.setOrderby(0 + ""); |
| | | video.setPicture(pptv.getNewPoster()); |
| | | video.setPlayPicture(pptv.getHorizontalPoster()); |
| | | video.setScore(score); |
| | | video.setShare("0"); |
| | | video.setShow("1"); |
| | | if (Integer.parseInt(pptv.getNewUpdate()) == pptv.getTotalnumber()) |
| | | video.setTag(pptv.getNewUpdate() + "集全"); |
| | | else |
| | | video.setTag("更新至" + pptv.getNewUpdate() + "集"); |
| | | video.setThirdType("0"); |
| | | video.setTotalNumber(pptv.getTotalnumber() + ""); |
| | | video.setUpdatetime(calendar.getTimeInMillis() + ""); |
| | | video.setVideocount(pptv.getDetailList().size()); |
| | | video.setVpicture(pptv.getNewPoster()); |
| | | video.setWatchCount(0 + ""); |
| | | video.setYear(year); |
| | | return video; |
| | | } |
| | | |
| | | public static VideoInfo convertShowToVideoInfo(PPTVShowVideo pptv) { |
| | | Comparator<PPTVShowDetail> cm = new Comparator<PPTVShowDetail>() { |
| | | public int compare(PPTVShowDetail o1, PPTVShowDetail o2) { |
| | | return (int) (Long.parseLong(o1.getSeq()) - Long.parseLong(o2.getSeq())); |
| | | } |
| | | }; |
| | | |
| | | Collections.sort(pptv.getDetailList(), cm); |
| | | |
| | | String score = getScore(pptv.getDetailList().get(0).getVid()); |
| | | String showTime = pptv.getShowTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | long time = TimeUtil.convertGernalTime(showTime, "yyyy-MM-dd"); |
| | | if (time < 0) |
| | | time = TimeUtil.convertGernalTime(pptv.getDetailList().get(0).getDate(), "yyyyMMdd"); |
| | | |
| | | calendar.setTimeInMillis(TimeUtil.convertGernalTime(showTime, "yyyy-MM-dd")); |
| | | String year = calendar.get(Calendar.YEAR) + ""; |
| | | String month = calendar.get(Calendar.MONTH) + ""; |
| | | String day = calendar.get(Calendar.DAY_OF_MONTH) + ""; |
| | | |
| | | VideoInfo video = new VideoInfo(); |
| | | String area = ""; |
| | | for (String st : pptv.getRegion().split("\\$\\$")) |
| | | area += st + " "; |
| | | video.setArea(area); |
| | | video.setBaseurl(""); |
| | | video.setCanSave(false); |
| | | video.setCommentCount(0); |
| | | video.setContentType(1); |
| | | video.setCreatetime(System.currentTimeMillis()); |
| | | video.setDay(day); |
| | | String director = ""; |
| | | for (String st : pptv.getHost().split("\\$\\$")) |
| | | director += st + " "; |
| | | |
| | | video.setDirector(director); |
| | | video.setHpicture(pptv.getHorizontalPoster()); |
| | | video.setIntroduction(pptv.getIntroduction()); |
| | | video.setLatestHpicture(pptv.getDetailList().get(pptv.getDetailList().size() - 1).getSingleThumbnails()); |
| | | video.setLatestVpicture(pptv.getDetailList().get(pptv.getDetailList().size() - 1).getPoster()); |
| | | video.setLatestWatchCount(0); |
| | | String mainActor = ""; |
| | | |
| | | video.setMainActor(mainActor); |
| | | video.setMonth(month); |
| | | video.setName(pptv.getWorkName()); |
| | | video.setNowNumber(0 + ""); |
| | | video.setOrderby(0 + ""); |
| | | video.setPicture(pptv.getNewPoster()); |
| | | video.setPlayPicture(pptv.getHorizontalPoster()); |
| | | video.setScore(score); |
| | | video.setShare("0"); |
| | | video.setShow("1"); |
| | | video.setTag("更新至" |
| | | + TimeUtil.getGernalTime(TimeUtil.convertGernalTime(pptv.getNewUpdate(), "yyyyMMdd"), "yyyy-MM-dd")); |
| | | video.setThirdType("0"); |
| | | video.setTotalNumber(pptv.getTotalNumber() + ""); |
| | | video.setUpdatetime(TimeUtil.convertGernalTime(pptv.getNewUpdate(), "yyyyMMdd") + ""); |
| | | video.setVideocount(pptv.getDetailList().size()); |
| | | video.setVpicture(pptv.getNewPoster()); |
| | | video.setWatchCount(0 + ""); |
| | | video.setYear(year); |
| | | return video; |
| | | } |
| | | |
| | | public static VideoInfo convertCartoonToVideoInfo(PPTVCartoonVideo pptv) { |
| | | Comparator<PPTVCartoonDetail> cm = new Comparator<PPTVCartoonDetail>() { |
| | | public int compare(PPTVCartoonDetail o1, PPTVCartoonDetail o2) { |
| | | return (int) (Long.parseLong(o1.getSeq()) - Long.parseLong(o2.getSeq())); |
| | | } |
| | | }; |
| | | |
| | | Collections.sort(pptv.getDetailList(), cm); |
| | | |
| | | String score = getScore(pptv.getDetailList().get(0).getVid()); |
| | | String showTime = pptv.getShowTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTimeInMillis(TimeUtil.convertGernalTime(showTime, "yyyy")); |
| | | String year = calendar.get(Calendar.YEAR) + ""; |
| | | String month = calendar.get(Calendar.MONTH) + ""; |
| | | String day = calendar.get(Calendar.DAY_OF_MONTH) + ""; |
| | | |
| | | VideoInfo video = new VideoInfo(); |
| | | String area = ""; |
| | | for (String st : pptv.getRegion().split("\\$\\$")) |
| | | area += st + " "; |
| | | video.setArea(area); |
| | | video.setBaseurl(""); |
| | | video.setCanSave(false); |
| | | video.setCommentCount(0); |
| | | video.setContentType(1); |
| | | video.setCreatetime(System.currentTimeMillis()); |
| | | video.setDay(day); |
| | | String director = ""; |
| | | |
| | | video.setDirector(director); |
| | | video.setHpicture(pptv.getHorizontalPoster()); |
| | | video.setIntroduction(pptv.getIntroduction()); |
| | | video.setLatestHpicture(pptv.getDetailList().get(pptv.getDetailList().size() - 1).getSingleThumbnails()); |
| | | video.setLatestVpicture(pptv.getDetailList().get(pptv.getDetailList().size() - 1).getPoster()); |
| | | video.setLatestWatchCount(0); |
| | | String mainActor = ""; |
| | | |
| | | video.setMainActor(mainActor); |
| | | video.setMonth(month); |
| | | video.setName(pptv.getWorkName()); |
| | | video.setNowNumber(0 + ""); |
| | | video.setOrderby(0 + ""); |
| | | video.setPicture(pptv.getNewPoster()); |
| | | video.setPlayPicture(pptv.getHorizontalPoster()); |
| | | video.setScore(score); |
| | | video.setShare("0"); |
| | | video.setShow("1"); |
| | | if (Integer.parseInt(pptv.getNewUpdate()) == pptv.getTotalNumber()) |
| | | video.setTag(pptv.getNewUpdate() + "集全"); |
| | | else |
| | | video.setTag("更新至" + pptv.getNewUpdate() + "集"); |
| | | video.setThirdType("0"); |
| | | video.setTotalNumber(pptv.getTotalNumber() + ""); |
| | | video.setUpdatetime(calendar.getTimeInMillis() + ""); |
| | | video.setVideocount(pptv.getDetailList().size()); |
| | | video.setVpicture(pptv.getNewPoster()); |
| | | video.setWatchCount(0 + ""); |
| | | video.setYear(year); |
| | | return video; |
| | | } |
| | | |
| | | public static VideoInfo convertShortToVideoInfo(PPTVShortVideo pptv) { |
| | | String showTime = pptv.getPublish(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTimeInMillis(TimeUtil.convertGernalTime(showTime, "yyyy-MM-dd HH:mm:ss")); |
| | | String year = calendar.get(Calendar.YEAR) + ""; |
| | | String month = calendar.get(Calendar.MONTH) + ""; |
| | | String day = calendar.get(Calendar.DAY_OF_MONTH) + ""; |
| | | |
| | | String[] sts = pptv.getDuration().split(":"); |
| | | int t = 0; |
| | | if (sts.length == 3) |
| | | t = Integer.parseInt(sts[0]) * 3600 + Integer.parseInt(sts[1]) * 60 + Integer.parseInt(sts[2]); |
| | | else if (sts.length == 2) |
| | | t = Integer.parseInt(sts[0]) * 60 + Integer.parseInt(sts[1]); |
| | | else if (sts.length == 1) |
| | | t = Integer.parseInt(sts[0]); |
| | | |
| | | String tag = NumberUtil.convertSecondToString(t); |
| | | VideoInfo video = new VideoInfo(); |
| | | String area = ""; |
| | | |
| | | video.setArea(area); |
| | | video.setBaseurl(""); |
| | | video.setCanSave(false); |
| | | video.setCommentCount(0); |
| | | video.setContentType(1); |
| | | video.setCreatetime(System.currentTimeMillis()); |
| | | video.setDay(day); |
| | | String director = ""; |
| | | video.setDirector(t + ""); |
| | | video.setHpicture(pptv.getHorizontalPoster()); |
| | | video.setIntroduction(pptv.getIntroduction()); |
| | | video.setLatestHpicture(""); |
| | | video.setLatestVpicture(""); |
| | | video.setLatestWatchCount(0); |
| | | String mainActor = ""; |
| | | |
| | | video.setMainActor(mainActor); |
| | | video.setMonth(month); |
| | | video.setName(pptv.getSingleTitle()); |
| | | video.setNowNumber(0 + ""); |
| | | video.setOrderby(0 + ""); |
| | | video.setPicture(pptv.getHorizontalPoster()); |
| | | video.setPlayPicture(pptv.getHorizontalPoster()); |
| | | video.setScore("9.0"); |
| | | video.setShare("0"); |
| | | video.setShow("1"); |
| | | video.setTag(tag); |
| | | video.setThirdType("0"); |
| | | video.setTotalNumber("1"); |
| | | video.setUpdatetime(calendar.getTimeInMillis() + ""); |
| | | video.setVideocount(1); |
| | | video.setVpicture(""); |
| | | video.setWatchCount(0 + ""); |
| | | video.setYear(year); |
| | | return video; |
| | | } |
| | | |
| | | public static List<Integer> getVideoTypeList(String ft, String typeStr) { |
| | | List<Integer> typeList = new ArrayList<Integer>(); |
| | | String[] types = (typeStr + "").split("\\$\\$"); |
| | | Set<Integer> set = new TreeSet<Integer>(); |
| | | for (String tp : types) { |
| | | List<Integer> typeL = PPTVUtil.getTypeList(ft, tp); |
| | | for (Integer i : typeL) |
| | | set.add(i); |
| | | } |
| | | Iterator<Integer> its = set.iterator(); |
| | | while (its.hasNext()) { |
| | | typeList.add(its.next()); |
| | | } |
| | | if (typeList.size() == 0) |
| | | typeList.add(299); |
| | | |
| | | return typeList; |
| | | } |
| | | public static int getPlayType(AcceptData acceptData, PPTVProgram pptvProgram) { |
| | | if (!pptvProgram.getStatus().equalsIgnoreCase("del")) { |
| | | return PLAY_SDK; |
| | | } else { |
| | | return PLAY_NONE; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.pptv.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | public class PPTVGoodsInfo { |
| | | |
| | | //商品编码 |
| | | private String goodsNo; |
| | | //商品名称 |
| | | private String goodsName; |
| | | //VIP是否定价 |
| | | private String isVipPricing; |
| | | //会员价格 |
| | | private BigDecimal vipPrice; |
| | | //非VIP是否定价 |
| | | private String isNoVipPricing; |
| | | //非会员价格 |
| | | private BigDecimal noVipPrice; |
| | | //有效/无效 0有效;1无效 |
| | | private String status; |
| | | //是否可用优惠券(满减、折扣)0:不可用 1:可用 |
| | | private String isTicket; |
| | | |
| | | public String getGoodsNo() { |
| | | return goodsNo; |
| | | } |
| | | |
| | | public void setGoodsNo(String goodsNo) { |
| | | this.goodsNo = goodsNo; |
| | | } |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public String getIsVipPricing() { |
| | | return isVipPricing; |
| | | } |
| | | |
| | | public void setIsVipPricing(String isVipPricing) { |
| | | this.isVipPricing = isVipPricing; |
| | | } |
| | | |
| | | public BigDecimal getVipPrice() { |
| | | return vipPrice; |
| | | } |
| | | |
| | | public void setVipPrice(BigDecimal vipPrice) { |
| | | this.vipPrice = vipPrice; |
| | | } |
| | | |
| | | public String getIsNoVipPricing() { |
| | | return isNoVipPricing; |
| | | } |
| | | |
| | | public void setIsNoVipPricing(String isNoVipPricing) { |
| | | this.isNoVipPricing = isNoVipPricing; |
| | | } |
| | | |
| | | public BigDecimal getNoVipPrice() { |
| | | return noVipPrice; |
| | | } |
| | | |
| | | public void setNoVipPrice(BigDecimal noVipPrice) { |
| | | this.noVipPrice = noVipPrice; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getIsTicket() { |
| | | return isTicket; |
| | | } |
| | | |
| | | public void setIsTicket(String isTicket) { |
| | | this.isTicket = isTicket; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.pptv.entity; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Document(collection = "pptvProgram") |
| | | public class PPTVProgram { |
| | | |
| | | |
| | | /** |
| | | * contentOnlineTime : 2020-09-27 15:36:35 |
| | | * free : 0 |
| | | * duration : 46:55 |
| | | * status : del |
| | | * subHorCover : https://v-img.pplive.cn/sp720/6b/2c/6b2c8d9515829b8587f13fbbdf710023/7.jpg |
| | | * programSetTiltle : 伏羲女娲(第01集) |
| | | * programCode : 12537929 |
| | | * seriesNum : 1 |
| | | * ContentType : 0 |
| | | */ |
| | | |
| | | @Id |
| | | //影片唯一Id ,节目ID,一个series 可以包含1 个或多个program |
| | | private String programCode; |
| | | //影片集数标题 |
| | | private String programSetTiltle; |
| | | //内容类型,0:正片、1:预告、2:花絮、3:资讯、4:看点 |
| | | private String ContentType; |
| | | //剧集每个分集对应横版截图 |
| | | private String subHorCover; |
| | | //集数序号,标识第几集 |
| | | private String seriesNum; |
| | | //节目更新时间,比如电视剧单集的更新时间 |
| | | private String contentOnlineTime; |
| | | //时长 |
| | | private String duration; |
| | | //状态:add新增;del删除;update更新 |
| | | private String status; |
| | | //默认全部收费 0免费;1付费 |
| | | private String free; |
| | | //排序值 |
| | | private Integer rank; |
| | | |
| | | //对应的商品信息JSON,该字段可为空 |
| | | private List<PPTVGoodsInfo> goodsInfo; |
| | | |
| | | private Date createTime; |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public List<PPTVGoodsInfo> getGoodsInfo() { |
| | | return goodsInfo; |
| | | } |
| | | |
| | | public void setGoodsInfo(List<PPTVGoodsInfo> goodsInfo) { |
| | | this.goodsInfo = goodsInfo; |
| | | } |
| | | |
| | | public String getContentOnlineTime() { |
| | | return contentOnlineTime; |
| | | } |
| | | |
| | | public void setContentOnlineTime(String contentOnlineTime) { |
| | | this.contentOnlineTime = contentOnlineTime; |
| | | } |
| | | |
| | | public String getFree() { |
| | | return free; |
| | | } |
| | | |
| | | public void setFree(String free) { |
| | | this.free = free; |
| | | } |
| | | |
| | | public String getDuration() { |
| | | return duration; |
| | | } |
| | | |
| | | public void setDuration(String duration) { |
| | | this.duration = duration; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSubHorCover() { |
| | | return subHorCover; |
| | | } |
| | | |
| | | public void setSubHorCover(String subHorCover) { |
| | | this.subHorCover = subHorCover; |
| | | } |
| | | |
| | | public String getProgramSetTiltle() { |
| | | return programSetTiltle; |
| | | } |
| | | |
| | | public void setProgramSetTiltle(String programSetTiltle) { |
| | | this.programSetTiltle = programSetTiltle; |
| | | } |
| | | |
| | | public String getProgramCode() { |
| | | return programCode; |
| | | } |
| | | |
| | | public void setProgramCode(String programCode) { |
| | | this.programCode = programCode; |
| | | } |
| | | |
| | | public String getSeriesNum() { |
| | | return seriesNum; |
| | | } |
| | | |
| | | public void setSeriesNum(String seriesNum) { |
| | | this.seriesNum = seriesNum; |
| | | } |
| | | |
| | | public String getContentType() { |
| | | return ContentType; |
| | | } |
| | | |
| | | public void setContentType(String ContentType) { |
| | | this.ContentType = ContentType; |
| | | } |
| | | |
| | | public Integer getRank() { |
| | | return rank; |
| | | } |
| | | |
| | | public void setRank(Integer rank) { |
| | | this.rank = rank; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.pptv.entity; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.annotation.Transient; |
| | | import org.springframework.data.mongodb.core.index.Indexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Document(collection = "pptvSeries") |
| | | public class PPTVSeries { |
| | | |
| | | |
| | | /** |
| | | * programType2 : 内地 |
| | | * publishTime : 2011-10-26 00:00:00 |
| | | * status : del |
| | | * updateTime : 2018-07-13 15:00:31 |
| | | * seriesCount : 17 |
| | | * score : 7.6 |
| | | * infoID : 162731 |
| | | * actor : 黄志忠/荣蓉/王卫国 |
| | | * horCover : https://v-img.pplive.cn/sp720/6b/2c/6b2c8d9515829b8587f13fbbdf710023/7.jpg |
| | | * director : |
| | | * offline : |
| | | * currentNum : 17 |
| | | * country : 内地 |
| | | * releaseYear : 1990 |
| | | * free : 0 |
| | | * cover : http://img36.pplive.cn/sp423/2011/10/26/17200517158.jpg |
| | | * description : 蛮荒时代,在火山、洪水、野兽肆虐的环境之中,人类的部落之间为抢夺生存环境和生活资料而相互争斗、频繁厮杀。被雷神强暴的华胥,在激流中生下一个孩子,一条鳄鱼把婴儿驮到岸边。正祭祀的鹿部落救起了这个孩子,起名“伏羲”。伏羲长大后,在部落混战中主持正义扶贫弱,以仁爱之心博得了各部落拥戴,建立了强大... |
| | | * name : 伏羲女娲 |
| | | * seriesCode : 10032394 |
| | | * language : 国语 |
| | | * programcategory : 电视剧-古装,电视剧-神话 |
| | | * workState : 1 |
| | | * programType : 电视剧 |
| | | */ |
| | | |
| | | @Id |
| | | //即百科ID:PP视频内部的内容唯一ID |
| | | private String infoID; |
| | | //剧集ID |
| | | @Indexed |
| | | private String seriesCode; |
| | | //影片名称 |
| | | private String name; |
| | | //影片海报(纵版),格式jpg,分辨率423*564 |
| | | private String cover; |
| | | //影片截图(横版),格式jpg,分辨率720*540 |
| | | private String horCover; |
| | | //影片大类型,比如说:电影、电视剧、综艺、动漫等(媒资一级分类) |
| | | private String programType; |
| | | //影片类型,比如说:爱情、喜剧、言情等(媒资二级分类) |
| | | private String programType2; |
| | | //表示该资源所包含前端分类,每一个分类之间用“,”分割,同一个分类之间用“-”分割,最多四级 |
| | | private String programcategory; |
| | | //演员,如遇到多个,用/分开 |
| | | private String actor; |
| | | //导演,如遇到多个,用/分开 |
| | | private String director; |
| | | //地区 |
| | | private String country; |
| | | //上映年份 |
| | | private String releaseYear; |
| | | //评分,媒资豆瓣评分 |
| | | private String score; |
| | | //总集数,单部电影则为1,如果>1 则为节目集(电视剧或音乐专辑等形式)。 |
| | | //注意:不管单部或者节目集形式,后面均有series 节点。 |
| | | private String seriesCount; |
| | | //该节目集更新集数,单集则字段为1 |
| | | private String currentNum; |
| | | //影片语言 |
| | | private String language; |
| | | //媒资内容上线时间,媒资bpp_channel表的publishTime |
| | | private String publishTime; |
| | | //版权到期时间,该字段里的内容可为空 |
| | | private String offline; |
| | | //媒资内容更新时间 |
| | | private String updateTime; |
| | | //影片介绍,该字段可为空 |
| | | private String description; |
| | | //默认全部收费 0免费;1付费 |
| | | private String free; |
| | | //状态:add新增;del删除;update更新 |
| | | private String status; |
| | | //内容的更新状态 0更新;1已完结 |
| | | private String workState; |
| | | private Date createTime; |
| | | |
| | | @Transient |
| | | private List<PPTVProgram> series; |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public List<PPTVProgram> getSeries() { |
| | | return series; |
| | | } |
| | | |
| | | public void setSeries(List<PPTVProgram> series) { |
| | | this.series = series; |
| | | } |
| | | |
| | | public String getProgramType2() { |
| | | return programType2; |
| | | } |
| | | |
| | | public void setProgramType2(String programType2) { |
| | | this.programType2 = programType2; |
| | | } |
| | | |
| | | public String getPublishTime() { |
| | | return publishTime; |
| | | } |
| | | |
| | | public void setPublishTime(String publishTime) { |
| | | this.publishTime = publishTime; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(String updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getSeriesCount() { |
| | | return seriesCount; |
| | | } |
| | | |
| | | public void setSeriesCount(String seriesCount) { |
| | | this.seriesCount = seriesCount; |
| | | } |
| | | |
| | | public String getScore() { |
| | | return score; |
| | | } |
| | | |
| | | public void setScore(String score) { |
| | | this.score = score; |
| | | } |
| | | |
| | | public String getInfoID() { |
| | | return infoID; |
| | | } |
| | | |
| | | public void setInfoID(String infoID) { |
| | | this.infoID = infoID; |
| | | } |
| | | |
| | | public String getActor() { |
| | | return actor; |
| | | } |
| | | |
| | | public void setActor(String actor) { |
| | | this.actor = actor; |
| | | } |
| | | |
| | | public String getHorCover() { |
| | | return horCover; |
| | | } |
| | | |
| | | public void setHorCover(String horCover) { |
| | | this.horCover = horCover; |
| | | } |
| | | |
| | | public String getDirector() { |
| | | return director; |
| | | } |
| | | |
| | | public void setDirector(String director) { |
| | | this.director = director; |
| | | } |
| | | |
| | | public String getOffline() { |
| | | return offline; |
| | | } |
| | | |
| | | public void setOffline(String offline) { |
| | | this.offline = offline; |
| | | } |
| | | |
| | | public String getCurrentNum() { |
| | | return currentNum; |
| | | } |
| | | |
| | | public void setCurrentNum(String currentNum) { |
| | | this.currentNum = currentNum; |
| | | } |
| | | |
| | | public String getCountry() { |
| | | return country; |
| | | } |
| | | |
| | | public void setCountry(String country) { |
| | | this.country = country; |
| | | } |
| | | |
| | | public String getReleaseYear() { |
| | | return releaseYear; |
| | | } |
| | | |
| | | public void setReleaseYear(String releaseYear) { |
| | | this.releaseYear = releaseYear; |
| | | } |
| | | |
| | | public String getFree() { |
| | | return free; |
| | | } |
| | | |
| | | public void setFree(String free) { |
| | | this.free = free; |
| | | } |
| | | |
| | | public String getCover() { |
| | | return cover; |
| | | } |
| | | |
| | | public void setCover(String cover) { |
| | | this.cover = cover; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getSeriesCode() { |
| | | return seriesCode; |
| | | } |
| | | |
| | | public void setSeriesCode(String seriesCode) { |
| | | this.seriesCode = seriesCode; |
| | | } |
| | | |
| | | public String getLanguage() { |
| | | return language; |
| | | } |
| | | |
| | | public void setLanguage(String language) { |
| | | this.language = language; |
| | | } |
| | | |
| | | public String getProgramcategory() { |
| | | return programcategory; |
| | | } |
| | | |
| | | public void setProgramcategory(String programcategory) { |
| | | this.programcategory = programcategory; |
| | | } |
| | | |
| | | public String getWorkState() { |
| | | return workState; |
| | | } |
| | | |
| | | public void setWorkState(String workState) { |
| | | this.workState = workState; |
| | | } |
| | | |
| | | public String getProgramType() { |
| | | return programType; |
| | | } |
| | | |
| | | public void setProgramType(String programType) { |
| | | this.programType = programType; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.pptv.entity; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.index.Indexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | @Document(collection = "pptvSeriesProgramMap") |
| | | public class PPTVSeriesProgramMap { |
| | | |
| | | @Id |
| | | private String id; |
| | | @Indexed |
| | | private String infoId; |
| | | private String seriesCode; |
| | | @Indexed |
| | | private String programCode; |
| | | @Indexed |
| | | private int rank;//排序值 |
| | | |
| | | |
| | | public PPTVSeriesProgramMap(String infoId, String seriesCode, String programCode, Integer rank) { |
| | | this.infoId = infoId; |
| | | this.seriesCode = seriesCode; |
| | | this.programCode = programCode; |
| | | if (rank == null) |
| | | this.rank = 0; |
| | | else |
| | | this.rank = rank; |
| | | this.id = infoId + "-" + programCode; |
| | | } |
| | | |
| | | |
| | | public String getInfoId() { |
| | | return infoId; |
| | | } |
| | | |
| | | public void setInfoId(String infoId) { |
| | | this.infoId = infoId; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getSeriesCode() { |
| | | return seriesCode; |
| | | } |
| | | |
| | | public void setSeriesCode(String seriesCode) { |
| | | this.seriesCode = seriesCode; |
| | | } |
| | | |
| | | public String getProgramCode() { |
| | | return programCode; |
| | | } |
| | | |
| | | public void setProgramCode(String programCode) { |
| | | this.programCode = programCode; |
| | | } |
| | | |
| | | |
| | | public int getRank() { |
| | | return rank; |
| | | } |
| | | |
| | | public void setRank(int rank) { |
| | | this.rank = rank; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.pptv.entity; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Document(collection = "videoPPTVMap") |
| | | public class VideoPPTVMap { |
| | | |
| | | @Id |
| | | private Long videoId; |
| | | private String infoId; |
| | | private Date createTime; |
| | | |
| | | public Long getVideoId() { |
| | | return videoId; |
| | | } |
| | | |
| | | public void setVideoId(Long videoId) { |
| | | this.videoId = videoId; |
| | | } |
| | | |
| | | public String getInfoId() { |
| | | return infoId; |
| | | } |
| | | |
| | | public void setInfoId(String infoId) { |
| | | this.infoId = infoId; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.AttentionDao; |
| | | import com.yeshi.buwan.dao.LoginUserDao; |
| | | import com.yeshi.buwan.dao.user.LoginUserDao; |
| | | import com.yeshi.buwan.domain.Attention; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.VideoDetailInfo; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.util.Constant; |
| | |
| | | if (map.get(at.getId()) != null) { |
| | | VideoResource vr = (VideoResource) map.get(at.getId()); |
| | | VideoDetailInfo detail = videoDetailUtil.getLatestVideoDetail(at.getVideoInfo().getId(), vr); |
| | | List<VideoDetailInfo> detailInfos = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailInfos = new ArrayList<>(); |
| | | detailInfos.add(detail); |
| | | at.getVideoInfo().setVideoDetailList(detailInfos); |
| | | } |
| | |
| | | |
| | | return (List<BanquanKeyAdmin>) videoBanQuanDao.excute(new HibernateCallback<List<BanquanKeyAdmin>>() { |
| | | public List<BanquanKeyAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<BanquanKeyAdmin> banquanList = new ArrayList<BanquanKeyAdmin>(); |
| | | List<BanquanKeyAdmin> banquanList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String where = ""; |
| | |
| | | .createQuery("select vb.detailSystem from VideoBanQuan vb where vb.name=?") |
| | | .setParameter(0, vb.getName()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | |
| | | return (List<BanquanVideoAdmin>) videoBanQuanDao.excute(new HibernateCallback<List<BanquanVideoAdmin>>() { |
| | | public List<BanquanVideoAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<BanquanVideoAdmin> banquanList = new ArrayList<BanquanVideoAdmin>(); |
| | | List<BanquanVideoAdmin> banquanList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String where = ""; |
| | |
| | | .createQuery("select vb.detailSystem from VideoBanQuanVideo vb where vb.info.id=?") |
| | | .setParameter(0, vb.getInfo().getId()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | |
| | | List<VideoInfo> videoList = classService.getVideoInfoData( |
| | | session.createSQLQuery(sql).setFirstResult((page - 1) * pageCount) |
| | | .setMaxResults(pageCount).list()); |
| | | .setMaxResults(pageCount).list(),resourceList); |
| | | if (videoList != null) |
| | | for (int i = 0; i < videoList.size(); i++) { |
| | | if (!isContainsResource(resourceList, videoList.get(i).getResourceList())) { |
| | |
| | | } |
| | | } |
| | | System.out.println("列表数量:" + videoList.size()); |
| | | List<VideoInfo> newVideoList = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> newVideoList = new ArrayList<>(); |
| | | if (videoList.size() > 0) |
| | | newVideoList.addAll(videoList); |
| | | return newVideoList; |
| | |
| | | }); |
| | | } |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | String sql = String.format( |
| | | "SELECT v.id,v.`name`,v.`tag`,v.`picture`,v.`hpicture`,v.`latest_hpicture`,v.watchcount,v.commentcount,temp.resources,v.`vpicture` FROM wk_video_video v LEFT JOIN wk_video_area_video_temp temp ON temp.`id`=v.`id` WHERE v.show=1 AND temp.`areas` LIKE '%s' AND temp.`typeid`=%s and v.id is not null %s", |
| | | "%" + areas + "%", type, orderby); |
| | | System.out.println(sql); |
| | | list = categoryContryDao.sqlList(sql, (page - 1) *pageCount, pageCount, null); |
| | | |
| | | List<VideoInfo> videoList = classService.getVideoInfoData(list); |
| | | List<VideoInfo> videoList = classService.getVideoInfoData(list,resourceList); |
| | | |
| | | if (videoList != null) |
| | | for (int i = 0; i < videoList.size(); i++) { |
| | |
| | | |
| | | System.out.println("列表数量:" + videoList.size()); |
| | | |
| | | List<VideoInfo> newVideoList = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> newVideoList = new ArrayList<>(); |
| | | if (videoList.size() > 0) |
| | | newVideoList.addAll(videoList); |
| | | return newVideoList; |
| | | } |
| | | |
| | | private boolean isContainsResource(List<Long> resourceList, List<VideoResource> relist) { |
| | | List<Long> targetList = new ArrayList<Long>(); |
| | | List<Long> targetList = new ArrayList<>(); |
| | | for (VideoResource vr : relist) |
| | | targetList.add(Long.parseLong(vr.getId())); |
| | | targetList.retainAll(resourceList); |
| | |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import com.yeshi.buwan.util.JuHe.VideoResourceUtil; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.SQLQuery; |
| | | import org.hibernate.Session; |
| | |
| | | import com.yeshi.buwan.domain.recommend.CategoryRecommendCacheVideo; |
| | | import com.yeshi.buwan.service.imp.recommend.CategoryRecommendVideoService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Service |
| | | public class CategoryRecommendCacheVideoService { |
| | | |
| | | @Autowired |
| | | private CategoryRecommendCacheVideoDao dao; |
| | | @Autowired |
| | | private CategoryRecommendCacheVideoDao dao; |
| | | |
| | | @Autowired |
| | | private CategoryRecommendVideoService categoryRecommendVideoService; |
| | | @Autowired |
| | | private CategoryRecommendVideoService categoryRecommendVideoService; |
| | | |
| | | public List<CategoryRecommendCacheVideo> getList(long videotype, String key, int page, int pageSize) { |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | List<CategoryRecommendCacheVideo> list = null; |
| | | @Resource |
| | | private VideoResourceUtil videoResourceUtil; |
| | | |
| | | int start = (page - 1) * pageSize; |
| | | public List<CategoryRecommendCacheVideo> getList(long videotype, String key, int page, int pageSize) { |
| | | |
| | | if (videotype <= 0) { // 全部 |
| | | String hql = ""; |
| | | if (key != null && !"".equals(key.trim())) { |
| | | hql = "from CategoryRecommendCacheVideo crcv where crcv.videoInfo.name like ? order by crcv.rank desc , crcv.orderby desc"; |
| | | list = dao.list(hql, start, pageSize, new Serializable[] { "%" + key + "%" }); |
| | | } else { |
| | | hql = "from CategoryRecommendCacheVideo crcv order by crcv.rank desc , crcv.orderby desc"; |
| | | list = dao.list(hql, start, pageSize, new Serializable[] {}); |
| | | } |
| | | } else { |
| | | if (key != null && !"".equals(key.trim())) { |
| | | // list = dao.sqlList("select * from wk_recommend_category_cache |
| | | // cc left join wk_video_video vv on vv.id=cc.videoid where |
| | | // cc.videotypeid = ? and vv.name like ? order by cc.rank = |
| | | // 0,cc.rank,cc.orderby desc", start, pageSize, params); |
| | | list = dao.list( |
| | | "from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? and crcv.videoInfo.name like ? order by crcv.rank desc , crcv.orderby desc", |
| | | start, pageSize, new Serializable[] { videotype, "%" + key + "%" }); |
| | | } else { |
| | | list = dao.list( |
| | | "from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? order by crcv.rank desc , crcv.orderby desc", |
| | | start, pageSize, new Serializable[] { videotype }); |
| | | } |
| | | } |
| | | List<CategoryRecommendCacheVideo> list = null; |
| | | |
| | | // if(list != null && list.size() > 0){ |
| | | // Collections.sort(list, new Comparator<CategoryRecommendCacheVideo>() |
| | | // { |
| | | // @Override |
| | | // public int compare(CategoryRecommendCacheVideo o1, |
| | | // CategoryRecommendCacheVideo o2) { |
| | | // int rank1= o1.getRank(); |
| | | // int rank2 = o2.getRank(); |
| | | // int b1 =o1.getOrderby(); |
| | | // int b2=o2.getOrderby(); |
| | | // if(rank2 == 0 && rank1 == 0){ |
| | | // return b2-b1; |
| | | // }else if(rank2 == 0 && rank1 !=0){ |
| | | // return -1; |
| | | // }else if(rank2 != 0 && rank1 == 0){ |
| | | // return 1; |
| | | // }else if(rank2 != 0 && rank1 != 0){ |
| | | // int i = rank1 - rank2; |
| | | // if(i==0){ |
| | | // return b2-b1; |
| | | // } |
| | | // return i; |
| | | // } |
| | | // return 0; |
| | | // } |
| | | // }); |
| | | // } |
| | | return list; |
| | | int start = (page - 1) * pageSize; |
| | | |
| | | } |
| | | if (videotype <= 0) { // 全部 |
| | | String hql = ""; |
| | | if (key != null && !"".equals(key.trim())) { |
| | | hql = "from CategoryRecommendCacheVideo crcv where crcv.videoInfo.name like ? order by crcv.rank desc , crcv.orderby desc"; |
| | | list = dao.list(hql, start, pageSize, new Serializable[]{"%" + key + "%"}); |
| | | } else { |
| | | hql = "from CategoryRecommendCacheVideo crcv order by crcv.rank desc , crcv.orderby desc"; |
| | | list = dao.list(hql, start, pageSize, new Serializable[]{}); |
| | | } |
| | | } else { |
| | | if (key != null && !"".equals(key.trim())) { |
| | | // list = dao.sqlList("select * from wk_recommend_category_cache |
| | | // cc left join wk_video_video vv on vv.id=cc.videoid where |
| | | // cc.videotypeid = ? and vv.name like ? order by cc.rank = |
| | | // 0,cc.rank,cc.orderby desc", start, pageSize, params); |
| | | list = dao.list( |
| | | "from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? and crcv.videoInfo.name like ? order by crcv.rank desc , crcv.orderby desc", |
| | | start, pageSize, new Serializable[]{videotype, "%" + key + "%"}); |
| | | } else { |
| | | list = dao.list( |
| | | "from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? order by crcv.rank desc , crcv.orderby desc", |
| | | start, pageSize, new Serializable[]{videotype}); |
| | | } |
| | | } |
| | | |
| | | public int getCount(long videotype, String key) { |
| | | if (videotype <= 0) { |
| | | if (key != null && !"".equals(key.trim())) { |
| | | return (int) dao.getCount( |
| | | "select count(*) from CategoryRecommendCacheVideo crcv where crcv.videoInfo.name like ? ", |
| | | new Serializable[] { "%" + key + "%" }); |
| | | } else { |
| | | return (int) dao.getCount("select count(*) from CategoryRecommendCacheVideo crcv", |
| | | new Serializable[] {}); |
| | | } |
| | | } else { |
| | | if (key != null && !"".equals(key.trim())) { |
| | | return (int) dao.getCount( |
| | | "select count(*) from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? and crcv.videoInfo.name like ? ", |
| | | new Serializable[] { videotype, "%" + key + "%" }); |
| | | } |
| | | return (int) dao.getCount( |
| | | "select count(*) from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? ", |
| | | new Serializable[] { videotype }); |
| | | } |
| | | // if(list != null && list.size() > 0){ |
| | | // Collections.sort(list, new Comparator<CategoryRecommendCacheVideo>() |
| | | // { |
| | | // @Override |
| | | // public int compare(CategoryRecommendCacheVideo o1, |
| | | // CategoryRecommendCacheVideo o2) { |
| | | // int rank1= o1.getRank(); |
| | | // int rank2 = o2.getRank(); |
| | | // int b1 =o1.getOrderby(); |
| | | // int b2=o2.getOrderby(); |
| | | // if(rank2 == 0 && rank1 == 0){ |
| | | // return b2-b1; |
| | | // }else if(rank2 == 0 && rank1 !=0){ |
| | | // return -1; |
| | | // }else if(rank2 != 0 && rank1 == 0){ |
| | | // return 1; |
| | | // }else if(rank2 != 0 && rank1 != 0){ |
| | | // int i = rank1 - rank2; |
| | | // if(i==0){ |
| | | // return b2-b1; |
| | | // } |
| | | // return i; |
| | | // } |
| | | // return 0; |
| | | // } |
| | | // }); |
| | | // } |
| | | return list; |
| | | |
| | | } |
| | | } |
| | | |
| | | public CategoryRecommendCacheVideo getTop(long id) { |
| | | return dao.find(CategoryRecommendCacheVideo.class, id + ""); |
| | | } |
| | | public int getCount(long videotype, String key) { |
| | | if (videotype <= 0) { |
| | | if (key != null && !"".equals(key.trim())) { |
| | | return (int) dao.getCount( |
| | | "select count(*) from CategoryRecommendCacheVideo crcv where crcv.videoInfo.name like ? ", |
| | | new Serializable[]{"%" + key + "%"}); |
| | | } else { |
| | | return (int) dao.getCount("select count(*) from CategoryRecommendCacheVideo crcv", |
| | | new Serializable[]{}); |
| | | } |
| | | } else { |
| | | if (key != null && !"".equals(key.trim())) { |
| | | return (int) dao.getCount( |
| | | "select count(*) from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? and crcv.videoInfo.name like ? ", |
| | | new Serializable[]{videotype, "%" + key + "%"}); |
| | | } |
| | | return (int) dao.getCount( |
| | | "select count(*) from CategoryRecommendCacheVideo crcv where crcv.videoType.id = ? ", |
| | | new Serializable[]{videotype}); |
| | | } |
| | | |
| | | @Transactional |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void update(CategoryRecommendCacheVideo crcv) { |
| | | dao.update(crcv); |
| | | } |
| | | } |
| | | |
| | | @Transactional |
| | | public void save(CategoryRecommendCacheVideo crcv) { |
| | | dao.save(crcv); |
| | | } |
| | | public CategoryRecommendCacheVideo getTop(long id) { |
| | | return dao.find(CategoryRecommendCacheVideo.class, id + ""); |
| | | } |
| | | |
| | | @Transactional |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void delete(long id) { |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setId(id + ""); |
| | | dao.delete(crcv); |
| | | } |
| | | @Transactional |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void update(CategoryRecommendCacheVideo crcv) { |
| | | dao.update(crcv); |
| | | } |
| | | |
| | | public CategoryRecommendCacheVideo getTop(long vid, long tid) { |
| | | List<CategoryRecommendCacheVideo> list = dao.list( |
| | | "from CategoryRecommendCacheVideo crcv where crcv.videoInfo.id = ? and crcv.videoType.id = ?", |
| | | new Serializable[] { vid + "", tid }); |
| | | if (list.size() > 0) { |
| | | return list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | @Transactional |
| | | public void save(CategoryRecommendCacheVideo crcv) { |
| | | dao.save(crcv); |
| | | } |
| | | |
| | | // public List<CategoryRecommendCacheVideo> getVideoListByRank(final int |
| | | // type) { |
| | | // |
| | | // return (List<CategoryRecommendCacheVideo>) dao.excute(new |
| | | // HibernateCallback<List<VideoInfo>>() { |
| | | // @Override |
| | | // public List<VideoInfo> doInHibernate(Session session) |
| | | // throws HibernateException { |
| | | // SQLQuery query = session.createSQLQuery("SELECT cc.* FROM |
| | | // wk_recommend_category_cache cc LEFT JOIN wk_video_video vv ON cc.videoid |
| | | // = vv.id LEFT JOIN wk_resource_video rv ON rv.videoid=vv.id WHERE |
| | | // rv.resourceid <> 16 AND vv.id IS NOT NULL AND vv.show = 1 AND |
| | | // cc.videotypeid=? AND cc.videoid = vv.id AND cc.rank > 0 GROUP BY cc.id |
| | | // ORDER BY cc.orderby desc"); |
| | | // query.addEntity(CategoryRecommendCacheVideo.class); |
| | | // query.setParameter(0, type); |
| | | // return query.list(); |
| | | // } |
| | | // }); |
| | | // } |
| | | @Transactional |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void delete(long id) { |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setId(id + ""); |
| | | dao.delete(crcv); |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Cacheable(value = "topCache", key = "'getVideoListByRank'+'-'+#videotype+'-'+#detailSystem") |
| | | public List<VideoInfo> getVideoListByRank(final int videotype, final String detailSystem) { |
| | | final int count = categoryRecommendVideoService.getRankVideoNumber(videotype); |
| | | return (List<VideoInfo>) dao.excute(new HibernateCallback<List<VideoInfo>>() { |
| | | @Override |
| | | public List<VideoInfo> doInHibernate(Session session) throws HibernateException { |
| | | SQLQuery query = session.createSQLQuery("SELECT cc.rank," |
| | | + "vv.id,vv.picture,vv.name,vv.vpicture,vv.hpicture,vv.latest_vpicture,vv.latest_hpicture,vv.watchcount,vv.commentcount,cc.orderby,vv.tag " |
| | | + "FROM wk_recommend_category_cache cc LEFT JOIN wk_video_video vv ON cc.videoid = vv.id LEFT JOIN wk_resource_video rv ON rv.videoid=vv.id LEFT JOIN wk_video_banquan_video bv on cc.videoid = bv.videoid WHERE bv.id is null and (bv.detailsystemid=? OR bv.detailsystemid IS null ) and rv.resourceid <> 16 AND vv.id IS NOT NULL AND vv.show = 1 AND cc.videotypeid=? AND cc.videoid = vv.id AND cc.rank <= ? AND cc.rank >= 0 GROUP BY cc.id ORDER BY cc.rank !=0 DESC ,cc.rank desc,cc.orderby desc"); |
| | | query.setParameter(0, detailSystem); |
| | | query.setParameter(1, videotype); |
| | | query.setParameter(2, count); |
| | | query.setFirstResult(0); |
| | | query.setMaxResults(count); |
| | | List<Object[]> qdata = query.list(); |
| | | List<VideoInfoRank> rks = new ArrayList<VideoInfoRank>(); |
| | | List<VideoInfo> vs = new ArrayList<VideoInfo>(); |
| | | VideoInfoRank vr; |
| | | for (Object[] objs : qdata) { |
| | | vr = new VideoInfoRank(); |
| | | vr.setRank(Integer.parseInt(objs[0] + "")); |
| | | vr.setId(objs[1] + ""); |
| | | vr.setPicture(objs[2] + ""); |
| | | vr.setName(objs[3] + ""); |
| | | vr.setVpicture(objs[4] + ""); |
| | | vr.setHpicture(objs[5] + ""); |
| | | vr.setLatestVpicture(objs[6] + ""); |
| | | vr.setLatestHpicture(objs[7] + ""); |
| | | vr.setWatchCount(objs[8] + ""); |
| | | vr.setCommentCount(Integer.parseInt(objs[9] + "")); |
| | | vr.setOrderBy(Integer.parseInt(objs[10] + "")); |
| | | vr.setTag(objs[11] + ""); |
| | | if (vr.getRank() > 0) { |
| | | rks.add(vr); |
| | | } else |
| | | vs.add(vr); |
| | | } |
| | | public CategoryRecommendCacheVideo getTop(long vid, long tid) { |
| | | List<CategoryRecommendCacheVideo> list = dao.list( |
| | | "from CategoryRecommendCacheVideo crcv where crcv.videoInfo.id = ? and crcv.videoType.id = ?", |
| | | new Serializable[]{vid + "", tid}); |
| | | if (list.size() > 0) { |
| | | return list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | Comparator<VideoInfoRank> c = new Comparator<VideoInfoRank>() { |
| | | |
| | | @Override |
| | | public int compare(VideoInfoRank arg0, VideoInfoRank arg1) { |
| | | return arg0.getRank() - arg1.getRank(); |
| | | } |
| | | }; |
| | | @SuppressWarnings("unchecked") |
| | | @Cacheable(value = "topCache", key = "'getVideoListByRank'+'-'+#videotype+'-'+#detailSystem+'-'+#platform+'-'+#version") |
| | | public List<VideoInfo> getVideoListByRank(final int videotype, final String detailSystem, String platform, Integer version) { |
| | | |
| | | Collections.sort(rks, c); |
| | | List<Long> resourceList = videoResourceUtil.getAvailableResourceIds(platform, version); |
| | | |
| | | // 找出rank=0的视频 |
| | | final int count = categoryRecommendVideoService.getRankVideoNumber(videotype); |
| | | List<VideoInfo> videoInfoList = (List<VideoInfo>) dao.excute(new HibernateCallback<List<VideoInfo>>() { |
| | | @Override |
| | | public List<VideoInfo> doInHibernate(Session session) throws HibernateException { |
| | | SQLQuery query = session.createSQLQuery("SELECT cc.rank," |
| | | + "vv.id,vv.picture,vv.name,vv.vpicture,vv.hpicture,vv.latest_vpicture,vv.latest_hpicture,vv.watchcount,vv.commentcount,cc.orderby,vv.tag " |
| | | + "FROM wk_recommend_category_cache cc LEFT JOIN wk_video_video vv ON cc.videoid = vv.id LEFT JOIN wk_resource_video rv ON rv.videoid=vv.id LEFT JOIN wk_video_banquan_video bv on cc.videoid = bv.videoid WHERE bv.id is null and (bv.detailsystemid=? OR bv.detailsystemid IS null ) and rv.resourceid <> 16 AND vv.id IS NOT NULL AND vv.show = 1 AND cc.videotypeid=? AND cc.videoid = vv.id AND cc.rank <= ? AND cc.rank >= 0 GROUP BY cc.id ORDER BY cc.rank !=0 DESC ,cc.rank desc,cc.orderby desc"); |
| | | query.setParameter(0, detailSystem); |
| | | query.setParameter(1, videotype); |
| | | query.setParameter(2, count); |
| | | query.setFirstResult(0); |
| | | query.setMaxResults(count); |
| | | List<Object[]> qdata = query.list(); |
| | | List<VideoInfoRank> rks = new ArrayList<>(); |
| | | List<VideoInfo> vs = new ArrayList<>(); |
| | | VideoInfoRank vr; |
| | | for (Object[] objs : qdata) { |
| | | vr = new VideoInfoRank(); |
| | | vr.setRank(Integer.parseInt(objs[0] + "")); |
| | | vr.setId(objs[1] + ""); |
| | | vr.setPicture(objs[2] + ""); |
| | | vr.setName(objs[3] + ""); |
| | | vr.setVpicture(objs[4] + ""); |
| | | vr.setHpicture(objs[5] + ""); |
| | | vr.setLatestVpicture(objs[6] + ""); |
| | | vr.setLatestHpicture(objs[7] + ""); |
| | | vr.setWatchCount(objs[8] + ""); |
| | | vr.setCommentCount(Integer.parseInt(objs[9] + "")); |
| | | vr.setOrderBy(Integer.parseInt(objs[10] + "")); |
| | | vr.setTag(objs[11] + ""); |
| | | if (vr.getRank() > 0) { |
| | | rks.add(vr); |
| | | } else |
| | | vs.add(vr); |
| | | } |
| | | |
| | | for (int i = 1; i <= count; i++) { |
| | | boolean exist = false; |
| | | for (VideoInfoRank vir : rks) |
| | | if (vir.getRank() == i) { |
| | | exist = true; |
| | | break; |
| | | } |
| | | // 需要加入rks |
| | | if (!exist) { |
| | | if (vs.size() > 0) { |
| | | VideoInfoRank rr = (VideoInfoRank) vs.get(0); |
| | | rr.setRank(i); |
| | | rks.add(rr); |
| | | vs.remove(0); |
| | | } |
| | | } |
| | | } |
| | | Comparator<VideoInfoRank> c = new Comparator<VideoInfoRank>() { |
| | | |
| | | vs.clear(); |
| | | @Override |
| | | public int compare(VideoInfoRank arg0, VideoInfoRank arg1) { |
| | | return arg0.getRank() - arg1.getRank(); |
| | | } |
| | | }; |
| | | |
| | | Collections.sort(rks, c); |
| | | Collections.sort(rks, c); |
| | | |
| | | for (VideoInfoRank videoInfoRank : rks) |
| | | vs.add(videoInfoRank); |
| | | // 找出rank=0的视频 |
| | | |
| | | // for (VideoInfoRank videoInfoRank : rks) { |
| | | // int rank = videoInfoRank.getRank(); |
| | | // if (rank <= vs.size()) { |
| | | // vs.remove((VideoInfo) videoInfoRank); |
| | | // vs.add(rank - 1, videoInfoRank); |
| | | // } |
| | | // } |
| | | for (int i = 1; i <= count; i++) { |
| | | boolean exist = false; |
| | | for (VideoInfoRank vir : rks) |
| | | if (vir.getRank() == i) { |
| | | exist = true; |
| | | break; |
| | | } |
| | | // 需要加入rks |
| | | if (!exist) { |
| | | if (vs.size() > 0) { |
| | | VideoInfoRank rr = (VideoInfoRank) vs.get(0); |
| | | rr.setRank(i); |
| | | rks.add(rr); |
| | | vs.remove(0); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // SQLQuery query2 = session.createSQLQuery("SELECT cc.* FROM |
| | | // wk_recommend_category_cache cc LEFT JOIN wk_video_video vv ON |
| | | // cc.videoid = vv.id LEFT JOIN wk_resource_video rv ON |
| | | // rv.videoid=vv.id WHERE rv.resourceid <> 16 AND vv.id IS NOT |
| | | // NULL AND vv.show = 1 AND cc.videotypeid=? AND cc.videoid = |
| | | // vv.id AND cc.rank > 0 GROUP BY cc.id ORDER BY cc.orderby |
| | | // desc"); |
| | | // query2.addEntity(CategoryRecommendCacheVideo.class); |
| | | // query2.setParameter(0, videotype); |
| | | // query2.setFirstResult(0); |
| | | // query2.setMaxResults(count); |
| | | // List<CategoryRecommendCacheVideo> cs = query2.list(); |
| | | // for (CategoryRecommendCacheVideo crcv : cs) { |
| | | // int rank = crcv.getRank(); |
| | | // if(vs.size() > 0 && rank > 0 && rank <= vs.size() ){ |
| | | // vs.remove(crcv.getVideoInfo()); |
| | | // vs.add(rank-1, crcv.getVideoInfo()); |
| | | // } |
| | | // } |
| | | // vs = vs.subList(0, vs.size()>count?count:vs.size()); |
| | | return vs; |
| | | } |
| | | }); |
| | | } |
| | | vs.clear(); |
| | | |
| | | public CategoryRecommendCacheVideo getByVid(String vid) { |
| | | List<CategoryRecommendCacheVideo> list = dao |
| | | .list("from CategoryRecommendCacheVideo crcv where crcv.videoInfo.id = ? ", new Serializable[] { vid }); |
| | | if (list.size() > 0) { |
| | | return list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | Collections.sort(rks, c); |
| | | |
| | | for (VideoInfoRank videoInfoRank : rks) |
| | | vs.add(videoInfoRank); |
| | | return vs; |
| | | } |
| | | }); |
| | | |
| | | return videoResourceMapExtraInfoService.batchExtraInfo(videoInfoList, resourceList); |
| | | } |
| | | |
| | | public CategoryRecommendCacheVideo getByVid(String vid) { |
| | | List<CategoryRecommendCacheVideo> list = dao |
| | | .list("from CategoryRecommendCacheVideo crcv where crcv.videoInfo.id = ? ", new Serializable[]{vid}); |
| | | if (list.size() > 0) { |
| | | return list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import org.hibernate.CacheMode; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | |
| | | |
| | | @Service |
| | | public class ClassService { |
| | | @Resource |
| | | private VideoTypeDao videoTypeDao; |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | @Resource |
| | | private SuperVideoTypeDao superVideoTypeDao; |
| | | @Resource |
| | | private VideoTypeDao videoTypeDao; |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | @Resource |
| | | private SuperVideoTypeDao superVideoTypeDao; |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | public List<VideoType> getTypeList() { |
| | | List<VideoType> list = videoTypeDao.list("from VideoType v where v.show='1' and v.parent=null"); |
| | | return list; |
| | | } |
| | | public List<VideoType> getTypeList() { |
| | | List<VideoType> list = videoTypeDao.list("from VideoType v where v.show='1' and v.parent=null"); |
| | | return list; |
| | | } |
| | | |
| | | public VideoType getTypeById(String id) { |
| | | public VideoType getTypeById(String id) { |
| | | |
| | | return videoTypeDao.find(VideoType.class, id); |
| | | } |
| | | return videoTypeDao.find(VideoType.class, id); |
| | | } |
| | | |
| | | public VideoType getTypeById(long id) { |
| | | public VideoType getTypeById(long id) { |
| | | |
| | | return videoTypeDao.find(VideoType.class, id); |
| | | } |
| | | return videoTypeDao.find(VideoType.class, id); |
| | | } |
| | | |
| | | @Cacheable(value = "classCache", key = "'getFirstTypeList'+'-'+#parentId") |
| | | public List<VideoType> getFirstTypeList(String parentId) { |
| | | if (StringUtil.isNullOrEmpty(parentId) || parentId.equalsIgnoreCase("0")) |
| | | return getTypeList(); |
| | | @Cacheable(value = "classCache", key = "'getFirstTypeList'+'-'+#parentId") |
| | | public List<VideoType> getFirstTypeList(String parentId) { |
| | | if (StringUtil.isNullOrEmpty(parentId) || parentId.equalsIgnoreCase("0")) |
| | | return getTypeList(); |
| | | |
| | | List<VideoType> list = videoTypeDao |
| | | .list("from VideoType v where v.show='1' and v.parent.id=" + parentId + " order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | List<VideoType> list = videoTypeDao |
| | | .list("from VideoType v where v.show='1' and v.parent.id=" + parentId + " order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | |
| | | public List<VideoType> getAllTypeList() { |
| | | public List<VideoType> getAllTypeList() { |
| | | |
| | | List<VideoType> list = videoTypeDao.list("from VideoType v order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | List<VideoType> list = videoTypeDao.list("from VideoType v order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | |
| | | public List<VideoType> getNextTypeList(String pid) { |
| | | public List<VideoType> getNextTypeList(String pid) { |
| | | |
| | | if (StringUtil.isNullOrEmpty(pid)) { |
| | | List<VideoType> list = videoTypeDao |
| | | .list("from VideoType v where v.show='1' and v.parent=null order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | if (Integer.parseInt(pid) > 0) { |
| | | List<VideoType> list = videoTypeDao.list( |
| | | (new StringBuilder("from VideoType v where v.show='1' and v.parent.id=")).append(pid).toString() |
| | | + " order by v.orderby desc"); |
| | | return list; |
| | | } else { |
| | | List<VideoType> list = videoTypeDao |
| | | .list("from VideoType v where v.show='1' and v.parent=null order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | } |
| | | if (StringUtil.isNullOrEmpty(pid)) { |
| | | List<VideoType> list = videoTypeDao |
| | | .list("from VideoType v where v.show='1' and v.parent=null order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | if (Integer.parseInt(pid) > 0) { |
| | | List<VideoType> list = videoTypeDao.list( |
| | | (new StringBuilder("from VideoType v where v.show='1' and v.parent.id=")).append(pid).toString() |
| | | + " order by v.orderby desc"); |
| | | return list; |
| | | } else { |
| | | List<VideoType> list = videoTypeDao |
| | | .list("from VideoType v where v.show='1' and v.parent=null order by v.orderby desc"); |
| | | return list; |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteVideoType(final String id) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | List<SuperVideoType> list = session.createQuery("from SuperVideoType sv where sv.type.id=?") |
| | | .setParameter(0, Long.parseLong(id)).list(); |
| | | for (SuperVideoType sv : list) |
| | | session.delete(sv); |
| | | session.delete(new VideoType(Long.parseLong(id))); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteVideoType(final String id) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | List<SuperVideoType> list = session.createQuery("from SuperVideoType sv where sv.type.id=?") |
| | | .setParameter(0, Long.parseLong(id)).list(); |
| | | for (SuperVideoType sv : list) |
| | | session.delete(sv); |
| | | session.delete(new VideoType(Long.parseLong(id))); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | public VideoType getType(long id) { |
| | | public VideoType getType(long id) { |
| | | |
| | | return videoTypeDao.find(VideoType.class, Long.valueOf(id)); |
| | | } |
| | | return videoTypeDao.find(VideoType.class, Long.valueOf(id)); |
| | | } |
| | | |
| | | public void createType(VideoType type) { |
| | | public void createType(VideoType type) { |
| | | |
| | | videoTypeDao.create(type); |
| | | } |
| | | videoTypeDao.create(type); |
| | | } |
| | | |
| | | public void updateType(VideoType type) { |
| | | public void updateType(VideoType type) { |
| | | |
| | | videoTypeDao.update(type); |
| | | } |
| | | videoTypeDao.update(type); |
| | | } |
| | | |
| | | public long getTypeVideoCount(String type) { |
| | | String wheres = ""; |
| | | String sts[] = getChildrenType(Integer.parseInt(type)); |
| | | String as[]; |
| | | int j = (as = sts).length; |
| | | for (int i = 0; i < j; i++) { |
| | | String st = as[i]; |
| | | wheres = (new StringBuilder(String.valueOf(wheres))).append("or h.videoType.id=").append(Long.parseLong(st)) |
| | | .append(" ").toString(); |
| | | } |
| | | public long getTypeVideoCount(String type) { |
| | | String wheres = ""; |
| | | String sts[] = getChildrenType(Integer.parseInt(type)); |
| | | String as[]; |
| | | int j = (as = sts).length; |
| | | for (int i = 0; i < j; i++) { |
| | | String st = as[i]; |
| | | wheres = (new StringBuilder(String.valueOf(wheres))).append("or h.videoType.id=").append(Long.parseLong(st)) |
| | | .append(" ").toString(); |
| | | } |
| | | |
| | | if (wheres.startsWith("or")) |
| | | wheres = wheres.substring(2, wheres.length()); |
| | | long count = videoInfoDao |
| | | .getCount("select count(*) from CategoryVideo as h where h.video.show='1' and (h.videoType.id=" + type |
| | | + " or h.videoType.parent.id=" + type + ")"); |
| | | return count; |
| | | } |
| | | if (wheres.startsWith("or")) |
| | | wheres = wheres.substring(2, wheres.length()); |
| | | long count = videoInfoDao |
| | | .getCount("select count(*) from CategoryVideo as h where h.video.show='1' and (h.videoType.id=" + type |
| | | + " or h.videoType.parent.id=" + type + ")"); |
| | | return count; |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public String[] getChildrenType(final int type) { |
| | | return (String[]) videoTypeDao.excute(new HibernateCallback<String[]>() { |
| | | public String[] doInHibernate(Session session) throws HibernateException { |
| | | String sts[] = new String[] {}; |
| | | try { |
| | | List<String> list = session.createSQLQuery( |
| | | (new StringBuilder("select queryChildrenType(")).append(type).append(")").toString()) |
| | | .list(); |
| | | sts = list.get(0).toString().substring(2, list.get(0).toString().length()).split(","); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | @SuppressWarnings("unchecked") |
| | | public String[] getChildrenType(final int type) { |
| | | return (String[]) videoTypeDao.excute(new HibernateCallback<String[]>() { |
| | | public String[] doInHibernate(Session session) throws HibernateException { |
| | | String sts[] = new String[]{}; |
| | | try { |
| | | List<String> list = session.createSQLQuery( |
| | | (new StringBuilder("select queryChildrenType(")).append(type).append(")").toString()) |
| | | .list(); |
| | | sts = list.get(0).toString().substring(2, list.get(0).toString().length()).split(","); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return sts; |
| | | } |
| | | }); |
| | | return sts; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param type |
| | | * @param page |
| | | * @param order |
| | | * 1-最近更新 2-最热 4-评论最多 |
| | | * @return |
| | | */ |
| | | public List<VideoInfo> getTypeVideoList(String type, int page, int order) { |
| | | String orderby = ""; |
| | | if (order == 1) { |
| | | orderby = " order by FROM_UNIXTIME(h.updatetime/1000) desc"; |
| | | } else if (order == 2) { |
| | | orderby = " order by h.latestWatchCount desc"; |
| | | } else if (order == 3) { |
| | | orderby = " order by h.commentCount desc"; |
| | | } |
| | | String wheres = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) |
| | | return videoInfoDao.list("from VideoInfo as h where h.videoType.parent=null and h.show='1' ?", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[] { orderby }); |
| | | String sts[] = getChildrenType(Integer.parseInt(type)); |
| | | String as[]; |
| | | int j = (as = sts).length; |
| | | for (int i = 0; i < j; i++) { |
| | | String st = as[i]; |
| | | wheres = (new StringBuilder(String.valueOf(wheres))).append("or h.videoType.id=").append(Long.parseLong(st)) |
| | | .append(" ").toString(); |
| | | } |
| | | /** |
| | | * @param type |
| | | * @param page |
| | | * @param order 1-最近更新 2-最热 4-评论最多 |
| | | * @return |
| | | */ |
| | | public List<VideoInfo> getTypeVideoList(String type, int page, int order) { |
| | | String orderby = ""; |
| | | if (order == 1) { |
| | | orderby = " order by FROM_UNIXTIME(h.updatetime/1000) desc"; |
| | | } else if (order == 2) { |
| | | orderby = " order by h.latestWatchCount desc"; |
| | | } else if (order == 3) { |
| | | orderby = " order by h.commentCount desc"; |
| | | } |
| | | String wheres = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) |
| | | return videoInfoDao.list("from VideoInfo as h where h.videoType.parent=null and h.show='1' ?", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[]{orderby}); |
| | | String sts[] = getChildrenType(Integer.parseInt(type)); |
| | | String as[]; |
| | | int j = (as = sts).length; |
| | | for (int i = 0; i < j; i++) { |
| | | String st = as[i]; |
| | | wheres = (new StringBuilder(String.valueOf(wheres))).append("or h.videoType.id=").append(Long.parseLong(st)) |
| | | .append(" ").toString(); |
| | | } |
| | | |
| | | if (wheres.startsWith("or")) |
| | | wheres = wheres.substring(2, wheres.length()); |
| | | List<VideoInfo> list = videoInfoDao.list("from VideoInfo as h where h.show='1' and (" + wheres + ") " + orderby, |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[] {}); |
| | | return list; |
| | | } |
| | | if (wheres.startsWith("or")) |
| | | wheres = wheres.substring(2, wheres.length()); |
| | | List<VideoInfo> list = videoInfoDao.list("from VideoInfo as h where h.show='1' and (" + wheres + ") " + orderby, |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[]{}); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param type |
| | | * @param ds |
| | | * @param page |
| | | * @param order |
| | | * @param resourceList |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @Cacheable(value = "longTimeCache", key = "'getTypeVideoList'+'-'+#type+'-'+#ds.id+'-'+#page+'-'+#pageCount+'-'+#order+'-'+#cachemd5") |
| | | public List<VideoInfo> getTypeVideoList(String type, DetailSystem ds, final int page, final int pageCount, |
| | | int order, List<Long> resourceList, String cachemd5) { |
| | | String resourceWhere = ""; |
| | | for (Long re : resourceList) { |
| | | resourceWhere += " rv.resourceid=" + re + " or"; |
| | | } |
| | | /** |
| | | * @param type |
| | | * @param ds |
| | | * @param page |
| | | * @param order |
| | | * @param resourceList |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @Cacheable(value = "longTimeCache", key = "'getTypeVideoList'+'-'+#type+'-'+#ds.id+'-'+#page+'-'+#pageCount+'-'+#order+'-'+#cachemd5") |
| | | public List<VideoInfo> getTypeVideoList(String type, DetailSystem ds, final int page, final int pageCount, |
| | | int order, List<Long> resourceList, String cachemd5) { |
| | | String resourceWhere = ""; |
| | | for (Long re : resourceList) { |
| | | resourceWhere += " rv.resourceid=" + re + " or"; |
| | | } |
| | | |
| | | if (resourceWhere.endsWith("or")) |
| | | resourceWhere = resourceWhere.substring(0, resourceWhere.length() - 2); |
| | | if (resourceWhere.endsWith("or")) |
| | | resourceWhere = resourceWhere.substring(0, resourceWhere.length() - 2); |
| | | |
| | | String orderby = ""; |
| | | if (order == 1) { |
| | | orderby = " order by FROM_UNIXTIME(v.updatetime/1000) desc"; |
| | | } else if (order == 2) { |
| | | orderby = " order by v.watchcount desc"; |
| | | } else if (order == 3) { |
| | | orderby = " order by v.commentcount desc"; |
| | | } |
| | | String orderby = ""; |
| | | if (order == 1) { |
| | | orderby = " order by FROM_UNIXTIME(v.updatetime/1000) desc"; |
| | | } else if (order == 2) { |
| | | orderby = " order by v.watchcount desc"; |
| | | } else if (order == 3) { |
| | | orderby = " order by v.commentcount desc"; |
| | | } |
| | | |
| | | String wheres = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) { |
| | | return getVideoInfoData(videoInfoDao.sqlList( |
| | | "select v.id,v.`name`,v.`tag`,v.`picture`,v.`hpicture`,v.`latest_hpicture`,v.watchcount,v.commentcount from wk_video_video v INNER JOIN (SELECT DISTINCT(v.id) FROM wk_category_video ca LEFT JOIN wk_video_video v ON v.id= ca.videoid LEFT JOIN wk_resource_video rv ON rv.`videoid`= v.`id` AND( ? ) WHERE v.show= 1 and ca.id is not null AND rv.`resourceid` IS NOT NULL ? ) a using(id)", |
| | | (page - 1) * pageCount, pageCount, new Serializable[] { resourceWhere, orderby, })); |
| | | } |
| | | String wheres = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) { |
| | | return getVideoInfoData(videoInfoDao.sqlList( |
| | | "select v.id,v.`name`,v.`tag`,v.`picture`,v.`hpicture`,v.`latest_hpicture`,v.watchcount,v.commentcount from wk_video_video v INNER JOIN (SELECT DISTINCT(v.id) FROM wk_category_video ca LEFT JOIN wk_video_video v ON v.id= ca.videoid LEFT JOIN wk_resource_video rv ON rv.`videoid`= v.`id` AND( ? ) WHERE v.show= 1 and ca.id is not null AND rv.`resourceid` IS NOT NULL ? ) a using(id)", |
| | | (page - 1) * pageCount, pageCount, new Serializable[]{resourceWhere, orderby,}),resourceList); |
| | | } |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | |
| | | long startTime = System.currentTimeMillis(); |
| | | long startTime = System.currentTimeMillis(); |
| | | |
| | | final String typeNew = type; |
| | | final String resourceWhereNew = resourceWhere; |
| | | final String orderbyNew = orderby; |
| | | list = (List<VideoInfo>) videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | try { |
| | | session.setCacheMode(CacheMode.GET); |
| | | String sql = String.format( |
| | | "select v.id,v.`name`,v.`tag`,v.`picture`,v.`hpicture`,v.`latest_hpicture`,v.watchcount,v.commentcount from wk_video_video v INNER JOIN (SELECT DISTINCT(v.id) FROM wk_video_video v LEFT JOIN wk_category_video ca ON v.id=ca.videoid LEFT JOIN wk_video_type t ON t.`id`=ca.`videotypeid` AND (t.`id`=%s OR t.`pid`=%s) LEFT JOIN wk_resource_video rv ON rv.`videoid`=v.`id` AND (%s) WHERE v.show=1 AND ca.id>0 AND t.`id`>0 AND rv.`resourceid`>0 %s) a using(id)", |
| | | typeNew, typeNew, resourceWhereNew, orderbyNew); |
| | | System.out.println(sql); |
| | | final String typeNew = type; |
| | | final String resourceWhereNew = resourceWhere; |
| | | final String orderbyNew = orderby; |
| | | list = (List<VideoInfo>) videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | try { |
| | | session.setCacheMode(CacheMode.GET); |
| | | String sql = String.format( |
| | | "select v.id,v.`name`,v.`tag`,v.`picture`,v.`hpicture`,v.`latest_hpicture`,v.watchcount,v.commentcount from wk_video_video v INNER JOIN (SELECT DISTINCT(v.id) FROM wk_video_video v LEFT JOIN wk_category_video ca ON v.id=ca.videoid LEFT JOIN wk_video_type t ON t.`id`=ca.`videotypeid` AND (t.`id`=%s OR t.`pid`=%s) LEFT JOIN wk_resource_video rv ON rv.`videoid`=v.`id` AND (%s) WHERE v.show=1 AND ca.id>0 AND t.`id`>0 AND rv.`resourceid`>0 %s) a using(id)", |
| | | typeNew, typeNew, resourceWhereNew, orderbyNew); |
| | | System.out.println(sql); |
| | | |
| | | list = session.createSQLQuery(sql).setFirstResult((page - 1) * pageCount).setCacheable(true) |
| | | .setMaxResults(pageCount).list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | list = session.createSQLQuery(sql).setFirstResult((page - 1) * pageCount).setCacheable(true) |
| | | .setMaxResults(pageCount).list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | |
| | | System.out.println("查询SQL费时:" + (System.currentTimeMillis() - startTime)); |
| | | return getVideoInfoData(list); |
| | | } |
| | | System.out.println("查询SQL费时:" + (System.currentTimeMillis() - startTime)); |
| | | return getVideoInfoData(list,resourceList); |
| | | } |
| | | |
| | | public List<VideoInfo> getVideoInfoData(List list) { |
| | | List<VideoInfo> dataList = new ArrayList<VideoInfo>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] obj = (Object[]) list.get(i); |
| | | VideoInfo info = new VideoInfo(); |
| | | info.setId(obj[0] + ""); |
| | | info.setName(obj[1] + ""); |
| | | info.setTag(obj[2] + ""); |
| | | info.setPicture(obj[3] + ""); |
| | | info.setHpicture(obj[4] + ""); |
| | | info.setLatestHpicture(obj[5] + ""); |
| | | info.setWatchCount(obj[6] + ""); |
| | | info.setCommentCount(Integer.parseInt(obj[7] + "")); |
| | | if (obj.length > 8) { |
| | | String[] resourceIds = (obj[8] + "").split(","); |
| | | List<VideoResource> resourceList = new ArrayList<VideoResource>(); |
| | | for (String rid : resourceIds) |
| | | resourceList.add(new VideoResource(rid)); |
| | | info.setResourceList(resourceList); |
| | | } |
| | | if(obj.length > 9){ |
| | | info.setVpicture(obj[9]+""); |
| | | } |
| | | dataList.add(info); |
| | | } |
| | | return dataList; |
| | | } |
| | | public List<VideoInfo> getVideoInfoData(List list, List<Long> resourceIdList) { |
| | | List<VideoInfo> dataList = new ArrayList<VideoInfo>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] obj = (Object[]) list.get(i); |
| | | VideoInfo info = new VideoInfo(); |
| | | info.setId(obj[0] + ""); |
| | | info.setName(obj[1] + ""); |
| | | info.setTag(obj[2] + ""); |
| | | info.setPicture(obj[3] + ""); |
| | | info.setHpicture(obj[4] + ""); |
| | | info.setLatestHpicture(obj[5] + ""); |
| | | info.setWatchCount(obj[6] + ""); |
| | | info.setCommentCount(Integer.parseInt(obj[7] + "")); |
| | | if (obj.length > 8) { |
| | | String[] resourceIds = (obj[8] + "").split(","); |
| | | List<VideoResource> resourceList = new ArrayList<VideoResource>(); |
| | | for (String rid : resourceIds) |
| | | resourceList.add(new VideoResource(rid)); |
| | | info.setResourceList(resourceList); |
| | | } |
| | | if (obj.length > 9) { |
| | | info.setVpicture(obj[9] + ""); |
| | | } |
| | | dataList.add(info); |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<VideoInfo> getTypeVideoList(String type, String startYear, String endYear, DetailSystem ds, |
| | | final int page, int order) { |
| | | String orderby = ""; |
| | | if (order == 1) { |
| | | orderby = " order by v.watchcount desc, v.updatetime desc"; |
| | | } else if (order == 2) { |
| | | // orderby = " order by v.updatetime desc,v.watchcount desc"; |
| | | // 豆豆系 |
| | | // if (ds.getPackageName().contains("doudou")) |
| | | orderby = " order by FROM_UNIXTIME(v.createtime/1000) desc"; |
| | | dataList = videoResourceMapExtraInfoService.batchExtraInfo(dataList, resourceIdList); |
| | | |
| | | } else if (order == 3) { |
| | | orderby = " order by v.orderby desc,v.watchcount desc, v.updatetime desc"; |
| | | } else if (order == 4) { |
| | | orderby = " order by v.score desc,v.updatetime desc"; |
| | | } |
| | | return dataList; |
| | | } |
| | | |
| | | String yearWhere = ""; |
| | | if (!StringUtil.isNullOrEmpty(startYear) && !StringUtil.isNullOrEmpty(endYear)) { |
| | | yearWhere = " and (v.year>=" + startYear + " and v.year<=" + endYear + ") "; |
| | | } |
| | | @SuppressWarnings("unchecked") |
| | | public List<VideoInfo> getTypeVideoList(String type, String startYear, String endYear, DetailSystem ds, |
| | | final int page, int order) { |
| | | String orderby = ""; |
| | | if (order == 1) { |
| | | orderby = " order by v.watchcount desc, v.updatetime desc"; |
| | | } else if (order == 2) { |
| | | // orderby = " order by v.updatetime desc,v.watchcount desc"; |
| | | // 豆豆系 |
| | | // if (ds.getPackageName().contains("doudou")) |
| | | orderby = " order by FROM_UNIXTIME(v.createtime/1000) desc"; |
| | | |
| | | String wheres = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) { |
| | | final String yearWhereNew = yearWhere; |
| | | final String orderbyNew = orderby; |
| | | return (List<VideoInfo>) videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | return session |
| | | .createSQLQuery( |
| | | "SELECT v.* FROM wk_category_video ca left join wk_video_video v on v.id=ca.videoid where v.show=1 " |
| | | + yearWhereNew + " group by v.id ?") |
| | | .addEntity(VideoInfo.class).setParameter(0, orderbyNew) |
| | | .setFirstResult((page - 1) * Constant.pageCount).setMaxResults(Constant.pageCount) |
| | | .list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | } else if (order == 3) { |
| | | orderby = " order by v.orderby desc,v.watchcount desc, v.updatetime desc"; |
| | | } else if (order == 4) { |
| | | orderby = " order by v.score desc,v.updatetime desc"; |
| | | } |
| | | |
| | | } |
| | | String yearWhere = ""; |
| | | if (!StringUtil.isNullOrEmpty(startYear) && !StringUtil.isNullOrEmpty(endYear)) { |
| | | yearWhere = " and (v.year>=" + startYear + " and v.year<=" + endYear + ") "; |
| | | } |
| | | |
| | | String sts[] = getChildrenType(Integer.parseInt(type)); |
| | | String as[]; |
| | | int j = (as = sts).length; |
| | | for (int i = 0; i < j; i++) { |
| | | String st = as[i]; |
| | | wheres = (new StringBuilder(String.valueOf(wheres))).append("or ca.videotypeid=").append(Long.parseLong(st)) |
| | | .append(" ").toString(); |
| | | } |
| | | String wheres = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) { |
| | | final String yearWhereNew = yearWhere; |
| | | final String orderbyNew = orderby; |
| | | return (List<VideoInfo>) videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | return session |
| | | .createSQLQuery( |
| | | "SELECT v.* FROM wk_category_video ca left join wk_video_video v on v.id=ca.videoid where v.show=1 " |
| | | + yearWhereNew + " group by v.id ?") |
| | | .addEntity(VideoInfo.class).setParameter(0, orderbyNew) |
| | | .setFirstResult((page - 1) * Constant.pageCount).setMaxResults(Constant.pageCount) |
| | | .list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | if (wheres.startsWith("or")) |
| | | wheres = wheres.substring(2, wheres.length()); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | } |
| | | |
| | | final String wheresNew = wheres; |
| | | final String yearWhereNew = yearWhere; |
| | | final String orderbyNew = orderby; |
| | | list = (List<VideoInfo>) videoTypeDao.excute(new HibernateCallback<List<VideoInfo>>() { |
| | | public List<VideoInfo> doInHibernate(Session session) throws HibernateException { |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | try { |
| | | list = session |
| | | .createSQLQuery( |
| | | "select v.* from wk_category_video ca left join wk_video_video v on v.id=ca.videoid where v.show=1 and (" |
| | | + wheresNew + ") " + yearWhereNew + " group by v.id " + orderbyNew) |
| | | .addEntity(VideoInfo.class).setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | String sts[] = getChildrenType(Integer.parseInt(type)); |
| | | String as[]; |
| | | int j = (as = sts).length; |
| | | for (int i = 0; i < j; i++) { |
| | | String st = as[i]; |
| | | wheres = (new StringBuilder(String.valueOf(wheres))).append("or ca.videotypeid=").append(Long.parseLong(st)) |
| | | .append(" ").toString(); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | if (wheres.startsWith("or")) |
| | | wheres = wheres.substring(2, wheres.length()); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | |
| | | private List<VideoInfo> parseVideoListAmin(List list) { |
| | | List<VideoInfo> resultList = new ArrayList<VideoInfo>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | VideoInfo video = new VideoInfo(); |
| | | video.setId(objs[0] + ""); |
| | | video.setName(objs[1] + ""); |
| | | video.setPicture(objs[2] + ""); |
| | | video.setLatestHpicture(objs[3] + ""); |
| | | video.setHpicture(objs[4] + ""); |
| | | video.setCreatetime(Long.parseLong(objs[5] + "")); |
| | | video.setShow(objs[6] + ""); |
| | | final String wheresNew = wheres; |
| | | final String yearWhereNew = yearWhere; |
| | | final String orderbyNew = orderby; |
| | | list = (List<VideoInfo>) videoTypeDao.excute(new HibernateCallback<List<VideoInfo>>() { |
| | | public List<VideoInfo> doInHibernate(Session session) throws HibernateException { |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | try { |
| | | list = session |
| | | .createSQLQuery( |
| | | "select v.* from wk_category_video ca left join wk_video_video v on v.id=ca.videoid where v.show=1 and (" |
| | | + wheresNew + ") " + yearWhereNew + " group by v.id " + orderbyNew) |
| | | .addEntity(VideoInfo.class).setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | |
| | | return list; |
| | | } |
| | | |
| | | private List<VideoInfo> parseVideoListAmin(List list) { |
| | | List<VideoInfo> resultList = new ArrayList<VideoInfo>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | VideoInfo video = new VideoInfo(); |
| | | video.setId(objs[0] + ""); |
| | | video.setName(objs[1] + ""); |
| | | video.setPicture(objs[2] + ""); |
| | | video.setLatestHpicture(objs[3] + ""); |
| | | video.setHpicture(objs[4] + ""); |
| | | video.setCreatetime(Long.parseLong(objs[5] + "")); |
| | | video.setShow(objs[6] + ""); |
| | | |
| | | boolean isEx = false; |
| | | for (VideoInfo info : resultList) { |
| | | if (info.getId().equalsIgnoreCase(video.getId())) { |
| | | isEx = true; |
| | | break; |
| | | } |
| | | } |
| | | if (!isEx) |
| | | resultList.add(video); |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | public List<VideoInfo> getTypeVideoListAdmin(String type, int page, String key, int contenttype) { |
| | | String ctwhere = ""; |
| | | if (contenttype == 1) |
| | | ctwhere = " and v.`contenttype`=1 "; |
| | | else if (contenttype > 1) { |
| | | ctwhere = " and v.`contenttype`>1 "; |
| | | } |
| | | String sql = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) |
| | | sql = String.format( |
| | | "SELECT v.`id`,v.name,v.`picture`,v.`latest_hpicture`,v.`hpicture`,v.`createtime`,v.`show` FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE v.`name` LIKE %s %s ORDER BY v.`createtime` DESC", |
| | | "'" + key + "%'", ctwhere); |
| | | else { |
| | | sql = String.format( |
| | | "SELECT v.`id`,v.name,v.`picture`,v.`latest_hpicture`,v.`hpicture`,v.`createtime`,v.`show` FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE (ty.`id`=%s OR ty.`pid`=%s) AND v.`name` LIKE %s %s ORDER BY v.`createtime` DESC", |
| | | type, type, "'" + key + "%'", ctwhere); |
| | | } |
| | | |
| | | boolean isEx = false; |
| | | for (VideoInfo info : resultList) { |
| | | if (info.getId().equalsIgnoreCase(video.getId())) { |
| | | isEx = true; |
| | | break; |
| | | } |
| | | } |
| | | if (!isEx) |
| | | resultList.add(video); |
| | | } |
| | | return resultList; |
| | | } |
| | | List result = videoInfoDao.sqlList(sql, (page - 1) * Constant.pageCount, Constant.pageCount, null); |
| | | |
| | | public List<VideoInfo> getTypeVideoListAdmin(String type, int page, String key, int contenttype) { |
| | | String ctwhere = ""; |
| | | if (contenttype == 1) |
| | | ctwhere = " and v.`contenttype`=1 "; |
| | | else if (contenttype > 1) { |
| | | ctwhere = " and v.`contenttype`>1 "; |
| | | } |
| | | String sql = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) |
| | | sql = String.format( |
| | | "SELECT v.`id`,v.name,v.`picture`,v.`latest_hpicture`,v.`hpicture`,v.`createtime`,v.`show` FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE v.`name` LIKE %s %s ORDER BY v.`createtime` DESC", |
| | | "'" + key + "%'", ctwhere); |
| | | else { |
| | | sql = String.format( |
| | | "SELECT v.`id`,v.name,v.`picture`,v.`latest_hpicture`,v.`hpicture`,v.`createtime`,v.`show` FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE (ty.`id`=%s OR ty.`pid`=%s) AND v.`name` LIKE %s %s ORDER BY v.`createtime` DESC", |
| | | type, type, "'" + key + "%'", ctwhere); |
| | | } |
| | | List<VideoInfo> list = parseVideoListAmin(result); |
| | | return list; |
| | | } |
| | | |
| | | List result = videoInfoDao.sqlList(sql, (page - 1) * Constant.pageCount, Constant.pageCount, null); |
| | | public long getTypeVideoListAdminCount(String type, String key, int contenttype) { |
| | | |
| | | List<VideoInfo> list = parseVideoListAmin(result); |
| | | return list; |
| | | } |
| | | String wheres = ""; |
| | | String ctwhere = ""; |
| | | if (contenttype == 1) |
| | | ctwhere = " and v.`contenttype`=1 "; |
| | | else if (contenttype > 1) { |
| | | ctwhere = " and v.`contenttype`>1 "; |
| | | } |
| | | |
| | | public long getTypeVideoListAdminCount(String type, String key, int contenttype) { |
| | | String sql = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) |
| | | sql = String.format( |
| | | "SELECT count(v.`id`) FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE v.`name` LIKE %s %s", |
| | | "'" + key + "%'", ctwhere); |
| | | else { |
| | | sql = String.format( |
| | | "SELECT count(v.`id`) FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE (ty.`id`=%s OR ty.`pid`=%s) AND v.`name` LIKE %s %s", |
| | | type, type, "'" + key + "%'", ctwhere); |
| | | } |
| | | |
| | | String wheres = ""; |
| | | String ctwhere = ""; |
| | | if (contenttype == 1) |
| | | ctwhere = " and v.`contenttype`=1 "; |
| | | else if (contenttype > 1) { |
| | | ctwhere = " and v.`contenttype`>1 "; |
| | | } |
| | | return videoInfoDao.getCountSQL(sql); |
| | | } |
| | | |
| | | String sql = ""; |
| | | if (StringUtil.isNullOrEmpty(type)) |
| | | sql = String.format( |
| | | "SELECT count(v.`id`) FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE v.`name` LIKE %s %s", |
| | | "'" + key + "%'", ctwhere); |
| | | else { |
| | | sql = String.format( |
| | | "SELECT count(v.`id`) FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` WHERE (ty.`id`=%s OR ty.`pid`=%s) AND v.`name` LIKE %s %s", |
| | | type, type, "'" + key + "%'", ctwhere); |
| | | } |
| | | public long getTypeVideoListAdminPage(String type, String key, int contenttype) { |
| | | long count = getTypeVideoListAdminCount(type, key, contenttype); |
| | | return count % (long) Constant.pageCount != 0L ? count / (long) Constant.pageCount + 1L |
| | | : count / (long) Constant.pageCount; |
| | | } |
| | | |
| | | return videoInfoDao.getCountSQL(sql); |
| | | } |
| | | public VideoType getRootVideoType(VideoType ty) { |
| | | |
| | | public long getTypeVideoListAdminPage(String type, String key, int contenttype) { |
| | | long count = getTypeVideoListAdminCount(type, key, contenttype); |
| | | return count % (long) Constant.pageCount != 0L ? count / (long) Constant.pageCount + 1L |
| | | : count / (long) Constant.pageCount; |
| | | } |
| | | ty = videoTypeDao.find(VideoType.class, ty.getId()); |
| | | while (ty.getParent() != null) |
| | | ty = ty.getParent(); |
| | | return ty; |
| | | } |
| | | |
| | | public VideoType getRootVideoType(VideoType ty) { |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteHotTypeAdmin(final String hotTypeId) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | List<SuperHotType> list = session.createQuery("from SuperHotType sh where sh.hotType.id=?") |
| | | .setParameter(0, hotTypeId).list(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperHotType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | ty = videoTypeDao.find(VideoType.class, ty.getId()); |
| | | while (ty.getParent() != null) |
| | | ty = ty.getParent(); |
| | | return ty; |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteHotTypeAdmin(final String hotTypeId) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | List<SuperHotType> list = session.createQuery("from SuperHotType sh where sh.hotType.id=?") |
| | | .setParameter(0, hotTypeId).list(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperHotType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteVideoTypeAdmin(final String videoTypeId) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperVideoType> list = session.createQuery("from SuperVideoType sh where sh.type.id=?") |
| | | .setParameter(0, videoTypeId).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperVideoType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteVideoTypeAdmin(final String videoTypeId) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperVideoType> list = session.createQuery("from SuperVideoType sh where sh.type.id=?") |
| | | .setParameter(0, videoTypeId).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperVideoType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteVideoTypeAdmin(final String videtype, final String detailSystem) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperVideoType> list = session |
| | | .createQuery("from SuperVideoType sh where sh.type.id=? and sh.detailSystem.id=?") |
| | | .setParameter(0, Long.parseLong(videtype)).setParameter(1, detailSystem).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperVideoType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteVideoTypeAdmin(final String videtype, final String detailSystem) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperVideoType> list = session |
| | | .createQuery("from SuperVideoType sh where sh.type.id=? and sh.detailSystem.id=?") |
| | | .setParameter(0, Long.parseLong(videtype)).setParameter(1, detailSystem).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperVideoType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteHotTypeAdmin(final String hotTypeId, final String detailSystem) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperHotType> list = session |
| | | .createQuery("from SuperHotType sh where sh.hotType.id=? and sh.detailSystem.id=?") |
| | | .setParameter(0, hotTypeId).setParameter(1, detailSystem).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperHotType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteHotTypeAdmin(final String hotTypeId, final String detailSystem) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperHotType> list = session |
| | | .createQuery("from SuperHotType sh where sh.hotType.id=? and sh.detailSystem.id=?") |
| | | .setParameter(0, hotTypeId).setParameter(1, detailSystem).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | for (SuperHotType st : list) { |
| | | session.delete(st); |
| | | } |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | /** |
| | | * 首页大分类--后台编辑使用 |
| | | * |
| | | * @param detailSystem |
| | | * @param page |
| | | * @return |
| | | */ |
| | | |
| | | } |
| | | @SuppressWarnings("unchecked") |
| | | public List<com.yeshi.buwan.domain.web.VideoTypeAdmin> getVideoTypeAdmin(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>>() { |
| | | public List<com.yeshi.buwan.domain.web.VideoTypeAdmin> doInHibernate(Session session) |
| | | 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(); |
| | | String where = ""; |
| | | |
| | | /** |
| | | * 首页大分类--后台编辑使用 |
| | | * |
| | | * @param detailSystem |
| | | * @param page |
| | | * @return |
| | | */ |
| | | List<VideoType> list = null; |
| | | if (detailSystem > 0) { |
| | | where += " where vb.detailSystem.id= " + detailSystem; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<com.yeshi.buwan.domain.web.VideoTypeAdmin> getVideoTypeAdmin(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>>() { |
| | | public List<com.yeshi.buwan.domain.web.VideoTypeAdmin> doInHibernate(Session session) |
| | | 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(); |
| | | String where = ""; |
| | | if (pid > 0) |
| | | |
| | | List<VideoType> list = null; |
| | | if (detailSystem > 0) { |
| | | where += " where vb.detailSystem.id= " + detailSystem; |
| | | list = session |
| | | .createQuery("select vb.type from SuperVideoType vb " + where |
| | | + " and vb.type.parent!=null and vb.type.parent.id=" + pid |
| | | + " group by vb.type.id order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | else |
| | | list = session |
| | | .createQuery("select vb.type from SuperVideoType vb " + where |
| | | + " and vb.type.parent=null group by vb.type.id order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | } else { |
| | | if (pid > 0) |
| | | list = session |
| | | .createQuery("from VideoType vb where vb.parent!=null and vb.parent.id=" |
| | | + pid + " order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | else |
| | | list = session |
| | | .createQuery( |
| | | "from VideoType vb where vb.parent=null order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | } |
| | | for (VideoType vb : list) { |
| | | List<DetailSystem> detailSystemS = session |
| | | .createQuery("select vb.detailSystem from SuperVideoType vb where vb.type.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | |
| | | if (pid > 0) |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | |
| | | list = session |
| | | .createQuery("select vb.type from SuperVideoType vb " + where |
| | | + " and vb.type.parent!=null and vb.type.parent.id=" + pid |
| | | + " group by vb.type.id order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | else |
| | | list = session |
| | | .createQuery("select vb.type from SuperVideoType vb " + where |
| | | + " and vb.type.parent=null group by vb.type.id order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | } else { |
| | | if (pid > 0) |
| | | list = session |
| | | .createQuery("from VideoType vb where vb.parent!=null and vb.parent.id=" |
| | | + pid + " order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | else |
| | | list = session |
| | | .createQuery( |
| | | "from VideoType vb where vb.parent=null order by vb.createtime desc") |
| | | .setFirstResult((page - 1) * Constant.pageCount) |
| | | .setMaxResults(Constant.pageCount).list(); |
| | | } |
| | | for (VideoType vb : list) { |
| | | List<DetailSystem> detailSystemS = session |
| | | .createQuery("select vb.detailSystem from SuperVideoType vb where vb.type.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | | dss.setDetailSystem(ds); |
| | | dss.setSelected(false); |
| | | dssList.add(dss); |
| | | } |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | // 设置已经存在的 |
| | | for (DetailSystem ds : detailSystemS) { |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | | dss.setDetailSystem(ds); |
| | | dss.setSelected(false); |
| | | dssList.add(dss); |
| | | } |
| | | for (DetailSystemSelect dss : dssList) { |
| | | if (dss.getDetailSystem().getId().equalsIgnoreCase(ds.getId())) { |
| | | dss.setSelected(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 设置已经存在的 |
| | | for (DetailSystem ds : detailSystemS) { |
| | | hotTypeList.add(new com.yeshi.buwan.domain.web.VideoTypeAdmin(vb, dssList)); |
| | | } |
| | | |
| | | for (DetailSystemSelect dss : dssList) { |
| | | if (dss.getDetailSystem().getId().equalsIgnoreCase(ds.getId())) { |
| | | dss.setSelected(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return hotTypeList; |
| | | } |
| | | }); |
| | | |
| | | hotTypeList.add(new com.yeshi.buwan.domain.web.VideoTypeAdmin(vb, dssList)); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return hotTypeList; |
| | | } |
| | | }); |
| | | /** |
| | | * 获取热门分类数量 |
| | | * |
| | | * @param detailSystem |
| | | * @return |
| | | */ |
| | | public long getVideoTypeAdminCount(int detailSystem, int pid) { |
| | | |
| | | } |
| | | String where = ""; |
| | | if (detailSystem > 0) { |
| | | |
| | | /** |
| | | * 获取热门分类数量 |
| | | * |
| | | * @param detailSystem |
| | | * @return |
| | | */ |
| | | public long getVideoTypeAdminCount(int detailSystem, int pid) { |
| | | where += " where bv.detailsystem= " + detailSystem; |
| | | if (pid > 0) |
| | | return videoTypeDao.getCountSQL( |
| | | "select count(*) from (select count(*) from wk_video_super_class bv left join wk_video_type v on v.id=bv.classid " |
| | | + where + " and v.pid=" + pid + " group by bv.hottypeid) s"); |
| | | else |
| | | return videoTypeDao.getCountSQL( |
| | | "select count(*) from (select count(*) from wk_video_super_class bv left join wk_video_type v on v.id=bv.classid " |
| | | + where + " and v.pid IS NULL group by bv.hottypeid) s"); |
| | | } else { |
| | | if (pid > 0) |
| | | return videoTypeDao |
| | | .getCount("select count(*) from VideoType vt where vt.parent!=null and vt.parent.id=" + pid); |
| | | else |
| | | return videoTypeDao.getCount("select count(*) from VideoType vt where vt.parent=null"); |
| | | } |
| | | } |
| | | |
| | | String where = ""; |
| | | if (detailSystem > 0) { |
| | | public void updateVideoTypes(final String videoid, final List<VideoType> typeList) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.createQuery("delete from CategoryVideo cv where cv.video.id=?").setParameter(0, videoid) |
| | | .executeUpdate(); |
| | | session.getTransaction().begin(); |
| | | for (VideoType vt : typeList) { |
| | | CategoryVideo cv = new CategoryVideo(); |
| | | cv.setVideo(new VideoInfo(videoid)); |
| | | cv.setVideoType(vt); |
| | | session.persist(cv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | where += " where bv.detailsystem= " + detailSystem; |
| | | if (pid > 0) |
| | | return videoTypeDao.getCountSQL( |
| | | "select count(*) from (select count(*) from wk_video_super_class bv left join wk_video_type v on v.id=bv.classid " |
| | | + where + " and v.pid=" + pid + " group by bv.hottypeid) s"); |
| | | else |
| | | return videoTypeDao.getCountSQL( |
| | | "select count(*) from (select count(*) from wk_video_super_class bv left join wk_video_type v on v.id=bv.classid " |
| | | + where + " and v.pid IS NULL group by bv.hottypeid) s"); |
| | | } else { |
| | | if (pid > 0) |
| | | return videoTypeDao |
| | | .getCount("select count(*) from VideoType vt where vt.parent!=null and vt.parent.id=" + pid); |
| | | else |
| | | return videoTypeDao.getCount("select count(*) from VideoType vt where vt.parent=null"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void updateVideoTypes(final String videoid, final List<VideoType> typeList) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.createQuery("delete from CategoryVideo cv where cv.video.id=?").setParameter(0, videoid) |
| | | .executeUpdate(); |
| | | session.getTransaction().begin(); |
| | | for (VideoType vt : typeList) { |
| | | CategoryVideo cv = new CategoryVideo(); |
| | | cv.setVideo(new VideoInfo(videoid)); |
| | | cv.setVideoType(vt); |
| | | session.persist(cv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | /** |
| | | * 获取某个视频的分类 |
| | | * |
| | | * @param vid |
| | | * @return |
| | | */ |
| | | @Cacheable(value = "homeCache", key = "'getVideoTypeList'+'-'+#vid") |
| | | public List<VideoType> getVideoTypeList(String vid) { |
| | | return videoTypeDao.list("select cv.videoType from CategoryVideo cv where cv.video.id=?", new String[]{vid}); |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * 显示视频大分类区 |
| | | */ |
| | | |
| | | /** |
| | | * 获取某个视频的分类 |
| | | * |
| | | * @param vid |
| | | * @return |
| | | */ |
| | | @Cacheable(value = "homeCache", key = "'getVideoTypeList'+'-'+#vid") |
| | | public List<VideoType> getVideoTypeList(String vid) { |
| | | return videoTypeDao.list("select cv.videoType from CategoryVideo cv where cv.video.id=?", new String[] { vid }); |
| | | } |
| | | @Cacheable(value = "classCache", key = "'getSuperVideoTypeList'+'-'+#detailSystem") |
| | | public List<SuperVideoType> getSuperVideoTypeList(String detailSystem) { |
| | | return superVideoTypeDao.list( |
| | | "from SuperVideoType s where s.detailSystem.id=" + detailSystem + " order by s.type.orderby desc"); |
| | | } |
| | | |
| | | /** |
| | | * 显示视频大分类区 |
| | | */ |
| | | @Cacheable(value = "classCache", key = "'getSuperVideoTypeTitleList'+'-'+#detailSystem") |
| | | public List<SuperVideoType> getSuperVideoTypeTitleList(String detailSystem) { |
| | | return superVideoTypeDao.list( |
| | | "from SuperVideoType s where s.detailSystem.id=" + detailSystem + " and s.type.showTitle='1' order by s.type.orderby desc"); |
| | | } |
| | | |
| | | @Cacheable(value = "classCache", key = "'getSuperVideoTypeList'+'-'+#detailSystem") |
| | | public List<SuperVideoType> getSuperVideoTypeList(String detailSystem) { |
| | | return superVideoTypeDao.list( |
| | | "from SuperVideoType s where s.detailSystem.id=" + detailSystem + " order by s.type.orderby desc"); |
| | | } |
| | | |
| | | @Cacheable(value = "classCache", key = "'getSuperVideoTypeTitleList'+'-'+#detailSystem") |
| | | public List<SuperVideoType> getSuperVideoTypeTitleList(String detailSystem) { |
| | | return superVideoTypeDao.list( |
| | | "from SuperVideoType s where s.detailSystem.id=" + detailSystem + " and s.type.showTitle='1' order by s.type.orderby desc"); |
| | | } |
| | | |
| | | public void addSuperVideoType(SuperVideoType sv) { |
| | | List<SuperVideoType> list = superVideoTypeDao.list("from SuperVideoType sv where sv.type.id=" |
| | | + sv.getType().getId() + " and sv.detailSystem.id=" + sv.getDetailSystem().getId()); |
| | | if (list != null && list.size() > 0) |
| | | return; |
| | | superVideoTypeDao.create(sv); |
| | | } |
| | | public void addSuperVideoType(SuperVideoType sv) { |
| | | List<SuperVideoType> list = superVideoTypeDao.list("from SuperVideoType sv where sv.type.id=" |
| | | + sv.getType().getId() + " and sv.detailSystem.id=" + sv.getDetailSystem().getId()); |
| | | if (list != null && list.size() > 0) |
| | | return; |
| | | superVideoTypeDao.create(sv); |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void updateSuperVideoTypeList(final String detailSystemId, final List<SuperVideoType> typeList) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperVideoType> list = session |
| | | .createQuery("from SuperVideoType sh where sh.detailSystem.id=" + detailSystemId).list(); |
| | | for (SuperVideoType ad : list) { |
| | | session.delete(ad); |
| | | } |
| | | @SuppressWarnings("unchecked") |
| | | public void updateSuperVideoTypeList(final String detailSystemId, final List<SuperVideoType> typeList) { |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperVideoType> list = session |
| | | .createQuery("from SuperVideoType sh where sh.detailSystem.id=" + detailSystemId).list(); |
| | | for (SuperVideoType ad : list) { |
| | | session.delete(ad); |
| | | } |
| | | |
| | | for (SuperVideoType videoType : typeList) { |
| | | session.persist(videoType); |
| | | } |
| | | for (SuperVideoType videoType : typeList) { |
| | | session.persist(videoType); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | public void deleteSuperVideoType(SuperVideoType videoType) { |
| | | superVideoTypeDao.delete(videoType); |
| | | } |
| | | public void deleteSuperVideoType(SuperVideoType videoType) { |
| | | superVideoTypeDao.delete(videoType); |
| | | } |
| | | |
| | | public List<VideoType> getAllVideoType() { |
| | | return videoTypeDao.list("from VideoType vt where vt.parent = null"); |
| | | } |
| | | public List<VideoType> getAllVideoType() { |
| | | return videoTypeDao.list("from VideoType vt where vt.parent = null"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | public void clearVideos(long[] ls, String date) { |
| | | final List<JSONObject> list = new ArrayList<JSONObject>(); |
| | | final List<JSONObject> list = new ArrayList<>(); |
| | | |
| | | for (long id : ls) { |
| | | JSONObject json = new JSONObject(); |
| | |
| | | List<VideoInfo> videoList; |
| | | List<Collection> list; |
| | | |
| | | videoList = new ArrayList<VideoInfo>(); |
| | | list = new ArrayList<Collection>(); |
| | | videoList = new ArrayList<>(); |
| | | list = new ArrayList<>(); |
| | | List li = null; |
| | | |
| | | if (!StringUtil.isNullOrEmpty(loginUid)) { |
| | |
| | | boolean s = false; |
| | | try { |
| | | session.getTransaction().begin(); |
| | | List<String> stList = new ArrayList<String>(); |
| | | List<String> stList = new ArrayList<>(); |
| | | List list = session |
| | | .createSQLQuery((new StringBuilder("select id from wk_video_collection c where c.uid=")) |
| | | .append(uid).append(" and c.videoid=").append(videoId).append(" and c.thirdtype=") |
| | |
| | | boolean s = false; |
| | | |
| | | try { |
| | | List<String> stList = new ArrayList<String>(); |
| | | List<String> stList = new ArrayList<>(); |
| | | List list; |
| | | if (StringUtil.isNullOrEmpty(loginUid)) { |
| | | list = collectionDao.sqlList((new StringBuilder("select id from wk_video_collection c where c.uid=")) |
| | |
| | | import com.yeshi.buwan.dao.CommentReplyDao; |
| | | import com.yeshi.buwan.domain.Comment2; |
| | | import com.yeshi.buwan.domain.CommentReply; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | |
| | |
| | | } |
| | | |
| | | public static List<HomeAd> getIOSTestHomeAdList() { |
| | | List<HomeAd> list = new ArrayList<HomeAd>(); |
| | | List<HomeAd> list = new ArrayList<>(); |
| | | HomeAd ad = new HomeAd(); |
| | | ad.setPicture("http://img.zcool.cn/community/01a5a7562499216ac7254878995802.jpg"); |
| | | VideoInfo info = new VideoInfo(); |
| | |
| | | public List<HomeAdAdmin> getHomeAdAdmin(final String key, 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<HomeAdAdmin>(); |
| | | List<HomeAdAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String sql = ""; |
| | |
| | | .createQuery("select vb.detailSystem from SuperHomeAd vb where vb.homeAd.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | } |
| | | |
| | | public List<HomeType> getIOSTestHomeType() { |
| | | List<HomeType> list = new ArrayList<HomeType>(); |
| | | List<HomeType> list = new ArrayList<>(); |
| | | HomeType type = new HomeType(); |
| | | type.setId("130"); |
| | | type.setName("萌宠奇趣"); |
| | |
| | | |
| | | return (List<HomeNoticeAdmin>) homeNoticeDao.excute(new HibernateCallback<List<HomeNoticeAdmin>>() { |
| | | public List<HomeNoticeAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<HomeNoticeAdmin> zhiBoClassList = new ArrayList<HomeNoticeAdmin>(); |
| | | List<HomeNoticeAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String sql = ""; |
| | |
| | | .createQuery("select vb.detailSystem from SuperHomeNotice vb where vb.homeNotice.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.buwan.dao.*; |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.DetailSystemDao; |
| | | import com.yeshi.buwan.dao.HomeTypeDao; |
| | | import com.yeshi.buwan.dao.HomeVideoDao; |
| | | import com.yeshi.buwan.dao.SuperHomeTypeDao; |
| | | import com.yeshi.buwan.dao.VideoInfoDao; |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.HomeType; |
| | | import com.yeshi.buwan.domain.HomeVideo; |
| | | import com.yeshi.buwan.domain.SuperHomeType; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.web.DetailSystemSelect; |
| | | import com.yeshi.buwan.domain.web.HomeTypeAdmin; |
| | | import com.yeshi.buwan.util.Constant; |
| | |
| | | @Resource |
| | | private DetailSystemDao detailSystemDao; |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | public List<HomeType> getHomeType() { |
| | | List<HomeType> list = homeTypeDao.list("from HomeType h order by h.orderby desc"); |
| | | |
| | |
| | | @Cacheable(value = "homeCache", key = "'getHomeType'+'-'+#detailSystem+'-'+#cacheMd5+'-'+#maxNumber+'-'+#vtid") |
| | | public List<HomeType> getHomeType(final String detailSystem, final List<Long> resourceIds, String cacheMd5, |
| | | final int maxNumber, final long vtid) { |
| | | return (List<HomeType>) homeTypeDao.excute(new HibernateCallback<List<HomeType>>() { |
| | | List<HomeType> homeTypeList = (List<HomeType>) homeTypeDao.excute(new HibernateCallback<List<HomeType>>() { |
| | | public List<HomeType> doInHibernate(Session session) throws HibernateException { |
| | | |
| | | return (List<HomeType>) homeTypeDao.excute(new HibernateCallback<List<HomeType>>() { |
| | |
| | | + vtid + "' AND (" + resourceWhere |
| | | + " ) AND bv.`videoid` IS NULL ) GROUP BY (hv.`id`) ORDER BY hv.`orderby` desc,v.createtime DESC ) hvideo LEFT JOIN `wk_video_super_hometype` sht ON sht.`hometypeid`=hvideo.hometype LEFT JOIN `wk_video_hometype` ht ON sht.`hometypeid` =ht.`id` LEFT JOIN wk_video_video v ON v.`id`=hvideo.videoid WHERE sht.`detailsystemid` =" + detailSystem + " ORDER BY hvideo.`orderby` DESC,v.orderby desc,v.updatetime desc") |
| | | .list(); |
| | | List<HomeType> homeTypeList = new ArrayList<HomeType>(); |
| | | List<HomeType> homeTypeList = new ArrayList<>(); |
| | | for (int i = 0; i < resultList.size(); i++) { |
| | | Object[] obj = (Object[]) resultList.get(i); |
| | | HomeType ht = new HomeType(); |
| | |
| | | } |
| | | |
| | | } else { |
| | | List<HomeVideo> videolist = new ArrayList<HomeVideo>(); |
| | | List<HomeVideo> videolist = new ArrayList<>(); |
| | | videolist.add(hv); |
| | | ht.setHomeVideoList(videolist); |
| | | homeTypeList.add(ht); |
| | |
| | | |
| | | } |
| | | }); |
| | | List<String> videoIdList = new ArrayList<>(); |
| | | for (HomeType ht : homeTypeList) { |
| | | if (ht.getHomeVideoList() != null) |
| | | for (HomeVideo hv : ht.getHomeVideoList()) { |
| | | if (hv.getVideo() != null) |
| | | videoIdList.add(hv.getVideo().getId()); |
| | | } |
| | | } |
| | | |
| | | Map<String, VideoResourceMapExtraInfo> videoMap = videoResourceMapExtraInfoService.listMap(videoIdList, resourceIds); |
| | | for (HomeType ht : homeTypeList) { |
| | | if (ht.getHomeVideoList() != null) |
| | | for (HomeVideo hv : ht.getHomeVideoList()) { |
| | | if (hv.getVideo() != null) |
| | | hv.getVideo().setVideoResourceMapExtraInfo(videoMap.get(hv.getVideo().getId())); |
| | | } |
| | | } |
| | | |
| | | |
| | | return homeTypeList; |
| | | } |
| | | |
| | | private void orderByType(List<HomeType> homeTypeList) { |
| | |
| | | } |
| | | |
| | | public List<DetailSystemSelect> getDetailSystemSelectByType(String homeType) { |
| | | List<DetailSystemSelect> li = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> li = new ArrayList<>(); |
| | | List<DetailSystem> list = detailSystemDao |
| | | .list("select sht.detailSystem from SuperHomeType sht where sht.homeType.id=" + homeType); |
| | | List<DetailSystem> sdList = detailSystemDao.list("from DetailSystem"); |
| | |
| | | |
| | | return (List<HomeTypeAdmin>) homeTypeDao.excute(new HibernateCallback<List<HomeTypeAdmin>>() { |
| | | public List<HomeTypeAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<HomeTypeAdmin> zhiBoClassList = new ArrayList<HomeTypeAdmin>(); |
| | | List<HomeTypeAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String sql = ""; |
| | |
| | | .createQuery("select vb.detailSystem from SuperHomeType vb where vb.homeType.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | |
| | | return (List<HotTypeAdmin>) hotTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List<HotTypeAdmin> hotTypeList = new ArrayList<HotTypeAdmin>(); |
| | | List<HotTypeAdmin> hotTypeList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String where = ""; |
| | |
| | | .createQuery("select vb.detailSystem from SuperHotType vb where vb.hotType.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
New file |
| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import com.yeshi.buwan.dao.user.LoginUserDao; |
| | | 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.service.inter.LoginUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | @Service |
| | | public class LoginUserServiceImpl implements LoginUserService { |
| | | |
| | | @Resource |
| | | private LoginUserDao loginUserDao; |
| | | |
| | | @Resource |
| | | private LoginUserExtraDao loginUserExtraDao; |
| | | |
| | | |
| | | @Override |
| | | public void initExtra(LoginUserExtra extra) { |
| | | if (extra.getCreateTime() == null) |
| | | extra.setCreateTime(new Date()); |
| | | loginUserExtraDao.save(extra); |
| | | } |
| | | |
| | | @Override |
| | | public LoginUser getLoginUser(String id) { |
| | | return loginUserDao.find(LoginUser.class, id); |
| | | } |
| | | |
| | | @Override |
| | | public LoginUser getLoginUserByOpenId(String systemId, String openid) { |
| | | return loginUserDao.findOne("from LoginUser u where u.systemId=? and u.openid=?", systemId, openid); |
| | | } |
| | | |
| | | @Override |
| | | public LoginUser getLoginUserByEmail(String systemId, String email) { |
| | | return loginUserDao.findOne("from LoginUser u where u.systemId=? and u.email=?", systemId, email); |
| | | } |
| | | |
| | | @Override |
| | | public LoginUser getLoginUserByQQOpenId(String systemId, String openId) { |
| | | return loginUserDao.findOne("from LoginUser u where u.systemId=? and u.qqOpenId=?", systemId, openId); |
| | | } |
| | | |
| | | @Override |
| | | public LoginUser getLoginUserByWxUnionId(String systemId, String unionId) { |
| | | return loginUserDao.findOne("from LoginUser u where u.systemId=? and u.wxUnionId=?", systemId, unionId); |
| | | } |
| | | |
| | | @Override |
| | | public LoginUser getLoginUserByPhone(String systemId, String phone) { |
| | | return loginUserDao.findOne("from LoginUser u where u.systemId=? and u.phone=?", systemId, phone); |
| | | } |
| | | |
| | | @Override |
| | | public void bindPhone(String loginUid, String phone) throws LoginUserException { |
| | | LoginUser user = getLoginUser(loginUid); |
| | | if (user == null) { |
| | | throw new LoginUserException("用户不存在"); |
| | | } |
| | | |
| | | LoginUser other = getLoginUserByPhone(user.getSystemId(), phone); |
| | | if (other != null) { |
| | | throw new LoginUserException("手机号已被其他账户绑定"); |
| | | } |
| | | user.setPhone(phone); |
| | | loginUserDao.update(user); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void bindQQ(String loginUid, String openId, String nickName, String portrait) throws LoginUserException { |
| | | |
| | | LoginUser user = getLoginUser(loginUid); |
| | | if (user == null) { |
| | | throw new LoginUserException("用户不存在"); |
| | | } |
| | | |
| | | LoginUser other = getLoginUserByQQOpenId(user.getSystemId(), openId); |
| | | if (other != null) { |
| | | throw new LoginUserException("QQ已被其他账户绑定"); |
| | | } |
| | | |
| | | user.setQqOpenId(openId); |
| | | loginUserDao.update(user); |
| | | |
| | | LoginUserExtra extra = new LoginUserExtra(); |
| | | extra.setId(loginUid); |
| | | extra.setQqNickName(nickName); |
| | | extra.setQqOpenId(openId); |
| | | extra.setQqPortrait(portrait); |
| | | if (loginUserExtraDao.get(loginUid) == null) { |
| | | initExtra(extra); |
| | | } else { |
| | | loginUserExtraDao.updateSelective(extra); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void bindWX(String loginUid, WeiXinUser weiXinUser) throws LoginUserException { |
| | | LoginUser user = getLoginUser(loginUid); |
| | | if (user == null) { |
| | | throw new LoginUserException("用户不存在"); |
| | | } |
| | | |
| | | LoginUser other = getLoginUserByWxUnionId(user.getSystemId(), weiXinUser.getUnionid()); |
| | | if (other != null) { |
| | | throw new LoginUserException("微信已被其他账户绑定"); |
| | | } |
| | | user.setWxOpenId(weiXinUser.getOpenid()); |
| | | user.setWxUnionId(weiXinUser.getUnionid()); |
| | | loginUserDao.update(user); |
| | | |
| | | LoginUserExtra extra = new LoginUserExtra(); |
| | | extra.setId(loginUid); |
| | | extra.setWxNickName(weiXinUser.getNickname()); |
| | | extra.setWxOpenId(weiXinUser.getOpenid()); |
| | | extra.setWxUnionId(weiXinUser.getUnionid()); |
| | | extra.setWxPortrait(weiXinUser.getHeadimgurl()); |
| | | extra.setWxSex(weiXinUser.getSex()); |
| | | if (loginUserExtraDao.get(loginUid) == null) { |
| | | initExtra(extra); |
| | | } else { |
| | | loginUserExtraDao.updateSelective(extra); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | if (resourceWhere.endsWith("or")) |
| | | resourceWhere = resourceWhere.substring(0, resourceWhere.length() - 2); |
| | | videoId = StringUtil.isNullOrEmpty(videoId) ? "" : videoId; |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | int start = (int) (Math.random() * 100); |
| | | |
| | | String sql = String.format( |
| | |
| | | for (int i = 0; i < idList.size(); i++) { |
| | | list.add((VideoInfo) videoInfoDao.find(VideoInfo.class, idList.get(i) + "")); |
| | | } |
| | | List<VideoInfo> videoList = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> videoList = new ArrayList<>(); |
| | | |
| | | for (VideoInfo v : list) { |
| | | boolean can = true; |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new ArrayList<VideoInfo>(); |
| | | return new ArrayList<>(); |
| | | |
| | | } |
| | | |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new ArrayList<VideoInfo>(); |
| | | return new ArrayList<>(); |
| | | |
| | | } |
| | | |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return new ArrayList<VideoInfo>(); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | } |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.dao.VideoResourceMapExtraInfoDao; |
| | | import com.yeshi.buwan.dao.juhe.iqiyi.VideoIqiyiDao; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | import com.yeshi.buwan.dto.mq.VideoExtraInfoChangeMQMsg; |
| | | import com.yeshi.buwan.iqiyi.entity.VideoIqiyi; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | |
| | | |
| | | @Autowired |
| | | private ResourceVideoDao resourceVideoDao; |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoDao videoResourceMapExtraInfoDao; |
| | | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | |
| | | resourceVideoDao.delete(resourceVideo); |
| | | CMQManager.getInstance().addVideoExtraInfoChanged(new VideoExtraInfoChangeMQMsg(VideoExtraInfoChangeMQMsg.TYPE_RESOURCE, videoId, VideoExtraInfoChangeMQMsg.ACTION_DELETE)); |
| | | } |
| | | |
| | | VideoResourceMapExtraInfo extraInfo = new VideoResourceMapExtraInfo(videoId, Long.parseLong(resourceId)); |
| | | extraInfo = videoResourceMapExtraInfoDao.find(VideoResourceMapExtraInfo.class, extraInfo.getId()); |
| | | if (extraInfo != null) { |
| | | videoResourceMapExtraInfoDao.delete(extraInfo); |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import com.github.qcloudsms.SmsSingleSenderResult; |
| | | import com.yeshi.buwan.dto.config.TencentSMSConfig; |
| | | import com.yeshi.buwan.exception.SMSException; |
| | | import com.yeshi.buwan.service.inter.SMSService; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.RedisKeyEnum; |
| | | import com.yeshi.buwan.util.RedisManager; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.yeshi.utils.sms.TencentSMSUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Service |
| | | public class SMSServiceImpl implements SMSService { |
| | | |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | @Override |
| | | public void sendBindVCode(Long uid, String phone, int codeLength) throws SMSException { |
| | | String limitKey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSLIMIT, uid + ""); |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSVCode, phone + "-" + 0); |
| | | if (StringUtil.isNullOrEmpty(redisManager.getCommonString(limitKey))) |
| | | throw new SMSException(1001, "请过60秒再试"); |
| | | |
| | | |
| | | String msgCode = StringUtil.getVerifyCode(codeLength); |
| | | |
| | | TencentSMSConfig tencentSMSConfig = Constant.tencentSMSConfig; |
| | | |
| | | // 验证码模板 |
| | | String msg = tencentSMSConfig.getContentBind().replace("[签名]", tencentSMSConfig.getSign()).replace("[验证码]", |
| | | msgCode); |
| | | SmsSingleSenderResult result = TencentSMSUtil.sendSingleMsg(Integer.parseInt(tencentSMSConfig.getAppId()), tencentSMSConfig.getAppKey(), phone, msg); |
| | | if (result == null) |
| | | throw new SMSException(2, "短信发送失败"); |
| | | if (result.result == 1025) { |
| | | throw new SMSException(result.result, "今日验证码发送超限,请明日再试"); |
| | | } else if (result.result != 0) {// 发送失败 |
| | | throw new SMSException(result.result, "短信发送失败"); |
| | | } |
| | | //保存验证码 |
| | | redisManager.cacheCommonString(key, msgCode, 60 * 2); |
| | | //60s后再发送 |
| | | redisManager.cacheCommonString(limitKey, "1", 60); |
| | | } |
| | | |
| | | @Override |
| | | public boolean verifyBindVCode(String phone, String code) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSVCode, phone + "-" + 0); |
| | | String cacheCode = redisManager.getCommonString(key); |
| | | if (cacheCode != null && cacheCode.equalsIgnoreCase(code)) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | import com.yeshi.buwan.domain.web.DetailSystemSelect; |
| | | import com.yeshi.buwan.domain.web.HotSearchAdmin; |
| | | import com.yeshi.buwan.dto.search.SolrResultDTO; |
| | | import com.yeshi.buwan.dto.search.SolrVideoSearchFilter; |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.*; |
| | | import com.yeshi.buwan.util.factory.VideoInfoFactory; |
| | |
| | | @Resource |
| | | private SolrAlbumDataManager solrAlbumDataManager; |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | @Cacheable(value = "userCache", key = "'suggestSearch'+'-'+#key+'-'+#system") |
| | | public List<String> suggestSearch(String key, String system) { |
| | | if (StringUtil.isNullOrEmpty(key) || key.startsWith("%")) |
| | | return new ArrayList<String>(); |
| | | return new ArrayList<>(); |
| | | |
| | | List<String> list; |
| | | Session session = null; |
| | |
| | | sql = "select name as result from wk_video_video where name like ?"; |
| | | } |
| | | |
| | | list = new ArrayList<String>(); |
| | | list = new ArrayList<>(); |
| | | |
| | | List li = null; |
| | | try { |
| | |
| | | } |
| | | |
| | | Iterator<String> it = set.iterator(); |
| | | list = new ArrayList<String>(); |
| | | list = new ArrayList<>(); |
| | | while (it.hasNext()) { |
| | | list.add(it.next()); |
| | | if (list.size() > 10) |
| | |
| | | .append(") order by REPLACE(v.name,?,'') ,v.watchCount desc").toString(); |
| | | else |
| | | sql = "from VideoInfo v where v.show='1' and (v.name like ?) order by REPLACE(v.name,?,''),v.watchCount desc";// 改为sql |
| | | List<Serializable> list = new ArrayList<Serializable>(); |
| | | List<Serializable> list = new ArrayList<>(); |
| | | BaiduVideoUtil util = new BaiduVideoUtil(); |
| | | List<VideoInfo> localList = videoInfoDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new String[]{(new StringBuilder("")).append(key).append("%").toString(), key}); |
| | |
| | | searchDao.create(sh); |
| | | // 查询数据库 |
| | | |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | List<VideoInfo> localList = null; |
| | | try { |
| | | long startt = System.currentTimeMillis(); |
| | |
| | | sql = sql.substring(0, sql.length() - 9); |
| | | |
| | | List rlist = videoInfoDao.sqlList(sql); |
| | | List<Integer> pList = new ArrayList<Integer>(); |
| | | List<Integer> pList = new ArrayList<>(); |
| | | for (int i = 0; i < localList.size(); i++) { |
| | | if (Integer.parseInt(rlist.get(i) + "") < 1) { |
| | | pList.add(i); |
| | |
| | | |
| | | //专辑数量 |
| | | long albumCount = 0L; |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | List<VideoInfo> localList = null; |
| | | try { |
| | | long startt = System.currentTimeMillis(); |
| | |
| | | //专辑视频集合 |
| | | Set<String> solrAlbumVids = new HashSet<>(); |
| | | |
| | | SolrResultDTO solrResultDTO = solrAlbumDataManager.findByKey(key, 1, videoType == 0 ? null : videoType, page, pageSize); |
| | | SolrVideoSearchFilter filter = new SolrVideoSearchFilter(); |
| | | filter.setKey(key); |
| | | filter.setVideoType(videoType == 0 ? null : videoType); |
| | | filter.setContentType(1); |
| | | |
| | | SolrResultDTO solrResultDTO = solrAlbumDataManager.find(filter, page, pageSize); |
| | | if (solrResultDTO != null) { |
| | | albumCount = solrResultDTO.getTotalCount(); |
| | | |
| | |
| | | sql = sql.substring(0, sql.length() - 9); |
| | | |
| | | List rlist = StringUtil.isNullOrEmpty(sql) ? new ArrayList() : videoInfoDao.sqlList(sql); |
| | | List<Integer> pList = new ArrayList<Integer>(); |
| | | List<Integer> pList = new ArrayList<>(); |
| | | for (int i = 0; i < localList.size(); i++) { |
| | | if (Integer.parseInt(rlist.get(i) + "") < 1) { |
| | | pList.add(i); |
| | |
| | | list.add(info); |
| | | } |
| | | } |
| | | |
| | | //获取附加信息 |
| | | list = videoResourceMapExtraInfoService.batchExtraInfo(list, resourceList); |
| | | |
| | | return new VideoListResultVO(list, videoType == 0 ? albumCount : 1000L); |
| | | } |
| | | |
| | |
| | | @SuppressWarnings({"rawtypes"}) |
| | | @Cacheable(value = "userCache", key = "'getHotSearchList'+'-'+#system") |
| | | public List<String> getHotSearchList(String system) { |
| | | List<String> list = new ArrayList<String>(); |
| | | List<String> list = new ArrayList<>(); |
| | | try { |
| | | List li = searchDao.sqlList( |
| | | "SELECT h.`name` FROM wk_video_super_hotsearch sh LEFT JOIN wk_video_hotsearch h ON sh.`hotsearchid`=h.`id` WHERE sh.`detailsystem`=? ORDER BY h.`orderby` DESC", |
| | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<HotSearchAdmin> getHotSearchAdmin(String key, int detailSystem, int page) { |
| | | List<HotSearchAdmin> zhiBoClassList = new ArrayList<HotSearchAdmin>(); |
| | | List<HotSearchAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | String sql = ""; |
| | |
| | | List<DetailSystem> detailSystemS = detailSystemDao |
| | | .list("select vb.detailSystem from SuperHotSearch vb where vb.hotSearch.id=" + vb.getId()); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | |
| | | videoInfoDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | // List<String> idList = new ArrayList<String>(); |
| | | // List<String> idList = new ArrayList<>(); |
| | | |
| | | List list = session.createSQLQuery("select videoid from wk_solr_update").setFirstResult(0) |
| | | .setMaxResults(10000).list(); |
| | |
| | | @SuppressWarnings("unchecked") |
| | | public List<SpecialAdmin> getSpecialAdmin(String key, int detailSystem, int page) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | List<SpecialAdmin> zhiBoClassList = new ArrayList<SpecialAdmin>(); |
| | | List<SpecialAdmin> zhiBoClassList = new ArrayList<>(); |
| | | |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | |
| | | List<DetailSystem> detailSystemS = detailSystemDao |
| | | .list("select vb.detailSystem from SuperSpecial vb where vb.special.id=" + vb.getId()); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | |
| | | |
| | | @Service |
| | | public class StarService { |
| | | @Resource |
| | | private HotStarDao hotStarDao; |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | @Resource |
| | | private SuperHotStarDao superHotStarDao; |
| | | @Resource |
| | | private HotStarDao hotStarDao; |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | @Resource |
| | | private SuperHotStarDao superHotStarDao; |
| | | |
| | | @Resource |
| | | private DetailSystemDao detailSystemDao; |
| | | @Resource |
| | | private DetailSystemDao detailSystemDao; |
| | | |
| | | public SuperHotStarDao getSuperHotStarDao() { |
| | | return superHotStarDao; |
| | | } |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | public void setSuperHotStarDao(SuperHotStarDao superHotStarDao) { |
| | | this.superHotStarDao = superHotStarDao; |
| | | } |
| | | public SuperHotStarDao getSuperHotStarDao() { |
| | | return superHotStarDao; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | public void setSuperHotStarDao(SuperHotStarDao superHotStarDao) { |
| | | this.superHotStarDao = superHotStarDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public HotStarDao getHotStarDao() { |
| | | return hotStarDao; |
| | | } |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public void setHotStarDao(HotStarDao hotStarDao) { |
| | | this.hotStarDao = hotStarDao; |
| | | } |
| | | public HotStarDao getHotStarDao() { |
| | | return hotStarDao; |
| | | } |
| | | |
| | | public StarService() { |
| | | public void setHotStarDao(HotStarDao hotStarDao) { |
| | | this.hotStarDao = hotStarDao; |
| | | } |
| | | |
| | | } |
| | | public StarService() { |
| | | |
| | | @Cacheable(value = "classCache", key = "'getHotStarList'+'-'+#page+'-'+#pageCount") |
| | | public List<HotStar> getHotStarList(int page, int pageCount) { |
| | | } |
| | | |
| | | List<HotStar> list = hotStarDao.list("from HotStar h order by h.orderby desc,h.createtime desc", |
| | | (page - 1) * pageCount, pageCount, new String[] {}); |
| | | return list; |
| | | } |
| | | @Cacheable(value = "classCache", key = "'getHotStarList'+'-'+#page+'-'+#pageCount") |
| | | public List<HotStar> getHotStarList(int page, int pageCount) { |
| | | |
| | | public List<HotStar> getHotStarList(String detailSystem, int page) { |
| | | List<HotStar> list = hotStarDao.list( |
| | | "select h.hotStar from SuperHotStar h where h.detailSystem.id=? order by h.hotStar.orderby desc,h.hotStar.createtime desc", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[] { detailSystem }); |
| | | return list; |
| | | } |
| | | List<HotStar> list = hotStarDao.list("from HotStar h order by h.orderby desc,h.createtime desc", |
| | | (page - 1) * pageCount, pageCount, new String[]{}); |
| | | return list; |
| | | } |
| | | |
| | | @Cacheable(value = "classCache", key = "'getHotStarDetail'+'-'+#id") |
| | | public HotStar getHotStarDetail(String id) { |
| | | public List<HotStar> getHotStarList(String detailSystem, int page) { |
| | | List<HotStar> list = hotStarDao.list( |
| | | "select h.hotStar from SuperHotStar h where h.detailSystem.id=? order by h.hotStar.orderby desc,h.hotStar.createtime desc", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[]{detailSystem}); |
| | | return list; |
| | | } |
| | | |
| | | return hotStarDao.find(HotStar.class, id); |
| | | } |
| | | @Cacheable(value = "classCache", key = "'getHotStarDetail'+'-'+#id") |
| | | public HotStar getHotStarDetail(String id) { |
| | | |
| | | public long getHotStarCount() { |
| | | return hotStarDao.find(HotStar.class, id); |
| | | } |
| | | |
| | | return hotStarDao.getCount("select count(*) from HotStar"); |
| | | } |
| | | public long getHotStarCount() { |
| | | |
| | | public long getHotStarCount(String detailSystem) { |
| | | return hotStarDao.getCount("select count(*) from HotStar"); |
| | | } |
| | | |
| | | return hotStarDao.getCount("select count(*) from SuperHotStar s where s.detailSystem.id=?", |
| | | new String[] { detailSystem }); |
| | | } |
| | | public long getHotStarCount(String detailSystem) { |
| | | |
| | | public List<VideoInfo> getHotStarVideo(String starId, int page) { |
| | | return hotStarDao.getCount("select count(*) from SuperHotStar s where s.detailSystem.id=?", |
| | | new String[]{detailSystem}); |
| | | } |
| | | |
| | | List<VideoInfo> list = videoInfoDao.list( |
| | | "select h.video from HotStarVideo as h LEFT JOIN h.video as v where h.video.show='1' and v.id=h.video.id and h.star.id=? order by h.video.updatetime desc", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[] { starId }); |
| | | return list; |
| | | } |
| | | public List<VideoInfo> getHotStarVideo(String starId, int page) { |
| | | |
| | | public long getHotStarVideoCount(String starId) { |
| | | List<VideoInfo> list = videoInfoDao.list( |
| | | "select h.video from HotStarVideo as h LEFT JOIN h.video as v where h.video.show='1' and v.id=h.video.id and h.star.id=? order by h.video.updatetime desc", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[]{starId}); |
| | | return list; |
| | | } |
| | | |
| | | long count = hotStarDao.getCount( |
| | | "select count(*) from HotStarVideo as h where h.video.show='1' and h.star.id=?", |
| | | new String[] { starId }); |
| | | return count; |
| | | } |
| | | public long getHotStarVideoCount(String starId) { |
| | | |
| | | public List<HotStar> getStarList() { |
| | | return hotStarDao.list("from HotStar h order by h.orderby DESC"); |
| | | } |
| | | long count = hotStarDao.getCount( |
| | | "select count(*) from HotStarVideo as h where h.video.show='1' and h.star.id=?", |
| | | new String[]{starId}); |
| | | return count; |
| | | } |
| | | |
| | | public HotStar getStar(String id) { |
| | | if (!StringUtil.isNullOrEmpty(id)) { |
| | | return (HotStar) hotStarDao.find(HotStar.class, id); |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | public List<HotStar> getStarList() { |
| | | return hotStarDao.list("from HotStar h order by h.orderby DESC"); |
| | | } |
| | | |
| | | public HotStar addStar(HotStar star) { |
| | | if (star != null) { |
| | | hotStarDao.save(star); |
| | | List<HotStar> list = hotStarDao.list("from HotStar h where h.createtime=? and h.name=?", |
| | | new String[] { star.getCreatetime(), star.getName() }); |
| | | if (list != null && list.size() > 0) |
| | | return (HotStar) list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | public HotStar getStar(String id) { |
| | | if (!StringUtil.isNullOrEmpty(id)) { |
| | | return (HotStar) hotStarDao.find(HotStar.class, id); |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public HotStar updateStar(HotStar star) { |
| | | if (star != null) { |
| | | hotStarDao.update(star); |
| | | List<HotStar> list = hotStarDao.list("from HotStar h where h.createtime=? and h.name=?", |
| | | new String[] { star.getCreatetime(), star.getName() }); |
| | | if (list != null && list.size() > 0) |
| | | return (HotStar) list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | public HotStar addStar(HotStar star) { |
| | | if (star != null) { |
| | | hotStarDao.save(star); |
| | | List<HotStar> list = hotStarDao.list("from HotStar h where h.createtime=? and h.name=?", |
| | | new String[]{star.getCreatetime(), star.getName()}); |
| | | if (list != null && list.size() > 0) |
| | | return (HotStar) list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void deleteStar(final HotStar star) { |
| | | if (star != null) { |
| | | hotStarDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | @SuppressWarnings("unchecked") |
| | | List<SuperHotStar> list = session.createQuery("from SuperHotStar sh where sh.hotStar.id=?") |
| | | .setParameter(0, star.getId()).list(); |
| | | session.getTransaction().begin(); |
| | | for (SuperHotStar sh : list) { |
| | | session.delete(sh); |
| | | } |
| | | session.createQuery("delete from HotStar hs where hs.id=?").setParameter(0, star.getId()) |
| | | .executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | public HotStar updateStar(HotStar star) { |
| | | if (star != null) { |
| | | hotStarDao.update(star); |
| | | List<HotStar> list = hotStarDao.list("from HotStar h where h.createtime=? and h.name=?", |
| | | new String[]{star.getCreatetime(), star.getName()}); |
| | | if (list != null && list.size() > 0) |
| | | return (HotStar) list.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | } |
| | | public void deleteStar(final HotStar star) { |
| | | if (star != null) { |
| | | hotStarDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | @SuppressWarnings("unchecked") |
| | | List<SuperHotStar> list = session.createQuery("from SuperHotStar sh where sh.hotStar.id=?") |
| | | .setParameter(0, star.getId()).list(); |
| | | session.getTransaction().begin(); |
| | | for (SuperHotStar sh : list) { |
| | | session.delete(sh); |
| | | } |
| | | session.createQuery("delete from HotStar hs where hs.id=?").setParameter(0, star.getId()) |
| | | .executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Cacheable(value = "classCache", key = "'getStarVideo'+'-'+#detailSystemId+'-'+#starId+'-'+#pageIndex+'-'+#cachemd5") |
| | | public List<VideoInfo> getStarVideo(String detailSystemId, String starId, int pageIndex, List<Long> resourceList, |
| | | String cachemd5) { |
| | | String resourceWhere = ""; |
| | | for (Long rid : resourceList) |
| | | resourceWhere += String.format(" rv.`resourceid`=%d or", rid); |
| | | if (resourceWhere.endsWith("or")) |
| | | resourceWhere = resourceWhere.substring(0, resourceWhere.length() - 2); |
| | | } |
| | | } |
| | | |
| | | List<VideoInfo> list = null; |
| | | Session session = hotStarDao.getSession(); |
| | | try { |
| | | HotStar star = (HotStar) session.get(HotStar.class, starId); |
| | | String sql = String.format( |
| | | "SELECT v.* FROM wk_video_video v LEFT JOIN wk_resource_video rv ON rv.`videoid`=v.`id` AND (%s) WHERE v.`contenttype`=1 AND v.`show`=1 AND v.`mainactor` LIKE '%s' AND rv.`videoid` IS NOT NULL and v.area is not null and v.area !='' GROUP BY v.`id` ORDER BY FROM_UNIXTIME(v.`updatetime`/1000) DESC", |
| | | resourceWhere, "%" + star.getName() + "%"); |
| | | list = session.createSQLQuery(sql).addEntity(VideoInfo.class) |
| | | .setFirstResult((pageIndex - 1) * Constant.pageCount).setMaxResults(Constant.pageCount).list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return list; |
| | | } |
| | | @SuppressWarnings("unchecked") |
| | | @Cacheable(value = "classCache", key = "'getStarVideo'+'-'+#detailSystemId+'-'+#starId+'-'+#pageIndex+'-'+#cachemd5") |
| | | public List<VideoInfo> getStarVideo(String detailSystemId, String starId, int pageIndex, List<Long> resourceList, |
| | | String cachemd5) { |
| | | String resourceWhere = ""; |
| | | for (Long rid : resourceList) |
| | | resourceWhere += String.format(" rv.`resourceid`=%d or", rid); |
| | | if (resourceWhere.endsWith("or")) |
| | | resourceWhere = resourceWhere.substring(0, resourceWhere.length() - 2); |
| | | |
| | | @Cacheable(value = "classCache", key = "'getStarVideo'+'-'+#detailSystemId+'-'+#starId+'-'+#pageIndex+'-'+#cachemd5") |
| | | public List<VideoInfo> getStarVideo(String detailSystemId, String starId, int pageIndex, String cachemd5) { |
| | | HotStar star = hotStarDao.find(HotStar.class, starId); |
| | | return SolrUtil.searchStarVideos(star.getName(), pageIndex); |
| | | } |
| | | List<VideoInfo> list = null; |
| | | Session session = hotStarDao.getSession(); |
| | | try { |
| | | HotStar star = (HotStar) session.get(HotStar.class, starId); |
| | | String sql = String.format( |
| | | "SELECT v.* FROM wk_video_video v LEFT JOIN wk_resource_video rv ON rv.`videoid`=v.`id` AND (%s) WHERE v.`contenttype`=1 AND v.`show`=1 AND v.`mainactor` LIKE '%s' AND rv.`videoid` IS NOT NULL and v.area is not null and v.area !='' GROUP BY v.`id` ORDER BY FROM_UNIXTIME(v.`updatetime`/1000) DESC", |
| | | resourceWhere, "%" + star.getName() + "%"); |
| | | list = session.createSQLQuery(sql).addEntity(VideoInfo.class) |
| | | .setFirstResult((pageIndex - 1) * Constant.pageCount).setMaxResults(Constant.pageCount).list(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | @Cacheable(value = "classCache", key = "'getStarVideoCount'+'-'+#detailSystemId+'-'+#starId") |
| | | public long getStarVideoCount(String detailSystemId, String starId) { |
| | | long count = 0; |
| | | try { |
| | | HotStar star = (HotStar) hotStarDao.find(HotStar.class, starId); |
| | | count = hotStarDao.getCount( |
| | | "select count(*) from CategoryVideo cv where cv.video.mainActor like ? and cv.video.contentType=1 and cv.video.area is not null and cv.video.area!=''", |
| | | new Serializable[] { "%" + star.getName() + "%" }); |
| | | list = videoResourceMapExtraInfoService.batchExtraInfo(list, resourceList); |
| | | return list; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return count; |
| | | } |
| | | @Cacheable(value = "classCache", key = "'getStarVideo'+'-'+#detailSystemId+'-'+#starId+'-'+#pageIndex+'-'+#cachemd5") |
| | | public List<VideoInfo> getStarVideo(String detailSystemId, String starId, int pageIndex, String cachemd5) { |
| | | HotStar star = hotStarDao.find(HotStar.class, starId); |
| | | return SolrUtil.searchStarVideos(star.getName(), pageIndex); |
| | | } |
| | | |
| | | public long getStarVideoPage(String detailSystemId, String starId) { |
| | | long count = getStarVideoCount(detailSystemId, starId); |
| | | return count % (long) Constant.pageCount != 0L ? count / (long) Constant.pageCount + 1L |
| | | : count / (long) Constant.pageCount; |
| | | } |
| | | @Cacheable(value = "classCache", key = "'getStarVideoCount'+'-'+#detailSystemId+'-'+#starId") |
| | | public long getStarVideoCount(String detailSystemId, String starId) { |
| | | long count = 0; |
| | | try { |
| | | HotStar star = (HotStar) hotStarDao.find(HotStar.class, starId); |
| | | count = hotStarDao.getCount( |
| | | "select count(*) from CategoryVideo cv where cv.video.mainActor like ? and cv.video.contentType=1 and cv.video.area is not null and cv.video.area!=''", |
| | | new Serializable[]{"%" + star.getName() + "%"}); |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<HotStarAdmin> getHotStarAdmin(String key, int detailSystem, int page) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | List<HotStarAdmin> zhiBoClassList = new ArrayList<HotStarAdmin>(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | 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"; |
| | | public long getStarVideoPage(String detailSystemId, String starId) { |
| | | long count = getStarVideoCount(detailSystemId, starId); |
| | | return count % (long) Constant.pageCount != 0L ? count / (long) Constant.pageCount + 1L |
| | | : count / (long) Constant.pageCount; |
| | | } |
| | | |
| | | List<HotStar> list = hotStarDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new Serializable[] { "%" + key + "%" }); |
| | | for (HotStar vb : list) { |
| | | List<DetailSystem> detailSystemS = detailSystemDao |
| | | .list("select vb.detailSystem from SuperHotStar vb where vb.hotStar.id=" + vb.getId()); |
| | | @SuppressWarnings("unchecked") |
| | | public List<HotStarAdmin> getHotStarAdmin(String key, int detailSystem, int page) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | List<HotStarAdmin> zhiBoClassList = new ArrayList<>(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | 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"; |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | | dss.setDetailSystem(ds); |
| | | dss.setSelected(false); |
| | | dssList.add(dss); |
| | | } |
| | | List<HotStar> list = hotStarDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new Serializable[]{"%" + key + "%"}); |
| | | for (HotStar vb : list) { |
| | | List<DetailSystem> detailSystemS = detailSystemDao |
| | | .list("select vb.detailSystem from SuperHotStar vb where vb.hotStar.id=" + vb.getId()); |
| | | |
| | | for (DetailSystem ds : detailSystemS) { |
| | | for (DetailSystemSelect dss : dssList) { |
| | | if (dss.getDetailSystem().getId().equalsIgnoreCase(ds.getId())) { |
| | | dss.setSelected(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | SuperHotStar sz = new SuperHotStar(); |
| | | sz.setDetailSystem(null); |
| | | sz.setHotStar(vb); |
| | | zhiBoClassList.add(new HotStarAdmin(sz, dssList)); |
| | | } |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return zhiBoClassList; |
| | | } |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | | dss.setDetailSystem(ds); |
| | | dss.setSelected(false); |
| | | dssList.add(dss); |
| | | } |
| | | |
| | | public long getHotStarAdminCount(String key, int detailSystem) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | for (DetailSystem ds : detailSystemS) { |
| | | for (DetailSystemSelect dss : dssList) { |
| | | if (dss.getDetailSystem().getId().equalsIgnoreCase(ds.getId())) { |
| | | dss.setSelected(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | SuperHotStar sz = new SuperHotStar(); |
| | | sz.setDetailSystem(null); |
| | | sz.setHotStar(vb); |
| | | zhiBoClassList.add(new HotStarAdmin(sz, dssList)); |
| | | } |
| | | |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select count(*) from (select count(*) from wk_video_super_hotstar zb left join wk_video_hotstar c on c.id=zb.hotstarid where zb.detailsystemid=" |
| | | + 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"; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return zhiBoClassList; |
| | | } |
| | | |
| | | return hotStarDao.getCountSQL(sql); |
| | | } |
| | | public long getHotStarAdminCount(String key, int detailSystem) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteHotStarAdmin(final String classId, final String detailSystemId) { |
| | | hotStarDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select count(*) from (select count(*) from wk_video_super_hotstar zb left join wk_video_hotstar c on c.id=zb.hotstarid where zb.detailsystemid=" |
| | | + 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"; |
| | | |
| | | List<SuperHotStar> list = session |
| | | .createQuery("from SuperHotStar vb where vb.hotStar.id=? and vb.detailSystem.id=?") |
| | | .setParameter(0, classId).setParameter(1, detailSystemId).list(); |
| | | if (list != null && list.size() > 0) { |
| | | session.getTransaction().begin(); |
| | | for (SuperHotStar vb : list) |
| | | session.delete(vb); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | return hotStarDao.getCountSQL(sql); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | @SuppressWarnings("unchecked") |
| | | public void deleteHotStarAdmin(final String classId, final String detailSystemId) { |
| | | hotStarDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | |
| | | } |
| | | List<SuperHotStar> list = session |
| | | .createQuery("from SuperHotStar vb where vb.hotStar.id=? and vb.detailSystem.id=?") |
| | | .setParameter(0, classId).setParameter(1, detailSystemId).list(); |
| | | if (list != null && list.size() > 0) { |
| | | session.getTransaction().begin(); |
| | | for (SuperHotStar vb : list) |
| | | session.delete(vb); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | |
| | | /** |
| | | * 明星 |
| | | */ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | public List<HotStar> getHotStarList(String detailSystem) { |
| | | } |
| | | |
| | | return hotStarDao.list("select hs.hotStar FROM SuperHotStar hs where hs.detailSystem.id=" + detailSystem |
| | | + " order by hs.hotStar.orderby desc"); |
| | | } |
| | | /** |
| | | * 明星 |
| | | */ |
| | | |
| | | public List<SuperHotStar> getSuperHotStarList(String detailSystem) { |
| | | return superHotStarDao.list( |
| | | "FROM SuperHotStar hs where hs.detailSystem.id=" + detailSystem + " order by hs.hotStar.orderby desc"); |
| | | } |
| | | public List<HotStar> getHotStarList(String detailSystem) { |
| | | |
| | | public void addSuperHotStar(SuperHotStar sv) { |
| | | List<SuperHotStar> list = superHotStarDao.list("from SuperHotStar sv where sv.hotStar.id=" |
| | | + sv.getHotStar().getId() + " and sv.detailSystem.id=" + sv.getDetailSystem().getId()); |
| | | if (list != null && list.size() > 0) |
| | | return; |
| | | superHotStarDao.create(sv); |
| | | } |
| | | return hotStarDao.list("select hs.hotStar FROM SuperHotStar hs where hs.detailSystem.id=" + detailSystem |
| | | + " order by hs.hotStar.orderby desc"); |
| | | } |
| | | |
| | | public void updateSuperHotStar(SuperHotStar hotSearch) { |
| | | superHotStarDao.update(hotSearch); |
| | | } |
| | | public List<SuperHotStar> getSuperHotStarList(String detailSystem) { |
| | | return superHotStarDao.list( |
| | | "FROM SuperHotStar hs where hs.detailSystem.id=" + detailSystem + " order by hs.hotStar.orderby desc"); |
| | | } |
| | | |
| | | public void deleteSuperHotStar(SuperHotStar hotSearch) { |
| | | superHotStarDao.delete(hotSearch); |
| | | } |
| | | public void addSuperHotStar(SuperHotStar sv) { |
| | | List<SuperHotStar> list = superHotStarDao.list("from SuperHotStar sv where sv.hotStar.id=" |
| | | + sv.getHotStar().getId() + " and sv.detailSystem.id=" + sv.getDetailSystem().getId()); |
| | | if (list != null && list.size() > 0) |
| | | return; |
| | | superHotStarDao.create(sv); |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void updateSuperHotStarList(final String detailSystemId, final List<SuperHotStar> typeList) { |
| | | hotStarDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperHotStar> list = session |
| | | .createQuery("from SuperHotStar sh where sh.detailSystem.id=" + detailSystemId).list(); |
| | | session.getTransaction().begin(); |
| | | for (SuperHotStar ad : list) { |
| | | session.delete(ad); |
| | | } |
| | | public void updateSuperHotStar(SuperHotStar hotSearch) { |
| | | superHotStarDao.update(hotSearch); |
| | | } |
| | | |
| | | for (SuperHotStar videoType : typeList) { |
| | | session.persist(videoType); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | public void deleteSuperHotStar(SuperHotStar hotSearch) { |
| | | superHotStarDao.delete(hotSearch); |
| | | } |
| | | |
| | | } |
| | | @SuppressWarnings("unchecked") |
| | | public void updateSuperHotStarList(final String detailSystemId, final List<SuperHotStar> typeList) { |
| | | hotStarDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<SuperHotStar> list = session |
| | | .createQuery("from SuperHotStar sh where sh.detailSystem.id=" + detailSystemId).list(); |
| | | session.getTransaction().begin(); |
| | | for (SuperHotStar ad : list) { |
| | | session.delete(ad); |
| | | } |
| | | |
| | | @Cacheable(value = "foundCache", key = "'getHotStarOnMain'+'-'+#detailSystemId") |
| | | public List<HotStar> getHotStarOnMain(String detailSystemId) { |
| | | return hotStarDao.list("select hs.hotStar FROM SuperHotStar hs where hs.detailSystem.id=" + detailSystemId |
| | | + " order by hs.hotStar.orderby desc", 0, 3, null); |
| | | } |
| | | for (SuperHotStar videoType : typeList) { |
| | | session.persist(videoType); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | @Cacheable(value = "foundCache", key = "'getHotStarOnMain'+'-'+#detailSystemId") |
| | | public List<HotStar> getHotStarOnMain(String detailSystemId) { |
| | | return hotStarDao.list("select hs.hotStar FROM SuperHotStar hs where hs.detailSystem.id=" + detailSystemId |
| | | + " order by hs.hotStar.orderby desc", 0, 3, null); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.apache.log4j.pattern.LogEvent; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.LoginUserDao; |
| | | import com.yeshi.buwan.dao.user.LoginUserDao; |
| | | import com.yeshi.buwan.dao.VideoPlayStatisticsDao; |
| | | import com.yeshi.buwan.dao.VideoTypeDao; |
| | | import com.yeshi.buwan.domain.CategoryContry; |
| | |
| | | |
| | | /** |
| | | * 统计 |
| | | * |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Service |
| | | public class StatisticsService { |
| | | @Resource |
| | | private VideoPlayStatisticsDao videoPlayStatisticsDao; |
| | | @Resource |
| | | private VideoDetailUtil videoDetailUtil; |
| | | @Resource |
| | | private VideoResourceService videoResourceService; |
| | | @Resource |
| | | private LoginUserDao loginUserDao; |
| | | @Resource |
| | | private VideoTypeDao videoTypeDao; |
| | | @Resource |
| | | private CategoryRecommendCacheVideoService categoryRecommendCacheVideoService; |
| | | @Resource |
| | | private VideoPlayStatisticsDao videoPlayStatisticsDao; |
| | | @Resource |
| | | private VideoDetailUtil videoDetailUtil; |
| | | @Resource |
| | | private VideoResourceService videoResourceService; |
| | | @Resource |
| | | private LoginUserDao loginUserDao; |
| | | @Resource |
| | | private VideoTypeDao videoTypeDao; |
| | | @Resource |
| | | private CategoryRecommendCacheVideoService categoryRecommendCacheVideoService; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void addStatistics(final String detailSystemId, final String videoid) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List list = session |
| | | .createSQLQuery( |
| | | "select id from wk_video_play_statistics s where s.detailsystemid=? and s.videoid=? and s.day=?") |
| | | .setParameter(0, detailSystemId).setParameter(1, videoid) |
| | | .setParameter(2, TimeUtil.getyyyyMMddHHTime(System.currentTimeMillis())).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | String id = list.get(0) + ""; |
| | | session.createSQLQuery( |
| | | "update wk_video_play_statistics s set s.playcount=s.playcount+1 where s.id=" + id) |
| | | .executeUpdate(); |
| | | } else { |
| | | VideoPlayStatistics vp = new VideoPlayStatistics(); |
| | | vp.setDay(TimeUtil.getyyyyMMddHHTime(System.currentTimeMillis())); |
| | | vp.setDetailSystem(new DetailSystem(detailSystemId)); |
| | | vp.setPlayCount(1); |
| | | vp.setVideoInfo(new VideoInfo(videoid)); |
| | | session.save(vp); |
| | | } |
| | | // 将watchcount+1 |
| | | session.createSQLQuery( |
| | | "update wk_video_video v set v.watchcount=v.watchcount+1 where v.id=" + videoid) |
| | | .executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | @SuppressWarnings("unchecked") |
| | | public void addStatistics(final String detailSystemId, final String videoid) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List list = session |
| | | .createSQLQuery( |
| | | "select id from wk_video_play_statistics s where s.detailsystemid=? and s.videoid=? and s.day=?") |
| | | .setParameter(0, detailSystemId).setParameter(1, videoid) |
| | | .setParameter(2, TimeUtil.getyyyyMMddHHTime(System.currentTimeMillis())).list(); |
| | | session.getTransaction().begin(); |
| | | if (list != null && list.size() > 0) { |
| | | String id = list.get(0) + ""; |
| | | session.createSQLQuery( |
| | | "update wk_video_play_statistics s set s.playcount=s.playcount+1 where s.id=" + id) |
| | | .executeUpdate(); |
| | | } else { |
| | | VideoPlayStatistics vp = new VideoPlayStatistics(); |
| | | vp.setDay(TimeUtil.getyyyyMMddHHTime(System.currentTimeMillis())); |
| | | vp.setDetailSystem(new DetailSystem(detailSystemId)); |
| | | vp.setPlayCount(1); |
| | | vp.setVideoInfo(new VideoInfo(videoid)); |
| | | session.save(vp); |
| | | } |
| | | // 将watchcount+1 |
| | | session.createSQLQuery( |
| | | "update wk_video_video v set v.watchcount=v.watchcount+1 where v.id=" + videoid) |
| | | .executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 统计视频播放数量 |
| | | * |
| | | * @param from |
| | | * @param to |
| | | * @param detailSystem |
| | | * @return |
| | | */ |
| | | @Cacheable(value = "statisticCache", key = "'getDetailSystemWatchCount'+'-'+#from+'-'+#to+'-'+#detailSystem") |
| | | @SuppressWarnings("rawtypes") |
| | | public List<StatisticXY> getDetailSystemWatchCount(String from, String to, String detailSystem) { |
| | | List<StatisticXY> xylist = new ArrayList<StatisticXY>(); |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | /** |
| | | * 统计视频播放数量 |
| | | * |
| | | * @param from |
| | | * @param to |
| | | * @param detailSystem |
| | | * @return |
| | | */ |
| | | @Cacheable(value = "statisticCache", key = "'getDetailSystemWatchCount'+'-'+#from+'-'+#to+'-'+#detailSystem") |
| | | @SuppressWarnings("rawtypes") |
| | | public List<StatisticXY> getDetailSystemWatchCount(String from, String to, String detailSystem) { |
| | | List<StatisticXY> xylist = new ArrayList<StatisticXY>(); |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | |
| | | try { |
| | | List list; |
| | | if ("0".equalsIgnoreCase(detailSystem)) |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT SUM(s.`playcount`),FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') FROM wk_video_play_statistics s WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') ORDER BY UNIX_TIMESTAMP(s.`day`)", |
| | | new Serializable[] { fromS, toS }); |
| | | else |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT SUM(s.`playcount`),FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') FROM wk_video_play_statistics s WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? and s.detailsystemid=? GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') ORDER BY UNIX_TIMESTAMP(s.`day`)", |
| | | new Serializable[] { fromS, toS, detailSystem }); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatisticXY xy = new StatisticXY(); |
| | | Object[] objs = (Object[]) list.get(i); |
| | | long count = Long.parseLong((objs[0] + "").toString()); |
| | | xy.setTime(objs[1].toString()); |
| | | xy.setY(count); |
| | | xylist.add(xy); |
| | | } |
| | | try { |
| | | List list; |
| | | if ("0".equalsIgnoreCase(detailSystem)) |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT SUM(s.`playcount`),FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') FROM wk_video_play_statistics s WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') ORDER BY UNIX_TIMESTAMP(s.`day`)", |
| | | new Serializable[]{fromS, toS}); |
| | | else |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT SUM(s.`playcount`),FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') FROM wk_video_play_statistics s WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? and s.detailsystemid=? GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.`day`),'%Y-%m-%d') ORDER BY UNIX_TIMESTAMP(s.`day`)", |
| | | new Serializable[]{fromS, toS, detailSystem}); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatisticXY xy = new StatisticXY(); |
| | | Object[] objs = (Object[]) list.get(i); |
| | | long count = Long.parseLong((objs[0] + "").toString()); |
| | | xy.setTime(objs[1].toString()); |
| | | xy.setY(count); |
| | | xylist.add(xy); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return xylist; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return xylist; |
| | | } |
| | | |
| | | @Cacheable(value = "statisticCache", key = "'getWatchDetail'+'-'+#from+'-'+#to+'-'+#detailsystem") |
| | | public List<StatisticXY> getWatchDetail(String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | List<StatisticXY> xylist = new ArrayList<StatisticXY>(); |
| | | try { |
| | | List list; |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT v.`name`,SUM(s.`playcount`) t FROM wk_video_play_statistics s LEFT JOIN wk_video_video v ON v.`id`=s.`videoid` WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? GROUP BY s.`videoid` ORDER BY t DESC limit 0,100", |
| | | new Serializable[] { fromS, toS }); |
| | | @Cacheable(value = "statisticCache", key = "'getWatchDetail'+'-'+#from+'-'+#to+'-'+#detailsystem") |
| | | public List<StatisticXY> getWatchDetail(String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | List<StatisticXY> xylist = new ArrayList<StatisticXY>(); |
| | | try { |
| | | List list; |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT v.`name`,SUM(s.`playcount`) t FROM wk_video_play_statistics s LEFT JOIN wk_video_video v ON v.`id`=s.`videoid` WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? GROUP BY s.`videoid` ORDER BY t DESC limit 0,100", |
| | | new Serializable[]{fromS, toS}); |
| | | |
| | | else |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT v.`name`,SUM(s.`playcount`) t FROM wk_video_play_statistics s LEFT JOIN wk_video_video v ON v.`id`=s.`videoid` WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? and s.detailsystemid=? GROUP BY s.`videoid` ORDER BY t DESC limit 0,100", |
| | | new Serializable[] { fromS, toS, detailsystem }); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatisticXY xy = new StatisticXY(); |
| | | Object[] objs = (Object[]) list.get(i); |
| | | long count = Long.parseLong((objs[1] + "").toString()); |
| | | xy.setTime(objs[0] + ""); |
| | | xy.setY(count); |
| | | xylist.add(xy); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return xylist; |
| | | } |
| | | else |
| | | list = videoPlayStatisticsDao.sqlList( |
| | | "SELECT v.`name`,SUM(s.`playcount`) t FROM wk_video_play_statistics s LEFT JOIN wk_video_video v ON v.`id`=s.`videoid` WHERE UNIX_TIMESTAMP(s.`day`)*1000>=? AND UNIX_TIMESTAMP(s.`day`)*1000<=? and s.detailsystemid=? GROUP BY s.`videoid` ORDER BY t DESC limit 0,100", |
| | | new Serializable[]{fromS, toS, detailsystem}); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatisticXY xy = new StatisticXY(); |
| | | Object[] objs = (Object[]) list.get(i); |
| | | long count = Long.parseLong((objs[1] + "").toString()); |
| | | xy.setTime(objs[0] + ""); |
| | | xy.setY(count); |
| | | xylist.add(xy); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return xylist; |
| | | } |
| | | |
| | | public long getRegisterCount(String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | try { |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | | return loginUserDao.getCount( |
| | | "select count(*) from LoginUser lu where cast(lu.createtime as long)>=? and cast(lu.createtime as long)<=?", |
| | | new Serializable[] { fromS, toS }); |
| | | public long getRegisterCount(String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | try { |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | | return loginUserDao.getCount( |
| | | "select count(*) from LoginUser lu where cast(lu.createtime as long)>=? and cast(lu.createtime as long)<=?", |
| | | new Serializable[]{fromS, toS}); |
| | | |
| | | else |
| | | return loginUserDao.getCount( |
| | | "select count(*) from LoginUser lu where and lu.detailsystem=? and cast(lu.createtime as long)>=? and cast(lu.createtime as long)<=?", |
| | | new Serializable[] { detailsystem, fromS, toS }); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | else |
| | | return loginUserDao.getCount( |
| | | "select count(*) from LoginUser lu where and lu.detailsystem=? and cast(lu.createtime as long)>=? and cast(lu.createtime as long)<=?", |
| | | new Serializable[]{detailsystem, fromS, toS}); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public long getTotalRegisterCount(String detailsystem) { |
| | | try { |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | | return loginUserDao.getCount("select count(*) from LoginUser"); |
| | | public long getTotalRegisterCount(String detailsystem) { |
| | | try { |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | | return loginUserDao.getCount("select count(*) from LoginUser"); |
| | | |
| | | else |
| | | return loginUserDao.getCount("select count(*) from LoginUser lu where and lu.detailsystem=?", |
| | | new Serializable[] { detailsystem }); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | else |
| | | return loginUserDao.getCount("select count(*) from LoginUser lu where and lu.detailsystem=?", |
| | | new Serializable[]{detailsystem}); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public long getTime(String st) { |
| | | Date date = new Date(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | date = sdf.parse(st.trim()); |
| | | LogUtil.i(date.getTime() + ""); |
| | | return date.getTime(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | public long getTime(String st) { |
| | | Date date = new Date(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | date = sdf.parse(st.trim()); |
| | | LogUtil.i(date.getTime() + ""); |
| | | return date.getTime(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | public Map<String, List<StatisticXY>> getCategoryPlayStatistics(String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from) / 1000; |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")) / 1000; |
| | | // 查找类型 |
| | | List<VideoType> list = videoTypeDao.list("from VideoType vt where vt.parent is null and vt.show=1"); |
| | | String sql = ""; |
| | | for (VideoType vt : list) { |
| | | if (StringUtil.isNullOrEmpty(detailsystem) || "0".equalsIgnoreCase(detailsystem)) |
| | | sql += String.format( |
| | | " (SELECT SUM(s.c) AS `count`,FROM_UNIXTIME(UNIX_TIMESTAMP(s.t) ,%s) AS `day`,s.tt AS `type` FROM (SELECT ps.`playcount` AS c,ps.`day` AS t ,%s AS tt FROM wk_video_play_statistics ps LEFT JOIN wk_category_video cv ON ps.`videoid`=cv.`videoid` LEFT JOIN wk_video_type ty ON (ty.`id`=cv.`videotypeid`) WHERE (ty.`id`=%s OR ty.`pid`=%s) AND UNIX_TIMESTAMP(ps.`day`)>=%s and UNIX_TIMESTAMP(ps.`day`)<%s GROUP BY ps.`id` ) s GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.t),%s))", |
| | | "'%Y-%m-%d'", "'" + vt.getName() + "'", vt.getId() + "", vt.getId() + "", fromS + "", toS + "", |
| | | "'%Y-%m-%d'"); |
| | | else |
| | | sql += String.format( |
| | | " (SELECT SUM(s.c) AS `count`,FROM_UNIXTIME(UNIX_TIMESTAMP(s.t) ,%s) AS `day`,s.tt AS `type` FROM (SELECT ps.`playcount` AS c,ps.`day` AS t ,%s AS tt FROM wk_video_play_statistics ps LEFT JOIN wk_category_video cv ON ps.`videoid`=cv.`videoid` LEFT JOIN wk_video_type ty ON (ty.`id`=cv.`videotypeid`) WHERE (ty.`id`=%s OR ty.`pid`=%s) AND and ps.detailsystemid=%s and UNIX_TIMESTAMP(ps.`day`)>=%s and UNIX_TIMESTAMP(ps.`day`)<%s GROUP BY ps.`id` ) s GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.t),%s))", |
| | | "'%Y-%m-%d'", "'" + vt.getName() + "'", vt.getId() + "", vt.getId() + "", detailsystem, |
| | | fromS + "", toS + "", "'%Y-%m-%d'"); |
| | | @SuppressWarnings("rawtypes") |
| | | public Map<String, List<StatisticXY>> getCategoryPlayStatistics(String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from) / 1000; |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")) / 1000; |
| | | // 查找类型 |
| | | List<VideoType> list = videoTypeDao.list("from VideoType vt where vt.parent is null and vt.show=1"); |
| | | String sql = ""; |
| | | for (VideoType vt : list) { |
| | | if (StringUtil.isNullOrEmpty(detailsystem) || "0".equalsIgnoreCase(detailsystem)) |
| | | sql += String.format( |
| | | " (SELECT SUM(s.c) AS `count`,FROM_UNIXTIME(UNIX_TIMESTAMP(s.t) ,%s) AS `day`,s.tt AS `type` FROM (SELECT ps.`playcount` AS c,ps.`day` AS t ,%s AS tt FROM wk_video_play_statistics ps LEFT JOIN wk_category_video cv ON ps.`videoid`=cv.`videoid` LEFT JOIN wk_video_type ty ON (ty.`id`=cv.`videotypeid`) WHERE (ty.`id`=%s OR ty.`pid`=%s) AND UNIX_TIMESTAMP(ps.`day`)>=%s and UNIX_TIMESTAMP(ps.`day`)<%s GROUP BY ps.`id` ) s GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.t),%s))", |
| | | "'%Y-%m-%d'", "'" + vt.getName() + "'", vt.getId() + "", vt.getId() + "", fromS + "", toS + "", |
| | | "'%Y-%m-%d'"); |
| | | else |
| | | sql += String.format( |
| | | " (SELECT SUM(s.c) AS `count`,FROM_UNIXTIME(UNIX_TIMESTAMP(s.t) ,%s) AS `day`,s.tt AS `type` FROM (SELECT ps.`playcount` AS c,ps.`day` AS t ,%s AS tt FROM wk_video_play_statistics ps LEFT JOIN wk_category_video cv ON ps.`videoid`=cv.`videoid` LEFT JOIN wk_video_type ty ON (ty.`id`=cv.`videotypeid`) WHERE (ty.`id`=%s OR ty.`pid`=%s) AND and ps.detailsystemid=%s and UNIX_TIMESTAMP(ps.`day`)>=%s and UNIX_TIMESTAMP(ps.`day`)<%s GROUP BY ps.`id` ) s GROUP BY FROM_UNIXTIME(UNIX_TIMESTAMP(s.t),%s))", |
| | | "'%Y-%m-%d'", "'" + vt.getName() + "'", vt.getId() + "", vt.getId() + "", detailsystem, |
| | | fromS + "", toS + "", "'%Y-%m-%d'"); |
| | | |
| | | sql += " UNION ALL"; |
| | | } |
| | | sql += " UNION ALL"; |
| | | } |
| | | |
| | | if (sql.endsWith("UNION ALL")) |
| | | sql = sql.substring(0, sql.length() - 9); |
| | | System.out.println(sql); |
| | | final String fsql = sql; |
| | | final Map<String, List<StatisticXY>> map = new HashMap<String, List<StatisticXY>>(); |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List list = session.createSQLQuery(fsql).list(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | if (map.get(objs[2] + "") == null) |
| | | map.put(objs[2] + "", new ArrayList<StatisticXY>()); |
| | | StatisticXY xy = new StatisticXY(); |
| | | xy.setTime(objs[1] + ""); |
| | | xy.setY(Long.parseLong(objs[0] + "")); |
| | | map.get(objs[2] + "").add(xy); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | return map; |
| | | } |
| | | if (sql.endsWith("UNION ALL")) |
| | | sql = sql.substring(0, sql.length() - 9); |
| | | System.out.println(sql); |
| | | final String fsql = sql; |
| | | final Map<String, List<StatisticXY>> map = new HashMap<String, List<StatisticXY>>(); |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List list = session.createSQLQuery(fsql).list(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | if (map.get(objs[2] + "") == null) |
| | | map.put(objs[2] + "", new ArrayList<StatisticXY>()); |
| | | StatisticXY xy = new StatisticXY(); |
| | | xy.setTime(objs[1] + ""); |
| | | xy.setY(Long.parseLong(objs[0] + "")); |
| | | map.get(objs[2] + "").add(xy); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | return map; |
| | | } |
| | | |
| | | // 大区分类播放统计-按当天 |
| | | @SuppressWarnings({ "unchecked", "rawtypes" }) |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void categoryPlayStatistic() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String startTime = TimeUtil.getGernalTime(System.currentTimeMillis() - 604800000L); |
| | | String endTime = TimeUtil.getGernalTime(System.currentTimeMillis() + 86400000L); |
| | | List<VideoType> typeList = (List<VideoType>) session |
| | | .createQuery("from VideoType vt where vt.parent is null").list(); |
| | | for (VideoType vt : typeList) { |
| | | // 只统计电影,电视剧,综艺,动漫的榜首 |
| | | if (vt.getId() == 150 || vt.getId() == 151 || vt.getId() == 152 || vt.getId() == 153) { |
| | | // if(1>0) |
| | | // continue; |
| | | String sql = String.format( |
| | | "SELECT mm.vid, mm.c,mm.rank FROM (SELECT m.vid AS vid,SUM(m.c) AS c,m.rank AS rank FROM (SELECT p.`videoid` AS vid, p.`playcount` AS c, p.`day`, cc.rank AS rank FROM wk_video_play_statistics p LEFT JOIN wk_category_video cv ON cv.`videoid` = p.`videoid` LEFT JOIN wk_video_type ty ON cv.`videotypeid` = ty.`id` LEFT JOIN wk_recommend_category_cache cc ON cc.videoid = p.videoid WHERE (ty.`id` = %s OR ty.`pid` = %s) AND ( UNIX_TIMESTAMP(P.`day`) < UNIX_TIMESTAMP(%s) AND UNIX_TIMESTAMP(P.`day`) >= UNIX_TIMESTAMP(%s)) GROUP BY p.`id`) m GROUP BY m.vid) mm ORDER BY mm.c DESC limit 0,100", |
| | | vt.getId() + "", vt.getId() + "", "'" + endTime + "'", "'" + startTime + "'"); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | session.getTransaction().begin(); |
| | | // 删除rank等于0的 |
| | | int update = session |
| | | .createQuery( |
| | | "delete from CategoryRecommendCacheVideo cr where cr.videoType.id=? and cr.rank = 0 ") |
| | | .setParameter(0, vt.getId()).executeUpdate(); |
| | | LogHelper.print("delete from CategoryRecommendCacheVideo cr where cr.videoType.id=" |
| | | + vt.getId() + " and cr.rank = 0 "); |
| | | LogHelper.print("删除:" + update + "条"); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | String rank = String.valueOf(objs[2] + ""); |
| | | if ("null".equalsIgnoreCase(rank)) { |
| | | rank = "0"; |
| | | } |
| | | if (Integer.parseInt(rank + "") != 0) { |
| | | CategoryRecommendCacheVideo ccv = categoryRecommendCacheVideoService |
| | | .getByVid(objs[0] + ""); |
| | | if (ccv != null) { |
| | | ccv.setOrderby(Integer.parseInt(objs[1] + "")); |
| | | session.update(ccv); |
| | | } |
| | | continue; |
| | | } |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setCreatetime("" + System.currentTimeMillis()); |
| | | crcv.setOrderby(Integer.parseInt(objs[1] + "")); |
| | | crcv.setVideoInfo(new VideoInfo(objs[0] + "")); |
| | | crcv.setVideoType(vt); |
| | | session.persist(crcv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } else {// 其他小分类的榜首查询最近更新的 |
| | | String sql = String.format( |
| | | "SELECT v.id FROM (SELECT DISTINCT(v.`id`) FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN `wk_video_type` t ON t.id=cv.`videotypeid` WHERE v.`show`=1 AND t.`id`=%s OR t.pid=%s ORDER BY v.id DESC LIMIT 200) vv LEFT JOIN wk_video_video v ON v.`id`=vv.id LIMIT 32", |
| | | vt.getId() + "", vt.getId() + ""); |
| | | // 先删除原来的视频 |
| | | session.getTransaction().begin(); |
| | | // 大区分类播放统计-按当天 |
| | | @SuppressWarnings({"unchecked", "rawtypes"}) |
| | | @CacheEvict(value = "topCache", allEntries = true) |
| | | public void categoryPlayStatistic() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String startTime = TimeUtil.getGernalTime(System.currentTimeMillis() - 604800000L); |
| | | String endTime = TimeUtil.getGernalTime(System.currentTimeMillis() + 86400000L); |
| | | List<VideoType> typeList = (List<VideoType>) session |
| | | .createQuery("from VideoType vt where vt.parent is null").list(); |
| | | for (VideoType vt : typeList) { |
| | | // 只统计电影,电视剧,综艺,动漫的榜首 |
| | | if (vt.getId() == 150 || vt.getId() == 151 || vt.getId() == 152 || vt.getId() == 153) { |
| | | //电影电视剧不更新榜首 |
| | | if(vt.getId() == 150 || vt.getId() == 151) |
| | | continue; |
| | | // if(1>0) |
| | | // continue; |
| | | String sql = String.format( |
| | | "SELECT mm.vid, mm.c,mm.rank FROM (SELECT m.vid AS vid,SUM(m.c) AS c,m.rank AS rank FROM (SELECT p.`videoid` AS vid, p.`playcount` AS c, p.`day`, cc.rank AS rank FROM wk_video_play_statistics p LEFT JOIN wk_category_video cv ON cv.`videoid` = p.`videoid` LEFT JOIN wk_video_type ty ON cv.`videotypeid` = ty.`id` LEFT JOIN wk_recommend_category_cache cc ON cc.videoid = p.videoid WHERE (ty.`id` = %s OR ty.`pid` = %s) AND ( UNIX_TIMESTAMP(P.`day`) < UNIX_TIMESTAMP(%s) AND UNIX_TIMESTAMP(P.`day`) >= UNIX_TIMESTAMP(%s)) GROUP BY p.`id`) m GROUP BY m.vid) mm ORDER BY mm.c DESC limit 0,100", |
| | | vt.getId() + "", vt.getId() + "", "'" + endTime + "'", "'" + startTime + "'"); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | session.getTransaction().begin(); |
| | | // 删除rank等于0的 |
| | | int update = session |
| | | .createQuery( |
| | | "delete from CategoryRecommendCacheVideo cr where cr.videoType.id=? and cr.rank = 0 ") |
| | | .setParameter(0, vt.getId()).executeUpdate(); |
| | | LogHelper.print("delete from CategoryRecommendCacheVideo cr where cr.videoType.id=" |
| | | + vt.getId() + " and cr.rank = 0 "); |
| | | LogHelper.print("删除:" + update + "条"); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | String rank = String.valueOf(objs[2] + ""); |
| | | if ("null".equalsIgnoreCase(rank)) { |
| | | rank = "0"; |
| | | } |
| | | if (Integer.parseInt(rank + "") != 0) { |
| | | CategoryRecommendCacheVideo ccv = categoryRecommendCacheVideoService |
| | | .getByVid(objs[0] + ""); |
| | | if (ccv != null) { |
| | | ccv.setOrderby(Integer.parseInt(objs[1] + "")); |
| | | session.update(ccv); |
| | | } |
| | | continue; |
| | | } |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setCreatetime("" + System.currentTimeMillis()); |
| | | crcv.setOrderby(Integer.parseInt(objs[1] + "")); |
| | | crcv.setVideoInfo(new VideoInfo(objs[0] + "")); |
| | | crcv.setVideoType(vt); |
| | | session.persist(crcv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } else {// 其他小分类的榜首查询最近更新的 |
| | | String sql = String.format( |
| | | "SELECT v.id FROM (SELECT DISTINCT(v.`id`) FROM wk_video_video v LEFT JOIN wk_category_video cv ON cv.`videoid`=v.`id` LEFT JOIN `wk_video_type` t ON t.id=cv.`videotypeid` WHERE v.`show`=1 AND t.`id`=%s OR t.pid=%s ORDER BY v.id DESC LIMIT 200) vv LEFT JOIN wk_video_video v ON v.`id`=vv.id LIMIT 32", |
| | | vt.getId() + "", vt.getId() + ""); |
| | | // 先删除原来的视频 |
| | | session.getTransaction().begin(); |
| | | |
| | | // 删除Rank=0的情况 |
| | | session.createQuery( |
| | | "delete from CategoryRecommendCacheVideo cr where cr.videoType.id=? and cr.rank = 0 ") |
| | | .setParameter(0, vt.getId()).executeUpdate(); |
| | | // 删除Rank=0的情况 |
| | | session.createQuery( |
| | | "delete from CategoryRecommendCacheVideo cr where cr.videoType.id=? and cr.rank = 0 ") |
| | | .setParameter(0, vt.getId()).executeUpdate(); |
| | | |
| | | List list = session.createSQLQuery(sql).list(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i); |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setCreatetime("" + System.currentTimeMillis()); |
| | | crcv.setOrderby(100 - i); |
| | | crcv.setVideoInfo(new VideoInfo(list.get(i) + "")); |
| | | crcv.setVideoType(vt); |
| | | session.persist(crcv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | LogHelper.error(e.getMessage()); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | LogHelper.print("统计完成..."); |
| | | return null; |
| | | } |
| | | }); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i); |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setCreatetime("" + System.currentTimeMillis()); |
| | | crcv.setOrderby(100 - i); |
| | | crcv.setVideoInfo(new VideoInfo(list.get(i) + "")); |
| | | crcv.setVideoType(vt); |
| | | session.persist(crcv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | LogHelper.error(e.getMessage()); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | LogHelper.print("统计完成..."); |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取单个视频观看详情 |
| | | * |
| | | * @param videoid |
| | | * @param from |
| | | * @param to |
| | | * @param detailsystem |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("rawtypes") |
| | | public List<StatisticXY> getVideoWatchDetail(String videoid, String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from) / 1000; |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")) / 1000; |
| | | /** |
| | | * 获取单个视频观看详情 |
| | | * |
| | | * @param videoid |
| | | * @param from |
| | | * @param to |
| | | * @param detailsystem |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("rawtypes") |
| | | public List<StatisticXY> getVideoWatchDetail(String videoid, String from, String to, String detailsystem) { |
| | | long fromS = TimeUtil.convertDateToTemp(from) / 1000; |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")) / 1000; |
| | | |
| | | String sql = ""; |
| | | String sql = ""; |
| | | |
| | | if (StringUtil.isNullOrEmpty(detailsystem) || "0".equalsIgnoreCase(detailsystem)) |
| | | sql = String.format( |
| | | "SELECT sts.`videoid` AS videoid,SUM(sts.`playcount`) AS `count`,(FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s)) AS `day` FROM wk_video_play_statistics sts WHERE sts.`videoid`=%s AND (UNIX_TIMESTAMP(sts.`day`)>=%s AND UNIX_TIMESTAMP(sts.`day`)<%s) GROUP BY (FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s))", |
| | | "'%Y-%m-%d'", videoid, fromS + "", toS + "", "'%Y-%m-%d'"); |
| | | else |
| | | sql = String.format( |
| | | "SELECT sts.`videoid` AS videoid,SUM(sts.`playcount`) AS `count`,(FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s)) AS `day` FROM wk_video_play_statistics sts WHERE sts.`videoid`=%s AND sts.`detailsystemid`=%s AND (UNIX_TIMESTAMP(sts.`day`)>=%s AND UNIX_TIMESTAMP(sts.`day`)<%s) GROUP BY (FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s))", |
| | | "'%Y-%m-%d'", videoid, detailsystem, fromS + "", toS + "", "'%Y-%m-%d'"); |
| | | if (StringUtil.isNullOrEmpty(detailsystem) || "0".equalsIgnoreCase(detailsystem)) |
| | | sql = String.format( |
| | | "SELECT sts.`videoid` AS videoid,SUM(sts.`playcount`) AS `count`,(FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s)) AS `day` FROM wk_video_play_statistics sts WHERE sts.`videoid`=%s AND (UNIX_TIMESTAMP(sts.`day`)>=%s AND UNIX_TIMESTAMP(sts.`day`)<%s) GROUP BY (FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s))", |
| | | "'%Y-%m-%d'", videoid, fromS + "", toS + "", "'%Y-%m-%d'"); |
| | | else |
| | | sql = String.format( |
| | | "SELECT sts.`videoid` AS videoid,SUM(sts.`playcount`) AS `count`,(FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s)) AS `day` FROM wk_video_play_statistics sts WHERE sts.`videoid`=%s AND sts.`detailsystemid`=%s AND (UNIX_TIMESTAMP(sts.`day`)>=%s AND UNIX_TIMESTAMP(sts.`day`)<%s) GROUP BY (FROM_UNIXTIME(UNIX_TIMESTAMP(sts.`day`),%s))", |
| | | "'%Y-%m-%d'", videoid, detailsystem, fromS + "", toS + "", "'%Y-%m-%d'"); |
| | | |
| | | System.out.println(sql); |
| | | final String fsql = sql; |
| | | final List<StatisticXY> rlist = new ArrayList<StatisticXY>(); |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List list = session.createSQLQuery(fsql).list(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | StatisticXY xy = new StatisticXY(); |
| | | xy.setTime(objs[2] + ""); |
| | | xy.setY(Long.parseLong(objs[1] + "")); |
| | | rlist.add(xy); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | return rlist; |
| | | } |
| | | System.out.println(sql); |
| | | final String fsql = sql; |
| | | final List<StatisticXY> rlist = new ArrayList<StatisticXY>(); |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List list = session.createSQLQuery(fsql).list(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | StatisticXY xy = new StatisticXY(); |
| | | xy.setTime(objs[2] + ""); |
| | | xy.setY(Long.parseLong(objs[1] + "")); |
| | | rlist.add(xy); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | return rlist; |
| | | } |
| | | |
| | | // 热门搜索统计 |
| | | @SuppressWarnings("unchecked") |
| | | public void hotSearchStatistics() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<HotSearch> hotList = session.createQuery("from HotSearch").list(); |
| | | List list = session.createSQLQuery( |
| | | "SELECT h.`keyword`,COUNT(*) c FROM wk_video_search_history h WHERE h.`createtime`>" |
| | | + (System.currentTimeMillis() - 1000 * 24 * 60 * 60L) |
| | | + " GROUP BY h.`keyword` ORDER BY c DESC limit 0,300") |
| | | .list(); |
| | | for (int i = list.size() - 1; i >= 0; i--) { |
| | | for (HotSearch hs : hotList) { |
| | | if (hs.getName().equalsIgnoreCase("" + ((Object[]) list.get(i))[0])) { |
| | | hs.setOrderby(Integer.parseInt(((Object[]) list.get(i))[1] + "")); |
| | | session.getTransaction().begin(); |
| | | session.update(hs); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | // 热门搜索统计 |
| | | @SuppressWarnings("unchecked") |
| | | public void hotSearchStatistics() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<HotSearch> hotList = session.createQuery("from HotSearch").list(); |
| | | List list = session.createSQLQuery( |
| | | "SELECT h.`keyword`,COUNT(*) c FROM wk_video_search_history h WHERE h.`createtime`>" |
| | | + (System.currentTimeMillis() - 1000 * 24 * 60 * 60L) |
| | | + " GROUP BY h.`keyword` ORDER BY c DESC limit 0,300") |
| | | .list(); |
| | | for (int i = list.size() - 1; i >= 0; i--) { |
| | | for (HotSearch hs : hotList) { |
| | | if (hs.getName().equalsIgnoreCase("" + ((Object[]) list.get(i))[0])) { |
| | | hs.setOrderby(Integer.parseInt(((Object[]) list.get(i))[1] + "")); |
| | | session.getTransaction().begin(); |
| | | session.update(hs); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | JSONArray array = new JSONArray(); |
| | | for (int i = 0; i < 20; i++) { |
| | | array.add(((Object[]) list.get(i))[0] + ""); |
| | | } |
| | | JSONArray array = new JSONArray(); |
| | | for (int i = 0; i < 20; i++) { |
| | | array.add(((Object[]) list.get(i))[0] + ""); |
| | | } |
| | | |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery("update wk_video_config cf set cf.value=? where cf.key=?") |
| | | .setParameter(0, array.toString()).setParameter(1, "topsearch").executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery("update wk_video_config cf set cf.value=? where cf.key=?") |
| | | .setParameter(0, array.toString()).setParameter(1, "topsearch").executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public void secondCategoryPlayStatistic() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String startTime = TimeUtil.getGernalTime(System.currentTimeMillis()); |
| | | String endTime = TimeUtil.getGernalTime(System.currentTimeMillis() + 24 * 60 * 60 * 1000L); |
| | | // 排除四大主分类 |
| | | List<VideoType> typeList = (List<VideoType>) session |
| | | .createQuery( |
| | | "from VideoType vt where vt.parent is not null and ( vt.parent.id!=150 and vt.parent.id!=151 and vt.parent.id!=152 and vt.parent.id!=153)") |
| | | .list(); |
| | | for (VideoType vt : typeList) { |
| | | String sql = String.format( |
| | | "SELECT mm.vid, mm.c FROM (SELECT m.vid AS vid,SUM(m.c) AS c FROM (SELECT p.`videoid` AS vid, p.`playcount` AS c, p.`day` FROM wk_video_play_statistics p LEFT JOIN wk_category_video cv ON cv.`videoid` = p.`videoid` LEFT JOIN wk_video_type ty ON cv.`videotypeid` = ty.`id` WHERE (ty.`id` = %s) AND ( UNIX_TIMESTAMP(P.`day`) < UNIX_TIMESTAMP(%s) AND UNIX_TIMESTAMP(P.`day`) >= UNIX_TIMESTAMP(%s)) GROUP BY p.`id`) m GROUP BY m.vid) mm ORDER BY mm.c DESC limit 0,100", |
| | | vt.getId() + "", "'" + endTime + "'", "'" + startTime + "'"); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | session.getTransaction().begin(); |
| | | // 删除所有 |
| | | session.createQuery( |
| | | "delete from CategoryRecommendCacheVideo cr where cr.videoType.id=? and cr.rank = 0 ") |
| | | .setParameter(0, vt.getId()).executeUpdate(); |
| | | @SuppressWarnings("unchecked") |
| | | public void secondCategoryPlayStatistic() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String startTime = TimeUtil.getGernalTime(System.currentTimeMillis()); |
| | | String endTime = TimeUtil.getGernalTime(System.currentTimeMillis() + 24 * 60 * 60 * 1000L); |
| | | // 排除四大主分类 |
| | | List<VideoType> typeList = (List<VideoType>) session |
| | | .createQuery( |
| | | "from VideoType vt where vt.parent is not null and ( vt.parent.id!=150 and vt.parent.id!=151 and vt.parent.id!=152 and vt.parent.id!=153)") |
| | | .list(); |
| | | for (VideoType vt : typeList) { |
| | | String sql = String.format( |
| | | "SELECT mm.vid, mm.c FROM (SELECT m.vid AS vid,SUM(m.c) AS c FROM (SELECT p.`videoid` AS vid, p.`playcount` AS c, p.`day` FROM wk_video_play_statistics p LEFT JOIN wk_category_video cv ON cv.`videoid` = p.`videoid` LEFT JOIN wk_video_type ty ON cv.`videotypeid` = ty.`id` WHERE (ty.`id` = %s) AND ( UNIX_TIMESTAMP(P.`day`) < UNIX_TIMESTAMP(%s) AND UNIX_TIMESTAMP(P.`day`) >= UNIX_TIMESTAMP(%s)) GROUP BY p.`id`) m GROUP BY m.vid) mm ORDER BY mm.c DESC limit 0,100", |
| | | vt.getId() + "", "'" + endTime + "'", "'" + startTime + "'"); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | session.getTransaction().begin(); |
| | | // 删除所有 |
| | | session.createQuery( |
| | | "delete from CategoryRecommendCacheVideo cr where cr.videoType.id=? and cr.rank = 0 ") |
| | | .setParameter(0, vt.getId()).executeUpdate(); |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setCreatetime("" + System.currentTimeMillis()); |
| | | crcv.setOrderby(Integer.parseInt(objs[1] + "")); |
| | | crcv.setVideoInfo(new VideoInfo(objs[0] + "")); |
| | | crcv.setVideoType(vt); |
| | | session.persist(crcv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | CategoryRecommendCacheVideo crcv = new CategoryRecommendCacheVideo(); |
| | | crcv.setCreatetime("" + System.currentTimeMillis()); |
| | | crcv.setOrderby(Integer.parseInt(objs[1] + "")); |
| | | crcv.setVideoInfo(new VideoInfo(objs[0] + "")); |
| | | crcv.setVideoType(vt); |
| | | session.persist(crcv); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | // 四大主分类的按地区播放统计 |
| | | @Cacheable(value = "statisticCache", key = "'areaPlayStatistic'") |
| | | public void areaPlayStatistic() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | @SuppressWarnings("unchecked") |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String endTime = TimeUtil.getAllTime(System.currentTimeMillis()); |
| | | String startTime = TimeUtil.getAllTime(System.currentTimeMillis() - 24 * 60 * 60 * 1000L); |
| | | // 排除四大主分类 |
| | | List<CategoryContry> rootList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent is null").list(); |
| | | for (CategoryContry cc : rootList) { |
| | | List<CategoryContry> secondAreaList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent.id=" + cc.getId()).list(); |
| | | for (CategoryContry se : secondAreaList) { |
| | | List<CategoryContry> thirdList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent.id=" + se.getId()).list(); |
| | | String areaWhere = ""; |
| | | for (CategoryContry tcc : thirdList) { |
| | | areaWhere += String.format(" v.area like %s or", "'%" + tcc.getName() + "%'"); |
| | | } |
| | | if (areaWhere.endsWith("or")) |
| | | areaWhere = areaWhere.substring(0, areaWhere.length() - 2); |
| | | // 四大主分类的按地区播放统计 |
| | | @Cacheable(value = "statisticCache", key = "'areaPlayStatistic'") |
| | | public void areaPlayStatistic() { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | @SuppressWarnings("unchecked") |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String endTime = TimeUtil.getAllTime(System.currentTimeMillis()); |
| | | String startTime = TimeUtil.getAllTime(System.currentTimeMillis() - 24 * 60 * 60 * 1000L); |
| | | // 排除四大主分类 |
| | | List<CategoryContry> rootList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent is null").list(); |
| | | for (CategoryContry cc : rootList) { |
| | | //排除电影/电视剧 |
| | | if (cc.getCid() == 150L || cc.getCid() == 151L) |
| | | continue; |
| | | List<CategoryContry> secondAreaList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent.id=" + cc.getId()).list(); |
| | | for (CategoryContry se : secondAreaList) { |
| | | List<CategoryContry> thirdList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent.id=" + se.getId()).list(); |
| | | String areaWhere = ""; |
| | | for (CategoryContry tcc : thirdList) { |
| | | areaWhere += String.format(" v.area like %s or", "'%" + tcc.getName() + "%'"); |
| | | } |
| | | if (areaWhere.endsWith("or")) |
| | | areaWhere = areaWhere.substring(0, areaWhere.length() - 2); |
| | | |
| | | String sql = String.format( |
| | | "SELECT videoid,SUM(playcount) sc FROM (SELECT s.`videoid`,s.`playcount` FROM wk_video_play_statistics s LEFT JOIN wk_category_video cv ON cv.`videoid`=s.`videoid` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` LEFT JOIN wk_video_video v ON v.`id`=s.`videoid` WHERE (ty.`id`=%s OR ty.`pid`=%s) AND (%s) AND (UNIX_TIMESTAMP(s.`day`)>=UNIX_TIMESTAMP('%s') AND UNIX_TIMESTAMP(s.`day`)<=UNIX_TIMESTAMP('%s')) GROUP BY s.`videoid`,s.`detailsystemid`,s.`day` ORDER BY s.`playcount` DESC) sm GROUP BY sm.videoid ORDER BY sc DESC limit 0,100", |
| | | cc.getCid() + "", cc.getCid() + "", areaWhere, startTime, endTime); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | session.getTransaction().begin(); |
| | | String sql = String.format( |
| | | "SELECT videoid,SUM(playcount) sc FROM (SELECT s.`videoid`,s.`playcount` FROM wk_video_play_statistics s LEFT JOIN wk_category_video cv ON cv.`videoid`=s.`videoid` LEFT JOIN wk_video_type ty ON ty.`id`=cv.`videotypeid` LEFT JOIN wk_video_video v ON v.`id`=s.`videoid` WHERE (ty.`id`=%s OR ty.`pid`=%s) AND (%s) AND (UNIX_TIMESTAMP(s.`day`)>=UNIX_TIMESTAMP('%s') AND UNIX_TIMESTAMP(s.`day`)<=UNIX_TIMESTAMP('%s')) GROUP BY s.`videoid`,s.`detailsystemid`,s.`day` ORDER BY s.`playcount` DESC) sm GROUP BY sm.videoid ORDER BY sc DESC limit 0,100", |
| | | cc.getCid() + "", cc.getCid() + "", areaWhere, startTime, endTime); |
| | | List list = session.createSQLQuery(sql).list(); |
| | | session.getTransaction().begin(); |
| | | |
| | | session.createQuery("delete from AreaVideoCache a where a.categoryContry.id=" + se.getId()) |
| | | .executeUpdate(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] object = (Object[]) list.get(i); |
| | | String videoid = object[0] + ""; |
| | | int count = Integer.parseInt(object[1] + ""); |
| | | AreaVideoCache avc = new AreaVideoCache(); |
| | | avc.setCategoryContry(se); |
| | | avc.setCreatetime(System.currentTimeMillis() + ""); |
| | | avc.setOrderby(count); |
| | | avc.setVideoInfo(new VideoInfo(videoid)); |
| | | session.persist(avc); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | session.createQuery("delete from AreaVideoCache a where a.categoryContry.id=" + se.getId()) |
| | | .executeUpdate(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] object = (Object[]) list.get(i); |
| | | String videoid = object[0] + ""; |
| | | int count = Integer.parseInt(object[1] + ""); |
| | | AreaVideoCache avc = new AreaVideoCache(); |
| | | avc.setCategoryContry(se); |
| | | avc.setCreatetime(System.currentTimeMillis() + ""); |
| | | avc.setOrderby(count); |
| | | avc.setVideoInfo(new VideoInfo(videoid)); |
| | | session.persist(avc); |
| | | } |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | // 统计某个视频某段时间的播放数) |
| | | public void videoPlayStatisticDuration(final String videoid, final long time) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String endTime = TimeUtil.getAllTime(System.currentTimeMillis()); |
| | | String startTime = TimeUtil.getAllTime(System.currentTimeMillis() - time); |
| | | // 统计某个视频某段时间的播放数) |
| | | public void videoPlayStatisticDuration(final String videoid, final long time) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | String endTime = TimeUtil.getAllTime(System.currentTimeMillis()); |
| | | String startTime = TimeUtil.getAllTime(System.currentTimeMillis() - time); |
| | | |
| | | String sql = String.format( |
| | | "SELECT SUM(s.`playcount`) FROM wk_video_play_statistics s WHERE s.`videoid`=%s AND (UNIX_TIMESTAMP(s.`day`)>=UNIX_TIMESTAMP(%s) AND UNIX_TIMESTAMP(s.`day`)<=UNIX_TIMESTAMP(%s))", |
| | | videoid + "", "'" + startTime + "'", "'" + endTime + "'"); |
| | | Object count = session.createSQLQuery(sql).uniqueResult(); |
| | | if (StringUtil.isNullOrEmpty(count + "")) |
| | | count = 0 + ""; |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery("update wk_video_video v set v.latestwatchcount=" |
| | | + Integer.parseInt(count + "") + " where id=" + videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | String sql = String.format( |
| | | "SELECT SUM(s.`playcount`) FROM wk_video_play_statistics s WHERE s.`videoid`=%s AND (UNIX_TIMESTAMP(s.`day`)>=UNIX_TIMESTAMP(%s) AND UNIX_TIMESTAMP(s.`day`)<=UNIX_TIMESTAMP(%s))", |
| | | videoid + "", "'" + startTime + "'", "'" + endTime + "'"); |
| | | Object count = session.createSQLQuery(sql).uniqueResult(); |
| | | if (StringUtil.isNullOrEmpty(count + "")) |
| | | count = 0 + ""; |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery("update wk_video_video v set v.latestwatchcount=" |
| | | + Integer.parseInt(count + "") + " where id=" + videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (session.getTransaction().isActive()) |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | // 同步观看次数 |
| | | public void refreshWatchCount(final String videoid) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery( |
| | | "UPDATE wk_video_video v SET v.`watchcount`=( SELECT SUM(s.`playcount`) FROM wk_video_play_statistics s WHERE s.`videoid`=?) WHERE v.`id`=?") |
| | | .setParameter(0, videoid).setParameter(1, videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | // 同步观看次数 |
| | | public void refreshWatchCount(final String videoid) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery( |
| | | "UPDATE wk_video_video v SET v.`watchcount`=( SELECT SUM(s.`playcount`) FROM wk_video_play_statistics s WHERE s.`videoid`=?) WHERE v.`id`=?") |
| | | .setParameter(0, videoid).setParameter(1, videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | // 同步评论数 |
| | | public void refreshVideoCommentCount(final String videoid) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery( |
| | | "UPDATE wk_video_video v SET v.`commentcount`=( SELECT COUNT(c.`id`) FROM wk_video_comment2 c WHERE c.`videoid`=?) WHERE v.`id`=?") |
| | | .setParameter(0, videoid).setParameter(1, videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | // 同步评论数 |
| | | public void refreshVideoCommentCount(final String videoid) { |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery( |
| | | "UPDATE wk_video_video v SET v.`commentcount`=( SELECT COUNT(c.`id`) FROM wk_video_comment2 c WHERE c.`videoid`=?) WHERE v.`id`=?") |
| | | .setParameter(0, videoid).setParameter(1, videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | // 刷新视频详情数量 |
| | | public void refreshVideoDetailCount(final String videoid) { |
| | | List<VideoResource> list = videoResourceService.getResourceList(); |
| | | List<Long> resourceList = new ArrayList<Long>(); |
| | | for (VideoResource vr : list) |
| | | resourceList.add(Long.parseLong(vr.getId())); |
| | | VideoInfo info = videoDetailUtil.getVideoInfo(videoid, null, resourceList, |
| | | StringUtil.Md5(System.currentTimeMillis() + "")); |
| | | int count = 0; |
| | | if (info != null && info.getVideoDetailList() != null) |
| | | count = info.getVideoDetailList().size(); |
| | | // 刷新视频详情数量 |
| | | public void refreshVideoDetailCount(final String videoid) { |
| | | List<VideoResource> list = videoResourceService.getResourceList(); |
| | | List<Long> resourceList = new ArrayList<Long>(); |
| | | for (VideoResource vr : list) |
| | | resourceList.add(Long.parseLong(vr.getId())); |
| | | VideoInfo info = videoDetailUtil.getVideoInfo(null, videoid, null, resourceList, |
| | | StringUtil.Md5(System.currentTimeMillis() + "")); |
| | | int count = 0; |
| | | if (info != null && info.getVideoDetailList() != null) |
| | | count = info.getVideoDetailList().size(); |
| | | |
| | | final int newCount = count; |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery("UPDATE wk_video_video v SET v.`videocount`=? WHERE v.`id`=?") |
| | | .setParameter(0, newCount).setParameter(1, videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | final int newCount = count; |
| | | videoPlayStatisticsDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | session.getTransaction().begin(); |
| | | session.createSQLQuery("UPDATE wk_video_video v SET v.`videocount`=? WHERE v.`id`=?") |
| | | .setParameter(0, newCount).setParameter(1, videoid).executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.yeshi.buwan.dao.LoginUserDao; |
| | | import com.yeshi.buwan.dao.user.LoginUserDao; |
| | | import com.yeshi.buwan.dao.UserDao; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.SystemInfo; |
| | | import com.yeshi.buwan.domain.UserData; |
| | | import com.yeshi.buwan.domain.UserInfo; |
New file |
| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import com.yeshi.buwan.dao.VideoResourceMapExtraInfoDao; |
| | | import com.yeshi.buwan.domain.HomeType; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.SQLQuery; |
| | | import org.hibernate.Session; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | import org.yeshi.utils.StringUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class VideoResourceMapExtraInfoServiceImpl implements VideoResourceMapExtraInfoService { |
| | | @Resource |
| | | private VideoResourceMapExtraInfoDao videoResourceMapExtraInfoDao; |
| | | |
| | | @Override |
| | | public Map<String, VideoResourceMapExtraInfo> listMap(List<String> videoIdList, List<Long> resourceIds) { |
| | | |
| | | List<String> idsList = new ArrayList<>(); |
| | | if (videoIdList != null) |
| | | for (String videoId : videoIdList) |
| | | if (resourceIds != null) |
| | | for (Long resourceId : resourceIds) { |
| | | idsList.add(String.format("'%s'", new VideoResourceMapExtraInfo(videoId, resourceId).getId())); |
| | | } |
| | | if (idsList.size() == 0) |
| | | return new HashMap<>(); |
| | | |
| | | List<VideoResourceMapExtraInfo> list = (List<VideoResourceMapExtraInfo>) videoResourceMapExtraInfoDao.excute(new HibernateCallback<List<VideoResourceMapExtraInfo>>() { |
| | | @Override |
| | | public List<VideoResourceMapExtraInfo> doInHibernate(Session session) throws HibernateException { |
| | | String sql = "SELECT * FROM (SELECT i.* FROM `wk_video_resource_map_extra_info` i LEFT JOIN wk_video_resource r ON r.`id`=i.`resource_id` WHERE i.`id` IN (%s) ORDER BY r.`orderby` DESC ) a GROUP BY a.`video_id`"; |
| | | SQLQuery query = session.createSQLQuery(String.format(sql, StringUtil.concat(idsList, ","))); |
| | | List list = query.addEntity(VideoResourceMapExtraInfo.class).list(); |
| | | return list; |
| | | } |
| | | }); |
| | | Map<String, VideoResourceMapExtraInfo> map = new HashMap<>(); |
| | | for (VideoResourceMapExtraInfo info : list) { |
| | | map.put(info.getVideoId(), info); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<VideoInfo> batchExtraInfo(List<VideoInfo> videoInfoList, List<Long> resourceIds) { |
| | | List<String> videoIdList = new ArrayList<>(); |
| | | for (VideoInfo videoInfo : videoInfoList) { |
| | | videoIdList.add(videoInfo.getId()); |
| | | } |
| | | Map<String, VideoResourceMapExtraInfo> map = listMap(videoIdList, resourceIds); |
| | | for (VideoInfo videoInfo : videoInfoList) { |
| | | videoInfo.setVideoResourceMapExtraInfo(map.get(videoInfo.getId())); |
| | | } |
| | | return videoInfoList; |
| | | } |
| | | } |
| | |
| | | pu.setResource(vr); |
| | | pu.setAid(video2.getMediaId()); |
| | | pu.setVid(video2.getId()); |
| | | |
| | | pu.setCode(video2.getCeCode()); |
| | | if (t == FunTVUtil2.PLAY_NONE) { |
| | | pu.setUrl(""); |
| | | } else { |
| | |
| | | VideoFunTV2 videoFunTV2 = videoFunTV2Dao.selectByMediaId(mediaId); |
| | | if (videoFunTV2 == null) |
| | | return; |
| | | videoFunTV2Dao.delete(videoFunTV2.getVideoId()); |
| | | videoFunTV2Dao.deleteByVideoId(videoFunTV2.getVideoId()); |
| | | resourceVideoService.delete(videoFunTV2.getVideoId()+"",FunTVUtil2.RESOURCE_ID+""); |
| | | //删除媒体与媒体对应的视频 |
| | | funTVAlbum2Dao.delete(mediaId); |
| | |
| | | // 获取最新一集的信息 |
| | | List<FunTVVideo> plist = funTVVideoDao.listByAid(p.getAid(), "num", Sort.Direction.DESC, 0, 1); |
| | | if (plist.size() > 0) { |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | detailList.add(FunTVUtil.convertFunTVVideoToVideoDetail(plist.get(0), p)); |
| | | vi.setVideoDetailList(detailList); |
| | | } |
| | |
| | | |
| | | final VideoInfo info = FunTVUtil.convertFunTVAlbumToVideoInfo(p); |
| | | // 类型计算 |
| | | final List<Integer> typeList = new ArrayList<Integer>(); |
| | | final List<Integer> typeList = new ArrayList<>(); |
| | | |
| | | int type = FunTVUtil.getFunTVAlbumType(p); |
| | | boolean exist = false; |
| | |
| | | return; |
| | | } else {// 需要新加入videoinfo |
| | | Serializable id = addVideoInfo(info, p); |
| | | List<Integer> typeList = new ArrayList<Integer>(); |
| | | List<Integer> typeList = new ArrayList<>(); |
| | | typeList = FunTVUtil.getShortVideoType(p, p.getCate(), p.getSubCate()); |
| | | |
| | | if (typeList == null || typeList.size() <= 0) |
| | |
| | | return detailList; |
| | | } else if (vft.getVid() != null) {// 单个视频 |
| | | FunTVVideo pv = funTVVideoDao.get(vft.getVid()); |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | VideoDetailInfo detail = new VideoDetailInfo(); |
| | | detail.setId(Long.parseLong(pv.getVid())); |
| | | detail.setExtraId(pv.getId() + ""); |
| | | detail.setName(pv.getTitle()); |
| | | detail.setTag(pv.getDesc()); |
| | | detail.setType("funtvvideo"); |
| | | List<VideoUrl> urlList = new ArrayList<VideoUrl>(); |
| | | List<VideoUrl> urlList = new ArrayList<>(); |
| | | VideoUrl vu = new VideoUrl(); |
| | | vu.setAdmin(null); |
| | | vu.setBaseUrl(pv.getPlayUrl()); |
| | |
| | | import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.util.log.VideoLogFactory; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import com.yeshi.buwan.util.video.VideoConstant; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Service |
| | | public class Iqiyi2ServiceImpl implements Iqiyi2Service { |
| | | |
| | | private final Logger logger = LoggerFactory.getLogger("videoUpdate"); |
| | | |
| | | @Resource |
| | | private VideoIqiyi2Dao videoIqiyi2Dao; |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | logger.info(VideoLogFactory.createAddToVideoLog(album)); |
| | | |
| | | VideoInfo newVideoInfo = convertAlbumToVideoInfo(album); |
| | | VideoIqiyi2 videoIqiyi2 = videoIqiyi2Dao.selectByIqiyiId(album.getId()); |
New file |
| | |
| | | package com.yeshi.buwan.service.imp.juhe; |
| | | |
| | | import com.yeshi.buwan.dao.VideoInfoDao; |
| | | import com.yeshi.buwan.dao.VideoResourceMapExtraInfoDao; |
| | | import com.yeshi.buwan.dao.juhe.pptv.PPTVProgramDao; |
| | | import com.yeshi.buwan.dao.juhe.pptv.PPTVSeriesDao; |
| | | import com.yeshi.buwan.dao.juhe.pptv.PPTVSeriesProgramMapDao; |
| | | import com.yeshi.buwan.dao.juhe.pptv.VideoPPTVMapDao; |
| | | import com.yeshi.buwan.dao.video.AlbumVideoMapDao; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | import com.yeshi.buwan.domain.video.AlbumVideoMap; |
| | | import com.yeshi.buwan.pptv.PPTVQuery; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.pptv.entity.PPTVProgram; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeriesProgramMap; |
| | | import com.yeshi.buwan.pptv.entity.VideoPPTVMap; |
| | | import com.yeshi.buwan.service.imp.CategoryVideoService; |
| | | import com.yeshi.buwan.service.imp.ResourceVideoService; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.inter.juhe.PPTVService; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | public class PPTVServiceImpl implements PPTVService { |
| | | @Resource |
| | | private PPTVSeriesDao pptvSeriesDao; |
| | | @Resource |
| | | private PPTVProgramDao pptvProgramDao; |
| | | @Resource |
| | | private PPTVSeriesProgramMapDao pptvSeriesProgramMapDao; |
| | | @Resource |
| | | private VideoPPTVMapDao videoPPTVMapDao; |
| | | @Resource |
| | | private VideoInfoService videoInfoService; |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | @Resource |
| | | private AlbumVideoMapDao albumVideoMapDao; |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | @Resource |
| | | private CategoryVideoService categoryVideoService; |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoDao videoResourceMapExtraInfoDao; |
| | | |
| | | |
| | | @Override |
| | | public void addToVideoInfo(PPTVSeries series) { |
| | | |
| | | if (series.getSeries() == null || series.getSeries().size() <= 0) |
| | | return; |
| | | |
| | | VideoInfo newVideoInfo = PPTVUtil.convertToVideoInfo(series); |
| | | VideoPPTVMap videoPPTV = videoPPTVMapDao.selectByInfoId(series.getInfoID()); |
| | | if (videoPPTV != null) {//渠道视频已经存在 |
| | | VideoInfo videoInfo = videoInfoService.getVideoInfo(videoPPTV.getVideoId() + ""); |
| | | if (videoInfo == null) |
| | | return; |
| | | newVideoInfo.setId(videoInfo.getId()); |
| | | if (!newVideoInfo.getTag().equalsIgnoreCase(videoInfo.getTag())) { |
| | | newVideoInfo.setCreatetime(videoInfo.getCreatetime()); |
| | | //更新信息tag信息 |
| | | videoInfo.setVideocount(newVideoInfo.getVideocount()); |
| | | videoInfo.setTag(newVideoInfo.getTag()); |
| | | videoInfo.setPicture(newVideoInfo.getPicture()); |
| | | videoInfo.setHpicture(newVideoInfo.getHpicture()); |
| | | videoInfo.setVpicture(newVideoInfo.getVpicture()); |
| | | videoInfo.setShow(newVideoInfo.getShow()); |
| | | videoInfo.setVideoType(newVideoInfo.getVideoType()); |
| | | videoInfoDao.update(videoInfo); |
| | | } |
| | | } else {//视频不存在 |
| | | //判断2个视频实体是否为同一视频 |
| | | VideoInfo oldVideo = videoInfoService.getExistSameVideo(newVideoInfo); |
| | | if (oldVideo == null) { |
| | | //添加视频 |
| | | Serializable id = videoInfoDao.save(newVideoInfo); |
| | | newVideoInfo.setId(id + ""); |
| | | } else {//为同一视频 |
| | | //更新tag |
| | | newVideoInfo.setId(oldVideo.getId()); |
| | | oldVideo.setVideocount(newVideoInfo.getVideocount()); |
| | | oldVideo.setTag(newVideoInfo.getTag()); |
| | | oldVideo.setPicture(newVideoInfo.getPicture()); |
| | | oldVideo.setHpicture(newVideoInfo.getHpicture()); |
| | | oldVideo.setVpicture(newVideoInfo.getVpicture()); |
| | | oldVideo.setShow(newVideoInfo.getShow()); |
| | | oldVideo.setVideoType(newVideoInfo.getVideoType()); |
| | | videoInfoDao.update(oldVideo); |
| | | } |
| | | |
| | | //加入专辑视频映射 |
| | | AlbumVideoMap map = new AlbumVideoMap(); |
| | | map.setCreateTime(new Date()); |
| | | map.setVideoId(newVideoInfo.getId()); |
| | | map.setRootVideoType(newVideoInfo.getVideoType().getId()); |
| | | map.setVideoCount(newVideoInfo.getVideocount()); |
| | | albumVideoMapDao.save(map); |
| | | |
| | | //加入映射 |
| | | VideoPPTVMap vi = new VideoPPTVMap(); |
| | | vi.setInfoId(series.getInfoID()); |
| | | vi.setVideoId(Long.parseLong(newVideoInfo.getId())); |
| | | vi.setCreateTime(new Date()); |
| | | videoPPTVMapDao.save(vi); |
| | | } |
| | | |
| | | //添加视频资源附加信息 |
| | | VideoResourceMapExtraInfo vrm = new VideoResourceMapExtraInfo(newVideoInfo.getId(), (long) PPTVUtil.RESOURCE_ID); |
| | | VideoResourceMapExtraInfo extra = videoResourceMapExtraInfoDao.find(VideoResourceMapExtraInfo.class, vrm.getId()); |
| | | if (extra == null) { |
| | | vrm.setFree(Integer.parseInt(series.getFree())); |
| | | vrm.setCreateTime(new Date()); |
| | | videoResourceMapExtraInfoDao.save(vrm); |
| | | } else {//更新 |
| | | extra.setFree(Integer.parseInt(series.getFree())); |
| | | extra.setUpdateTime(new Date()); |
| | | videoResourceMapExtraInfoDao.update(extra); |
| | | } |
| | | |
| | | //添加视频来源映射 |
| | | resourceVideoService.addVideoResource(newVideoInfo.getId(), PPTVUtil.RESOURCE_ID + ""); |
| | | //添加视频分类映射 |
| | | categoryVideoService.addCategoryVideo(newVideoInfo.getId(), newVideoInfo.getVideoType().getId()); |
| | | CMQManager.getInstance().addSolrMsg(newVideoInfo.getId()); |
| | | } |
| | | |
| | | @Override |
| | | public void offLineSeries(String infoId) { |
| | | //查询出对应的视频ID |
| | | VideoPPTVMap map = videoPPTVMapDao.selectByInfoId(infoId); |
| | | if (map == null) |
| | | return; |
| | | videoPPTVMapDao.delete(map.getVideoId()); |
| | | resourceVideoService.delete(map.getVideoId() + "", PPTVUtil.RESOURCE_ID + ""); |
| | | } |
| | | |
| | | @Override |
| | | public PPTVSeries getSeriesDetail(String infoId) { |
| | | PPTVSeries series = pptvSeriesDao.get(infoId); |
| | | if (series == null) { |
| | | return null; |
| | | } |
| | | PPTVQuery query = new PPTVQuery(); |
| | | query.infoId = infoId; |
| | | query.count = 100; |
| | | long count = pptvSeriesProgramMapDao.count(query); |
| | | int page = (int) (count % query.count == 0 ? count / query.count : count / query.count + 1); |
| | | List<PPTVProgram> programList = new ArrayList<>(); |
| | | for (int i = 0; i < page; i++) { |
| | | query.start = i * query.count; |
| | | List<PPTVSeriesProgramMap> mapList = pptvSeriesProgramMapDao.list(query); |
| | | List<String> codeList = new ArrayList<>(); |
| | | for (PPTVSeriesProgramMap map : mapList) { |
| | | codeList.add(map.getProgramCode()); |
| | | } |
| | | List<PPTVProgram> tempList = pptvProgramDao.list(codeList); |
| | | if (tempList != null && tempList.size() > 0) { |
| | | programList.addAll(tempList); |
| | | } |
| | | } |
| | | series.setSeries(programList); |
| | | return series; |
| | | } |
| | | |
| | | @Override |
| | | public void save(List<PPTVSeries> seriesList) { |
| | | for (PPTVSeries series : seriesList) { |
| | | save(series); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void save(PPTVSeries series) { |
| | | //删除的InfoId |
| | | Set<String> infoIds = new HashSet<>(); |
| | | //获取是否有更新 |
| | | PPTVSeries oldSeries = pptvSeriesDao.get(series.getInfoID()); |
| | | switch (series.getStatus()) { |
| | | //保存 |
| | | case "add": |
| | | //更新 |
| | | case "update": |
| | | if (oldSeries == null || !oldSeries.getUpdateTime().equalsIgnoreCase(series.getUpdateTime())) { |
| | | series.setCreateTime(new Date()); |
| | | pptvSeriesDao.save(series); |
| | | //处理新增/改变的剧集信息 |
| | | // CMQManager.getInstance().addPPTVSeriesUpdateMsg(new PPTVMQMsg(series.getInfoID(), PPTVMQMsg.TYPE_ADD_OR_UPDATE)); |
| | | } |
| | | |
| | | break; |
| | | //删除 |
| | | case "del": |
| | | deleteSeries(series); |
| | | infoIds.add(series.getInfoID()); |
| | | break; |
| | | } |
| | | |
| | | //删除的InfoId |
| | | for (PPTVProgram pptvProgram : series.getSeries()) { |
| | | Set<String> deleteInfoIds = processProgram(series, pptvProgram); |
| | | if (deleteInfoIds != null) { |
| | | infoIds.addAll(deleteInfoIds); |
| | | } |
| | | } |
| | | |
| | | for (String id : infoIds) { |
| | | //处理删除的剧集信息 |
| | | // CMQManager.getInstance().addPPTVSeriesUpdateMsg(new PPTVMQMsg(id, PPTVMQMsg.TYPE_DELETE)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除剧集 |
| | | * |
| | | * @param series |
| | | */ |
| | | private void deleteSeries(PPTVSeries series) { |
| | | PPTVQuery query = new PPTVQuery(); |
| | | query.seriesCode = series.getSeriesCode(); |
| | | Set<String> seriesCodeSet = deleteMap(query); |
| | | pptvSeriesDao.delete(series.getInfoID()); |
| | | } |
| | | |
| | | |
| | | private Set<String> processProgram(PPTVSeries series, PPTVProgram program) { |
| | | program.setCreateTime(new Date()); |
| | | //获取是否有更新 |
| | | PPTVProgram oldProgram = pptvProgramDao.get(program.getProgramCode()); |
| | | switch (program.getStatus()) { |
| | | //保存 |
| | | case "add": |
| | | //更新 |
| | | case "update": |
| | | if (oldProgram == null || !oldProgram.getContentOnlineTime().equalsIgnoreCase(oldProgram.getContentOnlineTime())) { |
| | | program.setCreateTime(new Date()); |
| | | pptvProgramDao.save(program); |
| | | |
| | | PPTVSeriesProgramMap map = new PPTVSeriesProgramMap(series.getInfoID(), series.getSeriesCode(), program.getProgramCode(), program.getRank()); |
| | | pptvSeriesProgramMapDao.save(map); |
| | | } |
| | | break; |
| | | //删除 |
| | | case "del": |
| | | return deleteProgram(program); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 删除节目 |
| | | * |
| | | * @param program |
| | | */ |
| | | private Set<String> deleteProgram(PPTVProgram program) { |
| | | //删除 |
| | | PPTVQuery query = new PPTVQuery(); |
| | | query.programCode = program.getProgramCode(); |
| | | Set<String> infoIdSet = deleteMap(query); |
| | | pptvProgramDao.delete(program.getProgramCode()); |
| | | return infoIdSet; |
| | | } |
| | | |
| | | private Set<String> deleteMap(PPTVQuery query) { |
| | | long count = pptvSeriesProgramMapDao.count(query); |
| | | if (count <= 0) { |
| | | return null; |
| | | } |
| | | Set<String> infoIdSet = new HashSet<>(); |
| | | query.count = (int) count; |
| | | List<PPTVSeriesProgramMap> mapList = pptvSeriesProgramMapDao.list(query); |
| | | //删除map |
| | | for (PPTVSeriesProgramMap map : mapList) { |
| | | infoIdSet.add(map.getInfoId()); |
| | | pptvSeriesProgramMapDao.delete(map.getId()); |
| | | } |
| | | |
| | | return infoIdSet; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public List<VideoType> getVideoTypeList(SoHuAlbum sa) { |
| | | List<VideoType> list = new ArrayList<VideoType>(); |
| | | List<VideoType> list = new ArrayList<>(); |
| | | String cateCode = sa.getCate_code(); |
| | | String[] ca = cateCode.split(";"); |
| | | for (int i = 1; i < ca.length; i++) { |
| | |
| | | public List<VideoDetailInfo> getVideoDetailList(final String videoid,int page,int pageSize) { |
| | | return (List<VideoDetailInfo>) soHuAlbumDao.excute(new HibernateCallback<List<VideoDetailInfo>>() { |
| | | public List<VideoDetailInfo> doInHibernate(Session session) throws HibernateException { |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | try { |
| | | List<SoHuAlbum> list = session.createQuery("select vs.album from VideoSoHu vs where vs.video.id=?") |
| | | .setParameter(0, videoid).list(); |
| | |
| | | public VideoDetailInfo getLatestVideoDetail(final String videoid) { |
| | | return (VideoDetailInfo) soHuAlbumDao.excute(new HibernateCallback<VideoDetailInfo>() { |
| | | public VideoDetailInfo doInHibernate(Session session) throws HibernateException { |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | try { |
| | | List<SoHuAlbum> list = session.createQuery("select vs.album from VideoSoHu vs where vs.video.id=?") |
| | | .setParameter(0, videoid).list(); |
| | |
| | | import com.yeshi.buwan.dao.push.VideoPushHistoryDao; |
| | | import com.yeshi.buwan.domain.Comment2; |
| | | import com.yeshi.buwan.domain.CommentReply; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.push.VideoPushHistory; |
| | | import com.yeshi.buwan.service.imp.CommentService; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | |
| | | return (List<CategoryRecommendVideoAdmin>) categoryRecommendVideoDao |
| | | .excute(new HibernateCallback<List<CategoryRecommendVideoAdmin>>() { |
| | | public List<CategoryRecommendVideoAdmin> doInHibernate(Session session) throws HibernateException { |
| | | List<CategoryRecommendVideoAdmin> zhiBoClassList = new ArrayList<CategoryRecommendVideoAdmin>(); |
| | | List<CategoryRecommendVideoAdmin> zhiBoClassList = new ArrayList<>(); |
| | | try { |
| | | List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list(); |
| | | String sql = ""; |
| | |
| | | "select vb.detailSystem from SuperCategoryRecommendVideo vb where vb.categoryRecommendVideo.id=?") |
| | | .setParameter(0, vb.getId()).list(); |
| | | |
| | | List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>(); |
| | | List<DetailSystemSelect> dssList = new ArrayList<>(); |
| | | |
| | | for (DetailSystem ds : detailSystemList) { |
| | | DetailSystemSelect dss = new DetailSystemSelect(); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.yeshi.buwan.dao.LoginUserDao; |
| | | import com.yeshi.buwan.dao.user.LoginUserDao; |
| | | import com.yeshi.buwan.dao.shop.ShopItemCollectDao; |
| | | import com.yeshi.buwan.dao.shop.ShopItemCommentDao; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.entity.ReturnResult; |
| | | import com.yeshi.buwan.domain.shop.ShopGoodsItem; |
| | | import com.yeshi.buwan.domain.shop.ShopItemCollect; |
| | |
| | | } |
| | | |
| | | public List<ShopGoodsItem> getGoodsList(final String uid, int page) { |
| | | final List<ShopGoodsItem> list = new ArrayList<ShopGoodsItem>(); |
| | | final List<ShopGoodsItem> list = new ArrayList<>(); |
| | | String result = getItemList(page); |
| | | System.out.println(result); |
| | | |
| | |
| | | } |
| | | |
| | | public ReturnResult getGoodsListAdmin(int page, String key, int show) { |
| | | final List<ShopGoodsItem> list = new ArrayList<ShopGoodsItem>(); |
| | | final List<ShopGoodsItem> list = new ArrayList<>(); |
| | | String result = ""; |
| | | try { |
| | | result = HttpUtil.get(String.format(HOST + "api/buwan/admin/itemlist?page=%s&show=%s&key=%s", page + "", |
| | |
| | | |
| | | @Cacheable(value = "shopCache", key = "'getGoodsSimpleDetail-'+#md5") |
| | | public List<ShopGoodsItem> getGoodsSimpleDetail(long[] ids, String md5) { |
| | | List<ShopGoodsItem> list = new ArrayList<ShopGoodsItem>(); |
| | | List<ShopGoodsItem> list = new ArrayList<>(); |
| | | Gson gson = new GsonBuilder().create(); |
| | | String idStr = ""; |
| | | for (long id : ids) { |
New file |
| | |
| | | package com.yeshi.buwan.service.inter; |
| | | |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUserExtra; |
| | | import com.yeshi.buwan.exception.LoginUserException; |
| | | import org.yeshi.utils.entity.wx.WeiXinUser; |
| | | |
| | | public interface LoginUserService { |
| | | |
| | | /** |
| | | * 初始化附加信息 |
| | | * @param extra |
| | | */ |
| | | public void initExtra(LoginUserExtra extra); |
| | | |
| | | /** |
| | | * 主键查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public LoginUser getLoginUser(String id); |
| | | |
| | | |
| | | /** |
| | | * 根据openId查询 |
| | | * |
| | | * @param systemId |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | public LoginUser getLoginUserByOpenId(String systemId, String openid); |
| | | |
| | | |
| | | /** |
| | | * 根据邮箱查询 |
| | | * |
| | | * @param systemId |
| | | * @param email |
| | | * @return |
| | | */ |
| | | public LoginUser getLoginUserByEmail(String systemId, String email); |
| | | |
| | | /** |
| | | * 根据QQ openId查询 |
| | | * |
| | | * @param systemId |
| | | * @param openId |
| | | * @return |
| | | */ |
| | | public LoginUser getLoginUserByQQOpenId(String systemId, String openId); |
| | | |
| | | /** |
| | | * 根据微信查询 |
| | | * |
| | | * @param systemId |
| | | * @param unionId |
| | | * @return |
| | | */ |
| | | public LoginUser getLoginUserByWxUnionId(String systemId, String unionId); |
| | | |
| | | /** |
| | | * 根据电话号码查询 |
| | | * |
| | | * @param systemId |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | public LoginUser getLoginUserByPhone(String systemId, String phone); |
| | | |
| | | |
| | | /** |
| | | * 绑定手机号 |
| | | * |
| | | * @param loginUid |
| | | * @param phone |
| | | */ |
| | | public void bindPhone(String loginUid, String phone) throws LoginUserException; |
| | | |
| | | /** |
| | | * 绑定QQ |
| | | * |
| | | * @param loginUid |
| | | * @param openId |
| | | * @param nickName |
| | | * @throws LoginUserException |
| | | */ |
| | | public void bindQQ(String loginUid, String openId, String nickName, String portrait) throws LoginUserException; |
| | | |
| | | /** |
| | | * 绑定微信 |
| | | * |
| | | * @param loginUid |
| | | * @param info |
| | | * @throws LoginUserException |
| | | */ |
| | | public void bindWX(String loginUid, WeiXinUser info) throws LoginUserException; |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.service.inter; |
| | | |
| | | import com.yeshi.buwan.exception.SMSException; |
| | | |
| | | public interface SMSService { |
| | | |
| | | /** |
| | | * 发送绑定验证码 |
| | | * |
| | | * @param uid |
| | | * @param phone |
| | | * @param codeLength |
| | | * @throws SMSException |
| | | */ |
| | | public void sendBindVCode(Long uid, String phone, int codeLength) throws SMSException; |
| | | |
| | | /** |
| | | * 验证码是否在正确 |
| | | * |
| | | * @param phone |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public boolean verifyBindVCode(String phone, String code); |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.service.inter; |
| | | |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface VideoResourceMapExtraInfoService { |
| | | |
| | | |
| | | public Map<String, VideoResourceMapExtraInfo> listMap(List<String> videoIdList, List<Long> resourceIds); |
| | | |
| | | |
| | | public List<VideoInfo> batchExtraInfo(List<VideoInfo> videoInfoList, List<Long> resourceIds); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.service.inter.juhe; |
| | | |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface PPTVService { |
| | | |
| | | /** |
| | | * 添加到视频 |
| | | * |
| | | * @param series |
| | | */ |
| | | public void addToVideoInfo(PPTVSeries series); |
| | | |
| | | |
| | | /** |
| | | * 剧集下线 |
| | | * |
| | | * @param infoId |
| | | */ |
| | | public void offLineSeries(String infoId); |
| | | |
| | | |
| | | /** |
| | | * 查询剧集详情 |
| | | * |
| | | * @param infoId |
| | | * @return |
| | | */ |
| | | public PPTVSeries getSeriesDetail(String infoId); |
| | | |
| | | |
| | | /** |
| | | * 处理PPTV的专辑 |
| | | * |
| | | * @param seriesList |
| | | */ |
| | | public void save(List<PPTVSeries> seriesList); |
| | | |
| | | |
| | | /** |
| | | * 保存专辑 |
| | | * |
| | | * @param series |
| | | */ |
| | | public void save(PPTVSeries series); |
| | | |
| | | |
| | | } |
| | |
| | | package com.yeshi.buwan.service.manager; |
| | | |
| | | import com.yeshi.buwan.domain.ResourceVideo; |
| | | import com.yeshi.buwan.domain.SolrVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.domain.video.AlbumVideoMap; |
| | | import com.yeshi.buwan.dto.search.SolrResultDTO; |
| | | import com.yeshi.buwan.dto.search.SolrVideoSearchFilter; |
| | | import com.yeshi.buwan.service.imp.ResourceVideoService; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.inter.juhe.AlbumVideoMapService; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.factory.SolrVideoFactory; |
| | | 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.result.ScoredPage; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 搜索引擎-专辑数据管理 |
| | | */ |
| | | @Component |
| | | public class SolrAlbumDataManager { |
| | | |
| | | private final Logger logger = LoggerFactory.getLogger(SolrAlbumDataManager.class); |
| | | |
| | | @Resource |
| | | private SolrTemplate solrTemplate; |
| | |
| | | @Resource |
| | | private VideoInfoService videoInfoService; |
| | | |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | |
| | | |
| | | public void saveOrUpdate(VideoInfo videoInfo) { |
| | | UpdateResponse updateResponse = solrTemplate.saveBean(SolrVideoFactory.create(videoInfo)); |
| | | UpdateResponse updateResponse = solrTemplate.saveBean(SolrVideoFactory.create(videoInfo, videoInfo.getResourceList())); |
| | | if (updateResponse.getStatus() == 0) { |
| | | solrTemplate.commit(); |
| | | } else { |
| | |
| | | public void saveOrUpdate(List<VideoInfo> videoInfoList) { |
| | | List<SolrVideo> solrVideoList = new ArrayList<>(); |
| | | for (VideoInfo vi : videoInfoList) { |
| | | solrVideoList.add(SolrVideoFactory.create(vi)); |
| | | solrVideoList.add(SolrVideoFactory.create(vi, vi.getResourceList())); |
| | | } |
| | | UpdateResponse updateResponse = solrTemplate.saveBeans(solrVideoList); |
| | | if (updateResponse.getStatus() == 0) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | *删除所有 |
| | | */ |
| | | public void clear() { |
| | | Query query = new SimpleQuery("name:*"); |
| | | UpdateResponse updateResponse = solrTemplate.delete(query); |
| | | if (updateResponse.getStatus() == 0) { |
| | | solrTemplate.commit(); |
| | | } else { |
| | | solrTemplate.rollback(); |
| | | } |
| | | } |
| | | |
| | | public void deleteById(String id) { |
| | | |
| | | |
| | | UpdateResponse updateResponse = solrTemplate.deleteById(id); |
| | | if (updateResponse.getStatus() == 0) { |
| | | solrTemplate.commit(); |
| | |
| | | return solrVideo; |
| | | } |
| | | |
| | | public SolrResultDTO findByKey(String key, Integer contentType, Integer videoType, int page, int pageSize) { |
| | | Query query = new SimpleQuery("name:\"" + key + "\""); |
| | | public SolrResultDTO find(SolrVideoSearchFilter filter, int page, int pageSize) { |
| | | logger.info(filter.getKey() + "#" + page); |
| | | Query query = new SimpleQuery("name:\"" + filter.getKey() + "\""); |
| | | |
| | | Criteria criteria = new Criteria("contenttype").is(contentType); |
| | | Criteria criteria = new Criteria("contenttype").is(filter.getContentType()); |
| | | |
| | | if (videoType != null) |
| | | criteria = criteria.and("root_video_type").is(videoType); |
| | | if (filter.getVideoType() != null) { |
| | | criteria = criteria.and("root_video_type").is(filter.getVideoType()); |
| | | } |
| | | if (filter.getResourceIds() != null && filter.getResourceIds().length > 0) { |
| | | criteria = criteria.and("resourceIds").contains(filter.getResourceIds()); |
| | | } |
| | | |
| | | /** 添加条件 */ |
| | | if (criteria != null) |
| | |
| | | query.setOffset((page - 1) * pageSize); |
| | | /** 设置每页显示记录数,默认10 */ |
| | | query.setRows(pageSize); |
| | | query.addSort(new Sort(Sort.Direction.DESC, "year")); |
| | | if (StringUtil.isNullOrEmpty(filter.getSortKey())) { |
| | | query.addSort(new Sort(Sort.Direction.DESC, "year")); |
| | | } else { |
| | | query.addSort(new Sort(Sort.Direction.DESC, filter.getSortKey())); |
| | | } |
| | | ScoredPage<SolrVideo> result = solrTemplate.queryForPage(query, SolrVideo.class); |
| | | System.out.println("总记录数:" + result.getTotalElements()); |
| | | List<SolrVideo> list = result.getContent(); |
| | |
| | | videoIds.add(map.getVideoId()); |
| | | } |
| | | List<VideoInfo> videoList = videoInfoService.listByVideoIds(videoIds); |
| | | |
| | | //获取资源ID |
| | | List<ResourceVideo> rvList = resourceVideoService.getResourceList(videoList); |
| | | Map<String, List<VideoResource>> map = new HashMap<>(); |
| | | for (ResourceVideo rv : rvList) { |
| | | if (rv.getVideo() != null && rv.getResource() != null) { |
| | | if (map.get(rv.getVideo().getId()) == null) |
| | | map.put(rv.getVideo().getId(), new ArrayList<>()); |
| | | map.get(rv.getVideo().getId()).add(rv.getResource()); |
| | | } |
| | | } |
| | | for (VideoInfo vi : videoList) { |
| | | if (map.get(vi.getId()) != null) { |
| | | vi.setResourceList(map.get(vi.getId())); |
| | | } |
| | | } |
| | | |
| | | saveOrUpdate(videoList); |
| | | } |
| | | } |
| | |
| | | AlbumVideoMap map = albumVideoMapService.selectByVideoId(videoId); |
| | | if (map == null) |
| | | return; |
| | | |
| | | List<VideoInfo> videoList = new ArrayList<>(); |
| | | VideoInfo video = videoInfoService.getVideoInfo(videoId); |
| | | if (video != null) |
| | | videoList.add(video); |
| | | saveOrUpdate(videoList); |
| | | if (video != null) { |
| | | List<ResourceVideo> rvList = resourceVideoService.getResourceList(video.getId()); |
| | | List<VideoResource> vrList = new ArrayList<>(); |
| | | for (ResourceVideo rv : rvList) |
| | | vrList.add(rv.getResource()); |
| | | video.setResourceList(vrList); |
| | | saveOrUpdate(video); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.util; |
| | | |
| | | import com.aliyuncs.DefaultAcsClient; |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.dypnsapi.model.v20170525.GetMobileRequest; |
| | | import com.aliyuncs.dypnsapi.model.v20170525.GetMobileResponse; |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.aliyuncs.exceptions.ServerException; |
| | | import com.aliyuncs.profile.DefaultProfile; |
| | | import com.google.gson.Gson; |
| | | |
| | | /** |
| | | * 阿里云一键登录帮助类 |
| | | */ |
| | | public class AliyunOneKeyLoginUtil { |
| | | |
| | | private final static String ACCESS_KEY = "LTAI4FwmTxVCuzTaoZtDiV8z"; |
| | | private final static String ACESS_SCRET = "ixWg90QbYFKP6ae5xpAo2P1qwIyll5"; |
| | | |
| | | public static String getMobile(String accessToken, String outId) { |
| | | DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", ACCESS_KEY, ACESS_SCRET); |
| | | IAcsClient client = new DefaultAcsClient(profile); |
| | | |
| | | GetMobileRequest request = new GetMobileRequest(); |
| | | request.setAccessToken(accessToken); |
| | | if (!StringUtil.isNullOrEmpty(outId)) |
| | | request.setOutId(outId); |
| | | |
| | | try { |
| | | GetMobileResponse response = client.getAcsResponse(request); |
| | | System.out.println(new Gson().toJson(response)); |
| | | if (response.getGetMobileResultDTO() != null) { |
| | | String mobile = response.getGetMobileResultDTO().getMobile(); |
| | | return mobile; |
| | | } |
| | | System.out.println(new Gson().toJson(response)); |
| | | } catch (ServerException e) { |
| | | e.printStackTrace(); |
| | | } catch (ClientException e) { |
| | | System.out.println("ErrCode:" + e.getErrCode()); |
| | | System.out.println("ErrMsg:" + e.getErrMsg()); |
| | | System.out.println("RequestId:" + e.getRequestId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.yeshi.buwan.util; |
| | | |
| | | import com.yeshi.buwan.dto.config.TencentSMSConfig; |
| | | import org.yeshi.utils.annotation.MapUtil; |
| | | |
| | | import javax.persistence.Entity; |
| | | import java.util.Properties; |
| | | |
| | | @Entity |
| | | public class Constant { |
| | | public static boolean isUpdate = false;// 是否在上传应用市场; |
| | | |
| | | public static boolean IsOutNet = false;// 是否为外网 |
| | | public final static String PHONE_BIND_PREFIX = "phone_login_code_"; |
| | | |
| | | public static boolean JobTasker = false; |
| | | public static boolean isUpdate = false;// 是否在上传应用市场; |
| | | |
| | | public static int pageCount = 20; |
| | | public static int HOT_SEARCH_COUNT = 20; |
| | | public static boolean IsOutNet = false;// 是否为外网 |
| | | |
| | | // 1-每日打开送积分 2-观看视频送积分 3-缓存视频送积分 4-搜藏视频送积分 5-分享送积分 6-连续观看 7-评价 8-建议 |
| | | public final static int GET_SCORE_OPEN = 1; |
| | | public final static int GET_SCORE_WATCH = 2; |
| | | public final static int GET_SCORE_SAVE = 3; |
| | | public final static int GET_SCORE_COLLECTION = 4; |
| | | public final static int GET_SCORE_SHARE = 5; |
| | | public final static int GET_SCORE_CONTINUE_WATCH = 6; |
| | | public final static int GET_SCORE_EVALUATE = 7; |
| | | public final static int GET_SCORE_ADVICE = 8; |
| | | public static boolean JobTasker = false; |
| | | |
| | | public final static String RANDKEY = "randkey"; |
| | | public static int pageCount = 20; |
| | | public static int HOT_SEARCH_COUNT = 20; |
| | | |
| | | public final static String RANDOMCODE = "RANDOM_CODE"; |
| | | public final static String ADMIN = "ADMIN_INFO"; |
| | | public final static String WEBSITE = "video.yeshitv.com:8089";// |
| | | // public final static String WEBSITE = "115.28.20.162:8080"; |
| | | public final static String ROOT_UPLOAD = "C:/software/Tomcat 6.0/webapps/BeiBeiVideo/upload/video"; |
| | | // 1-每日打开送积分 2-观看视频送积分 3-缓存视频送积分 4-搜藏视频送积分 5-分享送积分 6-连续观看 7-评价 8-建议 |
| | | public final static int GET_SCORE_OPEN = 1; |
| | | public final static int GET_SCORE_WATCH = 2; |
| | | public final static int GET_SCORE_SAVE = 3; |
| | | public final static int GET_SCORE_COLLECTION = 4; |
| | | public final static int GET_SCORE_SHARE = 5; |
| | | public final static int GET_SCORE_CONTINUE_WATCH = 6; |
| | | public final static int GET_SCORE_EVALUATE = 7; |
| | | public final static int GET_SCORE_ADVICE = 8; |
| | | |
| | | public final static String[] YEARS = { "全部", "2016", "2015", "2014", "2013", "2012", "2011", "00年代", "90年代", |
| | | "80年代" }; |
| | | public final static String RANDKEY = "randkey"; |
| | | |
| | | public final static String[] POJIE_LIST = { "http://www.fun.tv/" |
| | | // "http://m.fun.tv/", "http://www.hunantv.com/", |
| | | // "http://m.hunantv.com/", "http://www.wasu.cn/", |
| | | // "http://v.ku6.com/", "http://m.ku6.com", |
| | | // "http://ps.beva.cn", "http://m.tv.sohu.com/", |
| | | // "http://tv.sohu.com/", "http://www.acfun.tv/", "leshivip=1", |
| | | // "http://www.le123.com", "http://cms.cztv.com", |
| | | // "https://dqplayers.duapp.com/", "http://v.youku.com", |
| | | // "http://www.tudou.com", "http://tv.ifeng.com/film", |
| | | // "http://v.pptv.com", "http://www.letv.com", |
| | | // "http://www.le.com" |
| | | }; |
| | | public final static String RANDOMCODE = "RANDOM_CODE"; |
| | | public final static String ADMIN = "ADMIN_INFO"; |
| | | public final static String WEBSITE = "video.yeshitv.com:8089";// |
| | | // public final static String WEBSITE = "115.28.20.162:8080"; |
| | | public final static String ROOT_UPLOAD = "C:/software/Tomcat 6.0/webapps/BeiBeiVideo/upload/video"; |
| | | |
| | | public final static boolean IsDebug = true; |
| | | public final static String[] YEARS = {"全部", "2016", "2015", "2014", "2013", "2012", "2011", "00年代", "90年代", |
| | | "80年代"}; |
| | | |
| | | public final static boolean IOSTest = false; |
| | | public final static String[] POJIE_LIST = {"http://www.fun.tv/" |
| | | // "http://m.fun.tv/", "http://www.hunantv.com/", |
| | | // "http://m.hunantv.com/", "http://www.wasu.cn/", |
| | | // "http://v.ku6.com/", "http://m.ku6.com", |
| | | // "http://ps.beva.cn", "http://m.tv.sohu.com/", |
| | | // "http://tv.sohu.com/", "http://www.acfun.tv/", "leshivip=1", |
| | | // "http://www.le123.com", "http://cms.cztv.com", |
| | | // "https://dqplayers.duapp.com/", "http://v.youku.com", |
| | | // "http://www.tudou.com", "http://tv.ifeng.com/film", |
| | | // "http://v.pptv.com", "http://www.letv.com", |
| | | // "http://www.le.com" |
| | | }; |
| | | |
| | | public final static String SOLR_URL = "http://121.42.58.49:8080/solr/YSDQ/"; |
| | | // public final static String ROOT_UPLOAD = |
| | | // "D:/workspace/web/.metadata/.me_tcat/webapps/BeiBeiVideo/upload/juhe"; |
| | | public final static boolean IsDebug = true; |
| | | |
| | | // Android广告位 |
| | | public static int AD_COMMON_ANDROID_FOUND_SPECIAL = 1; |
| | | public static int AD_COMMON_ANDROID_FOUND_APPHUI = 2; |
| | | public final static boolean IOSTest = false; |
| | | |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_DIANYING = 5; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_DIANSHIJU = 6; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_ZONGYI = 7; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_DONGMAN = 8; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_YULE = 9; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_YOUXI = 10; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_SHENGHUO = 11; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_KEJI = 12; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_TIYU = 13; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_YUEWU = 14; |
| | | public final static String SOLR_URL = "http://121.42.58.49:8080/solr/YSDQ/"; |
| | | // public final static String ROOT_UPLOAD = |
| | | // "D:/workspace/web/.metadata/.me_tcat/webapps/BeiBeiVideo/upload/juhe"; |
| | | |
| | | // IOS广告位 |
| | | public static int AD_COMMON_IOS_FOUND_SPECIAL = 3; |
| | | public static int AD_COMMON_IOS_FOUND_APPHUI = 4; |
| | | // Android广告位 |
| | | public static int AD_COMMON_ANDROID_FOUND_SPECIAL = 1; |
| | | public static int AD_COMMON_ANDROID_FOUND_APPHUI = 2; |
| | | |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_DIANYING = 15; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_DIANSHIJU = 16; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_ZONGYI = 17; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_DONGMAN = 18; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_YULE = 19; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_YOUXI = 20; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_SHENGHUO = 21; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_KEJI = 22; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_TIYU = 23; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_YUEWU = 24; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_DIANYING = 5; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_DIANSHIJU = 6; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_ZONGYI = 7; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_DONGMAN = 8; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_YULE = 9; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_YOUXI = 10; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_SHENGHUO = 11; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_KEJI = 12; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_TIYU = 13; |
| | | public static int AD_COMMON_ANDROID_CLASS_RECOMMEND_YUEWU = 14; |
| | | |
| | | public static int VERSION_NEW_ANDROID_V2 = 35;// 新版版本号 |
| | | public static int VERSION_NEW_IOS_V2 = 15;// 新版版本号 |
| | | // IOS广告位 |
| | | public static int AD_COMMON_IOS_FOUND_SPECIAL = 3; |
| | | public static int AD_COMMON_IOS_FOUND_APPHUI = 4; |
| | | |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_DIANYING = 15; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_DIANSHIJU = 16; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_ZONGYI = 17; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_DONGMAN = 18; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_YULE = 19; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_YOUXI = 20; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_SHENGHUO = 21; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_KEJI = 22; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_TIYU = 23; |
| | | public static int AD_COMMON_IOS_CLASS_RECOMMEND_YUEWU = 24; |
| | | |
| | | public static int VERSION_NEW_ANDROID_V2 = 35;// 新版版本号 |
| | | public static int VERSION_NEW_IOS_V2 = 15;// 新版版本号 |
| | | |
| | | |
| | | //腾讯短信验证码配置 |
| | | public static TencentSMSConfig tencentSMSConfig; |
| | | |
| | | static { |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .getProperties(Constant.class.getClassLoader().getResourceAsStream("sms_tencent_config.properties")); |
| | | tencentSMSConfig = (TencentSMSConfig) MapUtil.parseMap(TencentSMSConfig.class, ps); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | public static List<VideoDetailInfo> getZongYiByHtml(String url, |
| | | VideoInfo info) { |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | Document doc = Jsoup.parse(get(url)); |
| | | Element els = null; |
| | | try { |
| | |
| | | |
| | | detailInfo.setAdmin(new AdminInfo("1")); |
| | | detailInfo.setCreatetime(System.currentTimeMillis() + ""); |
| | | List<VideoUrl> list = new ArrayList<VideoUrl>(); |
| | | List<VideoUrl> list = new ArrayList<>(); |
| | | VideoUrl videoUrl = new VideoUrl(); |
| | | videoUrl.setAdmin(new AdminInfo("1")); |
| | | videoUrl.setBaseUrl(url); |
| | |
| | | |
| | | public static List<VideoDetailInfo> getDianShiJuByHtml(String url, |
| | | VideoInfo info) { |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | Document doc = Jsoup.parse(get(url)); |
| | | Element els = doc.getElementById("tvplay-box"); |
| | | Elements deEls = els.getElementsByTag("li"); |
| | |
| | | |
| | | detailInfo.setAdmin(new AdminInfo("1")); |
| | | detailInfo.setCreatetime(System.currentTimeMillis() + ""); |
| | | List<VideoUrl> list = new ArrayList<VideoUrl>(); |
| | | List<VideoUrl> list = new ArrayList<>(); |
| | | VideoUrl videoUrl = new VideoUrl(); |
| | | videoUrl.setAdmin(new AdminInfo("1")); |
| | | videoUrl.setBaseUrl(url); |
| | |
| | | Element root = doc.getElementsByAttributeValue("class", |
| | | "clearfix ullist-ele").get(0); |
| | | Elements roots = root.getElementsByTag("li"); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | for (int i = 0; i < roots.size(); i++) { |
| | | |
| | | AdminInfo admin = new AdminInfo("1"); |
| | |
| | | info.setWatchCount("0"); |
| | | info.setYear("2015"); |
| | | info.setVideoType(videoType); |
| | | List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>(); |
| | | List<VideoUrl> urlList = new ArrayList<VideoUrl>(); |
| | | List<VideoDetailInfo> detailList = new ArrayList<>(); |
| | | List<VideoUrl> urlList = new ArrayList<>(); |
| | | VideoUrl videoUrl = new VideoUrl(); |
| | | videoUrl.setAdmin(admin); |
| | | videoUrl.setBaseUrl(baseUrl); |
| | |
| | | Element root = doc.getElementsByAttributeValue("class", |
| | | "clearfix ullist-ele").get(0); |
| | | Elements roots = root.getElementsByTag("li"); |
| | | List<VideoInfo> list = new ArrayList<VideoInfo>(); |
| | | List<VideoInfo> list = new ArrayList<>(); |
| | | for (int i = 0; i < roots.size(); i++) { |
| | | VideoInfo info = new VideoInfo(); |
| | | Element e = roots.get(i); |
New file |
| | |
| | | package com.yeshi.buwan.util; |
| | | |
| | | public enum RedisKeyEnum { |
| | | SMSVCode("smscode-", "短信验证码"), |
| | | SMSLIMIT("smscode-limit-", "短信验证码发送限制"), |
| | | |
| | | ; |
| | | |
| | | private final String key; |
| | | private final String desc; |
| | | |
| | | private RedisKeyEnum(String key, String desc) { |
| | | this.key = key; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public String getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public static String getRedisKey(RedisKeyEnum keyEnum, String value) { |
| | | return keyEnum.getKey() + value; |
| | | } |
| | | } |
| | |
| | | @Component |
| | | public class RedisManager { |
| | | |
| | | @Resource |
| | | private JedisPool jedisPool; |
| | | @Resource |
| | | private JedisPool jedisPool; |
| | | |
| | | public Jedis getJedis() { |
| | | Jedis jedis = jedisPool.getResource(); |
| | | return jedis; |
| | | } |
| | | public Jedis getJedis() { |
| | | Jedis jedis = jedisPool.getResource(); |
| | | return jedis; |
| | | } |
| | | |
| | | /** |
| | | * 缓存字符串 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | private void setString(String key, String value) { |
| | | Jedis jedis = getJedis(); |
| | | SetParams params = new SetParams().nx().ex(60); |
| | | jedis.set(key, value, params); |
| | | try { |
| | | jedis.set(key, value); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | /** |
| | | * 缓存字符串 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | private void setString(String key, String value) { |
| | | Jedis jedis = getJedis(); |
| | | SetParams params = new SetParams().nx().ex(60); |
| | | jedis.set(key, value, params); |
| | | try { |
| | | jedis.set(key, value); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除某个键值 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | private void removeKey(String key) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.del(key); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | /** |
| | | * 删除某个键值 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | private void removeKey(String key) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.del(key); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 缓存字符串 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @param seconds |
| | | * -缓存时间(s) |
| | | */ |
| | | private void setString(String key, String value, int seconds) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.setex(key, seconds, value); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | /** |
| | | * 缓存字符串 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @param seconds -缓存时间(s) |
| | | */ |
| | | private void setString(String key, String value, int seconds) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.setex(key, seconds, value); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | |
| | | private String getString(String key) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | return jedis.get(key); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | private String getString(String key) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | return jedis.get(key); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | |
| | | public void increase(String key) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.incr(key); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | public void increase(String key) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.incr(key); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | |
| | | public void expire(String key, int seconds) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.expire(key, seconds); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | public void expire(String key, int seconds) { |
| | | Jedis jedis = getJedis(); |
| | | try { |
| | | jedis.expire(key, seconds); |
| | | } finally { |
| | | jedis.close(); |
| | | } |
| | | } |
| | | |
| | | public void cacheCommonString(String key, String value, int seconds) { |
| | | setString(key, value, seconds); |
| | | } |
| | | public void cacheCommonString(String key, String value, int seconds) { |
| | | setString(key, value, seconds); |
| | | } |
| | | |
| | | public void cacheCommonString(String key, String value) { |
| | | setString(key, value); |
| | | } |
| | | public void cacheCommonString(String key, String value) { |
| | | setString(key, value); |
| | | } |
| | | |
| | | public String getCommonString(String key) { |
| | | return getString(key); |
| | | } |
| | | public String getCommonString(String key) { |
| | | return getString(key); |
| | | } |
| | | |
| | | public void removeCommonString(String key) { |
| | | removeKey(key); |
| | | } |
| | | public void removeCommonString(String key) { |
| | | removeKey(key); |
| | | } |
| | | |
| | | /** |
| | | * 保存视频数据 |
| | | * |
| | | * @param key |
| | | * @param videoData |
| | | */ |
| | | public void saveVideoList(String key, VideoListResultVO videoData) { |
| | | Gson gson = new Gson(); |
| | | cacheCommonString(key, gson.toJson(videoData), 60 * 60 * 24); |
| | | } |
| | | /** |
| | | * 保存视频数据 |
| | | * |
| | | * @param key |
| | | * @param videoData |
| | | */ |
| | | public void saveVideoList(String key, VideoListResultVO videoData) { |
| | | Gson gson = new Gson(); |
| | | cacheCommonString(key, gson.toJson(videoData), 60 * 60 * 24); |
| | | } |
| | | |
| | | /** |
| | | * 获取视频列表 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public VideoListResultVO getVideoList(String key) { |
| | | String st = getCommonString(key); |
| | | if (!StringUtil.isNullOrEmpty(st)) { |
| | | return new Gson().fromJson(st, VideoListResultVO.class); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | * 获取视频列表 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public VideoListResultVO getVideoList(String key) { |
| | | String st = getCommonString(key); |
| | | if (!StringUtil.isNullOrEmpty(st)) { |
| | | return new Gson().fromJson(st, VideoListResultVO.class); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 保存列表 |
| | | * |
| | | * @param clazzList |
| | | * @param key |
| | | * @param seconds |
| | | */ |
| | | public <T> T saveObjList(List<T> clazzList, String key, Integer seconds) { |
| | | if (clazzList == null) |
| | | return null; |
| | | String value = new Gson().toJson(clazzList); |
| | | if (seconds != null) |
| | | cacheCommonString(key, value, seconds); |
| | | else |
| | | cacheCommonString(key, value); |
| | | return null; |
| | | } |
| | | /** |
| | | * 保存列表 |
| | | * |
| | | * @param clazzList |
| | | * @param key |
| | | * @param seconds |
| | | */ |
| | | public <T> T saveObjList(List<T> clazzList, String key, Integer seconds) { |
| | | if (clazzList == null) |
| | | return null; |
| | | String value = new Gson().toJson(clazzList); |
| | | if (seconds != null) |
| | | cacheCommonString(key, value, seconds); |
| | | else |
| | | cacheCommonString(key, value); |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 获取对象 |
| | | * |
| | | * @param clazz |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public Class<?> getObj(Class<?> clazz, String key) { |
| | | String value = getCommonString(key); |
| | | return (Class<?>) new Gson().fromJson(value, clazz); |
| | | } |
| | | /** |
| | | * 获取对象 |
| | | * |
| | | * @param clazz |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public Class<?> getObj(Class<?> clazz, String key) { |
| | | String value = getCommonString(key); |
| | | return (Class<?>) new Gson().fromJson(value, clazz); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | * |
| | | * @param clazz |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public <T> List<T> getObjList(Class<T> clazz, String key) { |
| | | String value = getCommonString(key); |
| | | return JsonUtil.jsonToList(value, clazz); |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | * |
| | | * @param clazz |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public <T> List<T> getObjList(Class<T> clazz, String key) { |
| | | String value = getCommonString(key); |
| | | return JsonUtil.jsonToList(value, clazz); |
| | | } |
| | | |
| | | public boolean isSmsFrequencyLimit(String phone, Integer type) { |
| | | if (type == null) { |
| | | type = 0; |
| | | } |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSVCode, phone + "-" + type); |
| | | String value = getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(value)) |
| | | return false; |
| | | else |
| | | return true; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.yeshi.buwan.domain.ResourceVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.dto.mq.*; |
| | | import com.yeshi.buwan.funtv.entity.FunTVAlbum2; |
| | | import com.yeshi.buwan.iqiyi.entity.IqiyiAlbum2; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import com.yeshi.buwan.service.imp.JobThreadExecutorServiceImpl; |
| | | import com.yeshi.buwan.service.imp.ResourceVideoService; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.inter.juhe.FunTV2Service; |
| | | import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service; |
| | | import com.yeshi.buwan.service.inter.juhe.PPTVService; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.slf4j.Logger; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | |
| | | @Resource |
| | | private PPTVService pptvService; |
| | | |
| | | private static boolean isInited = false; |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(SpringContext.class); |
| | |
| | | } |
| | | |
| | | private void init() { |
| | | logger.error("初始化"); |
| | | if (!Constant.JobTasker) { |
| | | doSolrJob(); |
| | | doAddIqiyi2Video(); |
| | |
| | | } |
| | | |
| | | private void doSolrJob() { |
| | | new JobThreadExecutorServiceImpl().run(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | List<SolrVideoMQMsg> solrMsgList = CMQManager.getInstance().consumeSolrMsg(16); |
| | | if (solrMsgList != null) |
| | | for (SolrVideoMQMsg solrVideo : solrMsgList) { |
| | | try { |
| | | VideoInfo videoInfo = videoInfoService.getVideoInfo(solrVideo.getId()); |
| | | if (videoInfo != null) { |
| | | if ("1".equalsIgnoreCase(videoInfo.getShow())) |
| | | solrDataManager.saveOrUpdate(videoInfo); |
| | | else |
| | | solrDataManager.deleteById(videoInfo.getId()); |
| | | for (int i = 0; i < 5; i++) { |
| | | new JobThreadExecutorServiceImpl().run(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | logger.info("doSolrJob"); |
| | | List<SolrVideoMQMsg> solrMsgList = CMQManager.getInstance().consumeSolrMsg(16); |
| | | if (solrMsgList != null) |
| | | for (SolrVideoMQMsg solrVideo : solrMsgList) { |
| | | try { |
| | | VideoInfo videoInfo = videoInfoService.getVideoInfo(solrVideo.getId()); |
| | | if (videoInfo != null) { |
| | | if ("1".equalsIgnoreCase(videoInfo.getShow())) { |
| | | List<VideoResource> resourceList = new ArrayList<>(); |
| | | List<ResourceVideo> rvList = resourceVideoService.getResourceList(videoInfo.getId()); |
| | | if (rvList != null) |
| | | for (ResourceVideo rv : rvList) |
| | | resourceList.add(rv.getResource()); |
| | | videoInfo.setResourceList(resourceList); |
| | | solrDataManager.saveOrUpdate(videoInfo); |
| | | } else |
| | | solrDataManager.deleteById(videoInfo.getId()); |
| | | } |
| | | CMQManager.getInstance().deleteSolrMsg(solrVideo.getHandler()); |
| | | } catch (Exception e) { |
| | | logger.error("添加到搜索引擎出错", e); |
| | | } |
| | | CMQManager.getInstance().deleteSolrMsg(solrVideo.getHandler()); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | new JobThreadExecutorServiceImpl().run(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | logger.info("doAddIqiyi2Video"); |
| | | List<IqiyiAlbum2MQMsg> iqiyiAlbumMsgList = CMQManager.getInstance().consumeIqiyiAlbumUpdateMsg(16); |
| | | if (iqiyiAlbumMsgList != null) |
| | | for (IqiyiAlbum2MQMsg iqiyiAlbum2MQMsg : iqiyiAlbumMsgList) { |
| | | try { |
| | | Long qikuID = iqiyiAlbum2MQMsg.getId(); |
| | | IqiyiAlbum2 album2 = iqiyi2Service.selectAlbumById(qikuID); |
| | | logger.info("爱奇艺专辑:" + album2.getName()); |
| | | if (album2 != null) { |
| | | iqiyi2Service.addToVideoInfo(album2); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | private void doAddPPTVVideo() { |
| | | new JobThreadExecutorServiceImpl().run(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | List<PPTVMQMsg> pptvMsgList = CMQManager.getInstance().consumePPTVSeriesUpdateMsg(16); |
| | | if (pptvMsgList != null) |
| | | for (PPTVMQMsg pptvmqMsg : pptvMsgList) { |
| | | try { |
| | | switch (pptvmqMsg.getType()) { |
| | | case PPTVMQMsg.TYPE_ADD_OR_UPDATE: |
| | | PPTVSeries pptvSeries = pptvService.getSeriesDetail(pptvmqMsg.getInfoId()); |
| | | if (pptvSeries != null) { |
| | | pptvService.addToVideoInfo(pptvSeries); |
| | | } |
| | | break; |
| | | |
| | | case PPTVMQMsg.TYPE_DELETE: |
| | | pptvService.offLineSeries(pptvmqMsg.getInfoId()); |
| | | break; |
| | | } |
| | | CMQManager.getInstance().deletePPTVSeriesUpdateMsg(pptvmqMsg.getHandler()); |
| | | } catch (Exception e) { |
| | | logger.error("PPTV添加到视频出错:" + e.getMessage()); |
| | | logger.error("infoId:" + pptvmqMsg.getInfoId()); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | private void doDeleteVideoResource() { |
| | | new JobThreadExecutorServiceImpl().run(new Runnable() { |
| | | @Override |
| | |
| | | |
| | | import com.yeshi.buwan.domain.SolrVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.util.VideoTypeUtil; |
| | | import org.yeshi.utils.StringUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public class SolrVideoFactory { |
| | | |
| | | |
| | | public static SolrVideo create(VideoInfo videoInfo) { |
| | | |
| | | |
| | | public static SolrVideo create(VideoInfo videoInfo, List<VideoResource> videoResources) { |
| | | SolrVideo solrVideo = new SolrVideo(); |
| | | solrVideo.setMainactor(videoInfo.getMainActor()); |
| | | solrVideo.setShow(Integer.parseInt(videoInfo.getShow())); |
| | |
| | | solrVideo.setVideocount(videoInfo.getVideocount()); |
| | | solrVideo.setName(videoInfo.getName()); |
| | | solrVideo.setUpdatetime(videoInfo.getUpdatetime()); |
| | | if (videoInfo.getUpdatetime() != null) |
| | | solrVideo.setUpdateTime(Long.parseLong(videoInfo.getUpdatetime())); |
| | | if (videoInfo.getVideoType() != null) |
| | | solrVideo.setRootVideoType(videoInfo.getVideoType().getId()); |
| | | else |
| | | solrVideo.setRootVideoType(0); |
| | | |
| | | solrVideo.setYear(videoInfo.getYear()); |
| | | |
| | | if (videoResources != null && videoResources.size() > 0) { |
| | | List<String> resourceIds = new ArrayList<>(); |
| | | for (VideoResource vr : videoResources) { |
| | | resourceIds.add(vr.getId()); |
| | | } |
| | | solrVideo.setResourceIds(StringUtil.concat(resourceIds, ",")); |
| | | } |
| | | |
| | | return solrVideo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.util.log; |
| | | |
| | | import com.yeshi.buwan.iqiyi.entity.IqiyiAlbum2; |
| | | |
| | | /** |
| | | * 视频日志 |
| | | */ |
| | | public class VideoLogFactory { |
| | | |
| | | /** |
| | | * 获取播放链接日志 |
| | | * |
| | | * @param detailSystemId |
| | | * @param id |
| | | * @param type |
| | | * @param resourceid |
| | | * @param videoid |
| | | * @return |
| | | */ |
| | | public static String createPlayUrlLog(String detailSystemId, String id, String type, int resourceid, String videoid) { |
| | | return String.format("getPlayUrl:%s#%s#%s#%s#%s", detailSystemId, videoid, resourceid, id, type); |
| | | } |
| | | |
| | | /** |
| | | * 播放统计 |
| | | * @param detailSystemId |
| | | * @param resourceid |
| | | * @param videoid |
| | | * @return |
| | | */ |
| | | public static String createStatisticLog(String detailSystemId, int resourceid, String videoid) { |
| | | return String.format("playStatistic:%s#%s#%s", detailSystemId, videoid, resourceid); |
| | | } |
| | | |
| | | /** |
| | | * 视频详情 |
| | | * |
| | | * @param detailSystemId |
| | | * @param videoid |
| | | * @param resourceid |
| | | * @return |
| | | */ |
| | | public static String createVideoDetailLog(String detailSystemId, String videoid, String resourceid) { |
| | | return String.format("getVideoDetail:%s#%s#%s", detailSystemId, videoid, resourceid); |
| | | } |
| | | |
| | | /** |
| | | * 爱奇艺视频更新 |
| | | * |
| | | * @param album2 |
| | | * @return |
| | | */ |
| | | public static String createAddAlbumLog(IqiyiAlbum2 album2) { |
| | | return String.format("addAlbum:iqiyi#%s#%s", album2.getId(), album2.getName()); |
| | | } |
| | | |
| | | public static String createAddToVideoLog(IqiyiAlbum2 album2) { |
| | | return String.format("addToVideo:iqiyi#%s#%s", album2.getId(), album2.getName()); |
| | | } |
| | | |
| | | } |
| | |
| | | private static CMQManager cmqManager; |
| | | private static CMQUtil cmqUtil; |
| | | // 搜索引擎 |
| | | public static String QUEUENAME_SOLR = "buwan-solr"; |
| | | public static String QUEUENAME_SOLR = "buwan-solr-new"; |
| | | //视频更新-爱奇艺2 |
| | | public static String QUEUENAME_VIDEO_UPDATE_IQIYI_2 = "buwan-video-update-iqiyi2"; |
| | | //视频更新-风行2 |
| | | public static String QUEUENAME_VIDEO_UPDATE_FUNTV_2 = "buwan-video-update-funtv2"; |
| | | |
| | | //视频更新-PPTV |
| | | public static String QUEUENAME_VIDEO_UPDATE_PPTV = "buwan-video-update-pptv"; |
| | | |
| | | //删除视频资源 |
| | | public static String QUEUENAME_VIDEO_RESOURCE_DELETE = "buwan-video-resource-delete"; |
| | |
| | | cmqUtil.createQueue(QUEUENAME_SOLR, 1024 * 1024); |
| | | cmqUtil.createQueue(QUEUENAME_VIDEO_UPDATE_IQIYI_2, 1024 * 1024); |
| | | cmqUtil.createQueue(QUEUENAME_VIDEO_UPDATE_FUNTV_2, 1024 * 1024); |
| | | cmqUtil.createQueue(QUEUENAME_VIDEO_UPDATE_PPTV, 1024 * 1024); |
| | | cmqUtil.createQueue(QUEUENAME_VIDEO_RESOURCE_DELETE, 1024 * 1024); |
| | | cmqUtil.createQueue(QUEUENAME_UPDATE_VIDEO_EXTRAINFO, 1024 * 1024); |
| | | |
| | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | //删除专辑更新消息 |
| | | public void deleteFunTVAlbumUpdateMsg(String handler) { |
| | | cmqUtil.deleteMsg(QUEUENAME_VIDEO_UPDATE_FUNTV_2, handler); |
| | |
| | | |
| | | |
| | | /** |
| | | * PPTV剧集更新 |
| | | */ |
| | | |
| | | //添加专辑更新消息 |
| | | public void addPPTVSeriesUpdateMsg(PPTVMQMsg msg) { |
| | | cmqUtil.sendMsg(QUEUENAME_VIDEO_UPDATE_PPTV, new Gson().toJson(msg)); |
| | | } |
| | | |
| | | //消费专辑更新消息 |
| | | public List<PPTVMQMsg> consumePPTVSeriesUpdateMsg(int count) { |
| | | List<PPTVMQMsg> list = new ArrayList<>(); |
| | | List<Message> msgList = cmqUtil.recieveMsg(count, QUEUENAME_VIDEO_UPDATE_PPTV); |
| | | if (msgList != null) |
| | | for (Message msg : msgList) { |
| | | PPTVMQMsg mm = new Gson().fromJson(msg.msgBody, PPTVMQMsg.class); |
| | | mm.setHandler(msg.receiptHandle); |
| | | list.add(mm); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | //删除专辑更新消息 |
| | | public void deletePPTVSeriesUpdateMsg(String handler) { |
| | | cmqUtil.deleteMsg(QUEUENAME_VIDEO_UPDATE_PPTV, handler); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 搜索引擎 |
| | | * @param id |
| | | */ |
New file |
| | |
| | | package com.yeshi.buwan.util.user; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | | import org.yeshi.utils.entity.alipay.AlipayAppInfo; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.Properties; |
| | | |
| | | public class VipUtil { |
| | | |
| | | |
| | | public static AlipayAppInfo getAlipayApp() { |
| | | try { |
| | | Properties properties = new Properties(); |
| | | properties.load(VipUtil.class.getClassLoader().getResourceAsStream("alipay.properties")); |
| | | String appId = properties.getProperty("app_id"); |
| | | String privateKey = properties.getProperty("private_key"); |
| | | String publicKey = properties.getProperty("alipay_public_key"); |
| | | AlipayAppInfo appInfo = new AlipayAppInfo(appId, privateKey, publicKey); |
| | | return appInfo; |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 获取会员充值支付宝支付表单 |
| | | * |
| | | * @param orderNo |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static String getVipChargeAlipayForm(String orderNo, BigDecimal money) { |
| | | try { |
| | | String goodsTitle = "影视大全会员充值"; |
| | | String returnUrl = "http://vip.ysdq.yeshitv.com"; |
| | | String notifyUrl = "http://193.112.34.40:8089/BuWan/alipay/pay"; |
| | | AlipayAppInfo appInfo = getAlipayApp(); |
| | | String form = AlipayH5PayUtil.createOrderForm(appInfo, orderNo, money, goodsTitle, returnUrl, notifyUrl); |
| | | return form; |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | public final static List<String> iqiyiSpecialNames = Arrays.asList(new String[]{ |
| | | //不参与过滤的词 |
| | | "《卧底》" |
| | | "《卧底》","没关系,是青春啊!","山海情(原声版)" |
| | | }); |
| | | |
| | | |
| | |
| | | import com.yeshi.buwan.funtv.FunTVUtil2; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil2; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.imp.juhe.FunTVService; |
| | | import com.yeshi.buwan.service.imp.juhe.IqiyiService; |
| | | import com.yeshi.buwan.service.imp.juhe.PPTVService; |
| | | import com.yeshi.buwan.service.imp.juhe.SoHuService; |
| | | import com.yeshi.buwan.service.inter.juhe.FunTV2Service; |
| | | import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service; |
| | | import com.yeshi.buwan.sohu.SoHuUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.log.VideoLogFactory; |
| | | import com.yeshi.buwan.vo.AcceptData; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Component |
| | | public class VideoDetailUtil { |
| | | |
| | | private final Logger playLogger = LoggerFactory.getLogger("videoPlay"); |
| | | |
| | | @Resource |
| | | private IqiyiUtil iqiyiUtil; |
| | | |
| | |
| | | private FunTV2Service funTV2Service; |
| | | |
| | | @Resource |
| | | private PPTVService pptvService; |
| | | |
| | | @Resource |
| | | private VideoInfoService videoInfoService; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | // @Cacheable(value = "homeCache", key = "'getVideoInfo'+'-'+#videoid+'-'+#resourceId+'-'+#cacheMD5") |
| | | public VideoInfo getVideoInfo(final String videoid, final String resourceId, final List<Long> reList, |
| | | public VideoInfo getVideoInfo(String detailSystemId,final String videoid, final String resourceId, final List<Long> reList, |
| | | String cacheMD5) { |
| | | |
| | | playLogger.info(VideoLogFactory.createVideoDetailLog(detailSystemId, videoid,resourceId)); |
| | | return (VideoInfo) videoInfoDao.excute(new HibernateCallback<VideoInfo>() { |
| | | public VideoInfo doInHibernate(Session session) throws HibernateException { |
| | | |
| | |
| | | return funTV2Service.getVideoDetailList(videoid, page, pageSize); |
| | | case FunTVUtil.RESOURCE_ID: |
| | | return funTVService.getVideoDetailList(videoid, page, pageSize); |
| | | case PPTVUtil.RESOURCE_ID: |
| | | return pptvService.getVideoDetailList(videoid, page, pageSize); |
| | | case AcFunUtil.RESOURCE_ID: |
| | | return videoInfoService.getVideoDetailList(videoid, vr, page, pageSize); |
| | | case SoHuUtil.RESOURCE_ID: |
| | |
| | | return funTV2Service.getLatestVideoDetail(videoid); |
| | | case FunTVUtil.RESOURCE_ID: |
| | | return funTVService.getLatestVideoDetail(videoid); |
| | | case PPTVUtil.RESOURCE_ID: |
| | | return pptvService.getLatestVideoDetail(videoid); |
| | | case SoHuUtil.RESOURCE_ID: |
| | | return soHuService.getLatestVideoDetail(videoid); |
| | | default: |
| | |
| | | return funTV2Service.getShowType(videoid); |
| | | case FunTVUtil.RESOURCE_ID: |
| | | return funTVService.getShowType(videoid); |
| | | case PPTVUtil.RESOURCE_ID: |
| | | return pptvService.getShowType(videoid); |
| | | case SoHuUtil.RESOURCE_ID: |
| | | return soHuUtil.getShowType(videoid); |
| | | default: |
| | |
| | | |
| | | @Cacheable(value = "homeCache", key = "'getPlayUrl'+'-'+#detailSystemId+'-'+#id+'-'+#type+'-'+#resourceid") |
| | | public PlayUrl getPlayUrl(AcceptData acceptData, String detailSystemId, String id, String type, int resourceid, String videoid) { |
| | | |
| | | playLogger.info(VideoLogFactory.createPlayUrlLog(detailSystemId, id, type, resourceid, videoid)); |
| | | switch (resourceid) { |
| | | case IqiyiUtil2.RESOURCE_ID: |
| | | return iqiyi2Service.getPlayUrl(detailSystemId, resourceid, id, videoid); |
| | | case IqiyiUtil.RESOURCE_ID: |
| | | return iqiyiUtil.getPlayUrl(detailSystemId, resourceid + "", type, id); |
| | | case FunTVUtil2.RESOURCE_ID: |
| | | return funTV2Service.getPlayUrl(acceptData,detailSystemId, resourceid, id, videoid); |
| | | return funTV2Service.getPlayUrl(acceptData, detailSystemId, resourceid, id, videoid); |
| | | case FunTVUtil.RESOURCE_ID: |
| | | return funTVService.getPlayUrl(detailSystemId, id, type, resourceid, videoid); |
| | | case PPTVUtil.RESOURCE_ID: |
| | | return pptvService.getPlayUrl(detailSystemId, id, type, resourceid, videoid); |
| | | case SoHuUtil.RESOURCE_ID: |
| | | return soHuUtil.getPlayUrl(detailSystemId, resourceid + "", type, id); |
| | | case AcFunUtil.RESOURCE_ID: |
New file |
| | |
| | | package com.yeshi.buwan.vo.video; |
| | | |
| | | import com.yeshi.buwan.domain.SolrVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | |
| | | public class VideoAdminInfoVO { |
| | | |
| | | private String id; |
| | | private String name; |
| | | private String picture; |
| | | private String updatetime; |
| | | private String show; |
| | | private String tag; |
| | | |
| | | public void setShow(String show) { |
| | | this.show = show; |
| | | } |
| | | |
| | | public String getShow() { |
| | | return show; |
| | | } |
| | | |
| | | public String getTag() { |
| | | return tag; |
| | | } |
| | | |
| | | public void setTag(String tag) { |
| | | this.tag = tag; |
| | | } |
| | | |
| | | public static VideoAdminInfoVO create(VideoInfo video) { |
| | | VideoAdminInfoVO vo = new VideoAdminInfoVO(); |
| | | vo.setId(video.getId()); |
| | | vo.setName(video.getName()); |
| | | vo.setPicture(video.getHpicture()); |
| | | vo.setShow(video.getShow() + ""); |
| | | vo.setUpdatetime(TimeUtil.getGernalTime( |
| | | Long.parseLong( |
| | | StringUtil.isNullOrEmpty(video.getCreatetime() + "") ? "0" : video.getCreatetime() + ""), |
| | | "yyyy-MM-dd")); |
| | | vo.setTag(video.getTag()); |
| | | return vo; |
| | | } |
| | | |
| | | |
| | | public static VideoAdminInfoVO create(SolrVideo solrVideo) { |
| | | VideoAdminInfoVO vo = new VideoAdminInfoVO(); |
| | | vo.setId(solrVideo.getId()); |
| | | vo.setName(solrVideo.getName()); |
| | | vo.setPicture(solrVideo.getHpicture()); |
| | | vo.setShow(solrVideo.getShow() + ""); |
| | | vo.setUpdatetime(TimeUtil.getGernalTime( |
| | | Long.parseLong( |
| | | StringUtil.isNullOrEmpty(solrVideo.getUpdatetime() + "") ? "0" : solrVideo.getUpdatetime() + ""), |
| | | "yyyy-MM-dd")); |
| | | vo.setTag(solrVideo.getTag()); |
| | | return vo; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPicture() { |
| | | return picture; |
| | | } |
| | | |
| | | public void setPicture(String picture) { |
| | | this.picture = picture; |
| | | } |
| | | |
| | | public String getUpdatetime() { |
| | | return updatetime; |
| | | } |
| | | |
| | | public void setUpdatetime(String updatetime) { |
| | | this.updatetime = updatetime; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public String addCommonAd() { |
| | | String pids = request.getParameter("pids"); |
| | | List<String> pidList = new ArrayList<String>(); |
| | | List<String> pidList = new ArrayList<>(); |
| | | for (int i = 0; i < pids.split(",").length; i++) { |
| | | if (!StringUtil.isNullOrEmpty(pids.split(",")[i])) |
| | | pidList.add(pids.split(",")[i]); |
| | |
| | | |
| | | public String getHotSearchRank() { |
| | | Config cf = configService.getConfigByKey("topsearch", new DetailSystem(SystemUtil.getDetailSystemId() + ""), SystemUtil.getDefaultVersion()); |
| | | List<String> list = new ArrayList<String>(); |
| | | List<String> list = new ArrayList<>(); |
| | | if (cf != null) { |
| | | try { |
| | | JSONArray array = JSONArray.fromObject(cf.getValue()); |
| | |
| | | |
| | | public String addHotStar() { |
| | | String detailSystems = request.getParameter("detailsystems"); |
| | | List<String> sysList = new ArrayList<String>(); |
| | | List<String> sysList = new ArrayList<>(); |
| | | if (!StringUtil.isNullOrEmpty(detailSystems)) { |
| | | if (detailSystems.contains(",")) { |
| | | for (String st : detailSystems.split(",")) |
| | |
| | | Map<String, String> map = configService.getConfigAsMap(SystemUtil.getDetailSystem(), SystemUtil.getDefaultVersion()); |
| | | String versions = map.get("versions"); |
| | | String[] versionSts = versions.split(","); |
| | | List<String> versionList = new ArrayList<String>(); |
| | | List<String> versionList = new ArrayList<>(); |
| | | for (String st : versionSts) |
| | | versionList.add(st); |
| | | request.setAttribute("detailSystemList", detailSystemList); |
| | |
| | | |
| | | public String push() { |
| | | |
| | | List<String> versionList = new ArrayList<String>(); |
| | | List<String> versionList = new ArrayList<>(); |
| | | String[] versionSts = versions.split(","); |
| | | for (String st : versionSts) |
| | | versionList.add(st); |
| | |
| | | |
| | | String[] detailsystemSts = apps.split(","); |
| | | |
| | | List<DetailSystem> systemList = new ArrayList<DetailSystem>(); |
| | | List<DetailSystem> systemList = new ArrayList<>(); |
| | | for (String st : detailsystemSts) |
| | | systemList.add(systemService.getDetailSystemById(st)); |
| | | boolean isS = false; |
| | |
| | | |
| | | public String addSpecial() { |
| | | String detailSystems = request.getParameter("detailsystems"); |
| | | List<String> sysList = new ArrayList<String>(); |
| | | List<String> sysList = new ArrayList<>(); |
| | | if (!StringUtil.isNullOrEmpty(detailSystems)) { |
| | | if (detailSystems.contains(",")) { |
| | | for (String st : detailSystems.split(",")) |
New file |
| | |
| | | app_id=2021002122664142 |
| | | private_key=MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCobx3dj48eJ8xg9twd0Yo2j/t0UzawGHcCJ5lmA+LR3ZJHKud2/YhsekN5ZXR9BgJ3DZNTlZfRK3/DyW2CxEJmpCU9tNAM8WapkaXobQOaBqVhcfj9YevygcGYfAK0vPYNuGwCOW93Cl0Lm9SWIZQZIv3w8mWQBX9+7csAt9K46hk7QCJG/YyHORgTFWeHLATbj+j8JywyFpd5ZSrGFUj/bC5Z1v2Gx7lXOLF5VnAjY7slPdElYe93MHnLh901NQPI/IoqJupEJhHgV2Qi3Z+7PXXNTa/tWAew3rlYdEtfRojFPhqB5rNF3inIKLryMfxBcbVTG13QGFWo3gJZ9BdbAgMBAAECggEBAJkaiBdBy2Ip4wmw21zvf6chMf0HNwrS8jqvLC0jEyaZNcIjKctronqYmITcyAptUAhP+r9bl2i3FagujLD1HTaXtpJkrUlWlW9FyX2Aumlj6SiupRoNzJ/fes7UytDngvHt1aAf/UZD0VggChl95FUFDbfbXp6PoNkL5h98+LrD9eKrRd2Oeclpnet5E3benQogLLtW+n10PB2PTrBJg+HGk+M5J5t5O4fEZ4mCpEPl2Pq6g5KVR7Hbb5n0x7K5Uo8WXU79OIdMt8zy6a8BHx3VPYjkqr9VjMCEfgKBngMJ1ezFJGQ6rc3xJD9DoSR7/YXuFeHKQao8tX6UmUGjRUECgYEA4amyumywa37lmDtkmHXXgJHcpvejxM+A7F8DBw/uUBekVSCq3rU/kPsnXCr+/pL91ulEcJduCmPIbfkvTmAthD5IqDhQYnnYX+ulhX1C8Aj6zulkGqfa8sevuPjaLelLNZxvXXIYNik4+z5o7CSIgOrCjBhAWCKAgb/45BEwpIMCgYEAvxPb/ib7MMdEbWBmvqtauPPi170GOT9IiIcXQwyhcfj5/+0E83bjoEj0GOUH2X8qT0liSmj1LJqny4K00qnG05zijL+vna/pn3zFTKrRVtCmRDtYSJtzcCju7RdkNQ8WXASTmjaSinuEdg+aTI9G+oOMyIYGEQVZ8o+w2KzaukkCgYEAkPH+Ie5UNwewE2L6z07J2ARYlUp0/6JE7g5tFGkwKnO1ExTDi/8hUE9xzaq0VPI3Z4Y3dpZdkQDcqX6n2xC9y7Zx1tMtFsOqrpnenGqDx0gNST/yE4kDgnOutAHrqheyPkI36e6yDH/X4NEKdbtVjnC7+15MXg/zOOQEywEbnF8CgYAqcSHTYRs4aXqUhO4teehL3rhLTUw9mQXmdYNAPGT76N627xHDdmv3JV06zlyg/fMK63TurEORJcURmjXJ+TYVuOpFcypx7yoIZ/F3JxYan3ve+gORFR5eEmmHtkNm2bQQul+CyI5iPi9c/fg6+zQ73s59l+9vBm5FR49zgWmQKQKBgQCmq14mUPPe5LF3W342qZTKSKtwF82XYmuJ0EtjYxlt+D70fSvaB8Dtj/XanL0FRMVZsJaIM1pjdnMIqRN2AGOXLRt8DV9lTELqBfq2aI7f9vscc28T4ySUTkWVbZYwC6iDlPBha3MUwGGiO/rNbnIY7GB3BUSpgazo02lvzd0vsw== |
| | | alipay_public_key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHWEgMOlGb/VbN5pcSXv+DLX2EJ43p93zP9eyao8ghj1LcBSf5Sx4gYpuySKZ0oimILb+ErOAlDzcXwvMxcVTK0W2M6UaUW0Vh71vOorqggOGqMJsSDpV1hvYrUSCYu1Qe5KtV85w+Kw4dImC3fayIaxUMhwySuniQ/uQtezRHn/vwXrGigu3Y2tRgPMUptqA14EYEfhpm3KjLXsqWdJBO6ziiqILHJtow65QzkeoLM2ZHpYH6oYy2rIj/iSIpos18MKWvr4XrqSptJYIQp+G3dwqjlt2kk4bpgAXQSR6wKAtGTkAYvlOSpkQXVqI3tIGZO3ZM9bFQurMBoJFX790wIDAQAB |
| | |
| | | </id> |
| | | <many-to-one name="video" column="videoid"></many-to-one> |
| | | <property name="createtime" type="string"></property> |
| | | <many-to-one name="user" column="loginuid" class="LoginUser" lazy="false"></many-to-one> |
| | | <many-to-one name="user" column="loginuid" class="com.yeshi.buwan.domain.user.LoginUser" lazy="false"></many-to-one> |
| | | <property name="content" type="string" column="content"></property> |
| | | <property name="thirdType" type="string" column="thirdtype"></property> |
| | | <property name="detailsystem" type="string" column="detailsystemid" ></property> |
| | |
| | | <?xml version='1.0' encoding='UTF-8'?> |
| | | <!DOCTYPE hibernate-mapping PUBLIC |
| | | "-//Hibernate/Hibernate Mapping DTD 3.0//EN" |
| | | "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> |
| | | "-//Hibernate/Hibernate Mapping DTD 3.0//EN" |
| | | "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> |
| | | <hibernate-mapping package="com.yeshi.buwan.domain"> |
| | | <class name="LoginUser" table="wk_loginuser"> |
| | | <id name="id" column="id"> |
| | | <generator class="native"></generator> |
| | | </id> |
| | | <property name="name" type="string" column="`name`"></property> |
| | | <property name="openid" type="string"></property> |
| | | <property name="portrait" type="string"></property> |
| | | <property name="device" type="string"></property> |
| | | <property name="createtime" type="string"></property> |
| | | <property name="detailsystem" type="string" column="detailsystemid"></property> |
| | | <property name="pwd" type="string" column="`pwd`"></property> |
| | | <property name="loginType" type="integer" column="logintype"></property> |
| | | <class name="com.yeshi.buwan.domain.user.LoginUser" table="wk_loginuser"> |
| | | <id name="id" column="id"> |
| | | <generator class="native"></generator> |
| | | </id> |
| | | <property name="name" type="string" column="`name`"></property> |
| | | <property name="openid" type="string"></property> |
| | | <property name="portrait" type="string"></property> |
| | | <property name="device" type="string"></property> |
| | | <property name="createtime" type="string"></property> |
| | | <property name="detailsystem" type="string" column="detailsystemid"></property> |
| | | <property name="pwd" type="string" column="`pwd`"></property> |
| | | <property name="loginType" type="integer" column="logintype"></property> |
| | | |
| | | <property name="sex" type="string" column="`sex`"></property> |
| | | <property name="birthday" type="string" column="`birthday`"></property> |
| | | <property name="sign" type="string" column="`sign`"></property> |
| | | <property name="ipinfo" type="string" column="`ipinfo`"></property> |
| | | <property name="state" type="integer" column="`state`"></property> |
| | | |
| | | </class> |
| | | <property name="systemId" type="string" column="`system_id`"></property> |
| | | <property name="qqOpenId" type="string" column="`qq_open_id`"></property> |
| | | <property name="qqNickName" type="string" column="`qq_nick_name`"></property> |
| | | <property name="qqPortrait" type="string" column="`qq_portrait`"></property> |
| | | <property name="wxOpenId" type="string" column="`wx_open_id`"></property> |
| | | <property name="wxUnionId" type="string" column="`wx_union_id`"></property> |
| | | <property name="wxNickName" type="string" column="`wx_nick_name`"></property> |
| | | <property name="wxPortrait" type="string" column="`wx_portrait`"></property> |
| | | <property name="email" type="string" column="`email`"></property> |
| | | <property name="phone" type="string" column="`phone`"></property> |
| | | |
| | | |
| | | <property name="sex" type="string" column="`sex`"></property> |
| | | <property name="birthday" type="string" column="`birthday`"></property> |
| | | <property name="sign" type="string" column="`sign`"></property> |
| | | <property name="ipinfo" type="string" column="`ipinfo`"></property> |
| | | <property name="state" type="integer" column="`state`"></property> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </class> |
| | | </hibernate-mapping> |
New file |
| | |
| | | <?xml version='1.0' encoding='UTF-8'?> |
| | | <!DOCTYPE hibernate-mapping PUBLIC |
| | | "-//Hibernate/Hibernate Mapping DTD 3.0//EN" |
| | | "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> |
| | | <hibernate-mapping package="com.yeshi.buwan.domain"> |
| | | <class name="com.yeshi.buwan.domain.VideoResourceMapExtraInfo" table="wk_video_resource_map_extra_info" |
| | | lazy="false"> |
| | | <id name="id" column="id"> |
| | | </id> |
| | | |
| | | <property name="videoId" type="string" column="video_id"></property> |
| | | <property name="resourceId" type="long" column="resource_id"></property> |
| | | <property name="free" type="integer" column="free"></property> |
| | | <property name="createTime" column="create_time" type="timestamp"></property> |
| | | <property name="updateTime" column="update_time" type="timestamp"></property> |
| | | </class> |
| | | |
| | | |
| | | </hibernate-mapping> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!--scan为true(默认每一分钟扫描一下配置文件,如果发生更改就重新加载配置文件) |
| | | scanPeriod设置扫描配置文件的时间间隔(如果没有指定单位默认为毫秒) |
| | | debug 如果设置为true,在控制台中打印logback内部运行日志(内部状态信息,如果配置文件有错误 |
| | | 也会输出),由于logback已经很稳定了,我们一般设置为false,以免干扰我们查看有用的日志信息 --> |
| | | <configuration scan="true" scanPeriod="60 seconds" debug="false"> |
| | | <contextName>BuWan</contextName> |
| | | <!--定义参数常量(全局变量)--> |
| | | <!--设置Logger的等级 (TRACE<DEBUG<INFO<WARN<ERROR),假设配置为INFO,那么debug将不会被 |
| | | 输出,我们一般会把debug,info,error的信息分别输出到文件中--> |
| | | <property name="log.level" value="debug"/> |
| | | <!--归档日志文件保存的最大时间(单位跟按什么轮转有关,比如按天轮转那么单位就为天) --> |
| | | <property name="log.maxHistory" value="30"/> |
| | | <!--日志存储的根路径 ${catalina.base}指向每个Tomcat目录私有信息的位置, |
| | | 就是conf、logs、temp、webapps和work的父目录--> |
| | | <property name="log.filePath" value="E:/logback"/> |
| | | <!--日志展示的格式--> |
| | | <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"/> |
| | | |
| | | <!--appender是为了配置日志信息输出到哪个地方--> |
| | | <!--控制台设置,输出到控制台中--> |
| | | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| | | <!--encoder作用是既把日志信息转换为字符串,也输出到指定的位置 --> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <!--pattern为配置输出的格式--> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!-- ERROR --> |
| | | <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/error/error.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/error/error.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern> |
| | | ${log.pattern} |
| | | </pattern> |
| | | </layout> |
| | | </appender> |
| | | |
| | | |
| | | <appender name="ALIPAY_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/alipay/alipay.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/alipay/alipay.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern> |
| | | ${log.pattern} |
| | | </pattern> |
| | | </layout> |
| | | </appender> |
| | | |
| | | |
| | | <!-- DEBUG --> |
| | | <!-- 客户端接口出错 --> |
| | | <appender name="apiErrorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/client-api-error.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/error/client-api-error.%d{yyyy-MM-dd}.log.gz</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 搜索统计 --> |
| | | <appender name="searchAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/search.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/info/search.%d{yyyy-MM-dd}.log.gz</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | <appender name="videoPlayAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/video/video_play.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/video/video_play.%d{yyyy-MM-dd}.log.gz</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | |
| | | |
| | | <!--name表示为哪一个logger指定层级和输出的方式 |
| | | additivity表示叠加祖先的输出方式(默认为true,会叠加),所以com.lxc.o2o以及其子类都会输出在控制台中,因为这个logger继承了root中的appender |
| | | level表示级别大于等于${log.level}的信息才会输出,输出方式为配置的appender, |
| | | 由于这里level为debug(重写了,就不会继承root的level了), |
| | | 所以控制台中会输出大于等于debug等级的日志(包括持久层执行的mysql) |
| | | 并且 |
| | | debug日志会输出到debugAppender指定的文件中 |
| | | info日志会输出到infoAppender指定的文件中 |
| | | error日志会输出到errorAppender指定的文件中--> |
| | | |
| | | |
| | | <logger name="com.hxh.spring" level="INFO"> |
| | | <appender-ref ref="STDOUT"></appender-ref> |
| | | </logger> |
| | | |
| | | <!--additivity 是否向上传递 --> |
| | | <logger name="com.yeshi.buwan.aspect" level="ERROR" additivity="true"> |
| | | <appender-ref ref="apiErrorAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | <!--视频搜索关键词 --> |
| | | <logger name="com.yeshi.buwan.service.manager.SolrAlbumDataManager" level="INFO" additivity="true"> |
| | | <appender-ref ref="searchAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | <logger name="videoPlay" level="INFO" additivity="true"> |
| | | <appender-ref ref="videoPlayAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | <logger name="com.yeshi.buwan" level="INFO" additivity="true"> |
| | | <appender-ref ref="ERROR_FILE"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | <logger name="com.yeshi.buwan.controller.AlipayController" level="INFO" additivity="false"> |
| | | <appender-ref ref="ALIPAY_FILE"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 一切logger都会继承自root,root默认的层级level为debug --> |
| | | <root> |
| | | <level value="INFO"/> |
| | | <!--在控制台中输出所在层级对应level(以及大于level)的日志信息,因为这里并没有设置LevelFilter--> |
| | | <appender-ref ref="STDOUT"></appender-ref> |
| | | </root> |
| | | </configuration> |
| | |
| | | redis.addr=192.168.3.253 |
| | | redis.addr=193.112.34.40 |
| | | redis.port=6379 |
| | | redis.auth=123456 |
| | | redis.auth=weikou2014 |
| | | #193.112.34.40 |
| | | #redis.addr=172.16.16.3 |
| | | #redis.port=6379 |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!--scan为true(默认每一分钟扫描一下配置文件,如果发生更改就重新加载配置文件) |
| | | scanPeriod设置扫描配置文件的时间间隔(如果没有指定单位默认为毫秒) |
| | | debug 如果设置为true,在控制台中打印logback内部运行日志(内部状态信息,如果配置文件有错误 |
| | | 也会输出),由于logback已经很稳定了,我们一般设置为false,以免干扰我们查看有用的日志信息 --> |
| | | <configuration scan="true" scanPeriod="60 seconds" debug="false"> |
| | | |
| | | <!--定义参数常量(全局变量)--> |
| | | <!--设置Logger的等级 (TRACE<DEBUG<INFO<WARN<ERROR),假设配置为INFO,那么debug将不会被 |
| | | 输出,我们一般会把debug,info,error的信息分别输出到文件中--> |
| | | <property name="log.level" value="debug"/> |
| | | <!--归档日志文件保存的最大时间(单位跟按什么轮转有关,比如按天轮转那么单位就为天) --> |
| | | <property name="log.maxHistory" value="30"/> |
| | | <!--日志存储的根路径 ${catalina.base}指向每个Tomcat目录私有信息的位置, |
| | | 就是conf、logs、temp、webapps和work的父目录--> |
| | | <property name="log.filePath" value="/usr/local/tomcat/logs"/> |
| | | <!--日志展示的格式--> |
| | | <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"/> |
| | | |
| | | |
| | | <!--appender是为了配置日志信息输出到哪个地方--> |
| | | <!--控制台设置,输出到控制台中--> |
| | | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| | | <!--encoder作用是既把日志信息转换为字符串,也输出到指定的位置 --> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <!--pattern为配置输出的格式--> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!-- ERROR --> |
| | | <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/error/error.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/error/error.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern> |
| | | ${log.pattern} |
| | | </pattern> |
| | | </layout> |
| | | </appender> |
| | | |
| | | |
| | | <appender name="ALIPAY_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/alipay/alipay.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/alipay/alipay.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern> |
| | | ${log.pattern} |
| | | </pattern> |
| | | </layout> |
| | | </appender> |
| | | |
| | | |
| | | <!-- DEBUG --> |
| | | <!-- 客户端接口出错 --> |
| | | <appender name="apiErrorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/client-api-error.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/error/client-api-error.%d{yyyy-MM-dd}.log.gz</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 搜索统计 --> |
| | | <appender name="searchAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/search.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/info/search.%d{yyyy-MM-dd}.log.gz</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | <appender name="videoPlayAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/video/video_play.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/video/video_play.%d{yyyy-MM-dd}.log.gz</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>INFO</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | |
| | | |
| | | <!--name表示为哪一个logger指定层级和输出的方式 |
| | | additivity表示叠加祖先的输出方式(默认为true,会叠加),所以com.lxc.o2o以及其子类都会输出在控制台中,因为这个logger继承了root中的appender |
| | | level表示级别大于等于${log.level}的信息才会输出,输出方式为配置的appender, |
| | | 由于这里level为debug(重写了,就不会继承root的level了), |
| | | 所以控制台中会输出大于等于debug等级的日志(包括持久层执行的mysql) |
| | | 并且 |
| | | debug日志会输出到debugAppender指定的文件中 |
| | | info日志会输出到infoAppender指定的文件中 |
| | | error日志会输出到errorAppender指定的文件中--> |
| | | |
| | | |
| | | <logger name="com.hxh.spring" level="INFO"> |
| | | <appender-ref ref="STDOUT"></appender-ref> |
| | | </logger> |
| | | |
| | | <!--additivity 是否向上传递 --> |
| | | <logger name="com.yeshi.buwan.aspect" level="ERROR" additivity="true"> |
| | | <appender-ref ref="apiErrorAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | <!--视频搜索关键词 --> |
| | | <logger name="com.yeshi.buwan.service.manager.SolrAlbumDataManager" level="INFO" additivity="true"> |
| | | <appender-ref ref="searchAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | <logger name="videoPlay" level="INFO" additivity="true"> |
| | | <appender-ref ref="videoPlayAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | <logger name="com.yeshi.buwan" level="ERROR" additivity="true"> |
| | | <appender-ref ref="ERROR_FILE"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | <logger name="com.yeshi.buwan.controller.AlipayController" level="INFO" additivity="false"> |
| | | <appender-ref ref="ALIPAY_FILE"></appender-ref> |
| | | </logger> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 一切logger都会继承自root,root默认的层级level为debug --> |
| | | <root> |
| | | <level value="INFO"/> |
| | | <!--在控制台中输出所在层级对应level(以及大于level)的日志信息,因为这里并没有设置LevelFilter--> |
| | | <appender-ref ref="STDOUT"></appender-ref> |
| | | </root> |
| | | </configuration> |
| | |
| | | <mapping resource="domain/UseScoreHistory.hbm.xml" /> |
| | | <mapping resource="domain/VideoDetailInfo.hbm.xml" /> |
| | | <mapping resource="domain/VideoInfo.hbm.xml" /> |
| | | <mapping resource="domain/VideoResourceMapExtraInfo.hbm.xml" /> |
| | | <mapping resource="domain/VideoResource.hbm.xml" /> |
| | | <mapping resource="domain/VideoScoreHistory.hbm.xml" /> |
| | | <mapping resource="domain/VideoType.hbm.xml" /> |
| | |
| | | <mapping resource="domain/VideoTypeStatistics.hbm.xml" /> |
| | | <mapping resource="domain/VideoIntersection.hbm.xml" /> |
| | | <mapping resource="domain/VideoIntersectionVideo.hbm.xml" /> |
| | | <mapping resource="domain/PPTVAccount.hbm.xml" /> |
| | | <mapping resource="domain/PPTVVideo.hbm.xml" /> |
| | | <mapping resource="domain/PPTVVideo2Url.hbm.xml" /> |
| | | <mapping resource="domain/FengXingUrlId.hbm.xml" /> |
| | | <mapping resource="domain/HuaShuUrlId.hbm.xml" /> |
| | | <mapping resource="domain/MangGuoUrlId.hbm.xml" /> |
| | |
| | | <mapping resource="domain/video/sohu/SoHuAlbum.hbm.xml" /> |
| | | <mapping resource="domain/video/sohu/SoHuVideo.hbm.xml" /> |
| | | <mapping resource="domain/video/sohu/VideoSoHu.hbm.xml" /> |
| | | |
| | | |
| | | <!-- PPTV --> |
| | | <mapping resource="domain/video/pptv/PPTVCartoonDetail.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVCartoonVideo.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVMovieVideo.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVShortVideo.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVShowDetail.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVShowVideo.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVTVDetail.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/PPTVTVVideo.hbm.xml" /> |
| | | <mapping resource="domain/video/pptv/VideoPPTV.hbm.xml" /> |
| | | |
| | | |
| | | <!-- 风行 --> |
New file |
| | |
| | | app_id=1400246689 |
| | | app_key=7f3dfd82f3ff0326127a21009464bfd9 |
| | | sign=板栗快省 |
| | | content_bind=【[签名]】验证码:[验证码],2分钟内有效。为了保护您的账号安全,验证短信请勿转发他人。 |
| | |
| | | <html lang="zh-cn"> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="referrer" content="never"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| | | <title>分区视频</title> |
| | | <link href="css/bootstrap.min.css" rel="stylesheet"> |
| | | <link href="css/maincontent.css" rel="stylesheet"> |
| | | <style> |
| | | .search { |
| | | display: inline; |
| | | width: auto; |
| | | } |
| | | |
| | | #hometype input[type=checkbox] { |
| | | height: 20px; |
| | | width: 20px; |
| | | } |
| | | |
| | | #hometype ul li { |
| | | line-height: 30px; |
| | | } |
| | | |
| | | #hometype ul li span { |
| | | height: 30px; |
| | | vertical-align: middle; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | #hometype table td { |
| | | padding: 5px; |
| | | } |
| | | |
| | | #special input[type=checkbox] { |
| | | height: 20px; |
| | | width: 20px; |
| | | } |
| | | |
| | | #special ul li { |
| | | line-height: 30px; |
| | | } |
| | | |
| | | #special ul li span { |
| | | height: 30px; |
| | | vertical-align: middle; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | #special table td { |
| | | padding: 5px; |
| | | } |
| | | |
| | | #hometype-sure { |
| | | padding: 20px; |
| | | display: none; |
| | | } |
| | | |
| | | #hometype-sure span { |
| | | width: 100px; |
| | | text-align: right; |
| | | } |
| | | |
| | | #hometype-sure input[type=text] { |
| | | width: 360px; |
| | | display: inline; |
| | | } |
| | | |
| | | #hometype-sure div { |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="referrer" content="never"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| | | <title>分区视频</title> |
| | | <link href="css/bootstrap.min.css" rel="stylesheet"> |
| | | <link href="css/maincontent.css" rel="stylesheet"> |
| | | <style> |
| | | .search { |
| | | display: inline; |
| | | width: auto; |
| | | } |
| | | |
| | | <body> |
| | | <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> |
| | | </nav> |
| | | <div id="mainbody"> |
| | | <div id="sidebar"> |
| | | <dl> |
| | | </dl> |
| | | </div> |
| | | <div id="neirong"> |
| | | <div class="erjidh search-div" style="padding: 10px;"> |
| | | #hometype input[type=checkbox] { |
| | | height: 20px; |
| | | width: 20px; |
| | | } |
| | | |
| | | <div class="search videotypes"> |
| | | <select name="select" class="form-control roottype search"> |
| | | #hometype ul li { |
| | | line-height: 30px; |
| | | } |
| | | |
| | | </select> |
| | | #hometype ul li span { |
| | | height: 30px; |
| | | vertical-align: middle; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | </div> |
| | | #hometype table td { |
| | | padding: 5px; |
| | | } |
| | | |
| | | <select name="select" class="form-control search select-detailsystem"> |
| | | #special input[type=checkbox] { |
| | | height: 20px; |
| | | width: 20px; |
| | | } |
| | | |
| | | </select> |
| | | <select name="select" class="form-control search contenttype"> |
| | | <option value="1">正片</option> |
| | | <option value="2">其他</option> |
| | | </select> |
| | | <div class="form-group search" role="search"> |
| | | <input type="text" class="form-control search" id="kw" style="width: 200px;" placeholder="搜索"> |
| | | </div> |
| | | <button type="button" class="btn btn-default search-button">搜索</button> |
| | | #special ul li { |
| | | line-height: 30px; |
| | | } |
| | | |
| | | <div class="tianjia" class="search"> |
| | | <a href="add-fqmovie.html" class="btn btn-primary" role="button">添加内容 +</a> |
| | | </div> |
| | | #special ul li span { |
| | | height: 30px; |
| | | vertical-align: middle; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="qx"> |
| | | <div class="checkbox"> |
| | | <label> <input type="checkbox" class="check-all" value="#"> |
| | | 全选 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <button class="btn btn-warning pl-del" type="button">批量删除</button> |
| | | <button class="btn btn-primary pl-addrecommend" type="button">添加推荐</button> |
| | | <button class="btn btn-primary pl-addspecial" type="button">添加到合辑</button> |
| | | <button class="btn btn-primary pl-addtop" type="button">添加到榜首</button> |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"> |
| | | <a href="#">«</a> |
| | | </li> |
| | | <li class="active"> |
| | | <a href="#">1</a> |
| | | </li> |
| | | <li> |
| | | <a href="#">2</a> |
| | | </li> |
| | | <li> |
| | | <a href="#" class="next">»</a> |
| | | </li> |
| | | </ul> |
| | | <div class="form-group"> |
| | | <div class="tzan"> |
| | | <button type="button" class="btn btn-primary">跳转</button> |
| | | </div> |
| | | <div class="tz"> |
| | | <input class="form-control" type="text" placeholder="页数"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | #special table td { |
| | | padding: 5px; |
| | | } |
| | | |
| | | </div> |
| | | <div class="zhuti"> |
| | | <div class="liebiao"> |
| | | <table class="table"> |
| | | <thead> |
| | | <th width="7%">选择</th> |
| | | <th width="7%">编号</th> |
| | | <th width="12%">来源</th> |
| | | <th width="12%">封面</th> |
| | | <th width="17%">名称</th> |
| | | <th width="15%">更新时间</th> |
| | | <th width="8%">是否显示</th> |
| | | <th width="8%">操作</th> |
| | | <th width="7%">删除</th> |
| | | <th width="7%">编辑</th> |
| | | </thead> |
| | | <tbody> |
| | | <tr style="display: none;"> |
| | | <td width="7%"> |
| | | <div class="xuanze"> |
| | | <label> <input type="checkbox" class="check-item" |
| | | value="#"> |
| | | </label> |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="bianhao videoid">623</div> |
| | | </td> |
| | | <td width="12%"> |
| | | <div class="source" style="text-align: center;line-height: 105px;"></div> |
| | | </td> |
| | | <td width="12%"> |
| | | <div class="tupian-banner"> |
| | | <img alt src="image/banner/青云志.jpg" class="video-img" style="width: 240px;"> |
| | | </div> |
| | | </td> |
| | | <td width="17%"> |
| | | <div class="bianhao video-name"></div> |
| | | </td> |
| | | <td width="15%" style="text-align: center; line-height: 105px;" class="video-updatetime">2016-09-27</td> |
| | | <td width="8%"> |
| | | <div class="xuanze"> |
| | | <label> <input type="checkbox" value="#" class="video-show"> |
| | | </label> |
| | | </div> |
| | | </td> |
| | | <td width="8%"> |
| | | <div class="bianhao addrecommend"> |
| | | <a href="javascript:void(0)">添加推荐</a> |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="anniu"> |
| | | <img src="image/dustbin.png" class="delete"> |
| | | #hometype-sure { |
| | | padding: 20px; |
| | | display: none; |
| | | } |
| | | |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="anniu"> |
| | | <a key="370" class="edit" onclick="p_del()"><img src="image/bianji.png"></a> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | #hometype-sure span { |
| | | width: 100px; |
| | | text-align: right; |
| | | } |
| | | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="qx"> |
| | | <div class="checkbox"> |
| | | <label> <input type="checkbox" class="check-all" value="#"> |
| | | 全选 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <button class="btn btn-warning pl-del" type="button">批量删除</button> |
| | | <button class="btn btn-primary pl-addrecommend" type="button">添加推荐</button> |
| | | <button class="btn btn-primary pl-addspecial" type="button">添加到合辑</button> |
| | | <button class="btn btn-primary pl-addtop" type="button">添加到榜首</button> |
| | | #hometype-sure input[type=text] { |
| | | width: 360px; |
| | | display: inline; |
| | | } |
| | | |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"> |
| | | <a href="#">«</a> |
| | | </li> |
| | | <li class="active"> |
| | | <a href="#">1</a> |
| | | </li> |
| | | <li> |
| | | <a href="#">2</a> |
| | | </li> |
| | | <li> |
| | | <a href="#" class="next">»</a> |
| | | </li> |
| | | </ul> |
| | | <div class="form-group"> |
| | | <div class="tzan"> |
| | | <button type="button" class="btn btn-primary">跳转</button> |
| | | </div> |
| | | <div class="tz"> |
| | | <input class="form-control" type="text" placeholder="页数"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | #hometype-sure div { |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <body> |
| | | <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> |
| | | </nav> |
| | | <div id="mainbody"> |
| | | <div id="sidebar"> |
| | | <dl> |
| | | </dl> |
| | | </div> |
| | | <div id="neirong"> |
| | | <div class="erjidh search-div" style="padding: 10px;"> |
| | | |
| | | <!--栏目选择 --> |
| | | <div class="modal fade" id="hometype" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <input type="hidden" class="videoids" /> |
| | | <input type="hidden" class="desc" /> |
| | | <input type="hidden" class="picture" /> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| | | <h4 class="modal-title" id="myModalLabel">栏目选择</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="row"> |
| | | <div class="col-lg-4"> |
| | | <label>子系统选择</label> |
| | | <ul class="col-lg-12 detailsystem"> |
| | | <li><input type="checkbox" /> <span>布丸影视大全</span> </li> |
| | | <li><input type="checkbox" /> <span>布丸视频</span></li> |
| | | <li><input type="checkbox" /> <span>布丸影视大全IOS</span></li> |
| | | </ul> |
| | | </div> |
| | | <div class="col-lg-8"> |
| | | <table class="table"> |
| | | <thead> |
| | | <th>栏目ID</th> |
| | | <th>栏目名称</th> |
| | | <th>选择</th> |
| | | </thead> |
| | | <tbody> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox" /> </td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox" /> </td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox" /> </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> |
| | | <button type="button" class="btn btn-primary">提交更改</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="search videotypes"> |
| | | <select name="select" class="form-control roottype search"> |
| | | |
| | | <!-- 专辑选择 --> |
| | | <div class="modal fade" id="special" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <input type="hidden" class="videoids" /> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| | | <h4 class="modal-title" id="myModalLabel">专题选择</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="row"> |
| | | <div class="col-lg-4"> |
| | | <label>子系统选择</label> |
| | | <ul class="col-lg-12 detailsystem"> |
| | | <li><input type="checkbox" /> <span>布丸影视大全</span> </li> |
| | | <li><input type="checkbox" /> <span>布丸视频</span></li> |
| | | <li><input type="checkbox" /> <span>布丸影视大全IOS</span></li> |
| | | </ul> |
| | | </div> |
| | | <div class="col-lg-8"> |
| | | <table class="table"> |
| | | <thead> |
| | | <th>专题ID</th> |
| | | <th>专题名称</th> |
| | | <th>选择</th> |
| | | </thead> |
| | | <tbody> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox" /> </td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox" /> </td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox" /> </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> |
| | | <button type="button" class="btn btn-primary">提交更改</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </select> |
| | | |
| | | <!-- 栏目视频确认 --> |
| | | <div id="hometype-sure"> |
| | | <div class="row"> |
| | | <span class="col-lg-4">封面图片:</span><input type="text" class="form-control col-lg-8 picture" placeholder="如不更改可不填写" /> |
| | | </div> |
| | | <div class="row"> |
| | | <span class="col-lg-4"> 简介:</span><input type="text" class="form-control col-lg-8 desc" placeholder="如不更改可不填写" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="text-align: center;"> |
| | | <input type="button" class="btn btn-default" value="确定" /> |
| | | </div> |
| | | <select name="select" class="form-control search select-detailsystem"> |
| | | |
| | | </div> |
| | | </select> |
| | | <select name="select" class="form-control search contenttype"> |
| | | <option value="1">正片</option> |
| | | <option value="2">其他</option> |
| | | </select> |
| | | |
| | | <div id="dialog-chooselink" style="display: none;"> |
| | | <select name="select" class="form-control addType"> |
| | | <select name="select" class="form-control search resourceIds"> |
| | | <option value="0">全部</option> |
| | | <option value="24">风行2</option> |
| | | <option value="19">风行</option> |
| | | <option value="13">爱奇艺</option> |
| | | <option value="22">爱奇艺2</option> |
| | | <option value="21">Acfun</option> |
| | | </select> |
| | | <div class="form-group search" role="search"> |
| | | <input type="text" class="form-control search" id="kw" style="width: 200px;" placeholder="搜索"> |
| | | </div> |
| | | |
| | | </select> |
| | | </div> |
| | | <script src="//cdn.bootcss.com/jquery/1.10.1/jquery.min.js"></script> |
| | | <script src="js/nav.js"></script> |
| | | <script src="js/bootstrap.min.js"></script> |
| | | <script src="js/page.js"></script> |
| | | <script src="js/common.js"></script> |
| | | <script src="layer/layer.js"></script> |
| | | <script> |
| | | $(function() { |
| | | |
| | | function getCheckedItems() { |
| | | var ids = ""; |
| | | for(var i = 0; i < $(".check-item").length; i++) { |
| | | if($(".check-item").eq(i).is(':checked')) { |
| | | ids += $(".check-item").eq(i).attr("key") + ","; |
| | | } |
| | | } |
| | | if(ids.length > 0) |
| | | ids = ids.substr(0, ids.length - 1); |
| | | return ids; |
| | | } |
| | | <button type="button" class="btn btn-default search-button">搜索</button> |
| | | |
| | | $(".pl-del").click(function() { |
| | | var ids = getCheckedItems(); |
| | | if(ids.length < 1) { |
| | | layer.msg("请选择视频"); |
| | | return; |
| | | } |
| | | <div class="tianjia" class="search"> |
| | | <a href="add-fqmovie.html" class="btn btn-primary" role="button">添加内容 +</a> |
| | | </div> |
| | | |
| | | $.post('api/video/deletevideo', { |
| | | 'id': ids |
| | | }, function(data) { |
| | | layer.msg(data.msg); |
| | | if(data.code == 0) { |
| | | $deleteElement.parent().parent().parent().remove(); |
| | | } |
| | | }, 'json'); |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="qx"> |
| | | <div class="checkbox"> |
| | | <label> <input type="checkbox" class="check-all" value="#"> |
| | | 全选 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <button class="btn btn-warning pl-del" type="button">批量删除</button> |
| | | <button class="btn btn-primary pl-addrecommend" type="button">添加推荐</button> |
| | | <button class="btn btn-primary pl-addspecial" type="button">添加到合辑</button> |
| | | <button class="btn btn-primary pl-addtop" type="button">添加到榜首</button> |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"> |
| | | <a href="#">«</a> |
| | | </li> |
| | | <li class="active"> |
| | | <a href="#">1</a> |
| | | </li> |
| | | <li> |
| | | <a href="#">2</a> |
| | | </li> |
| | | <li> |
| | | <a href="#" class="next">»</a> |
| | | </li> |
| | | </ul> |
| | | <div class="form-group"> |
| | | <div class="tzan"> |
| | | <button type="button" class="btn btn-primary">跳转</button> |
| | | </div> |
| | | <div class="tz"> |
| | | <input class="form-control" type="text" placeholder="页数"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | }); |
| | | </div> |
| | | <div class="zhuti"> |
| | | <div class="liebiao"> |
| | | <table class="table"> |
| | | <thead> |
| | | <th width="7%">选择</th> |
| | | <th width="7%">编号</th> |
| | | <th width="12%">来源</th> |
| | | <th width="12%">封面</th> |
| | | <th width="17%">名称</th> |
| | | <th width="15%">更新时间</th> |
| | | <th width="8%">是否显示</th> |
| | | <th width="8%">操作</th> |
| | | <th width="7%">删除</th> |
| | | <th width="7%">编辑</th> |
| | | </thead> |
| | | <tbody> |
| | | <tr style="display: none;"> |
| | | <td width="7%"> |
| | | <div class="xuanze"> |
| | | <label> <input type="checkbox" class="check-item" |
| | | value="#"> |
| | | </label> |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="bianhao videoid">623</div> |
| | | </td> |
| | | <td width="12%"> |
| | | <div class="source" style="text-align: center;line-height: 105px;"></div> |
| | | </td> |
| | | <td width="12%"> |
| | | <div class="tupian-banner" style="position: relative"> |
| | | <img alt src="image/banner/青云志.jpg" class="video-img" style="width: 240px;"> |
| | | |
| | | $(".pl-addrecommend").click(function() { |
| | | var ids = getCheckedItems(); |
| | | if(ids.length < 1) |
| | | layer.msg("未选择视频"); |
| | | else { |
| | | $("#hometype .videoids").val(ids); |
| | | $("#hometype").modal("show"); |
| | | } |
| | | <span style="position: absolute;right: 2px;bottom: 2px;color: red" class="tag"></span> |
| | | </div> |
| | | </td> |
| | | <td width="17%"> |
| | | <div class="bianhao video-name"></div> |
| | | </td> |
| | | <td width="15%" style="text-align: center; line-height: 105px;" class="video-updatetime"> |
| | | 2016-09-27 |
| | | </td> |
| | | <td width="8%"> |
| | | <div class="xuanze"> |
| | | <label> <input type="checkbox" value="#" class="video-show"> |
| | | </label> |
| | | </div> |
| | | </td> |
| | | <td width="8%"> |
| | | <div class="bianhao addrecommend"> |
| | | <a href="javascript:void(0)">添加推荐</a> |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="anniu"> |
| | | <img src="image/dustbin.png" class="delete"> |
| | | |
| | | }); |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="anniu"> |
| | | <a key="370" class="edit" onclick="p_del()"><img src="image/bianji.png"></a> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | |
| | | $(".pl-addspecial").click(function() { |
| | | var ids = getCheckedItems(); |
| | | if(ids.length < 1) |
| | | layer.msg("未选择视频"); |
| | | else { |
| | | $("#special .videoids").val(ids); |
| | | $("#special").modal("show"); |
| | | } |
| | | }); |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="qx"> |
| | | <div class="checkbox"> |
| | | <label> <input type="checkbox" class="check-all" value="#"> |
| | | 全选 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <button class="btn btn-warning pl-del" type="button">批量删除</button> |
| | | <button class="btn btn-primary pl-addrecommend" type="button">添加推荐</button> |
| | | <button class="btn btn-primary pl-addspecial" type="button">添加到合辑</button> |
| | | <button class="btn btn-primary pl-addtop" type="button">添加到榜首</button> |
| | | |
| | | $(".pl-addtop").click(function() { |
| | | layer.open({ |
| | | type: 1, |
| | | title: '分类选择', |
| | | shadeClose: true, |
| | | btn: ['确定', '取消'], |
| | | shade: 0.8, |
| | | area: ['400px', '300px'], |
| | | yes: function(index) { |
| | | var arr = new Array(); |
| | | $(".check-item:checked").each(function() { |
| | | var vid = $(this).attr("key"); |
| | | arr.push(vid); |
| | | }); |
| | | if(arr.length == 0) { |
| | | layer.msg("请先选择数据"); |
| | | return false; |
| | | } |
| | | var type = $("#dialog-chooselink .addType option:selected").val(); |
| | | addTop(arr,type); |
| | | layer.close(index); |
| | | $(".check-item").prop("checked",false); |
| | | }, |
| | | btn2: function(index) { |
| | | layer.close(index); |
| | | }, |
| | | content: $("#dialog-chooselink") |
| | | }); |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"> |
| | | <a href="#">«</a> |
| | | </li> |
| | | <li class="active"> |
| | | <a href="#">1</a> |
| | | </li> |
| | | <li> |
| | | <a href="#">2</a> |
| | | </li> |
| | | <li> |
| | | <a href="#" class="next">»</a> |
| | | </li> |
| | | </ul> |
| | | <div class="form-group"> |
| | | <div class="tzan"> |
| | | <button type="button" class="btn btn-primary">跳转</button> |
| | | </div> |
| | | <div class="tz"> |
| | | <input class="form-control" type="text" placeholder="页数"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | }); |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | //获取栏目列表 |
| | | $.post('api/home/gethometypelist', {}, function(data) { |
| | | if(data.code == 0) { |
| | | var item = $("#hometype table tbody tr").eq(0); |
| | | $("#hometype table tbody").empty(); |
| | | data.data.forEach(function(hometype) { |
| | | $("#hometype table tbody").append("<tr>" + item.html() + "</tr>"); |
| | | var newItem = $("#hometype table tbody tr").eq($("#hometype table tbody tr").length - 1); |
| | | newItem.find("td").eq(0).html(hometype.id); |
| | | newItem.find("td").eq(1).html(hometype.name); |
| | | newItem.find("td").eq(2).find("input[type='checkbox']").eq(0).val(hometype.id); |
| | | }); |
| | | } |
| | | <!--栏目选择 --> |
| | | <div class="modal fade" id="hometype" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <input type="hidden" class="videoids"/> |
| | | <input type="hidden" class="desc"/> |
| | | <input type="hidden" class="picture"/> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| | | <h4 class="modal-title" id="myModalLabel">栏目选择</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="row"> |
| | | <div class="col-lg-4"> |
| | | <label>子系统选择</label> |
| | | <ul class="col-lg-12 detailsystem"> |
| | | <li><input type="checkbox"/> <span>布丸影视大全</span></li> |
| | | <li><input type="checkbox"/> <span>布丸视频</span></li> |
| | | <li><input type="checkbox"/> <span>布丸影视大全IOS</span></li> |
| | | </ul> |
| | | </div> |
| | | <div class="col-lg-8"> |
| | | <table class="table"> |
| | | <thead> |
| | | <th>栏目ID</th> |
| | | <th>栏目名称</th> |
| | | <th>选择</th> |
| | | </thead> |
| | | <tbody> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox"/></td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> |
| | | <button type="button" class="btn btn-primary">提交更改</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | }, 'json'); |
| | | <!-- 专辑选择 --> |
| | | <div class="modal fade" id="special" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <input type="hidden" class="videoids"/> |
| | | <div class="modal-dialog"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| | | <h4 class="modal-title" id="myModalLabel">专题选择</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="row"> |
| | | <div class="col-lg-4"> |
| | | <label>子系统选择</label> |
| | | <ul class="col-lg-12 detailsystem"> |
| | | <li><input type="checkbox"/> <span>布丸影视大全</span></li> |
| | | <li><input type="checkbox"/> <span>布丸视频</span></li> |
| | | <li><input type="checkbox"/> <span>布丸影视大全IOS</span></li> |
| | | </ul> |
| | | </div> |
| | | <div class="col-lg-8"> |
| | | <table class="table"> |
| | | <thead> |
| | | <th>专题ID</th> |
| | | <th>专题名称</th> |
| | | <th>选择</th> |
| | | </thead> |
| | | <tbody> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td>12</td> |
| | | <td>热门推荐</td> |
| | | <td><input type="checkbox"/></td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> |
| | | <button type="button" class="btn btn-primary">提交更改</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | //获取专辑列表 |
| | | $.post('api/special/getspeciallist', {}, function(data) { |
| | | if(data.code == 0) { |
| | | var item = $("#special table tbody tr").eq(0); |
| | | $("#special table tbody").empty(); |
| | | data.data.forEach(function(special) { |
| | | $("#special table tbody").append("<tr>" + item.html() + "</tr>"); |
| | | var newItem = $("#special table tbody tr").eq($("#special table tbody tr").length - 1); |
| | | newItem.find("td").eq(0).html(special.id); |
| | | newItem.find("td").eq(1).html(special.name); |
| | | newItem.find("td").eq(2).find("input[type='checkbox']").eq(0).val(special.id); |
| | | }); |
| | | } |
| | | }, 'json'); |
| | | <!-- 栏目视频确认 --> |
| | | <div id="hometype-sure"> |
| | | <div class="row"> |
| | | <span class="col-lg-4">封面图片:</span><input type="text" class="form-control col-lg-8 picture" |
| | | placeholder="如不更改可不填写"/> |
| | | </div> |
| | | <div class="row"> |
| | | <span class="col-lg-4"> 简介:</span><input type="text" class="form-control col-lg-8 desc" |
| | | placeholder="如不更改可不填写"/> |
| | | </div> |
| | | |
| | | //获取系统列表 |
| | | $.post('api/common/detailsystemlist', {}, function(data) { |
| | | if(data.code == 0) { |
| | | $(".select-detailsystem").empty(); |
| | | $(".select-detailsystem").append("<option value='0'>全部</option>"); |
| | | <div class="row" style="text-align: center;"> |
| | | <input type="button" class="btn btn-default" value="确定"/> |
| | | </div> |
| | | |
| | | $(".detailsystem").empty(); |
| | | data.data.forEach(function(detailsystem) { |
| | | var html = ""; |
| | | html += "<option value=" + detailsystem.id + ">"; |
| | | html += detailsystem.name; |
| | | html += "</option>"; |
| | | $(".select-detailsystem").append(html); |
| | | </div> |
| | | |
| | | html = "<li><input type='checkbox' value=" + detailsystem.id + ">"; |
| | | html += "<span>" + detailsystem.name; |
| | | html += "</span> </li>"; |
| | | $(".detailsystem").append(html); |
| | | }); |
| | | } |
| | | <div id="dialog-chooselink" style="display: none;"> |
| | | <select name="select" class="form-control addType"> |
| | | |
| | | }, 'json'); |
| | | }); |
| | | </script> |
| | | </select> |
| | | </div> |
| | | <script src="//cdn.bootcss.com/jquery/1.10.1/jquery.min.js"></script> |
| | | <script src="js/nav.js"></script> |
| | | <script src="js/bootstrap.min.js"></script> |
| | | <script src="js/page.js"></script> |
| | | <script src="js/common.js"></script> |
| | | <script src="layer/layer.js"></script> |
| | | <script> |
| | | $(function () { |
| | | |
| | | <script> |
| | | $(function() { |
| | | var htmlSrc = "<tr>" + $(".zhuti .table tbody tr").eq(0).html() + "</tr>"; |
| | | function getCheckedItems() { |
| | | var ids = ""; |
| | | for (var i = 0; i < $(".check-item").length; i++) { |
| | | if ($(".check-item").eq(i).is(':checked')) { |
| | | ids += $(".check-item").eq(i).attr("key") + ","; |
| | | } |
| | | } |
| | | if (ids.length > 0) |
| | | ids = ids.substr(0, ids.length - 1); |
| | | return ids; |
| | | } |
| | | |
| | | function getData(page) { |
| | | var index = layer.load(1, { |
| | | shade: false |
| | | }) |
| | | $.post('api/video/videolist', { |
| | | "page": page, |
| | | "videotype": $(".search-div .videotypes select:last").val(), |
| | | "detailsystem": $(".search-div .select-detailsystem").val(), |
| | | "contenttype": $(".contenttype").val(), |
| | | "key": $("#kw").val() |
| | | }, function(data) { |
| | | layer.close(index); |
| | | if(data.code != 0) |
| | | return; |
| | | $(".pl-del").click(function () { |
| | | var ids = getCheckedItems(); |
| | | if (ids.length < 1) { |
| | | layer.msg("请选择视频"); |
| | | return; |
| | | } |
| | | |
| | | fillPage(data.data.pageEntity, function(pageIndex) { |
| | | getData(pageIndex); |
| | | }); |
| | | //填充数据 |
| | | $.post('api/video/deletevideo', { |
| | | 'id': ids |
| | | }, function (data) { |
| | | layer.msg(data.msg); |
| | | if (data.code == 0) { |
| | | $deleteElement.parent().parent().parent().remove(); |
| | | } |
| | | }, 'json'); |
| | | |
| | | $(".zhuti .table tbody").empty(); |
| | | for(var i = 0; i < data.data.data.length; i++) { |
| | | var da = data.data.data[i]; |
| | | $(".zhuti .table tbody").append(htmlSrc); |
| | | var fk = $(".zhuti .table tbody tr").eq(i); |
| | | fk.find(".check-item").attr("key", da.id); |
| | | fk.find(".videoid").html(da.id); |
| | | fk.find(".video-name").html(da.name); |
| | | fk.find(".video-img").attr("src", da.picture); |
| | | fk.find(".video-updatetime").html(da.updatetime); |
| | | if(da.show == 1) |
| | | fk.find(".video-show").attr("checked", true); |
| | | else |
| | | fk.find(".video-show").attr("checked", false); |
| | | fk.find(".video-show").attr("key", da.id); |
| | | fk.find(".addrecommend a").attr("key", da.id); |
| | | fk.find(".edit").attr("key", da.id); |
| | | fk.find(".delete").attr("key", da.id); |
| | | fk.find(".source").text(da.source); |
| | | fk.css("display", "table-row"); |
| | | } |
| | | }); |
| | | |
| | | $(".table .addrecommend a").bind("click", function() { |
| | | var index = layer.open({ |
| | | type: 1, |
| | | skin: 'layui-layer-demo', //样式类名 |
| | | closeBtn: 0, //不显示关闭按钮 |
| | | anim: 2, |
| | | area: ['500px', '250px'], |
| | | shadeClose: true, //开启遮罩关闭 |
| | | content: $("#hometype-sure") |
| | | }); |
| | | var key = $(this).attr("key"); |
| | | $("#hometype-sure input[type=button]").click(function() { |
| | | $("#hometype .picture").val($("#hometype-sure .picture").val()); |
| | | $("#hometype .desc").val($("#hometype-sure .desc").val()); |
| | | $("#hometype .videoids").val(key); |
| | | layer.close(index); |
| | | $("#hometype").modal("show"); |
| | | }); |
| | | $(".pl-addrecommend").click(function () { |
| | | var ids = getCheckedItems(); |
| | | if (ids.length < 1) |
| | | layer.msg("未选择视频"); |
| | | else { |
| | | $("#hometype .videoids").val(ids); |
| | | $("#hometype").modal("show"); |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | |
| | | $(".table .video-show").bind("click", function() { |
| | | var show = $(this).is(":checked") ? "1" : "0"; |
| | | var key = $(this).attr("key"); |
| | | $.post('api/video/changevideoshow', { |
| | | 'id': key, |
| | | 'show': show |
| | | }, function(data) { |
| | | layer.msg(data.msg); |
| | | layer.close(index); |
| | | if(data.code == 0) { |
| | | $deleteElement.parent().parent().parent().remove(); |
| | | } |
| | | }, 'json'); |
| | | $(".pl-addspecial").click(function () { |
| | | var ids = getCheckedItems(); |
| | | if (ids.length < 1) |
| | | layer.msg("未选择视频"); |
| | | else { |
| | | $("#special .videoids").val(ids); |
| | | $("#special").modal("show"); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | $(".pl-addtop").click(function () { |
| | | layer.open({ |
| | | type: 1, |
| | | title: '分类选择', |
| | | shadeClose: true, |
| | | btn: ['确定', '取消'], |
| | | shade: 0.8, |
| | | area: ['400px', '300px'], |
| | | yes: function (index) { |
| | | var arr = new Array(); |
| | | $(".check-item:checked").each(function () { |
| | | var vid = $(this).attr("key"); |
| | | arr.push(vid); |
| | | }); |
| | | if (arr.length == 0) { |
| | | layer.msg("请先选择数据"); |
| | | return false; |
| | | } |
| | | var type = $("#dialog-chooselink .addType option:selected").val(); |
| | | addTop(arr, type); |
| | | layer.close(index); |
| | | $(".check-item").prop("checked", false); |
| | | }, |
| | | btn2: function (index) { |
| | | layer.close(index); |
| | | }, |
| | | content: $("#dialog-chooselink") |
| | | }); |
| | | |
| | | $(".table .anniu .delete").bind("click", function() { |
| | | var id = $(this).attr("key"); |
| | | var $deleteElement = $(this); |
| | | var index = layer.confirm('是否删除该条目?', { |
| | | btn: ['是', '否'] //按钮 |
| | | }, function() { |
| | | $.post('api/video/deletevideo', { |
| | | 'id': id |
| | | }, function(data) { |
| | | layer.msg(data.msg); |
| | | layer.close(index); |
| | | if(data.code == 0) { |
| | | $deleteElement.parent().parent().parent().remove(); |
| | | } |
| | | }, 'json'); |
| | | }, function() { |
| | | }); |
| | | |
| | | }); |
| | | //获取栏目列表 |
| | | $.post('api/home/gethometypelist', {}, function (data) { |
| | | if (data.code == 0) { |
| | | var item = $("#hometype table tbody tr").eq(0); |
| | | $("#hometype table tbody").empty(); |
| | | data.data.forEach(function (hometype) { |
| | | $("#hometype table tbody").append("<tr>" + item.html() + "</tr>"); |
| | | var newItem = $("#hometype table tbody tr").eq($("#hometype table tbody tr").length - 1); |
| | | newItem.find("td").eq(0).html(hometype.id); |
| | | newItem.find("td").eq(1).html(hometype.name); |
| | | newItem.find("td").eq(2).find("input[type='checkbox']").eq(0).val(hometype.id); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | }, 'json'); |
| | | |
| | | $(".table .anniu .edit").bind("click", function() { |
| | | //获取专辑列表 |
| | | $.post('api/special/getspeciallist', {}, function (data) { |
| | | if (data.code == 0) { |
| | | var item = $("#special table tbody tr").eq(0); |
| | | $("#special table tbody").empty(); |
| | | data.data.forEach(function (special) { |
| | | $("#special table tbody").append("<tr>" + item.html() + "</tr>"); |
| | | var newItem = $("#special table tbody tr").eq($("#special table tbody tr").length - 1); |
| | | newItem.find("td").eq(0).html(special.id); |
| | | newItem.find("td").eq(1).html(special.name); |
| | | newItem.find("td").eq(2).find("input[type='checkbox']").eq(0).val(special.id); |
| | | }); |
| | | } |
| | | }, 'json'); |
| | | |
| | | }); |
| | | //获取系统列表 |
| | | $.post('api/common/detailsystemlist', {}, function (data) { |
| | | if (data.code == 0) { |
| | | $(".select-detailsystem").empty(); |
| | | $(".select-detailsystem").append("<option value='0'>全部</option>"); |
| | | |
| | | }, 'json'); |
| | | } |
| | | $(".detailsystem").empty(); |
| | | data.data.forEach(function (detailsystem) { |
| | | var html = ""; |
| | | html += "<option value=" + detailsystem.id + ">"; |
| | | html += detailsystem.name; |
| | | html += "</option>"; |
| | | $(".select-detailsystem").append(html); |
| | | |
| | | $(".search-div .search-button").click(function() { |
| | | getData(1); |
| | | }); |
| | | html = "<li><input type='checkbox' value=" + detailsystem.id + ">"; |
| | | html += "<span>" + detailsystem.name; |
| | | html += "</span> </li>"; |
| | | $(".detailsystem").append(html); |
| | | }); |
| | | } |
| | | |
| | | $("#special .modal-footer button:last").click(function() { |
| | | var ids = ""; |
| | | for(var i = 0; i < $("#special .table tr").length; i++) { |
| | | if($("#special .table tr td input[type=checkbox]").eq(i).is(':checked')) { |
| | | ids += $("#special .table tr td input[type=checkbox]").eq(i).val() + ","; |
| | | } |
| | | } |
| | | if(ids.length > 0) |
| | | ids = ids.substr(0, ids.length - 1); |
| | | }, 'json'); |
| | | }); |
| | | </script> |
| | | |
| | | $.post('api/special/addspecialvideo', { |
| | | 'specialid': ids, |
| | | 'videos': $("#special .videoids").val() |
| | | }, function(data) { |
| | | if(data.code == 0) |
| | | layer.msg(data.msg); |
| | | }, 'json'); |
| | | }); |
| | | <script> |
| | | $(function () { |
| | | var htmlSrc = "<tr>" + $(".zhuti .table tbody tr").eq(0).html() + "</tr>"; |
| | | |
| | | $("#hometype .modal-footer button:last").click(function() { |
| | | var ids = ""; |
| | | for(var i = 0; i < $("#hometype .table tr").length; i++) { |
| | | if($("#hometype .table tr td input[type=checkbox]").eq(i).is(':checked')) { |
| | | ids += $("#hometype .table tr td input[type=checkbox]").eq(i).val() + ","; |
| | | } |
| | | } |
| | | if(ids.length < 1) { |
| | | layer.msg("请选择推荐类型"); |
| | | return; |
| | | } |
| | | function getData(page) { |
| | | var index = layer.load(1, { |
| | | shade: false |
| | | }) |
| | | var resourceIds=new Array(); |
| | | if("0"!=$(".search-div .resourceIds").val()) { |
| | | resourceIds.push($(".search-div .resourceIds").val()); |
| | | } |
| | | $.post('api/video/videolist', { |
| | | "page": page, |
| | | "videotype": $(".search-div .videotypes select:last").val(), |
| | | "detailsystem": $(".search-div .select-detailsystem").val(), |
| | | "contenttype": $(".contenttype").val(), |
| | | "key": $("#kw").val(), |
| | | "resourceIds":JSON.stringify(resourceIds) |
| | | }, function (data) { |
| | | layer.close(index); |
| | | if (data.code != 0) |
| | | return; |
| | | |
| | | if(ids.length > 0) |
| | | ids = ids.substr(0, ids.length - 1); |
| | | alert(ids); |
| | | fillPage(data.data.pageEntity, function (pageIndex) { |
| | | getData(pageIndex); |
| | | }); |
| | | //填充数据 |
| | | |
| | | $.post('api/home/addhomevideos', { |
| | | 'videoids': $("#hometype .videoids").val(), |
| | | 'types': ids, |
| | | 'tag': $("#hometype .desc").val(), |
| | | 'picture': $("#hometype .picture").val() |
| | | }, function(data) { |
| | | if(data.code == 0) |
| | | layer.msg(data.msg); |
| | | }, 'json'); |
| | | }); |
| | | $(".zhuti .table tbody").empty(); |
| | | for (var i = 0; i < data.data.data.length; i++) { |
| | | var da = data.data.data[i]; |
| | | $(".zhuti .table tbody").append(htmlSrc); |
| | | var fk = $(".zhuti .table tbody tr").eq(i); |
| | | fk.find(".check-item").attr("key", da.id); |
| | | fk.find(".videoid").html(da.id); |
| | | fk.find(".video-name").html(da.name); |
| | | fk.find(".tag").html(da.tag); |
| | | fk.find(".video-img").attr("src", da.picture); |
| | | fk.find(".video-updatetime").html(da.updatetime); |
| | | if (da.show == 1) |
| | | fk.find(".video-show").attr("checked", true); |
| | | else |
| | | fk.find(".video-show").attr("checked", false); |
| | | fk.find(".video-show").attr("key", da.id); |
| | | fk.find(".addrecommend a").attr("key", da.id); |
| | | fk.find(".edit").attr("key", da.id); |
| | | fk.find(".delete").attr("key", da.id); |
| | | fk.find(".source").text(da.source); |
| | | fk.css("display", "table-row"); |
| | | } |
| | | |
| | | }); |
| | | $(".table .addrecommend a").bind("click", function () { |
| | | var index = layer.open({ |
| | | type: 1, |
| | | skin: 'layui-layer-demo', //样式类名 |
| | | closeBtn: 0, //不显示关闭按钮 |
| | | anim: 2, |
| | | area: ['500px', '250px'], |
| | | shadeClose: true, //开启遮罩关闭 |
| | | content: $("#hometype-sure") |
| | | }); |
| | | var key = $(this).attr("key"); |
| | | $("#hometype-sure input[type=button]").click(function () { |
| | | $("#hometype .picture").val($("#hometype-sure .picture").val()); |
| | | $("#hometype .desc").val($("#hometype-sure .desc").val()); |
| | | $("#hometype .videoids").val(key); |
| | | layer.close(index); |
| | | $("#hometype").modal("show"); |
| | | }); |
| | | |
| | | function addTop(arr,tid) { |
| | | $.ajax({ |
| | | type: "post", |
| | | url: "api/top/addTop", |
| | | data: { "vids": arr, "tid":tid }, |
| | | traditional: true, |
| | | dataType: "json", |
| | | success: function(data) { |
| | | if(data.code == 0) { |
| | | layer.alert("添加成功"); |
| | | } else { |
| | | layer.alert("添加失败"); |
| | | } |
| | | }, |
| | | error: function() { |
| | | layer.alert("添加失败"); |
| | | } |
| | | }); |
| | | } |
| | | </script> |
| | | </body> |
| | | }); |
| | | |
| | | $(".table .video-show").bind("click", function () { |
| | | var show = $(this).is(":checked") ? "1" : "0"; |
| | | var key = $(this).attr("key"); |
| | | $.post('api/video/changevideoshow', { |
| | | 'id': key, |
| | | 'show': show |
| | | }, function (data) { |
| | | layer.msg(data.msg); |
| | | layer.close(index); |
| | | if (data.code == 0) { |
| | | $deleteElement.parent().parent().parent().remove(); |
| | | } |
| | | }, 'json'); |
| | | |
| | | }); |
| | | |
| | | $(".table .anniu .delete").bind("click", function () { |
| | | var id = $(this).attr("key"); |
| | | var $deleteElement = $(this); |
| | | var index = layer.confirm('是否删除该条目?', { |
| | | btn: ['是', '否'] //按钮 |
| | | }, function () { |
| | | $.post('api/video/deletevideo', { |
| | | 'id': id |
| | | }, function (data) { |
| | | layer.msg(data.msg); |
| | | layer.close(index); |
| | | if (data.code == 0) { |
| | | $deleteElement.parent().parent().parent().remove(); |
| | | } |
| | | }, 'json'); |
| | | }, function () { |
| | | |
| | | }); |
| | | |
| | | }); |
| | | |
| | | $(".table .anniu .edit").bind("click", function () { |
| | | |
| | | }); |
| | | |
| | | }, 'json'); |
| | | } |
| | | |
| | | $(".search-div .search-button").click(function () { |
| | | getData(1); |
| | | }); |
| | | |
| | | $("#special .modal-footer button:last").click(function () { |
| | | var ids = ""; |
| | | for (var i = 0; i < $("#special .table tr").length; i++) { |
| | | if ($("#special .table tr td input[type=checkbox]").eq(i).is(':checked')) { |
| | | ids += $("#special .table tr td input[type=checkbox]").eq(i).val() + ","; |
| | | } |
| | | } |
| | | if (ids.length > 0) |
| | | ids = ids.substr(0, ids.length - 1); |
| | | |
| | | $.post('api/special/addspecialvideo', { |
| | | 'specialid': ids, |
| | | 'videos': $("#special .videoids").val() |
| | | }, function (data) { |
| | | if (data.code == 0) |
| | | layer.msg(data.msg); |
| | | }, 'json'); |
| | | }); |
| | | |
| | | $("#hometype .modal-footer button:last").click(function () { |
| | | var ids = ""; |
| | | for (var i = 0; i < $("#hometype .table tr").length; i++) { |
| | | if ($("#hometype .table tr td input[type=checkbox]").eq(i).is(':checked')) { |
| | | ids += $("#hometype .table tr td input[type=checkbox]").eq(i).val() + ","; |
| | | } |
| | | } |
| | | if (ids.length < 1) { |
| | | layer.msg("请选择推荐类型"); |
| | | return; |
| | | } |
| | | |
| | | if (ids.length > 0) |
| | | ids = ids.substr(0, ids.length - 1); |
| | | alert(ids); |
| | | |
| | | $.post('api/home/addhomevideos', { |
| | | 'videoids': $("#hometype .videoids").val(), |
| | | 'types': ids, |
| | | 'tag': $("#hometype .desc").val(), |
| | | 'picture': $("#hometype .picture").val() |
| | | }, function (data) { |
| | | if (data.code == 0) |
| | | layer.msg(data.msg); |
| | | }, 'json'); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | function addTop(arr, tid) { |
| | | $.ajax({ |
| | | type: "post", |
| | | url: "api/top/addTop", |
| | | data: {"vids": arr, "tid": tid}, |
| | | traditional: true, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.code == 0) { |
| | | layer.alert("添加成功"); |
| | | } else { |
| | | layer.alert("添加失败"); |
| | | } |
| | | }, |
| | | error: function () { |
| | | layer.alert("添加失败"); |
| | | } |
| | | }); |
| | | } |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE body PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | |
| | | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> |
| | | <html> |
| | | <% |
| | | String key = "布丸社区"; |
| | | %> |
| | | |
| | | <head> |
| | | <title>用户协议</title> |
| | | |
| | | <head> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
| | | </head> |
| | | </head> |
| | | |
| | | |
| | | <body style="background-color: white;"> |
| | | <p class="MsoNormal" align="center" style="text-align:center;"> |
| | | <b><span><br /> |
| | | </span></b> |
| | | </p> |
| | | <p class="MsoNormal" align="center" style="text-align:center;"> |
| | | <b><span><br /> |
| | | </span></b> |
| | | </p> |
| | | <p class="MsoNormal" align="center" style="text-align:center;"> |
| | | <b><span>用户使用协议</span></b><b></b> |
| | | </p> |
| | | <p class="MsoNormal"> |
| | | 影视大全布丸用户使用协议 |
| | | </p> |
| | | <p class="MsoNormal"> |
| | | 1.用户协议的接受与修改 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 本协议是用户(您)与影视大全布丸<span>(下称</span>“布丸”)之间的协议,布丸将按照本协议约束之内容为您提供服务。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 1.1本协议所述服务条款构成您(个人或者单位、组织、团体等)使用布丸提供的相关服务的先决条件。若您不同意本协议中所述服务条款或其后对协议条款的修改,您应不使用或主动取消布丸提供的相关服务。您的使用行为将视作对本协议全部条款的完全接受。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.服务说明 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.1布丸向您提供包括但不限于如下服务: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.1.1布丸<span>主页</span> www.buwan.tv/www.yeshitv.com(及其他由布丸运营的任何网站); |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.1.2布丸<span>直接拥有或运营的包括但不限于</span>PC、平板、手机等全部终端客户端产品; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.1.3布丸用户用户空间、丸子、礼品、商城; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.1.4布丸直接拥有或运营的服务器、网络存储空间; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.1.5布丸<span>提供给您的其他技术和</span>/或服务。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.2布丸所提供的服务,均限于在布丸内使用,任何以恶意破解等非法手段将布丸所提供的服务与布丸台分离的行为,皆不属于本协议约定的由布丸提供的服务。由此引起的一切后果由行为人负责,布丸弹幕网将保留依法追究行为人法律责任的权利。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.3布丸<span>官方所公布的方式为注册、登陆、下载客户端(包括但不限于</span>iOS、Android等智能平台)、使用布丸服务的唯一合法方式,用户通过其他任何途径、任何渠道、任何方式获取的布丸服务(包括但不限于账号、丸子、客户端下载等)均为非法所得,布丸概不承认其效力,且一经发现,布丸有权立即作出删除、清零、封号等处理,任何因此导致的一切不利后果均由用户自行承担。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.4用户理解并认可布丸享有如下权利,布丸行使如下权利不视为违约,用户不追究或者豁免布丸的相关法律责任:用户有权长期使用其合法获得的布丸账号及其账号下丸子、标识、礼品等,但是用户确认其仅享有上述服务和产品的使用权,上述服务和产品,及其衍生物的所有权及知识产权均归布丸所有(用户经合法渠道取得的实体产品所有权除外)。布丸有权根据实际情况自行决定收回日期,无需另行通知用户亦无需征得用户同意。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 2.5布丸有权提前向用户公告(包括但不限于弹出页面公告、网站首页公告)以修改、替换、升级与布丸服务相关的任何软件。如果用户不同意或者不接受布丸相关软件的修改、替代、升级,请直接拒绝、停止、取消使用行为,否则视为用户同意并接受布丸相关软件的修改、替代、升级,同时该同意并接受的行为仍受本协议约束。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.用户注册 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 如果您使用布丸提供的评论、云收藏、云观看记录等一切需要账号系统支持的服务,您需要注册一个账号并设置密码,并确保注册信息的真实性、正确性及完整性,如果上述注册信息发生变化,您应及时更改。在完成本服务的登记程序后,您应维持账号及密码的机密安全。您应对任何人利用您的账号及密码所进行的活动完全负责,布丸无法对非法或未经您授权使用您账号及密码的行为作出甄别,因此布丸将不承担任何责任。同时您同意并承诺做到: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.1当您的账号或密码遭到未经授权的使用,或者发生任何安全问题时,您会立即有效地通知到布丸; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.2当您每次登录布丸或使用相关服务后,可将有关账号等安全退出; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.3您同意接受布丸通过电子邮件、短信、客户端、网页或其他合法方式向您发送通知信息和其他相关信息; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4您承诺不在注册、使用布丸账号从事以下行为: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4.1故意冒用他人信息为自己注册布丸账号; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4.2未经他人合法授权以他人名义注册布丸账号; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4.3窃取、盗用他人的布丸账号、丸子、会员标识等; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4.4使用侮辱、诽谤、色情、政治等违反法律、道德及公序良俗的词语注册布丸账号; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4.5以非法占有布丸相关服务资源为目的,通过正当或非正当手段恶意利用网站漏洞; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.4.6侵犯他人合法权益的其他内容。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 3.5您在此同意,布丸<span>有权对违反上述条款的用户作出禁止注册及</span>/或封号的处理。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.布丸上的内容 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.1布丸弹幕网上的内容是指您通过布丸观看的视频、音频或其他任何形式的内容,包括但不限于图像、文字、链接等。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.2您在布丸上传或发布的作品,您保证对其享有合法的著作权或相应授权,并且您同意授予布丸对上述所有作品和内容在全区范围内的免费的、不可撤销的、无限期的并且可转让的非独家使用权许可,布丸有权展示、散布及推广前述内容,有权对前述内容进行任何形式的复制、修改、出版、发行及以其他方式使用或授权第三方进行复制、修改、出版、发行及以其他方式使用。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.3对于用户通过布丸<span>提供的</span>UGC服务上传至布丸的任何信息内容,包括但不限于图片、文字等形式,用户在此同意并免费授权布丸进行传播,并同意布丸在传播前在不改变上述内容主要信息的前提下可对上述内容进行适当编辑和整理。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.4任何经由布丸<span>提供的服务,以上传、张贴、发送电子邮件或任何其他方式传送的资讯、资料、文字、软件、音乐、音讯、照片、图形、视讯、信息或其他资料(以下简称</span>“内容”),无论系公开还是私下传送,均由内容提供者、上传者承担责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.5布丸无法预先知晓并合理控制经由布丸服务上传之内容,亦无法准确判断内容上传者的真实身份。因此,您已预知在使用布丸的服务时,可能会接触到部分令人不快、不适或厌恶之内容,您同意放弃由此产生的针对布丸的任何追索权。但布丸有权依法停止传输任何前述内容并采取相应处理,包括但不限于暂停您继续使用布丸的部分或全部服务,保存有关记录并向有关机关报告。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 4.6您需独立对自己在布丸上实施的行为承担法律责任。若您使用布丸服务的行为不符合本协议,布丸<span>有权作出独立处理,且在无需事先通知及</span>/或征得用户同意的情况下停用您的账号。您若在布丸上散步和传播反动、色情或其他违反国家法律、规定的信息,布丸的系统记录可能作为您违反相关法律的证据。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.使用规则 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1用户在使用布丸服务的过程中,应遵守以下法律法规: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.1《中华人民共和国保守国家秘密法》 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.2《中华人民共和国著作权法》 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.3《中华人民共和国计算机信息系统安全保护条例》 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.4《计算机软件保护条例》 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.5《互联网电子公告服务管理规定》 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.6《信息网络传播权保护条例》 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.1.7其他有关计算机及互联网规定的法律、法规。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.2在任何情况下,布丸一旦合理地认为用户的行为可能违反上述法律、法规,可以在任何时候,不经事先通知终止向该用户提供服务。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3禁止用户从事以下行为: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.1制作、上传、复制、传送、传播包含任何反对宪法所确定的基本原则、危害国家安全、泄露国家秘密、颠覆国家政权、破坏国家统一、破坏民族团结、损害国家荣誉和利益、煽动民族仇恨、民族歧视、破坏民族团结、破坏国家宗教政策、宣扬邪教和封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪、侮辱或者诽谤他人,侵害他人合法权益的等法律、行政法规禁止的内容或其他另人反感的包括但不限于资讯、资料、文字、软件、音乐、照片、图形、信息或其他资料; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.2以任何方式危害未成年人; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.3冒充任何人或机构,或以虚伪不实的方式谎称或使人误认为与任何人或任何机构有关; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.4伪造标题或以其他方式操控识别资料,使人误认为该内容为布丸所传送; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.5将无权传送的内容(例如内部资料、机密资料)进行上载、张贴、发送电子邮件或以其他方式传送; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.6将侵犯任何人的专利、商标、著作权、商业秘密或其他专属权利之内容加以上载、张贴、发送电子邮件或以其他方式传送; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.7将广告函件、促销资料、"垃圾邮件"等,加以上载、张贴、发送电子邮件或以其他方式传送; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.8跟踪或以其他方式骚扰他人; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.9将有关干扰、破坏或限制任何计算机软件、硬件或通讯设备功能的软件病毒或其他计算机代码、档案和程序之资料,加以上载、张贴、发送电子邮件或以其他方式传送; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.10干扰或破坏布丸服务或与布丸服务相连的服务器和网络,或不遵守本协议之规定; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.3.11故意或非故意违反任何相关的中国法律、法规、规章、条例等其他具有法律效力的规范; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.4用户不得通过任何渠道或媒体(包括但不限于自媒体等)发出“与布丸<span>合作</span>”、“与布丸<span>共同出品</span>”等任何携带“布丸”品牌的字样,如用户需宣传推广合作节目,用户只能在宣传中提及节目本身而不得提及与布丸关系或者擅自以布丸<span>品牌进行推广,凡是用户的发稿带有</span>“布丸”的一切宣传稿件必须通过布丸相应合作部门之书面同意,否则因此给布丸造成的一切损失用户应予以赔偿。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5丸子及商城物品的使用规则 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5.1若无特殊说明,用户通过使用丸子服务获得的丸子、商城物品、兑换物品等虚拟产品,具体使用方法、期限等以布丸页面中附带的说明及用户指南或具备以上解说性质的类似官方文档为准。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5.2丸子系统及商城物品会因用户需求、网站策略调整、用户接受程度等因素随时进行调整,具体信息请以当时的页面说明为准。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5.3丸子系统是布丸向用户提供的免费服务,丸子的使用、消耗、兑换、抽奖等行为均不提供发票或其他票据证明。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5.4基于虚拟商品的性质和特征,布丸不提供丸子兑换的虚拟商品的退货、换货服务。对于实物产品,因用户原因导致产品出现瑕疵、损坏的,布丸不予负责。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5.5除非得到布丸的书面授权,用户不得将丸子服务及丸子用于商业领域,包括但不限于买卖、置换、抵押或以特定方式使用丸子服务获取不当得利等。任何用户都应通过正规渠道获得丸子服务,一切通过非官方公布渠道取得的丸子及其衍生服务均不对布丸发生法律效力,布丸有权单方面收回相关丸子并终止相应服务,严重者布丸有权对其用户采取封号处理。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 5.5.6如无特殊约定,用户通过正规渠道获得的丸子及其衍生物品均不以任何现金方式退还,仅能通过享用丸子服务进行等值消耗。用户消耗其所获得全部丸子,且不将继续使用丸子服务的,服务终止。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.隐私权策略 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 当您注册布丸<span>的服务时,您需提供一部分的个人信息。隐私信息是指那些能够对用户进行个体辨识的信息,包括用户的真实姓名、身份证号、手机号码、</span>IP地址等。而记录在布丸服务器上的、及用户在使用布丸时的行为习惯等基本信息和用户隐私信息外的一切普通信息,其中包括用户同意进行公开的部分隐私信息则统称为非隐私信息。用户充分理解并同意布丸主动、被动的收集用户信息,也充分理解布丸收集非隐私信息的目的在于更人性化的为用户提供服务,同时有针对性的为用户提供合适的内容。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.1布丸不会在未经合法用户授权时,公开、编辑或者向任何第三方透露用户隐私信息及保存在布丸的非公开内容,除非遇到以下情况: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.1.1有关法律规定或布丸合法服务程序规定; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.1.2在紧急情况下,为维护用户及公众的权益; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.1.3为维护布丸自身的合法权利; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.1.4其他依法需要公开、编辑和透露个人信息的情况。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.2在以下(包括但不限于)几种情况下,用户同意布丸使用其用户信息: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.2.1在进行活动或抽奖时,布丸可能会与赞助商共享部分的用户隐私信息,在这些情况下布丸会在发送用户隐私信息之前进行提示,用户可以选择不参与来终止传送过程; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.2.2用户在购买布丸所列出的商品时,用户提供的个人信息(例如用户的银行卡号和联系信息)会提供给商家,这些商家会进行数据收集操作,但布丸对商家的此种操作不负任何责任; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.2.3布丸会通过统计数据,向目前或将来可能的合作伙伴、广告商、赞助商及其他第三方以及为了其他合法目的而描述布丸的服务; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 6.2.4布丸会竭尽全力保护用户信息,但布丸不能确信或保证任何个人信息的安全性,用户仍需自己承担风险。比如用户联机公布可被公众访问的个人信息时,用户可能会受到未经用户同意的消息。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 7.第三方链接 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 布丸服务可能会提供与其他国际互联网网站或资源进行链接。除非另有声明,布丸无法对第三方网站之服务进行控制,用户因使用或依赖上述网站或资源所产生的损失或损害,布丸不承担任何责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.知识产权 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.1受国际版权公约、中华人民共和国著作权法、专利法、及其他知识产权方面的法律法规的保护,布丸服务及本服务所使用的软件、技术、商标、材料等的所有知识产权归布丸<span>所有和享有。</span>“知识产权”包括在专利法、版权法、商标法、反不正当竞争法中等法律规定的任何和所有权利、任何和所有其它所有权以及其中的任何和所有应用、更新、扩展和恢复。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.2用户不得修改、改编、翻译布丸服务所使用的软件、技术、材料等,或者创作与之相关的派生作品,不得通过反向工程、反编译、反汇编或其他类似行为获得其的源代码,否则由此引起的一切法律后果由用户负责,布丸将依法追究违约方的法律责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.3用户不得恶意修改、复制、传播布丸服务所使用的软件、技术、材料等。否则,用户自行承担因此而造成对其他人的损害,或者造成对布丸公司形象损害,要承担相应的法律责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.4用户不得擅自删除、掩盖或更改布丸的版权声明、商标或其它权利声明。布丸平台所有设计图样以及其他图样、产品及服务名称,均为布丸<span>及</span>/或其关联公司所享有的商标、标识。任何人不得使用、复制或用作其他用途。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.5经由布丸服务传送的内容,未经布丸明示授权许可,用户不得进行修改、出租、散布、转载或衍生其他作品。布丸对其自制内容和其他通过授权取得的独占内容享有完全知识产权,未经布丸许可,任何单位和个人不得私自转载、传播和提供观看服务或者有其他侵犯布丸知识产权的行为。否则,布丸将追究侵权行为人的法律责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 8.6布丸所有和享有的知识产权,不因用户的任何使用行为而发生权利转移。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.免责声明 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.1布丸对于任何包含、经由或连接、下载或从任何与有关本网络服务所获得的任何内容、信息或广告,不声明或保证其正确性或可靠性;并且对于用户经本服务上的广告、展示而购买、取得的任何产品、信息或资料,布丸不负保证责任。用户自行负担使用本服务的风险。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.2布丸有权但无义务,改善或更正布丸服务任何部分之任何疏漏、错误。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.3布丸对如下事项不做担保(包括但不限于): |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.3.1布丸提供的网站、客户端等软件虽然均已经过布丸测试,但由于技术本身的局限性,布丸不能保证其与其他软硬件、系统完全兼容。如果出现不兼容的情况,用户可将情况报告布丸,以获得技术支持。如果无法解决问题,用户可以选择卸载、停止使用布丸服务。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.3.2使用布丸<span>服务涉及到</span>Internet服务,可能会受到各个环节不稳定因素的影响。因不可抗力、黑客攻击、系统不稳定、网络中断、用户关机、通信线路等原因,均可能造成布丸服务中断或不能满足用户要求的情况,布丸不保证布丸服务适合用户的使用要求。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.3.3由于布丸提供的客户端等软件可以通过网络途径下载、传播,因此对于从非布丸指定官方站点下载、非布丸指定途径获得的布丸服务相关软件,布丸无法保证其是否感染计算机病毒、是否隐藏有伪装的木马程序等黑客软件,也不承担用户由此遭受的一切直接或间接损害赔偿等法律责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.3.4布丸不做任何与布丸服务、产品的安全性、可靠性、及时性和性能有关的担保。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.3.5布丸不保证其提供的任何产品、服务或其他材料符合用户的期望。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.4用户使用经由布丸服务下载或取得的任何资料,其风险由用户自行负担,因该使用而导致用户电脑系统损坏或资料流失,用户应负完全责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.5基于以下原因而造成的利润、商业信誉、资料损失或其他有形或无形损失,布丸不承担任何直接、间接、附带、衍生或惩罚性的赔偿: |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.5.1布丸服务使用或无法使用; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.5.2经由布丸服务购买或取得的任何产品、资料或服务; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.5.3用户资料遭到未授权的使用或修改; |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.5.4其他与布丸服务相关的事宜。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.6用户应妥善保管自己的帐号和密码,加强密码安全性,谨防账号泄露或被盗。因用户账号被泄露或被盗而造成的任何损失,布丸不承担补偿责任。用户因电信和网通等部门的通讯线路故障、网络或电脑故障、系统不稳定、不可抗力(如服务器当机)等非布丸原因造成账号、账号内财产等丢失、减少的,布丸不承担补偿等责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 9.7用户理解并同意自主选择免费下载和使用布丸服务,风险自负,包括但不限于用户使用布丸服务过程中的行为,以及因使用布丸服务产生的一切后果。如因下载或使用布丸服务而对计算机系统造成的损坏或数据的丢失等,用户须自行承担全部责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 10.服务终止 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 10.1您同意布丸有权基于自行考虑,因任何理由,包括但不限于缺乏使用或布丸认为您已经违反本协议的条款及精神,而终止您的账号或服务的全部或任何部分,并将您在布丸服务内的任何内容进行移除并删除。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 10.2您同意本协议任何规定提供之服务,无需进行任何事先通知即可终端或终止。您承认并同意,布丸<span>可立即关闭或删除您的账号及账号中所有相关信息及文件,及</span>/或禁止继续使用前述文件或布丸的服务。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 10.3布丸采取以上行为均不需要进行通知,并且对用户和任何第三人均不承担责任。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 11.法律适用和管辖 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 11.1布丸对本协议拥有最终解释权。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 11.2本协议的生效、履行、解释及争议的解决均适用中华人民共和国法律。本条款因与中华人民共和国现行法律相抵触而导致部分无效,不影响其他部分的效力。 |
| | | </p> |
| | | <p class="p" style="margin-left:0.0000pt;text-indent:0.0000pt;"> |
| | | 11.3如就本协议内容或其执行发生任何争议,应尽量友好协商解决;协商不成时,则争议各方均一致同意将争议提交重庆仲裁委员会依据其现行有效的仲裁规则进行仲裁,仲裁地点为重庆,仲裁语言为中文。仲裁裁决为一裁终局,对各方均有法律约束力。 |
| | | </p> |
| | | <p class="MsoNormal"> |
| | | |
| | | </p> |
| | | <p> |
| | | <br /> |
| | | </p> |
| | | <p> |
| | | <br /> |
| | | </p> |
| | | </body> |
| | | </html> |
| | |
| | | <% |
| | | String key = "布丸社区"; |
| | | %> |
| | | |
| | | <style> |
| | | h1 { |
| | | font-size: 25px !important; |
| | | } |
| | | |
| | | h2 { |
| | | font-size: 20px !important; |
| | | margin-block-start:2px; |
| | | margin-block-end:2px; |
| | | } |
| | | |
| | | h3 { |
| | | font-size: 15px !important; |
| | | line-height: 80%; |
| | | } |
| | | </style> |
| | | <head> |
| | | <title>隐私政策</title> |
| | | <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
| | | <title>隐私政策</title> |
| | | <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
| | | </head> |
| | | |
| | | <body style="background-color: white;"> |
| | | <p> |
| | | <p class="p" align="center" |
| | | style="margin-left: 0.0000pt; text-indent: 21.0000pt; text-align: center; background: #FFFFFF;"> |
| | | <b><span>隐私政策</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>引言</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>影视大全</span><span>(</span>“我们”)非常重视用户的隐私和个人信息保护。您在使用我们的产品与/或服务时,我们可能会收集和使用您的相关信息。我们希望通过《隐私政策》(“本隐私政策”)向您说明我们在您使用我们的产品与/或服务时如何收集、使用、保存、共享和转让这些信息,以及我们为您提供的访问、更新、删除和保护这些信息的方式。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>本政策将帮助您了解以下内容:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>1. 我们如何收集和使用您的个人信息</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>2. 我们如何使用 Cookie 和同类技术</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>3. 我们如何共享、转让、公开披露您的个人信息</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>4. 我们如何保存和保护您的个人信息</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>5. 您的权利(您如何管理个人信息、改变授权范围、注销帐户)</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>6. 我们如何保护儿童的个人信息</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>7. 您的个人信息如何在全球范围转移</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>8. 通知和修订</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b>9. 如何联系我们</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们尽量以更清晰、更容易被您理解的方式展现本隐私政策,从而希望能够真实地传达我们希望向您传达的信息,并希望您在向我们提供某些信息(其中很可能包括您的个人信息)以及允许我们处理并分享某些信息之前,能够清晰地了解这些信息收集的目的、可能的用途以及其他方面的内容。为了便于您阅读及理解,我们将专门术语进行了定义,请参见本隐私政策附件。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>本隐私政策适用于</span><span>影视大全</span><span>平台所有产品和服务。</span><b><span>如</span></b><b><span>影视大全</span></b><b><span>产品有单独的隐私政策,则该产品的隐私政策将优先适用。该产品隐私政策未涵盖的内容,以本隐私政策内容为准。</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>若您使用</span></b><b><span>影视大全</span></b><b><span>平台的服务,即表示您认同我们在本政策中所述内容。在将您的信息用于本隐私权政策未涵盖的用途时,我们会事先征求您的同意。</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>如对本隐私政策或相关事宜有任何问题,您</span><span>都</span><span>可以与我们联系</span> <span>。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>我们如何收集和使用您的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>一、帮助您成为我们的注册用户</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您注册</span><span>影视大全</span><span>帐号时须至少向我们提供</span><span>微信、</span>QQ等第三方的快捷登录注册<span>及或电子邮箱,并创建密码。部分基本服务),您不需要注册成为我们的用户及提供上述信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您提供的上述信息,将在您使用</span><span>影视大全</span><span>平台产品和服务期间持续授权我们使用。在您注销帐号时,我们将停止使用并删除上述信息或对您的个人信息进行匿名化处理,法律法规另有规定的除外。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>二、向您提供产品和服务</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 您向我们提供的信息</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您使用我们的特定产品和服务时(如支付、购买产品和服务、发布软件、发表文章、评论等),为满足向您提供产品和服务之目的,除注册时提供的信息外,您可能还需要进一步向我们提供与上述产品和服务的功能相关的信息(例如您的真实姓名、性别、出生日期、身份证号码、联系地址、银行卡、支付宝、头像和简介等),如果您不使用特定产品和服务,则无需提供相关信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们还可能会记录您在使用我们的产品和</span>/或服务时提供、形成或留存的信息。您参与产品运营活动时提交的信息。您有权选择不使用相关产品和/或服务,但这将导致您无法使用特定服务或功能,或者无法达到相关服务拟达到的效果。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 我们在您使用服务过程中收集的信息</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们可能会收集关于您使用产品和</span>/或服务(包括使用方式)过程中的信息,此类信息包括: |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>(</span>1)设备信息 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>为了提供更好的产品和</span>/或服务并改善用户体验,我们会收集设备属性信息(例如您的硬件型号、操作系统版本、设备配置、唯一设备标识符、国际移动设备身份码IMEI、网络设备硬件地址MAC、广告标识符IDFA等),设备连接信息(浏览器的类型、电信运营商、使用的语言)以及设备状态信息(例如设备传感器数据,设备应用安装列表)。对于从您的各种设备上收集到的信息,我们可能会将它们进行关联,以便我们能在这些设备上为您提供一致的服务。我们可能会将您的设备信息或电话号码与您的<span>影视大全</span><span>帐户相关联。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>(</span>2)日志信息 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>当您使用</span><span>影视大全</span><span>平台产品和服务时,我们的服务器会自动记录一些信息,例如您对我们的产品和</span>/或服务的使用情况、IP地址、所访问服务的URL、浏览器的类型和使用的语言、下载、安装或使用移动应用和软件的信息、与通讯软件通讯的信息以及访问服务的日期、时间、时长等。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>(</span>3)位置信息 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>当您使用具有定位功能的</span><span>影视大全</span><span>平台产品和服务时,当您开启设备定位功能并使用我们基于位置提供的相关服务时,我们可能会收集和处理有关您实际所在位置的信息,以使得您不需要手动输入自身地理坐标就可获得相关服务。我们会使用各种技术进行定位,这些技术包括</span> |
| | | IP 地址、GPS 以及能够提供相关信息的其他传感器(比如可能会为我们提供附近设备、Wi-Fi |
| | | 接入点和基站的信息)。您可以通过关闭定位功能,停止对您的地理位置信息的收集,但您可能将无法获得相关服务或功能,或者无法达到相关服务拟达到的效果。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>请注意,单独的设备信息、日志信息等是无法识别特定自然人身份的信息。如果我们将这类非个人信息与其他信息结合用于识别特定自然人身份,或者将其与个人信息结合使用,则在结合使用期间,这类非个人信息将被视为个人信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | 3.我们通过间接获得方式收集到的您的个人信息</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>当您通过我们产品或服务使用</span><span>影视大全</span><span>合作商服务时,您同意我们根据实际业务及合作需要从我们合作商处接收、使用、汇总、分析经您授权同意其向我们提供的您的个人信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>三、为您展示和推送定制内容</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>通过使用收集的信息,我们会得以向您提供定制内容,例如向您展现或推荐相关程度更高(而非普遍推送)信息流或者广告</span>/推广信息结果。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>为了让您有更好的体验、改善我们的服务或经您同意的其他用途,在符合相关法律法规的前提下,我们可能将通过某些服务所收集的信息用于我们的其他服务。例如,将您在使用我们某项服务时的信息,用于另一项服务中向您展示个性化的内容或广告、用于用户研究分析与统计等服务。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>四、为您提供安全保障</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>为提高您使用我们与</span><span>影视大全</span><span>合作商提供的产品和服务的安全性,我们可能使用您的信息用于身份验证、客户服务、安全防范、诈骗监测、信贷分析等,以预防、发现、调查欺诈、危害安全、非法或违反与我们的协议、政策或规则的行为,以保护您、我们的其他用户、我们或</span><span>影视大全</span><span>合作商及社会公众的合法权益。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>五、改善我们的产品和服务,并开展内部审计、数据分析和研究</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们使用收集的信息来提供并改进我们及</span><span>影视大全</span><span>合作商提供的产品和服务,并进行必要的业务运营,例如运营产品或提供服务,评估、维护和改进产品和服务的性能,开发新的产品和服务、提供客户支持等。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>为改进我们及</span><span>影视大全</span><span>合作商的产品和服务,我们也可能会对产品使用情况进行统计和分析。同时,</span><span>影视大全</span><span>可能会与公众共享这些统计信息,以展示我们服务的整体使用趋势,但这些统计信息将不会包含您的任何身份识别信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们会将所收集到的信息用于大数据分析。例如,我们将收集到的信息用于分析形成不包含任何个人信息的统计类产品。我们可能对外公开并与我们的合作伙伴分享经统计加工后不含身份识别内容的大数据分析信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>部分产品或服务会邀请您参与</span>“用户体验计划”,您拥有完全的自主选择权。例如输入法产品,如您主动选择参与“用户体验计划”,<span>影视大全</span><span>会根据需要对产品和服务的各项功能使用情况进行统计,这样可以通过分析统计数据提高产品和服务质量,推出对您有帮助的创新产品和服务。如您不想参与该计划,可以选择关闭相关产品</span>/或服务中的相关功能. |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>六、其他用途</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>当我们要将信息用于本隐私政策未载明的其他用途,将基于特定目的收集而来的信息用于其他目的时,会事先征求您的同意。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>我们如何使用</span> Cookie 和同类技术</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>一、</span>Cookies的使用</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 为实现您联机体验的个性化需求,使您获得更轻松的访问体验。我们会在您的计算机或移动设备上新建一个或多个名为Cookies的小数据文件,用来存储web服务器发送给你的唯一的Cookies数据,它只能被将Cookies发布给您的域中的Web服务器读取。我们为您存储Cookies是为了简化您重复登录的步骤等数据进而为您提供偏好设置、帮助您优化对广告的选择与互动、帮助判断您的登录状态以及帐户或数据安全。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | 2、我们不会将 Cookies 用于本隐私政策所述目的之外的任何用途。您可根据自己的偏好管理或删除 |
| | | Cookies。您可以清除计算机上保存的Cookies,大部分网络浏览器会自动接受Cookies,但您通常可根据自己的需要来修改浏览器的设置以拒绝 |
| | | Cookies;另外,您也可以清除软件内保存的所有Cookies。但 如果您这么做,您可能需要在每一次使用<span>影视大全</span><span>浏览器访问网站或使用其他产品访问</span><span>影视大全</span><span>相关网站时手动更改用户设置,而且您之前所记录的相应</span>Cookies信息也均会被删除,并且可能会对您所使用服务的便捷性、安全性有一定影响。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>二、网络</span>Beacon和同类技术的使用</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>除</span> Cookie |
| | | 外,我们还会在网站上使用网络Beacon等其他同类技术。我们的网页上常会包含一些电子图像(称为"单像素" GIF 文件或 "网络 |
| | | beacon")。我们使用网络beacon的方式有: |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | 1. 通过在<span>影视大全</span><span>网站上使用网络</span>beacon,计算用户访问数量,并通过访问 |
| | | cookie 辨认注册的<span>影视大全</span><span>用户。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | 2、通过得到的cookies信息,为您提供个性化服务。</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>我们如何共享、转让、公开披露您的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>一、</span> <span>共享</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们会以高度的勤勉义务对待您的信息。除以下情形外,未经您同意,我们不会与除</span><span>影视大全</span><span>及其关联公司外的其他公司、组织和个人分享您的信息:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 在获得您的明确同意后,我们会与其他方共享您的个人信息。我们可能会根据法律法规规定,或按政府主管部门的强制性要求或司法裁定,对外共享您的个人信息。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 仅为实现本隐私政策中声明的目的,我们的某些服务将由授权合作伙伴提供。我们可能会与合作伙伴共享您的某些个人信息,以提供更好的客户服务和用户体验。我们仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并且只会共享与提供服务相关的个人信息。我们的合作伙伴无权将共享的个人信息用于任何其他用途。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>目前,我们的授权合作伙伴包括以下类型:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>关联公司</span></b><span>:为便于我们基于关联帐号共同向您提供服务,推荐您可能感兴趣的信息或保护</span><span>重庆椰视网络科技有限公司及</span><span>关联公司或其他用户或公众的人身财产安全免遭侵害,您的个人信息可能会与我们的关联公司共享。我们只会共享必要的个人信息(如为便于您使用</span><span>影视大全</span><span>帐号使用我们关联公司产品或服务,我们会向关联公司共享您必要的帐号信息),如果我们共享您的个人敏感信息或关联公司改变个人信息的使用及处理目的,将再次征求您的授权同意。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>服务平台或服务提供商</span></b><span>。</span><span>影视大全</span><span>各产品接入了丰富的第三方服务。当您选择使用该第三方服务时,您授权我们将该信息提供给第三方服务平台或服务提供商,以便其基于相关信息为您提供服务。</span><b><span>第三方接入我司产品</span>/或服务时,将由第三方帐户获取您的信息,第三方服务平台或服务商提供商的行为与我司无关,由第三方承担相应责任。</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>软硬件</span>/系统服务提供商</b><span>。当第三方软硬件</span>/系统产品或服务与<span>影视大全</span><span>的产品或服务结合为您提供服务时,经您授权,我们会向第三方软硬件</span>/系统服务提供商提供您必要的个人信息,以便您使用服务,或用于我们分析产品和服务使用情况,来提升您的使用体验。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>广告、咨询类服务商</span>/广告主</b><span>。未经您授权,我们不会将您的个人信息与提供广告、咨询类服务商共享。但我们可能会将经处理无法识别您的身份且接收方无法复原的信息,例如经匿名化处理的用户画像,与广告或咨询类服务商或广告主共享,以帮助其在不识别您个人的前提下,提升广告有效触达率,以及分析我们的产品和服务使用情况等。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">3. |
| | | 对我们与之共享个人信息的公司、组织和个人,我们会与其签署严格的保密协定,要求他们按照我们的说明、本隐私政策以及其他任何相关的保密和安全措施来处理个人信息。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>二</span>. 转让</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们不会将您的个人信息转让给除</span><span>影视大全</span><span>及其关联公司外的其他公司、组织和个人,但以下情形除外:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 事先获得您的明确授权或同意;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 满足法律法规、法律程序的要求或强制性的政府要求或司法裁定;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">3. |
| | | 如果我们或我们的关联公司涉及合并、分立、清算、资产或业务的收购或出售等交易,您的个人信息有可能作为此类交易的一部分而被转移,我们将确保该等信息在转移时的机密性,并要求新的持有您个人信息的公司、组织继续受此隐私政策的约束,否则我们将要求该公司、组织重新向您征求授权同意。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>三</span>. 公开披露</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们仅会在以下情形下,公开披露您的个人信息:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 获得您的明确同意;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 基于法律法规、法律程序、诉讼或政府主管部门强制性要求下。</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>四</span>. 共享、转让、公开披露个人信息时事先征得授权同意的例外</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>在以下情形中,共享、转让、公开披露您的个人信息无需事先征得您的授权同意:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt;">1. 与国家安全、国防安全直接相关的;</p> |
| | | <p class="p" style="text-indent: 21pt;">2. 与公共安全、公共卫生、重大公共利益直接相关的; |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt;">3. 与犯罪侦查、起诉、审判和判决执行等直接相关的; |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt;">4. |
| | | 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;</p> |
| | | <p class="p" style="text-indent: 21pt;">5. 您自行向社会公众公开的个人信息;</p> |
| | | <p class="p" style="text-indent: 21pt;">6. |
| | | 从合法公开披露的信息中收集个人信息的,如合法的新闻报道、政府信息公开等渠道。</p> |
| | | <p class="p" style="text-indent: 21pt;">7. 根据个人信息主体要求签订和履行合同所必需的;</p> |
| | | <p class="p" style="text-indent: 21pt;">8. |
| | | 用于维护所提供的产品或服务的安全稳定运行所必需的,例如发现、处置产品或服务的故障;</p> |
| | | <p class="p" style="text-indent: 21pt;">9. |
| | | 学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行去标识化处理的;</p> |
| | | <p class="p" style="text-indent: 21pt;">10. 法律法规规定的其他情形。</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>根据法律规定,共享、转让经去标识化处理的个人信息,且确保数据接收方无法复原并重新识别个人信息主体的,不属于个人信息的对外共享、转让及公开披露行为,对此类数据的保存及处理将无需另行向您通知并征得您的同意。</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>我们如何保存和保护您的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>一、保存期限</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>在使用</span><span>影视大全</span><span>产品及服务期间,我们将持续为您保存您的个人信息。如果您注销帐户或主动删除上述信息,我们将依据网络安全法等法律法规规定保存您的信息。在您注销帐户或主动删除上述信息后,我们不会再对您的个人信息进行商业化使用,但我们可能会对您的个人信息进行匿名化处理后使用。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>二、保护地域</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您的个人信息均储存于中华人民共和国境内。如部分产品或服务涉及跨境,我们需要向境外传输您的个人信息,我们会严格按照法律法规的规定执行,并保证您的个人信息安全。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>三、保护措施</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 我们保护您个人信息的技术措施</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们从数据的生命周期角度出发,在数据收集、存储、显示、处理、使用、销毁等各个环节建立了安全防护措施,根据信息敏感程度的级别采取不同的控制措施,包括但不限于访问控制、</span>SSL(Secure |
| | | Socket Layer)加密传输、AES256bit或以上强度的加密算法进行加密存储、敏感信息脱敏显示等。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 我们保护您个人信息的管理措施</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们对可能接触到您信息的员工也采取了严格管理,可监控他们的操作情况,对于数据访问、内外部传输使用、脱敏、解密等重要操作建立了审批机制,并与上述员工签署保密协议,对大量接触个人敏感信息的人员进行背景审查等。与此同时,我们还定期对员工进行信息安全培训,要求员工在日常工作中形成良好操作习惯,提升数据保护意识。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">3. |
| | | 请您理解</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>尽管有前述的安全措施,但同时也请您理解在网络上不存在</span>“完美的安全措施”。我们会按现有的技术提供相应的安全措施来保护您的信息,提供合理的安全保障,我们将尽力做到使您的信息不被泄露、损毁或丢失。</b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>四、个人帐号信息自我保护</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>您的帐户均有安全保护功能,请妥善保管您的帐号及密码信息,切勿将密码告知他人,如果您发现自己的个人信息泄露,特别是您的帐号和密码发生泄露,请您立即与我们的客服联系,以便我们采取相应的措施。</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>请您及时保存或备份您的文字、图片等其他信息,您需理解并接受,您接入我们的服务所用的系统和通讯网络,有可能因我们可控范围外的因素而出现问题。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>您的权利(如何管理信息、改变授权范围、注销帐户)</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>一、访问您的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您有权访问您的个人信息,法律法规规定的例外情况除外。您可以通过以下方式自行访问您的个人信息:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>帐号信息:如果您希望访问或编辑您的帐号中的个人基本资料信息和支付信息、更改您的密码、添加安全信息或关闭您的帐号等,您可以通过登录帐号通过</span>“帐号管理”执行此类操作。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>如果您无法通过上述路径访问该等个人信息,您可以随时与我们联系。我们将在收到访问信息后</span>15天内回复您的访问请求。对于您在使用我们的产品或服务过程中产生的其他个人信息,我们将根据本条“六、响应您的上述请求”中的相关安排向您提供。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>二、更正或补充您的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>当您发现我们处理的关于您的个人信息有错误时,您有权要求我们做出更正或补充。您可以通过</span>“一、访问您的个人信息”中列明的方式提出更正或补充申请。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>三、删除您的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您可以通过</span>“一、访问您的个人信息”中列明的方式删除您的部分个人信息。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>在以下情形中,您可以向我们提出删除个人信息的请求:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 如果我们处理个人信息的行为违反法律法规;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 如果我们收集、使用您的个人信息,却未征得您的明确同意;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">3. |
| | | 如果我们处理个人信息的行为严重违反了与您的约定;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">4. |
| | | 如果您不再使用我们的产品或服务,或您主动注销了帐号;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">5. |
| | | 如果我们永久不再为您提供产品或服务。</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>若我们决定响应您的删除请求,我们还将同时尽可能通知从我们处获得您的个人信息的主体,要求其及时删除,除非法律法规另有规定,或这些主体获得您的独立授权。当您从我们的服务中删除信息后,我们可能不会立即从备份系统中删除相应的信息,但会在备份更新时删除这些信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>四、改变您授权同意的范围</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>每个业务功能可能需要一些基本的个人信息才能得以完成。除此之外,对于额外个人信息的收集和使用,您可以通过登录帐号通过</span>“帐号管理”或与客服联系给予或收回您的授权同意。当您收回同意后,我们将不再处理相应的个人信息。但您收回同意的决定,不会影响此前基于您的授权而开展的个人信息处理。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>五、注销帐号</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您可以自行在</span>“帐号注销”页面提交帐号注销申请。在您主动注销帐号之后,我们将停止为您提供产品或服务,根据适用法律的要求删除您的个人信息,或使其匿名化处理。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>六、响应您的上述请求</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>为保障安全,您可能需要提供书面请求,或以其他方式证明您的身份。我们可能会先要求您验证自己的身份,然后再处理您的请求。我们将尽快做出答复。如您不满意,还可以通过客服电话发起投诉。对于您合理的请求,我们原则上不收取费用,但对多次重复、超出合理限度的请求,我们将视情收取一定成本费用。对于那些无端重复、需要过多技术手段(例如,需要开发新系统或从根本上改变现行惯例)、给他人合法权益带来风险或者非常不切实际的请求,我们可能会予以拒绝。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>在以下情形中,按照法律法规要求,我们将无法响应您的请求:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 与国家安全、国防安全有关的;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 与公共安全、公共卫生、重大公共利益有关的;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | 3.与犯罪侦查、起诉、审判和执行判决等有关的;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | 4.有充分证据表明个人信息主体存在主观恶意或滥用权利的;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">5. |
| | | 响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">6. |
| | | 涉及商业秘密的。</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>我们如何保护儿童的个人信息</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们的产品、网站和服务主要面向成人。如果没有父母或监护人的同意,儿童不得创建自己的用户帐户。对于经父母同意而收集儿童个人信息的情况,我们只会在受到法律允许、父母或监护人明确同意或者保护儿童所必要的情况下使用或公开披露此信息。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>尽管当地法律和习俗对儿童的定义不同,但我们将不满</span> 14 |
| | | 周岁的任何人均视为儿童。如果我们发现自己在未事先获得可证实的父母同意的情况下收集了儿童的个人信息,则会设法尽快删除相关数据。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>您的个人信息如何在全球范围转移</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>原则上,我们在中华人民共和国境内收集和产生的个人信息,将存储在中华人民共和国境内。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>由于我们通过遍布全球的资源和服务器提供产品或服务,这意味着,在获得您的授权同意后,您的个人信息可能会被转移到您使用产品或服务所在国家</span>/地区的境外管辖区,或者受到来自这些管辖区的访问。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>此类管辖区可能设有不同的数据保护法,甚至未设立相关法律。在此类情况下,我们会确保您的个人信息得到在中华人民共和国境内足够同等的保护。例如,我们会请求您对跨境转移个人信息的同意,或者在跨境数据转移之前实施数据去标识化等安全举措</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>通知和修订</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们的隐私政策可能变更。未经您明确同意,我们不会削减您按照本隐私政策所应享有的权利。我们会在本页面上发布对本政策所做的任何变更。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>对于重大变更,我们还会提供更为显著的通知,例如通过页面弹窗形式通知,说明隐私政策的具体变更内容。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>本政策所指的重大变更包括但不限于:</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">1. |
| | | 我们的服务模式发生重大变化。如处理个人信息的目的、处理的个人信息类型、个人信息的使用方式等;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">2. |
| | | 我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">3. |
| | | 个人信息共享、转让或公开披露的主要对象发生变化;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">4. |
| | | 您参与个人信息处理方面的权利及其行使方式发生重大变化;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">5. |
| | | 我们负责处理个人信息安全的责任部门、联络方式及投诉渠道发生变化时;</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;">6. |
| | | 个人信息安全影响评估报告表明存在高风险时。</p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>我们还会将本政策的旧版本存档,供您查阅。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>如何联系我们</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>您可以通过以下方式与我们联系,我们将在</span>15天内回复您的请求: |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <span>如对本政策内容有任何疑问、意见或建议,您可通过留言板或客服电话与我们联系;</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>附件:定义</span></b> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>个人信息</span></b><span>:指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息。个人信息包括姓名、出生日期、身份证件号码、个人生物识别信息、住址、通信通讯联系方式、通信记录和内容、帐号密码、财产信息、征信信息、行踪轨迹、住</span> |
| | | <span>宿信息、健康生理信息、交易信息等。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>个人敏感信息</span></b><span>:指一旦泄露、非法提供或滥用可能危害人身和财产安全,极易导致个人名誉、身心健康受到损害或歧视性待遇等的个人信息。个人敏感信息包括身份证件号码、个人生物识别信息、银行账号、通信记录和内容、财产信息、征信信息、行踪轨迹、住宿信息、健康生理信息、交易信息、</span>14周岁以下(含)儿童的个人信息等。 |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>影视大全</span></b><b><span>平台</span></b><span>:</span><span>重庆椰视网络科技</span><span>有限公司所运营之</span><span>影视大全</span><span>网站。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>影视大全</span></b><b><span>合作商</span></b><span>:指我们联盟成员、合作伙伴及其他受信任的第三方供应商、服务商及代理商。</span> |
| | | </p> |
| | | <p class="p" style="text-indent: 21pt; background: #FFFFFF;"> |
| | | <b><span>去标识化</span></b><span>:收集个人信息后,我们将采取技术和管理方面的措施,将去标识化后的数据与可用于恢复识别个人的信息分开存储,并确保在后续的个人信息处理中不重新识别个人。</span> |
| | | </p> |
| | | <p class="MsoNormal"> </p> |
| | | </p> |
| | | <p> |
| | | <br /> |
| | | </p> |
| | | <body> |
| | | <p> |
| | | <h1 align="center" style="margin-left:0.0000pt;text-align:center;"> |
| | | <b>影视大全隐私政策</b> |
| | | </h1> |
| | | <h2> |
| | | <b><span>更新日期:</span>2020年</b><b>12</b><b>月</b><b>28</b><b>日</b> |
| | | </h2> |
| | | <h2> |
| | | <b><span>生效日期:</span>2020年</b><b>12</b><b>月</b><b>28</b><b>日</b> |
| | | </h2> |
| | | <h2> |
| | | <b>版本更新提示</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 尊敬的用户: |
| | | </p> |
| | | <p class="p"> |
| | | 感谢您使用影视大全!本次影视大全<span>(以下称</span>“我们”)依据《中华人民共和国网络安全法》、《信息安全技术个人信息安全规范》(GB/T |
| | | 35273-2017)以及其他相关法律法规和技术规范更新了一些内容,其中主要包括如下内容:本《影视大全<span>隐私政策》相关词语释义、我们如何收集和使用您的个人信息、我们如何共享、转让、公开披露您的个人信息。请您在使用</span>/继续使用影视大全<span>的产品与</span>/或服务前仔细阅读和充分理解全文,并在同意全部内容后使用/继续使用。 |
| | | </p> |
| | | <h2> |
| | | <b>导言</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 影视大全<span>(以下也称</span>“我们”)深知个人信息对您的重要性,因此我们非常重视保护您的隐私和个人信息,我们亦将本《影视大全<span>隐私政策》(以下也称</span>“本政策”)中的内容以高度审慎的义务对待和处理。本政策与您所使用的我们的产品与/或服务息息相关,您在下载、安装、启动、浏览、注册、登录、使用我们的产品与/或服务(以下统称“使用我们的产品与/或服务”或“使用产品与/或服务”)时,我们将按照本政策的约定处理和保护您的个人信息,因此我们希望您能够仔细阅读、充分理解本政策的全文,并在需要时,按照本政策的指引,作出您认为适当的选择。本政策之中涉及的相关技术词汇,我们尽量以简明扼要的表述向您解释,以便于您理解。 |
| | | <br /> |
| | | <b>您应当在仔细阅读、充分理解本《</b><b>影视大全</b><b><span>隐私政策》后选择是否同意本政策的内容以及是否同意使用我们的产品与</span>/或服务,如果您不同意本政策的内容,将可能导致我们的产品与/或服务无法正常运行,或者无法达到我们拟达到的服务效果,您应立即停止访问/使用我们的产品与/或服务。您使用或继续使用我们提供的产品与/或服务的行为,都表示您充分理解和同意本《</b><b>影视大全</b><b><span>隐私政策》(包括更新版本)的全部内容。</span> |
| | | </b><b><br /> |
| | | </b><b>影视大全</b><b><span>已经以字体加粗或其他合理方式提示您重点阅读协议中与您的权益(可能)存在重大关系的条款,且双方同意其不属于《合同法》第</span>40条规定的“免除其责任、加重对方责任、排除对方主要权利”的条款,即您和</b><b>影视大全</b><b>均认可该类条款的合法性及有效性,您不会以</b><b>影视大全</b><b>未尽到合理提示义务为由而声称协议中条款非法或无效。</b> <br /> |
| | | 如您在阅读本《影视大全<span>隐私政策》过程中有任何疑惑或其他相关事宜的,我们为您提供了多种反馈渠道,具体请见本政策</span>“如何联系我们”章节,我们会尽快为您作出解答。 |
| | | </p> |
| | | <h2> |
| | | <b>关于我们</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 影视大全是指包括重庆椰视网络科技有限公司<span>及其关联公司在内的企业。</span> <br /> |
| | | ● 关联公司是指在现在、将来控制重庆椰视网络科技有限公司、受重庆椰视网络科技有限公司控制或与重庆椰视网络科技有限公司<span>处于共同控制下的公司、机构。控制指通过所有权、有投票权的股份、合同、实际运营关联或其他被依法认定的方式直接或间接地拥有影响被控制对象管理</span>/经营的能力。 |
| | | <br /> |
| | | ● 我们的主要运营公司基本情况如下:重庆椰视网络科技有限公司<span>,</span>2015年12月22日 营业期限自: 2015年12月22日 营业期限至: 登记机关: 重庆市渝中区市场监督管理局 核准日期: 2018年12月27日 登记状态: 存续(在营、开业、在册) 住所: 重庆市渝中区经纬大道333号2幢1702号 经营范围: 计算机软硬件及网络技术的技术开发、技术转让、技术咨询;计算机系统集成;商务信息咨询;企业管理咨询;企业营销策划;会议及展览服务(国家有专项规定的除外);设计、制作、代理、发布国内外广告(法律、法规禁止的不得经营;法律、法规限制的取得许可或审批后方可经营);销售:计算机软件及辅助设备、日用百货。『以上范围法律、法规、国务院决定禁止经营的不得经营;法律、法规、国务院决定规定应经审批而未获审批前不得经营』★★ |
| | | </p> |
| | | <h2> |
| | | <b>本《</b><b>影视大全</b><b>隐私政策》将帮助您了解以下内容</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>一、</span> <span>本《</span>影视大全<span>隐私政策》适用范围、相关词语涵义</span> <br /> |
| | | <span>二、</span> <span>我们如何收集和使用您的个人信息</span> <br /> |
| | | <span>三、</span> <span>我们如何使用</span>Cookie和同类技术 <br /> |
| | | <span>四、</span> <span>我们如何共享、转让、公开披露您的个人信息</span> <br /> |
| | | <span>五、</span> <span>您对个人信息享有的控制权</span> <br /> |
| | | <span>六、</span> <span>我们如何存储和保护您的个人信息</span> <br /> |
| | | <span>七、</span> <span>未成年人保护</span> <br /> |
| | | <span>八、</span> <span>本《</span>影视大全<span>隐私政策》的更新</span> <br /> |
| | | <span>九、</span> <span>如何联系我们</span> <br /> |
| | | <span>十、</span> <span>其他</span> |
| | | </p> |
| | | <h2> |
| | | <b>一、本《</b><b>影视大全</b><b>隐私政策》适用范围、相关词语涵义</b><b> </b><b><br /> |
| | | </b><b>(一)本《</b><b>影视大全</b><b>隐私政策》适用范围</b><b> </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 本《影视大全<span>隐私政策》为我们的所有产品与</span>/或服务统一适用的通用内容,当您使用我们的任何产品与/或服务时,本《影视大全<span>隐私政策》即适用,但如该产品与</span>/或服务单独设置了隐私条款/隐私协议的,单独的隐私条款/隐私协议优先适用;单独的隐私条款/隐私协议未提及的内容,适用本政策。但请您注意,本《影视大全<span>隐私政策》不适用于以下情况:</span> |
| | | <br /> |
| | | ● 为我们的产品与/或服务提供广告服务的第三方的信息收集/处理做法; <br /> |
| | | ● |
| | | 我们的产品与/或服务可能会包含或链接至第三方提供的信息与/或第三方服务(包括任何第三方应用、网站、产品、服务等),这些信息与/或服务由第三方负责运营,您使用该等信息与/或服务与我们无关。我们在此善意的提醒您,您在使用第三方信息与/或服务时,应留意和仔细阅读第三方向您展示的相关用户协议和隐私政策,并妥善保管和谨慎提供您的个人信息。本《影视大全<span>隐私政策》仅适用于我们所收集的您的个人信息,并不适用于任何第三方对您的个人信息的收集,以及任何第三方提供的服务或第三方的信息使用规则,我们对任何第三方收集、储存和使用的您个人信息的行为在法律允许的范围内亦不承担任何责任;</span> |
| | | <br /> |
| | | ● 其他非影视大全<span>向您提供的产品与</span>/或服务内容。 <br /> |
| | | <b>(二)相关词语涵义</b> <br /> |
| | | ● 我们的产品与/或服务:包括但不限于我们提供的软件、网站、服务(含站外服务,例如:我们的广告服务和“通过我们的服务申请或分享”的插件等)以及包含的相关产品或服务功能。 <br /> |
| | | <b>我们需要特别提醒您的是:由于我们的产品和服务较多,为您提供的产品和服务内容也有所不同,本《</b><b>影视大全</b><b>隐私政策》为</b><b>影视大全</b><b><span>统一适用的一般性隐私条款,本政策约定的用户权利和我们提供的相关信息安全保护措施均适用于我们的所有产品和服务;本政策所述之</span>“我们的产品与/或服务”以及我们收集的您个人信息的类型和对应的使用、处理规则等可能会因您使用的具体的产品/服务(包括客户端类型、软件版本等)而有所不同,具体以您实际使用的产品/服务的实际情况为准。针对我们的某些特定产品/服务,我们还将制定特定隐私条款或隐私协议,以便更具体地向您阐明我们的隐私规则和保护措施等内容。</b> <br /> |
| | | ● 个人信息(出自于GB/T |
| | | 35273-2017《信息安全技术个人信息安全规范》):指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息。本隐私政策中涉及的个人信息包括个人基本资料(包括个人姓名、生日、性别、住址、个人电话号码)、网络身份标识信息(包括系统账号、IP地址)、个人财产信息(包括交易和消费记录、流水记录、虚拟货币(如优惠券等)、兑换码等虚拟财产信息))个人上网记录(包括浏览记录、软件使用记录、点击记录)、个人常用设备信息(包括硬件序列号、硬件型号、设备MAC地址、操作系统类型、软件列表、唯一设备识别码如(如IMEI/ANDROID |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等在内的描述个人常用设备基本情况的信息)、个人位置信息(包括大概地理位置、精准定位信息)。我们实际具体收集的个人信息种类以下文描述为准。 <br /> |
| | | ● <b>个人敏感信息</b><span>(出自于</span>GB/T 35273-2017《信息安全技术个人信息安全规范》)<b><span>:指一旦泄露、非法提供或滥用可能危害人身和财产安全,极易导致个人名誉、身心健康受到损害或歧视性待遇等的个人信息。本隐私政策中涉及的个人敏感信息包括您的个人财产信息(包括交易和消费记录、流水记录、虚拟货币(如优惠券等)、兑换码等虚拟财产信息)、网络身份识别信息(包括系统账号、</span>IP地址)、其他信息(包括个人电话号码、精准定位信息、收货地址、网页浏览记录)。您同意您的个人敏感信息按本《</b><b>影视大全</b><b>隐私政策》所述的目的和方式来处理。我们实际具体收集的个人敏感信息种类以下文描述为准。相比其他个人信息,个人敏感信息可能对您的个人权益影响更大。我们在此善意的提醒您需在谨慎考虑后再向我们提供您的个人敏感信息。</b> <br /> |
| | | ● 儿童:指不满十四周岁的未成年人。(出自于《儿童个人信息网络保护规定》) <br /> |
| | | ● 匿名化:指通过对个人信息的技术处理,使得个人信息主体无法被识别,且处理后的信息不能被复原的过程。(出自于GB/T 35273-2017《信息安全技术个人信息安全规范》) <br /> |
| | | ● 去标识化:指通过对个人信息的技术处理,使其在不借助额外信息的情况下,无法识别个人信息主体的过程。(出自于GB/T 35273-2017《信息安全技术个人信息安全规范》) <br /> |
| | | ● 删除:指在实现日常业务功能所涉及的系统中去除个人信息的行为,使其保持不可被检索、访问的状态。(出自于GB/T 35273-2017《信息安全技术个人信息安全规范》) |
| | | </p> |
| | | <h2> |
| | | <b>二、我们如何收集和使用您的个人信息</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>您在使用我们的产品与</span>/或服务时,我们需要/可能需要收集和使用您的一些个人信息,我们收集和使用的您的个人信息类型包括两种:<b><span>第一种:我们产品与</span>/或服务的核心业务功能所必需的信息:此类信息为产品与/或服务正常运行的必备信息,您须授权我们收集。如您拒绝提供,您将无法正常使用我们的产品与/或服务;第二种:我们产品与/或服务的附加业务功能可能需要收集的信息:此信息为非核心业务功能所需的信息,您可以选择是否授权我们收集。如您拒绝提供,将导致附加业务功能无法实现或无法达到我们拟达到的效果,但不影响您对核心业务功能的正常使用。</b> <br /> |
| | | <b><span>我们需要特别提醒您的是:由于我们的产品和服务较多,为您提供的内容也不同,因此核心业务功能(包括其收集的您的个人信息类型)也会因产品</span>/服务的内容不同而有所区别,具体以产品/服务实际提供为准。除此之外,您理解并同意,我们希望提供给您的产品和服务是完善的,所以我们会不断改进我们的产品和服务,包括技术,这意味着我们可能会经常推出新的业务功能,可能需要收集新的个人信息或变更个人信息使用目的或方式。如果某一需要收集您的个人信息的功能或产品/服务未能在本《</b><b>影视大全</b><b>隐私政策》中予以说明的,我们会通过更新本政策、系统提示、弹窗、公告、站内信等方式另行向您说明该信息收集的目的、内容、使用方式和范围,并为您提供自主选择同意的方式,且在征得您明示同意后收集。</b><span>在此过程中,如果您对相关事宜有任何疑惑的,可以通过文末提供的方式联系我们,我们会尽快为您作出解答。</span> |
| | | <br /> |
| | | <span>具体业务功能场景包括:</span> <br /> |
| | | <b>(一)视频展示和播放功能</b> <br /> |
| | | <span>我们的产品与</span>/或服务为您提供视频展示和播放服务,在此过程中,我们需要收集您的一些信息,包括如下个人信息:<b><span>设备型号、设备名称、设备标识、操作系统和应用程序版本、登录</span>IP地址、接入网络的方式、移动网络信息(包括运营商名称)、产品版本号、日志信息(如操作日志、服务日志)等。同时为了收集上述基本的个人设备信息,我们将会申请访问您的设备信息的权限,</b><span>我们收集这些信息是为了向您提供我们最核心的视频展示和播放服务,如您拒绝提供上述权限将可能导致您无法使用我们的产品与服务。</span> |
| | | <br /> |
| | | <b>(二)搜索功能</b> <br /> |
| | | 当您使用搜索功能时,我们需要收集您的一些信息,包括如下个人信息:<b>搜索的字词、浏览记录和时间、搜索的时间以及与它们互动的次数。</b><span>我们收集这些信息是为了向您提供您所需要的内容和可能更感兴趣的服务,同时亦可以改进我们的产品和服务。</span> |
| | | <br /> |
| | | <b>(三)注册与登录功能</b> <br /> |
| | | <span>当您使用注册功能时,您需要按照我们的指引完成一系列注册的程序,在您成为注册用户后,我们将为您提供专属于注册用户的产品与</span>/或服务。在此过程中,您需要提供给我们一些单独或者结合识别您的用户身份的信息,包括:<b>手机号码、验证码匹配结果,</b>并创建<b><span>账号</span>UID</b>。我们收集这些信息是用以完成注册程序、为您持续稳定提供注册服务,并保护您注册账号的安全。<b>您应知悉,手机号码和验证码匹配结果属于您的个人敏感信息,我们收集该类信息是为了满足相关法律法规的要求,如您拒绝提供可能导致您无法使用我们的此功能,请您谨慎考虑后再提供。</b>同时,您也可以在注册时或后续使用过程中填写或补充<b>您的性别、昵称、头像、生日信息,</b><span>如您未填写或后续删除、变更此类信息的,可能会影响(包括无法获取到)我们为您提供的基于您的个人画像信息的影视作品推荐、您感兴趣的广告呈现等,但不会影响注册功能的正常使用。</span> |
| | | <br /> |
| | | 如您使用一键登录的功能,基于我们与通信运营商的合作,我们将会<b>收集您的手机号码和手机运营商信息</b><span>,以便为您提供快捷的登录服务。</span> <span>如您使用第三方平台的账号(例如:微信</span>/微博/QQ/AppleID等账号)登录的,我们将根据您的授权获取<b>该第三方账号下的相关信息(包括:用户名、昵称、头像,具体以您的授权内容为准)以及身份验证信息(个人敏感信息),在您使用发布、评论以及其他要求实名认证的功能与服务前,我们将另行收集您的手机号码以完成实名认证</b><span>。我们收集这些信息是用于为您提供账号登录服务以及保障您的账号安全,防范安全风险。如您拒绝授权此类信息的,您将无法使用第三方平台的账号登录我们平台,但不影响我们为您提供的其他产品和服务的正常使用。您知悉并同意,对于您在使用产品与</span>/或服务的过程中提供的您的联系方式(如<b>联系电话</b><span>),我们在运营中可能会向其中的一种或多种发送多类通知,用于用户消息告知、身份验证、安全验证等用途。</span> |
| | | <br /> |
| | | <b>(四)服务推荐功能</b> <br /> |
| | | <span>视频推荐、广告推荐、文学推荐、直播推荐、服务内容推荐及相关推荐功能为我们的产品与</span>/或服务的核心业务功能,在此过程中,我们需要收集您在我们的产品与/或服务中的一些信息,包括如下个人信息:<b><span>您观看的内容、您搜索的字词、浏览内容和广告的次数以及与它们互动的次数、您点赞</span>/分享/评论/互动的对象,</b><span>我们收集这些信息是为了向您实时推荐更优质、您可能更感兴趣的服务内容,例如:推荐您可能喜欢的电视剧、电影、综艺节目、广告等。</span> |
| | | <br /> |
| | | <b>(五)基于设备相册权限的附加业务功能</b> <br /> |
| | | 当您使用视频分享、发布图片等业务功能时,我们将需要获取您的设备相册权限,并收集您提供的<b>图文及视频内容信息(个人信息)</b><span>。如您拒绝提供的仅会使您无法使用该功能,但并不影响您正常使用产品与</span>/或服务的其他功能。相册权限是您设备上的一项设置,您可以通过设备设置页面进行管理。您开启该权限即视为您授权我们可以访问、获取、收集、使用您的该等个人信息;当您取消该授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但除非您依照法律的规定删除了您的个人信息,否则您的取消行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 |
| | | <br /> |
| | | <b>(六)基于设备相机权限的附加业务功能</b> <br /> |
| | | 当您使用视频分享、授权设备登录等业务功能时,我们将需要获取您的设备相机权限,并收集您提供的<b>图片、视频信息(个人信息)</b><span>。如您拒绝提供的仅会使您无法使用该功能,但并不影响您正常使用产品与</span>/或服务的其他功能。相机权限是您设备上的一项设置,您可以通过设备设置页面进行管理。您开启该权限即视为您授权我们可以访问、获取、收集、使用您的该等个人信息;当您取消该授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但除非您依照法律的规定删除了您的个人信息,否则您的取消行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 |
| | | <br /> |
| | | <b>(七)基于设备麦克风权限的附加业务功能</b> <br /> |
| | | 当您使用语音输入等业务功能时,我们将需要获取您的设备麦克风权限,并收集您的<b>语音信息、语音交互信息(个人信息)</b><span>。如您拒绝提供的仅会使您无法使用该功能,但并不影响您正常使用产品与</span>/或服务的其他功能。麦克风权限是您设备上的一项设置,您可以通过设备设置页面进行管理。您开启该权限即视为您授权我们可以访问、获取、收集、使用您的该等个人信息;但当您取消该授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但除非您依照法律的规定删除了您的个人信息,否则您的取消行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 |
| | | <br /> |
| | | <b>(八)下单与交付</b> <br /> |
| | | <span>当您在我们的产品与</span>/或服务中购买商品或服务的,您需要提供一些下单与完成交易所需要的信息,包括:<b>交易商品或服务信息、收货人信息(收货人姓名、收货地址及其联系电话)(个人敏感信息),</b>此外,我们也可能会再收集一些其他与订单相关的信息,包括:<b>订单号、交易金额、下单时间、订单商户、订单编号、订单状态、支付方式、支付账号、支付状态(个人敏感信息),</b><span>我们收集这些信息是为了帮助您顺利完成交易、保障您的交易安全、查询订单信息、提供客户服务等。</span> |
| | | <span>在您成功下单后,如商品系第三方卖家提供的或商品需要第三方配送的,我们为了顺利、安全、准确向您完成货物的交付及配送,商家及第三方配送公司在发货及配送环节内不可避免地会获知您的</span><b>相关配送信息(个人信息)</b><span>。我们向您承诺,我们会以最大努力保障您的个人信息安全,我们会严格要求商家及第三方配送公司对您的个人信息保密,只以配送之目的获悉和使用,不得对外泄露或做其他任何用途。</span> |
| | | <br /> |
| | | <b>(九)身份认证功能</b> <br /> |
| | | <span>当您使用我们的产品与</span>/或服务中的身份认证功能或服务时,为满足相关法律规定及监管要求、确保用户身份真实性、实现反欺诈等风险控制、保障系统和服务安全或提供服务之需要,我们将需要收集您的真实身份信息(可能包括<b>手机号码等个人敏感信息)</b><span>以完成实名认证,相关业务场景可能包括:注册产品时、使用信息发布等服务时、申请使用</span>“影视大全”服务时、申请注销“影视大全”账号时以及其他需要进行身份认证的场景。为实现实名认证的目的,您同意我们可以自行或委托第三方向有关机构(如个人征信机构、政府机构等)提供、查询、核对您的前述身份信息。<b>在您实名认证成功后,如无正当事由,实名信息将无法修改,</b><span>如确需修改,请您与我们联系解决。</span> |
| | | <br /> |
| | | <span>同时,为协助您快速完成实名认证、风控核验等,对于您曾经在我们的产品与</span>/或服务中提供的相关实名认证信息(包括<b>手机号码等个人敏感信息)</b><span>,您同意我们可以将前述信息的全部或部分自动预填于其他需要您实名认证的页面,您知悉并认可,我们仅协助填写,并未直接传输,只有在您点击下一步操作后才由您自行提供至对应服务系统。</span> |
| | | <br /> |
| | | <b>(十)客服、其他用户响应功能</b> <br /> |
| | | 当您联系我们的客服或使用其他用户响应功能时(包括:行使您的相关个人信息控制权、其他客户投诉和需求),为了您的账号与系统安全,我们可能需要您先行提供账号信息,并与您之前的个人信息相匹配以验证您的用户身份。在您使用客服或其他用户响应功能时,我们可能还会需要收集<b><span>您的如下个人敏感信息:联系方式(您与我们联系时使用的电话号码或您向我们主动提供的其他联系方式)、您与我们的沟通信息(包括文字</span>/图片/音视频/通话记录形式)、与您需求相关联的其他必要信息</b><span>。我们收集这些信息是为了调查事实与帮助您解决问题,如您拒绝提供可能导致您无法使用我们的客服等用户响应机制。</span> |
| | | <br /> |
| | | <b>(十一)保障账号安全功能</b> <br /> |
| | | <span>我们需要收集您的一些信息来保障您使用我们的产品与</span>/或服务时的账号与系统安全,并协助提升我们的产品与/服务的安全性和可靠性,以防产生任何危害用户、影视大全、社会的行为,包括:<b><span>您的如下个人信息:个人常用设备信息、登录</span>IP地址、产品版本号、浏览记录、网络使用习惯、服务故障信息,以及个人敏感信息如实名认证信息。</b><span>我们会根据上述信息来综合判断您账号、账户及交易风险、进行身份验证、客户服务、检测及防范安全事件、诈骗监测、存档和备份用途,并依法采取必要的记录、审计、分析、处置措施,一旦我们检测出存在或疑似存在账号安全风险时,我们会使用相关信息进行安全验证与风险排除,确保我们向您提供的产品和服务的安全性,以用来保障您的权益不受侵害。同时,当发生账号或系统安全问题时,我们会收集这些信息来优化我们的产品和服务。</span> |
| | | <br /> |
| | | <b>(十二)从外部第三方间接收集的您的个人信息</b> <br /> |
| | | 您知悉,您向外部第三方(影视大全<span>旗下公司不在此限)提供的个人信息,或外部第三方收集的您的个人信息,我们无法获取,更不会使用非常规方式(如:恶意干预对方系列</span>APP数据)擅自以软件程序获得您的个人信息。如果因业务发展的必要而需要从第三方间接收集(如共享等)您的个人信息的,且由我们直接或联合为您提供产品或服务的,我们(或第三方)在收集前会向您明示共享的您个人信息的来源、类型、使用目的、方式和所用于的业务功能、授权同意范围(如果使用方式和范围超出您在第三方原授权范围的,我们会再次征得您的授权同意),此种场景包括您通过第三方账户直接登录我们的产品与/或服务时,我们从第三方获取的您授权共享的账户信息(包括头像、昵称)、我们的某些产品/服务由业务合作伙伴提供或者我们与业务合作伙伴共同提供时,为了必要/合理的业务的顺利开展,我们从部分业务合作伙伴处间接收集的您的部分信息、其他方使用我们的产品与/或服务时所提供有关您的信息(包括发布的与您相关的内容,包括评论、图片、照片、视频)。 |
| | | <br /> |
| | | <span>此外,我们会在间接收集您的个人信息前,明确以书面形式(如协议、承诺书)要求该第三方在已经取得您明示同意后收集个人信息,并向您告知共享的信息内容,且涉及敏感信息的在提供给我们使用前需经过您的再次确认,在协议等层面要求第三方对个人信息来源的合法性和合规性作出承诺,如第三方有违反行为的,我们会明确要求对方承担相应法律责任;同时,我们的专业安全团队对个人信息进行安全加固(包括敏感信息报备、敏感信息加密存储、访问权限控制等)。我们会使用不低于我们对自身用户个人信息同等的保护手段与措施对间接获取的个人信息进行保护。</span> |
| | | <br /> |
| | | <b><span>(十三)个性化推荐</span>/定向推送、维护/改进我们的产品与/或服务之必需</b> <br /> |
| | | <span>为了向您提供更优质和更适合您的产品与</span>/或服务、让您有更好的产品与/或服务的使用体验或您同意的其他用途,在符合相关法律法规的前提下,我们可能将我们的某一项产品与/或服务所收集的您的个人信息,以综合统计、分析的方式单独或与来自其他服务的某些信息结合进行使用,以便于向您提供个性化服务/定向推送,包括我们向您提供相关个性化信息、在征得您同意的情况下与我们的合作伙伴共享信息以便他们向您发送有关其产品和服务的信息等,同时,我们也为您提供了相关定向推送的退出机制。但未经您的同意,我们不会主动将前述信息传输至该第三方),以便我们向您推荐所在地区的最新消息或更适合您的服务内容等,如您决定退出我们基于位置信息作出的个性化推荐/定向推送的,您可通过设备设置页面予以取消授权;您可以授权我们在移动端通过<b>“消息”推送</b><span>您可能更感兴趣的相关内容,如您希望我们停止继续推送的,您可通过相关功能设置页面予以取消授权。</span> |
| | | <br /> |
| | | <span>我们可能会收集您使用我们的产品与</span>/或服务时的<b><span>搜索记录、观看历史、收藏记录、观看时长、</span>IP地址、访问日期和时间、您的偏向网络行为、兴趣偏好等信息形成用户画像</b><span>用于帮助使我们更加了解您如何接入和使用我们的产品与</span>/或服务、维护和改进我们的产品与/或服务或对您作出其他方面的回应。 |
| | | <br /> |
| | | <span>同时,我们可能会收集您使用我们的产品与</span>/或服务时的其他信息做一些其他合理用途,包括:<b>调查问卷回复、您与</b><b>影视大全</b><b><span>旗下公司</span>/我们的合作伙伴之间互动时我们获得的相关信息</b><span>用于研发和改进、综合统计、数据分析或加工等处理、经您同意或授权的其他用途、遵守法律规定或其他一些合理用途。如我们在相关产品与</span>/或服务之中提供了相应选项,您也可以主动要求我们将您在该产品与/或服务所提供和储存的个人信息用于我们或我们合作方的其他服务。 |
| | | <br /> |
| | | <b>(十</b><b>四</b><b>)其他</b> <br /> |
| | | 如上文所述,<b><span>如果某一需要收集您的个人信息的功能或产品</span>/服务未能在本《</b><b>影视大全</b><b>隐私政策》中予以说明的,或者我们超出了与收集您的个人信息时所声称的目的及具有直接或合理关联范围的,我们将在收集和使用你的个人信息前,通过更新本《</b><b>影视大全</b><b>隐私政策》、页面提示、弹窗、消息通知、网站公告或其他便于您获知的方式另行向您说明,并为您提供自主选择同意的方式,且在征得您明示同意后收集和使用。</b> <br /> |
| | | <b><i>例外情形</i></b> <br /> |
| | | <span>另外,您充分理解并同意,我们在以下情况下收集、使用您的个人信息无需您的授权同意:</span> <br /> |
| | | ● 与国家安全、国防安全有关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益有关的; <br /> |
| | | ● 与犯罪侦查、起诉、审判和判决执行等直接相关的; <br /> |
| | | ● 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到您本人同意的; <br /> |
| | | ● 所收集的信息是您自行向社会公开的或者是从合法公开的渠道(如合法的新闻报道、政府信息公开等渠道)中收集到的; <br /> |
| | | ● 根据与您签订和履行相关协议或其他书面文件所必需的; <br /> |
| | | ● 用于维护我们的产品与/或服务的安全稳定运行所必需的,例如:发现、处置产品与/或服务的故障; <br /> |
| | | ● 有权机关的要求、法律法规等规定的其他情形。 |
| | | </p> |
| | | <h2> |
| | | <b><span>三、我们如何使用</span>Cookie和同类技术 </b><b><br /> |
| | | </b><b><span>(一)关于</span>Cookie和同类技术 </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | Cookie是包含字符串的小文件,在您登入和使用网站或其他网络内容时发送、存放在您的计算机、移动设备或其他装置内(通常经过加密)。Cookie同类技术是可用于与Cookie类似用途的其他技术,例如:Web |
| | | Beacon、Proxy、嵌入式脚本等。 <br /> |
| | | <span>目前,我们主要使用</span>Cookie收集您的个人信息。您知悉并同意,随着技术的发展和我们产品和服务的进一步完善,我们也可能会使用Cookie同类技术。 <br /> |
| | | <b><span>(二)我们如何使用</span>Cookie和同类技术</b> <br /> |
| | | <span>在您使用我们的产品与</span>/或服务时,我们可能会使用Cookie和同类技术收集您的一些个人信息,<b>包括:您访问网站的习惯、您的浏览信息、您的登录信息,</b>Cookie和同类技术收集该类信息是为了您使用我们的产品与/或服务的必要、简化您重复操作的步骤(如注册、登录)、便于您查看使用历史(如视频观看历史)、向您提供更切合您个人需要的服务内容和您可能更感兴趣的内容、保护您的信息和账号安全性、改善我们的产品和服务等。我们承诺仅在本《影视大全<span>隐私政策》所述目的范围内使用</span>Cookie和同类技术。 |
| | | <br /> |
| | | <span>如果您的浏览器允许,您可以通过您的浏览器的设置以管理、(部分</span>/全部)拒绝Cookie与/或同类技术;或删除已经储存在您的计算机、移动设备或其他装置内的Cookie与/或同类技术,从而实现我们无法全部或部分追踪您的个人信息。您如需详细了解如何更改浏览器设置,请具体查看您使用的浏览器的相关设置页面。<b><span>您理解并知悉:我们的某些产品</span>/服务只能通过使用Cookie或同类技术才可得到实现,如您拒绝使用或删除的,您可能将无法正常使用我们的相关产品与/或服务或无法通过我们的产品与/或服务获得最佳的服务体验,同时也可能会对您的信息保护和账号安全性造成一定的影响。</b> |
| | | </p> |
| | | <h2> |
| | | <b><span>四、我们如何共享、转让、公开披露您的个人信息</span> </b><b><br /> |
| | | </b><b><span>(一)共享</span> </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>我们会重视对您的个人信息的保护,您的个人信息是我们为您提供产品与</span>/或服务的重要依据和组成部分,对于您的个人信息,我们仅在本《影视大全隐私政策》所述目的和范围内或根据法律法规的要求收集和使用,并严格保密,我们不会与影视大全<span>以外的第三方公司、组织和个人共享您的个人信息,除非存在以下一种或多种情形:</span> |
| | | <br /> |
| | | ● 您自行提出要求的; <br /> |
| | | ● 事先已征得您的明确授权同意; <br /> |
| | | ● 与部分业务合作伙伴的必要共享; <br /> |
| | | <span>您理解并同意,为了必要</span>/合理的业务的顺利开展、满足您的要求、履行我们在相关用户协议或本隐私政策中的义务和行使我们的权利或遵守法律规定等目的,我们可能需要向部分业务合作伙伴共享您的部分信息。但我们承诺我们只会共享您的必要个人信息,如果我们共享您的个人敏感信息或改变个人信息的使用及处理目的,我们会将再次征求您的授权同意。我们的业务合作伙伴包括: |
| | | <br /> |
| | | <span>(</span>1)为我们的产品与/或服务提供功能支持的服务提供商:包括:提供一键登录服务的运营商,我们共享信息的目的是可以实现我们产品与/或服务的功能,让您可以正常使用; <br /> |
| | | <span>(</span>2)我们平台的第三方商家:为实现您购买产品或服务的需求(包括享受售后服务),我们会将您的订单信息与交易相关的信息共享给我们平台的第三方商家; <br /> |
| | | <span>(</span>3)提供数据服务(包括网络广告监测、数据统计、数据分析)的合作伙伴:为维护/改进我们的产品/服务、为您提供更好的内容,我们可能会与提供该服务的指定合作伙伴共享您的相关信息(包括:视频播放记录、广告展示记录、个人设备信息(包括硬件序列号、硬件型号、设备MAC地址、操作系统类型、软件列表、唯一设备识别码如IMEI/ANDROID |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等在内的描述个人设备基本情况的信息)、您所在的城市及其他相关信息),为了您的信息安全,我们目前仅与已签署严格数据安全保密协议的合作伙伴进行合作,包括友盟同欣(北京)科技有限公司等,且这些公司必须遵守我们的数据隐私和安全要求。除非得到您的同意,我们不会与其共享您的个人身份信息; |
| | | <br /> |
| | | <span>(</span>4)第三方SDK类服务商:我们产品中可能会包含第三方SDK或其他类似的应用程序,如您在我们平台上使用这类由第三方提供的服务时,您同意将由其直接收集和处理您的信息(如以嵌入代码、插件等形式),例如:当您使用小米、魅族、华为、OPPO、VIVO手机的,我们接入的小米Push |
| | | SDK需要收集手机唯一标识信息(例如IMEI信息),并可能会收集您的手机型号、系统类型、系统版本、设备屏幕尺寸等参数用于实现推广活动、视频内容等信息的推送; <br /> |
| | | 我们会使用如您把影视大全的内容分享到第三方平台(如微博,微信<span>),其</span>SDK可能会收集您提供的信息; <br /> |
| | | 我们会使用穿山甲的广告 SDK:<span>需要收集您的设备</span>Mac地址、唯一设备识别码 (IMEI/android |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等)、设备机型、操作系统及版本、客户端版本、设备分辨率、包名、设备设置、软硬件特征信息、设备名称等以提供统计分析服务,并通过地理位置校准报表数据准确性,提供基础反作弊能力。用来匹配设备广告。 |
| | | </p> |
| | | <p class="p"> |
| | | <span>我们的产品集成友盟</span>+SDK,友盟+SDK需要收集您的设备Mac地址、唯一设备识别码 (IMEI/android |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等)、设备机型、操作系统及版本、客户端版本、设备分辨率、包名、设备设置、软硬件特征信息、设备名称等以提供统计分析服务,并通过地理位置校准报表数据准确性,提供基础反作弊能力; |
| | | <br /> |
| | | <span>如您使用用户反馈功能(入口为</span>“我的-设置-我要反馈”),我们会通过阿里云<span>反馈</span>SDK进行用户反馈的收集和回复,可能需要读取您的设备相关信息(例如设备型号、操作系统版本、设备设置、MAC地址及IMEI、IDFA、OAID及其他设备标识符等软硬件特征信息)、设备所在位置相关信息(例如IP地址、GPS位置以及能够提供相关信息的Wi-Fi接入点、蓝牙和基站等传感器信息)。阿里云反馈SDK可能会将前面两类信息进行关联,以便能在不同设备上为您提供一致的服务;当您使用阿里云反馈提供的服务时,阿里云反馈SDK会自动收集您对我们服务的详细使用情况,作为有关网络日志保存。例如您的搜索查询内容、IP地址、浏览器的类型、电信运营商、使用的语言、访问日期和时间及您访问的网页记录等。 |
| | | <br /> |
| | | <span>(</span>5)委托我们进行信息推广和广告投放的合作伙伴(如优量汇、穿山甲、百度联盟<span>等)共享我们使用您的相关信息集合形成的间接用户画像、去标识化或匿名化处理后的分析</span>/统计类信息,以帮助其进行广告或决策建议、提高广告有效触达率、进一步了解用户需求。我们承诺:未经您的同意,我们不会与其共享可以识别您身份的个人信息; |
| | | <br /> |
| | | <span>(</span>6)与我们共同提供某项服务的合作伙伴,例如:我们与合作伙伴共同开展营销活动,为了能够向您提供正常服务和满足您的服务需求,我们会另行取得您的授权,并在您授权后将您的相关信息(具体以您的授权内容为准)同步给该合作伙伴。 |
| | | <br /> |
| | | ● 共享的是去标识化的信息,且接受该信息共享的第三方无法重新识别信息主体身份; <br /> |
| | | ● 为了保护您、我们的其他用户或员工、影视大全<span>或社会公共利益、财产或安全(例如:欺诈或信用风险等)免遭损害而与第三方的共享;</span> <br /> |
| | | ● 某些情况下,只有共享您的个人信息,才能实现我们的产品与/或服务的核心功能或提供您需要的服务,或处理您与他人的纠纷或争议; <br /> |
| | | ● 依据您与我们签署的相关协议(例如:在线协议、平台规则等)或法律文件而共享的; <br /> |
| | | ● 符合您与其他第三人之间的有关约定的; <br /> |
| | | ● 基于合理商业习惯而共享的,例如:与第三方共享联合营销活动中的中奖/获胜者等信息,以便其能及时向您发放奖品/礼品等;我们接受尽调时等; <br /> |
| | | ● |
| | | 基于学术研究而使用,例如:以学术研究为目的而与学术机构共享我们使用您的相关信息集合形成的间接用户画像、去标识化或匿名化处理后的分析/统计类信息(未经您的同意,我们不会与其共享可以识别您身份的个人信息);学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行匿名化处理的; |
| | | <br /> |
| | | ● 有权机关的要求、诉讼争议需要、法律法规等规定的其他需要共享的情形。 <br /> |
| | | 您可以基于影视大全的平台与第三人(包括不特定对象)共享您的个人信息或其他信息,但因您的共享行为而导致的信息泄露、被使用等情况,与影视大全<span>无关,您需要自行承担相应的法律责任。</span> <br /> |
| | | <span>我们仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并且只会共享必要的个人信息。在我们与业务合作伙伴共享信息时,我们会以多种方式保护您的个人信息,包括但不限于:(</span>1)如具备上述合理事由且需要您授权同意的,我们会在共享前向您告知共享的信息的目的、类型(如涉及您的个人敏感信息的,我们还会向您告知涉及的敏感信息的内容)并在取得您授权同意后再共享;(2)在合作协议层面,我们会严格要求合作伙伴的信息保护义务与责任,为此,我们的法律部门要求业务合作伙伴在合作前需与影视大全<span>签署关于数据安全的保护协议,协议严格约定了业务合作伙伴的用户信息保密义务,包括信息的保管、使用和流转等均应满足我们的管控要求,接受我们的审核、监督等,一旦有任何违反,将须承担相应法律责任;(</span>3)此外,我们的安全团队将对信息数据的输出形式、流转、使用等做安全评估与处理等。请您知悉,即使已经取得您的授权同意,我们也仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并尽量对共享内容中的个人信息进行匿名化处理。您理解并知悉,匿名化处理后的信息无法指向与识别您,已不属于法律意义上的个人信息,其处理、使用、共享、转让无需征得您的授权同意。 |
| | | <br /> |
| | | <b>(二)转让</b> <br /> |
| | | <span>转让是指将个人信息控制权向其他公司、组织或个人转移的过程。原则上我们不会将您的个人信息转让,但以下情况除外:</span> <br /> |
| | | ● 您自行提出要求的; <br /> |
| | | ● 事先已征得您的明确授权同意; <br /> |
| | | ● 如我们进行兼并、收购、重组、分立、破产、资产转让或类似的交易,而您的个人信息有可能作为此类交易的一部分而被转移,我们会要求新持有人继续遵守和履行该《影视大全<span>隐私政策》的全部内容(包括使用目的、使用规则、安全保护措施等),否则我们将要求其重新获取您的明示授权同意;</span> |
| | | <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <span>如具备上述事由确需转让的,我们会在转让前向您告知转让的信息的目的、类型(如涉及您的个人敏感信息的,我们还会向您告知涉及的敏感信息的内容),并在征得您的授权同意后再转让,但法律法规另有规定的或本政策另有约定的除外。</span> |
| | | <br /> |
| | | <b>(三)公开披露</b> <br /> |
| | | <span>公开披露是指向社会或不特定人群发布信息的行为。除了因需要对违规账号、欺诈行为等进行处罚公告、公布中奖</span>/获胜者等名单时脱敏展示相关信息等必要事宜而进行的必要披露外,我们不会对您的个人信息进行公开披露,如具备合理事由确需公开披露的,我们会在公开披露前向您告知公开披露的信息的目的、类型(如涉及您的个人敏感信息的,我们还会向您告知涉及的敏感信息的内容),并在征得您的授权同意后再公开披露,但法律法规另有规定的或本政策另有约定的除外。 |
| | | <br /> |
| | | 对于公开披露的您的个人信息,我们会充分重视风险,在收到公开披露申请后第一时间且审慎审查其正当性、合理性、合法性,并在公开披露时和公开披露后采取不低于本《影视大全<span>隐私政策》约定的个人信息安全保护措施和手段的程度对其进行保护。</span> |
| | | <br /> |
| | | <span>请您知悉,即使已经取得您的授权同意,我们也仅会出于合法、正当、必要、特定、明确的目的公开披露您的个人信息,并尽量对公开披露内容中的个人信息进行匿名化处理。</span> <br /> |
| | | <b><span>例外情形</span> </b><br /> |
| | | <span>根据法律法规等规定,在下述情况下,共享、转让、公开披露您的个人信息无需事先征得您的授权同意:</span> <br /> |
| | | ● 与国家安全、国防安全直接相关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益直接相关的; <br /> |
| | | ● 与犯罪侦查、起诉、审判和判决执行等直接相关的;或根据法律法规的要求、行政机关或公检法等有权机关的要求的; <br /> |
| | | ● 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到您本人同意的; <br /> |
| | | ● 个人信息是您自行向社会公开的或者是从合法公开的渠道(如合法的新闻报道、政府信息公开等渠道)中收集到的; <br /> |
| | | ● 根据与您签订和履行相关协议或其他书面文件所必需的; <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <b>(四)共享、转让、公开披露的相关责任</b> <br /> |
| | | <span>我们将严格按照本隐私政策的约定及相关法律法规的要求执行对个人信息的共享、转让、公开披露的操作,如因我们的过错原因导致您的合法权益遭受损害的,我们愿意就我们的过错在法律规定的范围内向您承担相应的损害赔偿责任。</span> |
| | | </p> |
| | | <h2> |
| | | <b>五、您对个人信息享有的控制权</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>您对我们产品与</span>/或服务中的您的个人信息享有多种方式的控制权,包括:您可以访问、更正/修改、删除您的个人信息,也可以撤回之前作出的对您个人信息的同意。为便于您行使您的上述控制权,<b>我们在产品的相关功能页面为您提供了操作指引和操作设置,您可以自行进行操作,如您在操作过程中有疑惑或困难的可以通过文末的方式联系我们来进行控制,我们会及时为您处理。</b> <br /> |
| | | <b>(一)访问权</b> <br /> |
| | | <span>您可以在我们的产品与</span>/或服务中查询或访问您的相关个人信息,包括: <br /> |
| | | ● 账号信息:您可以通过相关产品页面随时登录您的个人账号,以访问您的账号中的个人资料信息,包括:头像、昵称、生日、性别等,例如: |
| | | “头像/昵称/生日/性别/个性签名”信息在“手机端影视大全 APP”中的更正/修改路径为:我的—头像—编辑资料; <br /> |
| | | ● |
| | | 使用信息:您可以通过相关产品页面随时查阅您的使用信息,包括:收藏记录、观看历史记录、离线缓存记录、搜索记录、上传内容、积分信息等,例如:“观看历史记录”信息在“手机端影视大全 APP”中的访问路径为:我的—历史记录; |
| | | <br /> |
| | | ● 其他信息:如您在此访问过程中遇到操作问题的或如需获取其他前述无法获知的个人信息内容,您可通过文末提供的方式联系我们,我们将在核实您的身份后在合理期限内向您提供,但法律法规另有规定的或本政策另有约定的除外。 <br /> |
| | | <b><span>(二)更正</span>/修改权</b> <br /> |
| | | <span>您可以在我们的产品与</span>/或服务中更正/修改您的相关个人信息。为便于您行使您的上述权利,我们为您提供了在线自行更正/修改和向我们提出更正/修改申请两种方式。 <br /> |
| | | <span>对于您的部分个人信息,我们在产品的相关功能页面为您提供了操作指引和操作设置,您可以直接进行更正</span>/修改,例如:“头像/昵称/生日/性别”信息在“手机端影视大全 APP”中的更正/修改路径为:我的—头像—编辑资料; |
| | | <br /> |
| | | <span>对于您在行使上述权利过程中遇到的困难,或其他可能未</span>/无法向您提供在线自行更正/修改权限的, |
| | | 经对您的身份进行验证,且更正不影响信息的客观性和准确性的情况下,您有权对错误或不完整的信息作出更正或修改,或在特定情况下,尤其是数据错误时,通过我们公布的反馈与报错等措施将您的更正/修改申请提交给我们,要求我们更正或修改您的数据,但法律法规另有规定的除外。但出于安全性和身份识别的考虑,您可能无法修改注册时提交的某些初始注册信息。 |
| | | <br /> |
| | | <b>(三)删除权</b> <br /> |
| | | <span>一般而言,我们只会在法律法规规定或必需且最短的时间内保存您的个人信息。为便于您行使您的上述删除权,我们为您提供了在线自行删除和向我们提出删除申请两种方式。</span> <br /> |
| | | <span>对于您的部分个人信息,我们在产品的相关功能页面为您提供了操作指引和操作设置,您可以直接进行删除,例如:</span>“历史记录”信息在“手机端影视大全 APP”中的删除路径为:我的—历史记录—编辑。一旦您删除后,我们即会对此类信息进行删除或匿名化处理,除非法律法规另有规定。 |
| | | <br /> |
| | | <span>在以下情形下,您可以直接向我们提出删除您个人信息的请求,但已做数据匿名化处理或法律法规另有规定的除外。</span> <br /> |
| | | ● 我们违反法律法规规定,收集、使用您的个人信息的; <br /> |
| | | ● 我们违反了与您的约定,收集、使用您的个人信息的; <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <span>关于您不再使用我们提供的产品与</span>/或服务后、以及我们终止部分或全部产品与/或服务后我们对您的个人信息的处理,我们将在本文其他专门章/节中为您详细作出说明。 <br /> |
| | | <span>您理解并同意:当您从我们的产品与</span>/或服务中删除信息后,我们可能不会立即从备份系统中删除相应的信息,但会在备份更新时删除这些信息。 <br /> |
| | | <b>(四)索取权</b> <br /> |
| | | 如您需要您的个人数据的副本,您可以通过本《影视大全<span>隐私政策》文末提供的方式联系我们,在核实您的身份后,我们将向您提供您在我们的服务中的个人信息副本(包括基本资料、身份信息),但法律法规另有规定的或本政策另有约定的除外。</span> |
| | | <br /> |
| | | <b><span>(五)</span> <span>撤回同意权</span></b> <br /> |
| | | 如您想更改相关权限的授权(例如:位置、相册等),您可以通过您的硬件设备进行修改。如您在此过程中遇到操作问题的,可以通过本《影视大全<span>隐私政策》文末提供的方式联系我们。</span> <br /> |
| | | <span>当您取消相关个人信息收集的授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但您知悉并同意,除非您行使前述</span>“ |
| | | 删除权”,否则您的该行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 <br /> |
| | | <b>(六)注销权</b> <br /> |
| | | 我们为您提供影视大全账号注销权限,您可以通过发送邮件至yesbd@qq.com邮箱来注销您的账号。<b>一旦您注销账号,将无法使用我们提供的产品和服务且视为自动放弃已有的权益,</b><span>因此请您谨慎操作。除法律法规另有规定外,注销账号之后,我们将停止为您提供我们所有的产品和服务,您曾通过该账号使用的我们的产品与服务下的所有内容、信息、数据、记录将会被删除或匿名化处理。</span> |
| | | <br /> |
| | | <b><span>(七)提前获知产品与</span>/或服务停止运营权</b> <br /> |
| | | <span>我们将持续为您提供优质服务,若因特殊原因导致我们的部分或全部产品与</span>/或服务被迫停止运营,我们将提前在显著位置或向您发送推送消息或以其他方式通知您,并将停止对您个人信息的收集,同时在超出法律法规规定的必需且最短期限后,我们将会对所持有的您的个人信息进行删除或匿名化处理。 |
| | | <br /> |
| | | <b>(八)帮助反馈权</b> <br /> |
| | | <span>我们为您提供了多种反馈渠道,具体请见本政策</span>“如何联系我们”章节。 <br /> |
| | | <b><i>例外情形</i></b> <br /> |
| | | <span>请您理解并知悉,根据法律法规等规定,在下述情况下,我们可能不会响应您的关于访问、更正</span>/修改权、删除权、撤回同意权、索取权的请求: <br /> |
| | | ● 与国家安全、国防安全有关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益有关的; <br /> |
| | | ● 与犯罪侦查、起诉、审判和判决执行等有关的; <br /> |
| | | ● 我们有充分证据表明您存在主观恶意或滥用权利的; <br /> |
| | | ● 响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的; <br /> |
| | | ● 涉及商业秘密的; <br /> |
| | | ● 法律法规等规定的其他情形。 |
| | | </p> |
| | | <h2> |
| | | <b><span>六、我们如何存储和保护您的个人信息</span> </b><b><br /> |
| | | </b><b><span>(一)个人信息的存储</span> </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | ● <b>存储地点:我们依照法律法规的规定,将您的个人信息存储于中华人民共和国境内。目前我们暂时不存在跨境存储您的个人信息或向境外提供个人信息的场景。</b>如需跨境存储或向境外提供个人信息的,我们会单独向您明确告知(包括出境的目的、接收方、使用方式与范围、使用内容、安全保障措施、安全风险等)并再次征得您的授权同意,并严格要求接收方按照本《影视大全<span>隐私政策》以及其他相关要求来处理您的个人信息;</span> |
| | | <br /> |
| | | ● |
| | | 存储期限:我们在为提供我们的产品和服务之目的所必需且最短的期间内保留您的个人信息,例如:当您使用我们的注册功能时,我们需要收集您的手机号码,且在您提供后并在您使用该功能期间,我们需要持续为您保留您的手机号码,以向您正常提供该功能、保障您的账号和系统安全。在超出上述存储期限后,我们会对您的个人信息进行删除或匿名化处理。但您行使删除权或法律法规另有规定的除外(例如:《电子商务法》规定:商品和服务信息、交易信息保存时间自交易完成之日起不少于三年)。 |
| | | <br /> |
| | | <b>(二)个人信息的保护措施</b> <br /> |
| | | <span>我们一直都极为重视保护用户的个人信息安全,为此我们采用了符合行业标准的安全技术措施及配套的组织架构和管理体系等多层面保护措施以最大程度降低您的信息被泄露、毁损、误用、非授权访问、非授权披露和更改的风险。包括:</span> |
| | | <br /> |
| | | ● 数据安全技术措施 <br /> |
| | | <span>(</span>1)数据安全收集方面,通过个人信息安全影响评估确认数据收集的合法性、正当性和必要性,识别并以清晰、准确的方式告知用户以征得同意,同时对用户的授权同意采集行为进行日志记录;采用敏感识别工具对收集的用户数据进行分类分级,针对不同级别的数据设置不同等级的安全策略;采用技术措施对收集或产生数据的来源方进行身份识别,确保数据来源的准确性和抗抵赖性; |
| | | <br /> |
| | | <span>(</span>2) 数据安全传输方面,使用安全通道传输个人信息,并通过合适的加密算法进行安全加密、脱敏处理,确保数据传输过程中个人信息的秘密性和完整性; <br /> |
| | | <span>(</span>3)数据安全存储方面,采用数据分类分级管理制度,针对数据分类分级结果采取不同的信息存储策略;采用数据分类分级管理制度,针对数据分类分级结果采取不同的信息存储策略;个人敏感信息需加密存储,确保数据安全使用规范能够落实到位;针对存储有个人信息的数据库加强权限控制与安全审计;定期对个人信息进行备份与恢复,确保个人信息在存储使用过程中的完整性; |
| | | <br /> |
| | | <span>(</span>4)数据安全处理方面,依照使用场景和安全需求对个人信息进行脱敏处理,例如:在前端显示个人敏感信息之前需在服务端完成脱敏处理;开发、测试环境严禁使用真实用户信息;实施严格的数据权限控制机制,采取多重身份认证、网络/数据隔离等技术措施,确保能够对处理个人信息的行为进行有效监控,避免数据被违规访问和未授权使用; |
| | | <br /> |
| | | <span>(</span>5)数据安全销毁方面,根据法律法规要求和业务实际需求设定个人信息存储的最小可用期限,对到期的数据通过安全删除技术进行处理,确保已销毁数据不可恢复,技术手段包括但不限于数据彻底清除方案、磁盘销毁、物理销毁等; |
| | | <br /> |
| | | <span>(</span>6) 建立完整的审计机制,对数据生命周期的全流程进行监控与审计,防止您的个人信息遭遇未经授权的访问、公开披露、使用、修改、人为或意外的损坏或丢失; <br /> |
| | | <span>(</span>7) 其他实现数据安全保护的措施。 <br /> |
| | | ● 数据安全组织和管理措施 <br /> |
| | | <span>(</span>1)成立专门的个人信息保护责任部门,建立相关的内控管理流程,对可能接触到您的信息的工作人员采取最小化权限原则; <br /> |
| | | <span>(</span>2)建立数据分类分级制度、业务数据安全使用规范、数据合作规范等管理体系,保障您的信息在收集、传输、使用、存储、转移、销毁等环节的处置满足法律法规相关规范和安全要求; <br /> |
| | | <span>(</span>3)定期组织员工参加安全与隐私保护相关培训并要求完成规定的考核,加强员工对于保护个人信息重要性的认知; <br /> |
| | | <span>(</span>4)其他可行的安全组织和管理措施。 <br /> |
| | | ● 合作协议条款保证 <br /> |
| | | <span>(</span>1)在我们从第三方间接收集您的个人信息前,我们会明确以书面形式(如合作协议、承诺书)要求该第三方在已经取得您明示同意后收集以及处理(如共享等)个人信息,在书面协议层面要求第三方对个人信息来源的合法性和合规性作出承诺,如第三方有违反行为的,我们会明确要求该第三方承担相应法律责任; |
| | | <br /> |
| | | <span>(</span>2)在我们向业务合作伙伴共享您的个人信息前,我们会严格要求合作伙伴的信息保护义务与责任,并要求业务合作伙伴在合作前签署关于数据安全的保护协议,一旦业务合作伙伴有任何违反协议的行为,将须承担相应法律责任; |
| | | <br /> |
| | | <span>(</span>3)其他合作协议中明确约定的内容。 <br /> |
| | | ● 安全事件的处理 <br /> |
| | | <span>(</span>1)如不幸发生个人信息安全事件的,我们将按照法律法规的要求,及时向您告知安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施等。我们将及时将事件相关情况以短信、推送通知、站内消息等一种或多种方式告知您,难以逐一告知个人信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,主动上报个人信息安全事件的处置情况; |
| | | <br /> |
| | | <span>(</span>2)请您知悉并理解,互联网并非绝对安全的环境,我们强烈建议您通过安全方式、使用复杂密码,协助我们保证您的账号安全。如您发现自己的个人信息泄密,尤其是您的账户或密码发生泄露,请您立即根据本隐私政策文末中提供的联系方式联络我们,以便我们采取相应措施来保护您的信息安全。 |
| | | </p> |
| | | <h2> |
| | | <b>七、未成年人保护</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 影视大全<span>一直非常注重对未成年人的保护,致力于践行我们的企业社会责任。</span> <br /> |
| | | 影视大全<span>的绝大部分产品与</span>/或服务主要面向成年人提供,针对这部分产品与/或服务,我们不会主动直接向未成年人收集其个人信息,如未成年人需要使用的,应首先取得其监护人的同意(包括本政策),在监护人同意后和指导下进行使用、提交个人信息;我们希望监护人亦能积极的教育和引导未成年人增强个人信息保护意识和能力,保护未成年人个人信息安全。影视大全<span>会严格履行法律规定的未成年人保护义务与责任,我们只会在法律允许、监护人同意或保护未成年人所必要的情况下收集、使用、共享、转让或披露未成年人个人信息,如果我们发现未成年人在未事先获得其监护人同意的情况下使用了我们的产品与</span>/或服务的,我们会尽最大努力与监护人取得联系,并在监护人要求下尽快删除相关未成年人个人信息。 |
| | | </p> |
| | | <h2> |
| | | <b>八、本《</b><b>影视大全</b><b>隐私政策》的更新</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <b>我们鼓励您在每次使用我们的产品或服务时都查阅我们的《</b><b>影视大全</b><b>隐私政策》。</b>为了给您提供更好的服务,我们会根据产品的更新情况及法律法规的相关要求更新本《影视大全隐私政策》的条款,该等更新构成本《影视大全隐私政策》的一部分。如该等更新造成您在本《影视大全隐私政策》下权利的实质减少或重大变更,我们将在本政策生效前通过在显著位置提示或向您发送推送消息或以其他方式通知您,若您继续使用我们的服务,即表示您充分阅读、理解并同意受经修订的《影视大全<span>隐私政策》的约束。为保障您的合法权益,我们建议您可以定期在我们平台的设置页面中查看本政策。</span> |
| | | <br /> |
| | | <span>上述的</span>“重大变更”包括但不限于: <br /> |
| | | ● 我们的服务模式发生重大变化。如处理个人信息的目的、处理的个人信息的类型、个人信息的使用方式等; <br /> |
| | | ● 我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等; <br /> |
| | | ● 个人信息共享、转让或公开披露的主要对象发生变化; <br /> |
| | | ● 您参与个人信息处理方面的权利及其行使方式发生重大变化; <br /> |
| | | ● 我们负责处理个人信息安全的责任部门、联络方式及投诉渠道发生变化时; <br /> |
| | | ● 个人信息安全影响评估报告表明存在高风险时; <br /> |
| | | ● 其他重要的或可能严重影响您的个人权益的情况发生时。 |
| | | </p> |
| | | <h2> |
| | | <b>九、如何联系我们</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | (一)如您对本《影视大全<span>隐私政策》的执行或使用我们的服务时遇到的与隐私保护相关的事宜有任何问题(包括问题咨询、投诉等),我们专门为您提供了多种反馈通道,希望为您提供满意的解决方案:</span> <br /> |
| | | ● 客服/其他在线意见反馈通道:您可与我们平台上产品功能页面的客服联系或者在线提交意见反馈; <br /> |
| | | ● 专设的邮件通道:为更好地保护您的权益,我们专门设立了yesbd@qq.com<span>邮箱,您可以通过该邮箱与我们联系;</span> <br /> |
| | | <span>(二)我们会在收到您的意见及建议后,并在验证您的用户身份后的</span>15个工作日内或法律法规规定的期限内尽快向您回复,一般情况下,我们不会因此对您收取服务费。但是,在以下情形下,您理解并知悉,我们将无法响应您的请求: |
| | | <br /> |
| | | ● 与国家安全、国防安全有关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益有关的; <br /> |
| | | ● 与犯罪侦查、起诉和审判等有关的; <br /> |
| | | ● 有充分证据表明您存在主观恶意或滥用权利的; <br /> |
| | | ● 响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的; <br /> |
| | | ● 涉及商业秘密的; <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <span>(三)如果您对我们的回复不满意,或我们对您个人信息的处理方式侵害了您的合法权益,且在您向我们反馈后我们仍拒绝改进的,您可以向工商、公安等监管部门进行投诉、举报。</span> |
| | | </p> |
| | | <h2> |
| | | <b>十、其他</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <b>(一)本《</b><b>影视大全</b><b>隐私政策》的解释及争议解决均应适用中华人民共和国大陆地区法律。与本《</b><b>影视大全</b><b>隐私政策》相关的任何纠纷,双方应协商友好解决;若不能协商解决,您同意将争议提交至重庆市江北区人民法院诉讼解决。</b> <br /> |
| | | (二)本《影视大全<span>隐私政策》的标题仅为方便及阅读而设,并不影响正文其中任何规定的含义或解释。</span> |
| | | </p> |
| | | <p class="MsoNormal"> |
| | | |
| | | </p> |
| | | <p class="MsoNormal" align="right" style="text-align:right;"> |
| | | 重庆椰视网络科技有限公司 |
| | | </p> |
| | | <p class="MsoNormal" align="right" style="text-align:right;"> |
| | | 2020年12月28日修订 |
| | | </p> |
| | | </p> |
| | | |
| | | </body> |
| | | |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE body PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| | | |
| | | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> |
| | | <html> |
| | | <% |
| | | String key = "布丸社区"; |
| | | %> |
| | | |
| | | <style> |
| | | h1 { |
| | | font-size: 25px !important; |
| | | } |
| | | |
| | | h2 { |
| | | font-size: 20px !important; |
| | | margin-block-start:2px; |
| | | margin-block-end:2px; |
| | | } |
| | | |
| | | h3 { |
| | | font-size: 15px !important; |
| | | line-height: 80%; |
| | | } |
| | | </style> |
| | | <head> |
| | | <title>隐私政策</title> |
| | | <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
| | | </head> |
| | | |
| | | <body> |
| | | <p> |
| | | <h1 align="center" style="margin-left:0.0000pt;text-align:center;"> |
| | | <b>影视大全布丸隐私政策</b> |
| | | </h1> |
| | | <h2> |
| | | <b><span>更新日期:</span>2020年</b><b>12</b><b>月</b><b>28</b><b>日</b> |
| | | </h2> |
| | | <h2> |
| | | <b><span>生效日期:</span>2020年</b><b>12</b><b>月</b><b>28</b><b>日</b> |
| | | </h2> |
| | | <h2> |
| | | <b>版本更新提示</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 尊敬的用户: |
| | | </p> |
| | | <p class="p"> |
| | | 感谢您使用影视大全布丸!本次影视大全布丸<span>(以下称</span>“我们”)依据《中华人民共和国网络安全法》、《信息安全技术个人信息安全规范》(GB/T |
| | | 35273-2017)以及其他相关法律法规和技术规范更新了一些内容,其中主要包括如下内容:本《影视大全布丸<span>隐私政策》相关词语释义、我们如何收集和使用您的个人信息、我们如何共享、转让、公开披露您的个人信息。请您在使用</span>/继续使用影视大全布丸<span>的产品与</span>/或服务前仔细阅读和充分理解全文,并在同意全部内容后使用/继续使用。 |
| | | </p> |
| | | <h2> |
| | | <b>导言</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 影视大全布丸<span>(以下也称</span>“我们”)深知个人信息对您的重要性,因此我们非常重视保护您的隐私和个人信息,我们亦将本《影视大全布丸<span>隐私政策》(以下也称</span>“本政策”)中的内容以高度审慎的义务对待和处理。本政策与您所使用的我们的产品与/或服务息息相关,您在下载、安装、启动、浏览、注册、登录、使用我们的产品与/或服务(以下统称“使用我们的产品与/或服务”或“使用产品与/或服务”)时,我们将按照本政策的约定处理和保护您的个人信息,因此我们希望您能够仔细阅读、充分理解本政策的全文,并在需要时,按照本政策的指引,作出您认为适当的选择。本政策之中涉及的相关技术词汇,我们尽量以简明扼要的表述向您解释,以便于您理解。 |
| | | <br /> |
| | | <b>您应当在仔细阅读、充分理解本《</b><b>影视大全布丸</b><b><span>隐私政策》后选择是否同意本政策的内容以及是否同意使用我们的产品与</span>/或服务,如果您不同意本政策的内容,将可能导致我们的产品与/或服务无法正常运行,或者无法达到我们拟达到的服务效果,您应立即停止访问/使用我们的产品与/或服务。您使用或继续使用我们提供的产品与/或服务的行为,都表示您充分理解和同意本《</b><b>影视大全布丸</b><b><span>隐私政策》(包括更新版本)的全部内容。</span> |
| | | </b><b><br /> |
| | | </b><b>影视大全布丸</b><b><span>已经以字体加粗或其他合理方式提示您重点阅读协议中与您的权益(可能)存在重大关系的条款,且双方同意其不属于《合同法》第</span>40条规定的“免除其责任、加重对方责任、排除对方主要权利”的条款,即您和</b><b>影视大全布丸</b><b>均认可该类条款的合法性及有效性,您不会以</b><b>影视大全布丸</b><b>未尽到合理提示义务为由而声称协议中条款非法或无效。</b> <br /> |
| | | 如您在阅读本《影视大全布丸<span>隐私政策》过程中有任何疑惑或其他相关事宜的,我们为您提供了多种反馈渠道,具体请见本政策</span>“如何联系我们”章节,我们会尽快为您作出解答。 |
| | | </p> |
| | | <h2> |
| | | <b>关于我们</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 影视大全布丸是指包括重庆椰视网络科技有限公司<span>及其关联公司在内的企业。</span> <br /> |
| | | ● 关联公司是指在现在、将来控制重庆椰视网络科技有限公司、受重庆椰视网络科技有限公司控制或与重庆椰视网络科技有限公司<span>处于共同控制下的公司、机构。控制指通过所有权、有投票权的股份、合同、实际运营关联或其他被依法认定的方式直接或间接地拥有影响被控制对象管理</span>/经营的能力。 |
| | | <br /> |
| | | ● 我们的主要运营公司基本情况如下:重庆椰视网络科技有限公司<span>,</span>2015年12月22日 营业期限自: 2015年12月22日 营业期限至: 登记机关: 重庆市渝中区市场监督管理局 核准日期: 2018年12月27日 登记状态: 存续(在营、开业、在册) 住所: 重庆市渝中区经纬大道333号2幢1702号 经营范围: 计算机软硬件及网络技术的技术开发、技术转让、技术咨询;计算机系统集成;商务信息咨询;企业管理咨询;企业营销策划;会议及展览服务(国家有专项规定的除外);设计、制作、代理、发布国内外广告(法律、法规禁止的不得经营;法律、法规限制的取得许可或审批后方可经营);销售:计算机软件及辅助设备、日用百货。『以上范围法律、法规、国务院决定禁止经营的不得经营;法律、法规、国务院决定规定应经审批而未获审批前不得经营』★★ |
| | | </p> |
| | | <h2> |
| | | <b>本《</b><b>影视大全布丸</b><b>隐私政策》将帮助您了解以下内容</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>一、</span> <span>本《</span>影视大全布丸<span>隐私政策》适用范围、相关词语涵义</span> <br /> |
| | | <span>二、</span> <span>我们如何收集和使用您的个人信息</span> <br /> |
| | | <span>三、</span> <span>我们如何使用</span>Cookie和同类技术 <br /> |
| | | <span>四、</span> <span>我们如何共享、转让、公开披露您的个人信息</span> <br /> |
| | | <span>五、</span> <span>您对个人信息享有的控制权</span> <br /> |
| | | <span>六、</span> <span>我们如何存储和保护您的个人信息</span> <br /> |
| | | <span>七、</span> <span>未成年人保护</span> <br /> |
| | | <span>八、</span> <span>本《</span>影视大全布丸<span>隐私政策》的更新</span> <br /> |
| | | <span>九、</span> <span>如何联系我们</span> <br /> |
| | | <span>十、</span> <span>其他</span> |
| | | </p> |
| | | <h2> |
| | | <b>一、本《</b><b>影视大全布丸</b><b>隐私政策》适用范围、相关词语涵义</b><b> </b><b><br /> |
| | | </b><b>(一)本《</b><b>影视大全布丸</b><b>隐私政策》适用范围</b><b> </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 本《影视大全布丸<span>隐私政策》为我们的所有产品与</span>/或服务统一适用的通用内容,当您使用我们的任何产品与/或服务时,本《影视大全布丸<span>隐私政策》即适用,但如该产品与</span>/或服务单独设置了隐私条款/隐私协议的,单独的隐私条款/隐私协议优先适用;单独的隐私条款/隐私协议未提及的内容,适用本政策。但请您注意,本《影视大全布丸<span>隐私政策》不适用于以下情况:</span> |
| | | <br /> |
| | | ● 为我们的产品与/或服务提供广告服务的第三方的信息收集/处理做法; <br /> |
| | | ● |
| | | 我们的产品与/或服务可能会包含或链接至第三方提供的信息与/或第三方服务(包括任何第三方应用、网站、产品、服务等),这些信息与/或服务由第三方负责运营,您使用该等信息与/或服务与我们无关。我们在此善意的提醒您,您在使用第三方信息与/或服务时,应留意和仔细阅读第三方向您展示的相关用户协议和隐私政策,并妥善保管和谨慎提供您的个人信息。本《影视大全布丸<span>隐私政策》仅适用于我们所收集的您的个人信息,并不适用于任何第三方对您的个人信息的收集,以及任何第三方提供的服务或第三方的信息使用规则,我们对任何第三方收集、储存和使用的您个人信息的行为在法律允许的范围内亦不承担任何责任;</span> |
| | | <br /> |
| | | ● 其他非影视大全布丸<span>向您提供的产品与</span>/或服务内容。 <br /> |
| | | <b>(二)相关词语涵义</b> <br /> |
| | | ● 我们的产品与/或服务:包括但不限于我们提供的软件、网站、服务(含站外服务,例如:我们的广告服务和“通过我们的服务申请或分享”的插件等)以及包含的相关产品或服务功能。 <br /> |
| | | <b>我们需要特别提醒您的是:由于我们的产品和服务较多,为您提供的产品和服务内容也有所不同,本《</b><b>影视大全布丸</b><b>隐私政策》为</b><b>影视大全布丸</b><b><span>统一适用的一般性隐私条款,本政策约定的用户权利和我们提供的相关信息安全保护措施均适用于我们的所有产品和服务;本政策所述之</span>“我们的产品与/或服务”以及我们收集的您个人信息的类型和对应的使用、处理规则等可能会因您使用的具体的产品/服务(包括客户端类型、软件版本等)而有所不同,具体以您实际使用的产品/服务的实际情况为准。针对我们的某些特定产品/服务,我们还将制定特定隐私条款或隐私协议,以便更具体地向您阐明我们的隐私规则和保护措施等内容。</b> <br /> |
| | | ● 个人信息(出自于GB/T |
| | | 35273-2017《信息安全技术个人信息安全规范》):指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息。本隐私政策中涉及的个人信息包括个人基本资料(包括个人姓名、生日、性别、住址、个人电话号码)、网络身份标识信息(包括系统账号、IP地址)、个人财产信息(包括交易和消费记录、流水记录、虚拟货币(如优惠券等)、兑换码等虚拟财产信息))个人上网记录(包括浏览记录、软件使用记录、点击记录)、个人常用设备信息(包括硬件序列号、硬件型号、设备MAC地址、操作系统类型、软件列表、唯一设备识别码如(如IMEI/ANDROID |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等在内的描述个人常用设备基本情况的信息)、个人位置信息(包括大概地理位置、精准定位信息)。我们实际具体收集的个人信息种类以下文描述为准。 <br /> |
| | | ● <b>个人敏感信息</b><span>(出自于</span>GB/T 35273-2017《信息安全技术个人信息安全规范》)<b><span>:指一旦泄露、非法提供或滥用可能危害人身和财产安全,极易导致个人名誉、身心健康受到损害或歧视性待遇等的个人信息。本隐私政策中涉及的个人敏感信息包括您的个人财产信息(包括交易和消费记录、流水记录、虚拟货币(如优惠券等)、兑换码等虚拟财产信息)、网络身份识别信息(包括系统账号、</span>IP地址)、其他信息(包括个人电话号码、精准定位信息、收货地址、网页浏览记录)。您同意您的个人敏感信息按本《</b><b>影视大全布丸</b><b>隐私政策》所述的目的和方式来处理。我们实际具体收集的个人敏感信息种类以下文描述为准。相比其他个人信息,个人敏感信息可能对您的个人权益影响更大。我们在此善意的提醒您需在谨慎考虑后再向我们提供您的个人敏感信息。</b> <br /> |
| | | ● 儿童:指不满十四周岁的未成年人。(出自于《儿童个人信息网络保护规定》) <br /> |
| | | ● 匿名化:指通过对个人信息的技术处理,使得个人信息主体无法被识别,且处理后的信息不能被复原的过程。(出自于GB/T 35273-2017《信息安全技术个人信息安全规范》) <br /> |
| | | ● 去标识化:指通过对个人信息的技术处理,使其在不借助额外信息的情况下,无法识别个人信息主体的过程。(出自于GB/T 35273-2017《信息安全技术个人信息安全规范》) <br /> |
| | | ● 删除:指在实现日常业务功能所涉及的系统中去除个人信息的行为,使其保持不可被检索、访问的状态。(出自于GB/T 35273-2017《信息安全技术个人信息安全规范》) |
| | | </p> |
| | | <h2> |
| | | <b>二、我们如何收集和使用您的个人信息</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>您在使用我们的产品与</span>/或服务时,我们需要/可能需要收集和使用您的一些个人信息,我们收集和使用的您的个人信息类型包括两种:<b><span>第一种:我们产品与</span>/或服务的核心业务功能所必需的信息:此类信息为产品与/或服务正常运行的必备信息,您须授权我们收集。如您拒绝提供,您将无法正常使用我们的产品与/或服务;第二种:我们产品与/或服务的附加业务功能可能需要收集的信息:此信息为非核心业务功能所需的信息,您可以选择是否授权我们收集。如您拒绝提供,将导致附加业务功能无法实现或无法达到我们拟达到的效果,但不影响您对核心业务功能的正常使用。</b> <br /> |
| | | <b><span>我们需要特别提醒您的是:由于我们的产品和服务较多,为您提供的内容也不同,因此核心业务功能(包括其收集的您的个人信息类型)也会因产品</span>/服务的内容不同而有所区别,具体以产品/服务实际提供为准。除此之外,您理解并同意,我们希望提供给您的产品和服务是完善的,所以我们会不断改进我们的产品和服务,包括技术,这意味着我们可能会经常推出新的业务功能,可能需要收集新的个人信息或变更个人信息使用目的或方式。如果某一需要收集您的个人信息的功能或产品/服务未能在本《</b><b>影视大全布丸</b><b>隐私政策》中予以说明的,我们会通过更新本政策、系统提示、弹窗、公告、站内信等方式另行向您说明该信息收集的目的、内容、使用方式和范围,并为您提供自主选择同意的方式,且在征得您明示同意后收集。</b><span>在此过程中,如果您对相关事宜有任何疑惑的,可以通过文末提供的方式联系我们,我们会尽快为您作出解答。</span> |
| | | <br /> |
| | | <span>具体业务功能场景包括:</span> <br /> |
| | | <b>(一)视频展示和播放功能</b> <br /> |
| | | <span>我们的产品与</span>/或服务为您提供视频展示和播放服务,在此过程中,我们需要收集您的一些信息,包括如下个人信息:<b><span>设备型号、设备名称、设备标识、操作系统和应用程序版本、登录</span>IP地址、接入网络的方式、移动网络信息(包括运营商名称)、产品版本号、日志信息(如操作日志、服务日志)等。同时为了收集上述基本的个人设备信息,我们将会申请访问您的设备信息的权限,</b><span>我们收集这些信息是为了向您提供我们最核心的视频展示和播放服务,如您拒绝提供上述权限将可能导致您无法使用我们的产品与服务。</span> |
| | | <br /> |
| | | <b>(二)搜索功能</b> <br /> |
| | | 当您使用搜索功能时,我们需要收集您的一些信息,包括如下个人信息:<b>搜索的字词、浏览记录和时间、搜索的时间以及与它们互动的次数。</b><span>我们收集这些信息是为了向您提供您所需要的内容和可能更感兴趣的服务,同时亦可以改进我们的产品和服务。</span> |
| | | <br /> |
| | | <b>(三)注册与登录功能</b> <br /> |
| | | <span>当您使用注册功能时,您需要按照我们的指引完成一系列注册的程序,在您成为注册用户后,我们将为您提供专属于注册用户的产品与</span>/或服务。在此过程中,您需要提供给我们一些单独或者结合识别您的用户身份的信息,包括:<b>手机号码、验证码匹配结果,</b>并创建<b><span>账号</span>UID</b>。我们收集这些信息是用以完成注册程序、为您持续稳定提供注册服务,并保护您注册账号的安全。<b>您应知悉,手机号码和验证码匹配结果属于您的个人敏感信息,我们收集该类信息是为了满足相关法律法规的要求,如您拒绝提供可能导致您无法使用我们的此功能,请您谨慎考虑后再提供。</b>同时,您也可以在注册时或后续使用过程中填写或补充<b>您的性别、昵称、头像、生日信息,</b><span>如您未填写或后续删除、变更此类信息的,可能会影响(包括无法获取到)我们为您提供的基于您的个人画像信息的影视作品推荐、您感兴趣的广告呈现等,但不会影响注册功能的正常使用。</span> |
| | | <br /> |
| | | 如您使用一键登录的功能,基于我们与通信运营商的合作,我们将会<b>收集您的手机号码和手机运营商信息</b><span>,以便为您提供快捷的登录服务。</span> <span>如您使用第三方平台的账号(例如:微信</span>/微博/QQ/AppleID等账号)登录的,我们将根据您的授权获取<b>该第三方账号下的相关信息(包括:用户名、昵称、头像,具体以您的授权内容为准)以及身份验证信息(个人敏感信息),在您使用发布、评论以及其他要求实名认证的功能与服务前,我们将另行收集您的手机号码以完成实名认证</b><span>。我们收集这些信息是用于为您提供账号登录服务以及保障您的账号安全,防范安全风险。如您拒绝授权此类信息的,您将无法使用第三方平台的账号登录我们平台,但不影响我们为您提供的其他产品和服务的正常使用。您知悉并同意,对于您在使用产品与</span>/或服务的过程中提供的您的联系方式(如<b>联系电话</b><span>),我们在运营中可能会向其中的一种或多种发送多类通知,用于用户消息告知、身份验证、安全验证等用途。</span> |
| | | <br /> |
| | | <b>(四)服务推荐功能</b> <br /> |
| | | <span>视频推荐、广告推荐、文学推荐、直播推荐、服务内容推荐及相关推荐功能为我们的产品与</span>/或服务的核心业务功能,在此过程中,我们需要收集您在我们的产品与/或服务中的一些信息,包括如下个人信息:<b><span>您观看的内容、您搜索的字词、浏览内容和广告的次数以及与它们互动的次数、您点赞</span>/分享/评论/互动的对象,</b><span>我们收集这些信息是为了向您实时推荐更优质、您可能更感兴趣的服务内容,例如:推荐您可能喜欢的电视剧、电影、综艺节目、广告等。</span> |
| | | <br /> |
| | | <b>(五)基于设备相册权限的附加业务功能</b> <br /> |
| | | 当您使用视频分享、发布图片等业务功能时,我们将需要获取您的设备相册权限,并收集您提供的<b>图文及视频内容信息(个人信息)</b><span>。如您拒绝提供的仅会使您无法使用该功能,但并不影响您正常使用产品与</span>/或服务的其他功能。相册权限是您设备上的一项设置,您可以通过设备设置页面进行管理。您开启该权限即视为您授权我们可以访问、获取、收集、使用您的该等个人信息;当您取消该授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但除非您依照法律的规定删除了您的个人信息,否则您的取消行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 |
| | | <br /> |
| | | <b>(六)基于设备相机权限的附加业务功能</b> <br /> |
| | | 当您使用视频分享、授权设备登录等业务功能时,我们将需要获取您的设备相机权限,并收集您提供的<b>图片、视频信息(个人信息)</b><span>。如您拒绝提供的仅会使您无法使用该功能,但并不影响您正常使用产品与</span>/或服务的其他功能。相机权限是您设备上的一项设置,您可以通过设备设置页面进行管理。您开启该权限即视为您授权我们可以访问、获取、收集、使用您的该等个人信息;当您取消该授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但除非您依照法律的规定删除了您的个人信息,否则您的取消行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 |
| | | <br /> |
| | | <b>(七)基于设备麦克风权限的附加业务功能</b> <br /> |
| | | 当您使用语音输入等业务功能时,我们将需要获取您的设备麦克风权限,并收集您的<b>语音信息、语音交互信息(个人信息)</b><span>。如您拒绝提供的仅会使您无法使用该功能,但并不影响您正常使用产品与</span>/或服务的其他功能。麦克风权限是您设备上的一项设置,您可以通过设备设置页面进行管理。您开启该权限即视为您授权我们可以访问、获取、收集、使用您的该等个人信息;但当您取消该授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但除非您依照法律的规定删除了您的个人信息,否则您的取消行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 |
| | | <br /> |
| | | <b>(八)下单与交付</b> <br /> |
| | | <span>当您在我们的产品与</span>/或服务中购买商品或服务的,您需要提供一些下单与完成交易所需要的信息,包括:<b>交易商品或服务信息、收货人信息(收货人姓名、收货地址及其联系电话)(个人敏感信息),</b>此外,我们也可能会再收集一些其他与订单相关的信息,包括:<b>订单号、交易金额、下单时间、订单商户、订单编号、订单状态、支付方式、支付账号、支付状态(个人敏感信息),</b><span>我们收集这些信息是为了帮助您顺利完成交易、保障您的交易安全、查询订单信息、提供客户服务等。</span> |
| | | <span>在您成功下单后,如商品系第三方卖家提供的或商品需要第三方配送的,我们为了顺利、安全、准确向您完成货物的交付及配送,商家及第三方配送公司在发货及配送环节内不可避免地会获知您的</span><b>相关配送信息(个人信息)</b><span>。我们向您承诺,我们会以最大努力保障您的个人信息安全,我们会严格要求商家及第三方配送公司对您的个人信息保密,只以配送之目的获悉和使用,不得对外泄露或做其他任何用途。</span> |
| | | <br /> |
| | | <b>(九)身份认证功能</b> <br /> |
| | | <span>当您使用我们的产品与</span>/或服务中的身份认证功能或服务时,为满足相关法律规定及监管要求、确保用户身份真实性、实现反欺诈等风险控制、保障系统和服务安全或提供服务之需要,我们将需要收集您的真实身份信息(可能包括<b>手机号码等个人敏感信息)</b><span>以完成实名认证,相关业务场景可能包括:注册产品时、使用信息发布等服务时、申请使用</span>“影视大全布丸”服务时、申请注销“影视大全布丸”账号时以及其他需要进行身份认证的场景。为实现实名认证的目的,您同意我们可以自行或委托第三方向有关机构(如个人征信机构、政府机构等)提供、查询、核对您的前述身份信息。<b>在您实名认证成功后,如无正当事由,实名信息将无法修改,</b><span>如确需修改,请您与我们联系解决。</span> |
| | | <br /> |
| | | <span>同时,为协助您快速完成实名认证、风控核验等,对于您曾经在我们的产品与</span>/或服务中提供的相关实名认证信息(包括<b>手机号码等个人敏感信息)</b><span>,您同意我们可以将前述信息的全部或部分自动预填于其他需要您实名认证的页面,您知悉并认可,我们仅协助填写,并未直接传输,只有在您点击下一步操作后才由您自行提供至对应服务系统。</span> |
| | | <br /> |
| | | <b>(十)客服、其他用户响应功能</b> <br /> |
| | | 当您联系我们的客服或使用其他用户响应功能时(包括:行使您的相关个人信息控制权、其他客户投诉和需求),为了您的账号与系统安全,我们可能需要您先行提供账号信息,并与您之前的个人信息相匹配以验证您的用户身份。在您使用客服或其他用户响应功能时,我们可能还会需要收集<b><span>您的如下个人敏感信息:联系方式(您与我们联系时使用的电话号码或您向我们主动提供的其他联系方式)、您与我们的沟通信息(包括文字</span>/图片/音视频/通话记录形式)、与您需求相关联的其他必要信息</b><span>。我们收集这些信息是为了调查事实与帮助您解决问题,如您拒绝提供可能导致您无法使用我们的客服等用户响应机制。</span> |
| | | <br /> |
| | | <b>(十一)保障账号安全功能</b> <br /> |
| | | <span>我们需要收集您的一些信息来保障您使用我们的产品与</span>/或服务时的账号与系统安全,并协助提升我们的产品与/服务的安全性和可靠性,以防产生任何危害用户、影视大全布丸、社会的行为,包括:<b><span>您的如下个人信息:个人常用设备信息、登录</span>IP地址、产品版本号、浏览记录、网络使用习惯、服务故障信息,以及个人敏感信息如实名认证信息。</b><span>我们会根据上述信息来综合判断您账号、账户及交易风险、进行身份验证、客户服务、检测及防范安全事件、诈骗监测、存档和备份用途,并依法采取必要的记录、审计、分析、处置措施,一旦我们检测出存在或疑似存在账号安全风险时,我们会使用相关信息进行安全验证与风险排除,确保我们向您提供的产品和服务的安全性,以用来保障您的权益不受侵害。同时,当发生账号或系统安全问题时,我们会收集这些信息来优化我们的产品和服务。</span> |
| | | <br /> |
| | | <b>(十二)从外部第三方间接收集的您的个人信息</b> <br /> |
| | | 您知悉,您向外部第三方(影视大全布丸<span>旗下公司不在此限)提供的个人信息,或外部第三方收集的您的个人信息,我们无法获取,更不会使用非常规方式(如:恶意干预对方系列</span>APP数据)擅自以软件程序获得您的个人信息。如果因业务发展的必要而需要从第三方间接收集(如共享等)您的个人信息的,且由我们直接或联合为您提供产品或服务的,我们(或第三方)在收集前会向您明示共享的您个人信息的来源、类型、使用目的、方式和所用于的业务功能、授权同意范围(如果使用方式和范围超出您在第三方原授权范围的,我们会再次征得您的授权同意),此种场景包括您通过第三方账户直接登录我们的产品与/或服务时,我们从第三方获取的您授权共享的账户信息(包括头像、昵称)、我们的某些产品/服务由业务合作伙伴提供或者我们与业务合作伙伴共同提供时,为了必要/合理的业务的顺利开展,我们从部分业务合作伙伴处间接收集的您的部分信息、其他方使用我们的产品与/或服务时所提供有关您的信息(包括发布的与您相关的内容,包括评论、图片、照片、视频)。 |
| | | <br /> |
| | | <span>此外,我们会在间接收集您的个人信息前,明确以书面形式(如协议、承诺书)要求该第三方在已经取得您明示同意后收集个人信息,并向您告知共享的信息内容,且涉及敏感信息的在提供给我们使用前需经过您的再次确认,在协议等层面要求第三方对个人信息来源的合法性和合规性作出承诺,如第三方有违反行为的,我们会明确要求对方承担相应法律责任;同时,我们的专业安全团队对个人信息进行安全加固(包括敏感信息报备、敏感信息加密存储、访问权限控制等)。我们会使用不低于我们对自身用户个人信息同等的保护手段与措施对间接获取的个人信息进行保护。</span> |
| | | <br /> |
| | | <b><span>(十三)个性化推荐</span>/定向推送、维护/改进我们的产品与/或服务之必需</b> <br /> |
| | | <span>为了向您提供更优质和更适合您的产品与</span>/或服务、让您有更好的产品与/或服务的使用体验或您同意的其他用途,在符合相关法律法规的前提下,我们可能将我们的某一项产品与/或服务所收集的您的个人信息,以综合统计、分析的方式单独或与来自其他服务的某些信息结合进行使用,以便于向您提供个性化服务/定向推送,包括我们向您提供相关个性化信息、在征得您同意的情况下与我们的合作伙伴共享信息以便他们向您发送有关其产品和服务的信息等,同时,我们也为您提供了相关定向推送的退出机制。但未经您的同意,我们不会主动将前述信息传输至该第三方),以便我们向您推荐所在地区的最新消息或更适合您的服务内容等,如您决定退出我们基于位置信息作出的个性化推荐/定向推送的,您可通过设备设置页面予以取消授权;您可以授权我们在移动端通过<b>“消息”推送</b><span>您可能更感兴趣的相关内容,如您希望我们停止继续推送的,您可通过相关功能设置页面予以取消授权。</span> |
| | | <br /> |
| | | <span>我们可能会收集您使用我们的产品与</span>/或服务时的<b><span>搜索记录、观看历史、收藏记录、观看时长、</span>IP地址、访问日期和时间、您的偏向网络行为、兴趣偏好等信息形成用户画像</b><span>用于帮助使我们更加了解您如何接入和使用我们的产品与</span>/或服务、维护和改进我们的产品与/或服务或对您作出其他方面的回应。 |
| | | <br /> |
| | | <span>同时,我们可能会收集您使用我们的产品与</span>/或服务时的其他信息做一些其他合理用途,包括:<b>调查问卷回复、您与</b><b>影视大全布丸</b><b><span>旗下公司</span>/我们的合作伙伴之间互动时我们获得的相关信息</b><span>用于研发和改进、综合统计、数据分析或加工等处理、经您同意或授权的其他用途、遵守法律规定或其他一些合理用途。如我们在相关产品与</span>/或服务之中提供了相应选项,您也可以主动要求我们将您在该产品与/或服务所提供和储存的个人信息用于我们或我们合作方的其他服务。 |
| | | <br /> |
| | | <b>(十</b><b>四</b><b>)其他</b> <br /> |
| | | 如上文所述,<b><span>如果某一需要收集您的个人信息的功能或产品</span>/服务未能在本《</b><b>影视大全布丸</b><b>隐私政策》中予以说明的,或者我们超出了与收集您的个人信息时所声称的目的及具有直接或合理关联范围的,我们将在收集和使用你的个人信息前,通过更新本《</b><b>影视大全布丸</b><b>隐私政策》、页面提示、弹窗、消息通知、网站公告或其他便于您获知的方式另行向您说明,并为您提供自主选择同意的方式,且在征得您明示同意后收集和使用。</b> <br /> |
| | | <b><i>例外情形</i></b> <br /> |
| | | <span>另外,您充分理解并同意,我们在以下情况下收集、使用您的个人信息无需您的授权同意:</span> <br /> |
| | | ● 与国家安全、国防安全有关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益有关的; <br /> |
| | | ● 与犯罪侦查、起诉、审判和判决执行等直接相关的; <br /> |
| | | ● 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到您本人同意的; <br /> |
| | | ● 所收集的信息是您自行向社会公开的或者是从合法公开的渠道(如合法的新闻报道、政府信息公开等渠道)中收集到的; <br /> |
| | | ● 根据与您签订和履行相关协议或其他书面文件所必需的; <br /> |
| | | ● 用于维护我们的产品与/或服务的安全稳定运行所必需的,例如:发现、处置产品与/或服务的故障; <br /> |
| | | ● 有权机关的要求、法律法规等规定的其他情形。 |
| | | </p> |
| | | <h2> |
| | | <b><span>三、我们如何使用</span>Cookie和同类技术 </b><b><br /> |
| | | </b><b><span>(一)关于</span>Cookie和同类技术 </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | Cookie是包含字符串的小文件,在您登入和使用网站或其他网络内容时发送、存放在您的计算机、移动设备或其他装置内(通常经过加密)。Cookie同类技术是可用于与Cookie类似用途的其他技术,例如:Web |
| | | Beacon、Proxy、嵌入式脚本等。 <br /> |
| | | <span>目前,我们主要使用</span>Cookie收集您的个人信息。您知悉并同意,随着技术的发展和我们产品和服务的进一步完善,我们也可能会使用Cookie同类技术。 <br /> |
| | | <b><span>(二)我们如何使用</span>Cookie和同类技术</b> <br /> |
| | | <span>在您使用我们的产品与</span>/或服务时,我们可能会使用Cookie和同类技术收集您的一些个人信息,<b>包括:您访问网站的习惯、您的浏览信息、您的登录信息,</b>Cookie和同类技术收集该类信息是为了您使用我们的产品与/或服务的必要、简化您重复操作的步骤(如注册、登录)、便于您查看使用历史(如视频观看历史)、向您提供更切合您个人需要的服务内容和您可能更感兴趣的内容、保护您的信息和账号安全性、改善我们的产品和服务等。我们承诺仅在本《影视大全布丸<span>隐私政策》所述目的范围内使用</span>Cookie和同类技术。 |
| | | <br /> |
| | | <span>如果您的浏览器允许,您可以通过您的浏览器的设置以管理、(部分</span>/全部)拒绝Cookie与/或同类技术;或删除已经储存在您的计算机、移动设备或其他装置内的Cookie与/或同类技术,从而实现我们无法全部或部分追踪您的个人信息。您如需详细了解如何更改浏览器设置,请具体查看您使用的浏览器的相关设置页面。<b><span>您理解并知悉:我们的某些产品</span>/服务只能通过使用Cookie或同类技术才可得到实现,如您拒绝使用或删除的,您可能将无法正常使用我们的相关产品与/或服务或无法通过我们的产品与/或服务获得最佳的服务体验,同时也可能会对您的信息保护和账号安全性造成一定的影响。</b> |
| | | </p> |
| | | <h2> |
| | | <b><span>四、我们如何共享、转让、公开披露您的个人信息</span> </b><b><br /> |
| | | </b><b><span>(一)共享</span> </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>我们会重视对您的个人信息的保护,您的个人信息是我们为您提供产品与</span>/或服务的重要依据和组成部分,对于您的个人信息,我们仅在本《影视大全布丸隐私政策》所述目的和范围内或根据法律法规的要求收集和使用,并严格保密,我们不会与影视大全布丸<span>以外的第三方公司、组织和个人共享您的个人信息,除非存在以下一种或多种情形:</span> |
| | | <br /> |
| | | ● 您自行提出要求的; <br /> |
| | | ● 事先已征得您的明确授权同意; <br /> |
| | | ● 与部分业务合作伙伴的必要共享; <br /> |
| | | <span>您理解并同意,为了必要</span>/合理的业务的顺利开展、满足您的要求、履行我们在相关用户协议或本隐私政策中的义务和行使我们的权利或遵守法律规定等目的,我们可能需要向部分业务合作伙伴共享您的部分信息。但我们承诺我们只会共享您的必要个人信息,如果我们共享您的个人敏感信息或改变个人信息的使用及处理目的,我们会将再次征求您的授权同意。我们的业务合作伙伴包括: |
| | | <br /> |
| | | <span>(</span>1)为我们的产品与/或服务提供功能支持的服务提供商:包括:提供一键登录服务的运营商,我们共享信息的目的是可以实现我们产品与/或服务的功能,让您可以正常使用; <br /> |
| | | <span>(</span>2)我们平台的第三方商家:为实现您购买产品或服务的需求(包括享受售后服务),我们会将您的订单信息与交易相关的信息共享给我们平台的第三方商家; <br /> |
| | | <span>(</span>3)提供数据服务(包括网络广告监测、数据统计、数据分析)的合作伙伴:为维护/改进我们的产品/服务、为您提供更好的内容,我们可能会与提供该服务的指定合作伙伴共享您的相关信息(包括:视频播放记录、广告展示记录、个人设备信息(包括硬件序列号、硬件型号、设备MAC地址、操作系统类型、软件列表、唯一设备识别码如IMEI/ANDROID |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等在内的描述个人设备基本情况的信息)、您所在的城市及其他相关信息),为了您的信息安全,我们目前仅与已签署严格数据安全保密协议的合作伙伴进行合作,包括友盟同欣(北京)科技有限公司等,且这些公司必须遵守我们的数据隐私和安全要求。除非得到您的同意,我们不会与其共享您的个人身份信息; |
| | | <br /> |
| | | <span>(</span>4)第三方SDK类服务商:我们产品中可能会包含第三方SDK或其他类似的应用程序,如您在我们平台上使用这类由第三方提供的服务时,您同意将由其直接收集和处理您的信息(如以嵌入代码、插件等形式),例如:当您使用小米、魅族、华为、OPPO、VIVO手机的,我们接入的小米Push |
| | | SDK需要收集手机唯一标识信息(例如IMEI信息),并可能会收集您的手机型号、系统类型、系统版本、设备屏幕尺寸等参数用于实现推广活动、视频内容等信息的推送; <br /> |
| | | 我们会使用如您把影视大全布丸的内容分享到第三方平台(如微博,微信<span>),其</span>SDK可能会收集您提供的信息; <br /> |
| | | 我们会使用穿山甲的广告 SDK:<span>需要收集您的设备</span>Mac地址、唯一设备识别码 (IMEI/android |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等)、设备机型、操作系统及版本、客户端版本、设备分辨率、包名、设备设置、软硬件特征信息、设备名称等以提供统计分析服务,并通过地理位置校准报表数据准确性,提供基础反作弊能力。用来匹配设备广告。 |
| | | </p> |
| | | <p class="p"> |
| | | <span>我们的产品集成友盟</span>+SDK,友盟+SDK需要收集您的设备Mac地址、唯一设备识别码 (IMEI/android |
| | | ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等)、设备机型、操作系统及版本、客户端版本、设备分辨率、包名、设备设置、软硬件特征信息、设备名称等以提供统计分析服务,并通过地理位置校准报表数据准确性,提供基础反作弊能力; |
| | | <br /> |
| | | <span>如您使用用户反馈功能(入口为</span>“我的-设置-我要反馈”),我们会通过阿里云<span>反馈</span>SDK进行用户反馈的收集和回复,可能需要读取您的设备相关信息(例如设备型号、操作系统版本、设备设置、MAC地址及IMEI、IDFA、OAID及其他设备标识符等软硬件特征信息)、设备所在位置相关信息(例如IP地址、GPS位置以及能够提供相关信息的Wi-Fi接入点、蓝牙和基站等传感器信息)。阿里云反馈SDK可能会将前面两类信息进行关联,以便能在不同设备上为您提供一致的服务;当您使用阿里云反馈提供的服务时,阿里云反馈SDK会自动收集您对我们服务的详细使用情况,作为有关网络日志保存。例如您的搜索查询内容、IP地址、浏览器的类型、电信运营商、使用的语言、访问日期和时间及您访问的网页记录等。 |
| | | <br /> |
| | | <span>(</span>5)委托我们进行信息推广和广告投放的合作伙伴(如优量汇、穿山甲、百度联盟<span>等)共享我们使用您的相关信息集合形成的间接用户画像、去标识化或匿名化处理后的分析</span>/统计类信息,以帮助其进行广告或决策建议、提高广告有效触达率、进一步了解用户需求。我们承诺:未经您的同意,我们不会与其共享可以识别您身份的个人信息; |
| | | <br /> |
| | | <span>(</span>6)与我们共同提供某项服务的合作伙伴,例如:我们与合作伙伴共同开展营销活动,为了能够向您提供正常服务和满足您的服务需求,我们会另行取得您的授权,并在您授权后将您的相关信息(具体以您的授权内容为准)同步给该合作伙伴。 |
| | | <br /> |
| | | ● 共享的是去标识化的信息,且接受该信息共享的第三方无法重新识别信息主体身份; <br /> |
| | | ● 为了保护您、我们的其他用户或员工、影视大全布丸<span>或社会公共利益、财产或安全(例如:欺诈或信用风险等)免遭损害而与第三方的共享;</span> <br /> |
| | | ● 某些情况下,只有共享您的个人信息,才能实现我们的产品与/或服务的核心功能或提供您需要的服务,或处理您与他人的纠纷或争议; <br /> |
| | | ● 依据您与我们签署的相关协议(例如:在线协议、平台规则等)或法律文件而共享的; <br /> |
| | | ● 符合您与其他第三人之间的有关约定的; <br /> |
| | | ● 基于合理商业习惯而共享的,例如:与第三方共享联合营销活动中的中奖/获胜者等信息,以便其能及时向您发放奖品/礼品等;我们接受尽调时等; <br /> |
| | | ● |
| | | 基于学术研究而使用,例如:以学术研究为目的而与学术机构共享我们使用您的相关信息集合形成的间接用户画像、去标识化或匿名化处理后的分析/统计类信息(未经您的同意,我们不会与其共享可以识别您身份的个人信息);学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行匿名化处理的; |
| | | <br /> |
| | | ● 有权机关的要求、诉讼争议需要、法律法规等规定的其他需要共享的情形。 <br /> |
| | | 您可以基于影视大全布丸的平台与第三人(包括不特定对象)共享您的个人信息或其他信息,但因您的共享行为而导致的信息泄露、被使用等情况,与影视大全布丸<span>无关,您需要自行承担相应的法律责任。</span> <br /> |
| | | <span>我们仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并且只会共享必要的个人信息。在我们与业务合作伙伴共享信息时,我们会以多种方式保护您的个人信息,包括但不限于:(</span>1)如具备上述合理事由且需要您授权同意的,我们会在共享前向您告知共享的信息的目的、类型(如涉及您的个人敏感信息的,我们还会向您告知涉及的敏感信息的内容)并在取得您授权同意后再共享;(2)在合作协议层面,我们会严格要求合作伙伴的信息保护义务与责任,为此,我们的法律部门要求业务合作伙伴在合作前需与影视大全布丸<span>签署关于数据安全的保护协议,协议严格约定了业务合作伙伴的用户信息保密义务,包括信息的保管、使用和流转等均应满足我们的管控要求,接受我们的审核、监督等,一旦有任何违反,将须承担相应法律责任;(</span>3)此外,我们的安全团队将对信息数据的输出形式、流转、使用等做安全评估与处理等。请您知悉,即使已经取得您的授权同意,我们也仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并尽量对共享内容中的个人信息进行匿名化处理。您理解并知悉,匿名化处理后的信息无法指向与识别您,已不属于法律意义上的个人信息,其处理、使用、共享、转让无需征得您的授权同意。 |
| | | <br /> |
| | | <b>(二)转让</b> <br /> |
| | | <span>转让是指将个人信息控制权向其他公司、组织或个人转移的过程。原则上我们不会将您的个人信息转让,但以下情况除外:</span> <br /> |
| | | ● 您自行提出要求的; <br /> |
| | | ● 事先已征得您的明确授权同意; <br /> |
| | | ● 如我们进行兼并、收购、重组、分立、破产、资产转让或类似的交易,而您的个人信息有可能作为此类交易的一部分而被转移,我们会要求新持有人继续遵守和履行该《影视大全布丸<span>隐私政策》的全部内容(包括使用目的、使用规则、安全保护措施等),否则我们将要求其重新获取您的明示授权同意;</span> |
| | | <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <span>如具备上述事由确需转让的,我们会在转让前向您告知转让的信息的目的、类型(如涉及您的个人敏感信息的,我们还会向您告知涉及的敏感信息的内容),并在征得您的授权同意后再转让,但法律法规另有规定的或本政策另有约定的除外。</span> |
| | | <br /> |
| | | <b>(三)公开披露</b> <br /> |
| | | <span>公开披露是指向社会或不特定人群发布信息的行为。除了因需要对违规账号、欺诈行为等进行处罚公告、公布中奖</span>/获胜者等名单时脱敏展示相关信息等必要事宜而进行的必要披露外,我们不会对您的个人信息进行公开披露,如具备合理事由确需公开披露的,我们会在公开披露前向您告知公开披露的信息的目的、类型(如涉及您的个人敏感信息的,我们还会向您告知涉及的敏感信息的内容),并在征得您的授权同意后再公开披露,但法律法规另有规定的或本政策另有约定的除外。 |
| | | <br /> |
| | | 对于公开披露的您的个人信息,我们会充分重视风险,在收到公开披露申请后第一时间且审慎审查其正当性、合理性、合法性,并在公开披露时和公开披露后采取不低于本《影视大全布丸<span>隐私政策》约定的个人信息安全保护措施和手段的程度对其进行保护。</span> |
| | | <br /> |
| | | <span>请您知悉,即使已经取得您的授权同意,我们也仅会出于合法、正当、必要、特定、明确的目的公开披露您的个人信息,并尽量对公开披露内容中的个人信息进行匿名化处理。</span> <br /> |
| | | <b><span>例外情形</span> </b><br /> |
| | | <span>根据法律法规等规定,在下述情况下,共享、转让、公开披露您的个人信息无需事先征得您的授权同意:</span> <br /> |
| | | ● 与国家安全、国防安全直接相关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益直接相关的; <br /> |
| | | ● 与犯罪侦查、起诉、审判和判决执行等直接相关的;或根据法律法规的要求、行政机关或公检法等有权机关的要求的; <br /> |
| | | ● 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到您本人同意的; <br /> |
| | | ● 个人信息是您自行向社会公开的或者是从合法公开的渠道(如合法的新闻报道、政府信息公开等渠道)中收集到的; <br /> |
| | | ● 根据与您签订和履行相关协议或其他书面文件所必需的; <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <b>(四)共享、转让、公开披露的相关责任</b> <br /> |
| | | <span>我们将严格按照本隐私政策的约定及相关法律法规的要求执行对个人信息的共享、转让、公开披露的操作,如因我们的过错原因导致您的合法权益遭受损害的,我们愿意就我们的过错在法律规定的范围内向您承担相应的损害赔偿责任。</span> |
| | | </p> |
| | | <h2> |
| | | <b>五、您对个人信息享有的控制权</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <span>您对我们产品与</span>/或服务中的您的个人信息享有多种方式的控制权,包括:您可以访问、更正/修改、删除您的个人信息,也可以撤回之前作出的对您个人信息的同意。为便于您行使您的上述控制权,<b>我们在产品的相关功能页面为您提供了操作指引和操作设置,您可以自行进行操作,如您在操作过程中有疑惑或困难的可以通过文末的方式联系我们来进行控制,我们会及时为您处理。</b> <br /> |
| | | <b>(一)访问权</b> <br /> |
| | | <span>您可以在我们的产品与</span>/或服务中查询或访问您的相关个人信息,包括: <br /> |
| | | ● 账号信息:您可以通过相关产品页面随时登录您的个人账号,以访问您的账号中的个人资料信息,包括:头像、昵称、生日、性别等,例如: |
| | | “头像/昵称/生日/性别/个性签名”信息在“手机端影视大全布丸 APP”中的更正/修改路径为:我的—头像—编辑资料; <br /> |
| | | ● |
| | | 使用信息:您可以通过相关产品页面随时查阅您的使用信息,包括:收藏记录、观看历史记录、离线缓存记录、搜索记录、上传内容、积分信息等,例如:“观看历史记录”信息在“手机端影视大全布丸 APP”中的访问路径为:我的—历史记录; |
| | | <br /> |
| | | ● 其他信息:如您在此访问过程中遇到操作问题的或如需获取其他前述无法获知的个人信息内容,您可通过文末提供的方式联系我们,我们将在核实您的身份后在合理期限内向您提供,但法律法规另有规定的或本政策另有约定的除外。 <br /> |
| | | <b><span>(二)更正</span>/修改权</b> <br /> |
| | | <span>您可以在我们的产品与</span>/或服务中更正/修改您的相关个人信息。为便于您行使您的上述权利,我们为您提供了在线自行更正/修改和向我们提出更正/修改申请两种方式。 <br /> |
| | | <span>对于您的部分个人信息,我们在产品的相关功能页面为您提供了操作指引和操作设置,您可以直接进行更正</span>/修改,例如:“头像/昵称/生日/性别”信息在“手机端影视大全布丸 APP”中的更正/修改路径为:我的—头像—编辑资料; |
| | | <br /> |
| | | <span>对于您在行使上述权利过程中遇到的困难,或其他可能未</span>/无法向您提供在线自行更正/修改权限的, |
| | | 经对您的身份进行验证,且更正不影响信息的客观性和准确性的情况下,您有权对错误或不完整的信息作出更正或修改,或在特定情况下,尤其是数据错误时,通过我们公布的反馈与报错等措施将您的更正/修改申请提交给我们,要求我们更正或修改您的数据,但法律法规另有规定的除外。但出于安全性和身份识别的考虑,您可能无法修改注册时提交的某些初始注册信息。 |
| | | <br /> |
| | | <b>(三)删除权</b> <br /> |
| | | <span>一般而言,我们只会在法律法规规定或必需且最短的时间内保存您的个人信息。为便于您行使您的上述删除权,我们为您提供了在线自行删除和向我们提出删除申请两种方式。</span> <br /> |
| | | <span>对于您的部分个人信息,我们在产品的相关功能页面为您提供了操作指引和操作设置,您可以直接进行删除,例如:</span>“历史记录”信息在“手机端影视大全布丸 APP”中的删除路径为:我的—历史记录—编辑。一旦您删除后,我们即会对此类信息进行删除或匿名化处理,除非法律法规另有规定。 |
| | | <br /> |
| | | <span>在以下情形下,您可以直接向我们提出删除您个人信息的请求,但已做数据匿名化处理或法律法规另有规定的除外。</span> <br /> |
| | | ● 我们违反法律法规规定,收集、使用您的个人信息的; <br /> |
| | | ● 我们违反了与您的约定,收集、使用您的个人信息的; <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <span>关于您不再使用我们提供的产品与</span>/或服务后、以及我们终止部分或全部产品与/或服务后我们对您的个人信息的处理,我们将在本文其他专门章/节中为您详细作出说明。 <br /> |
| | | <span>您理解并同意:当您从我们的产品与</span>/或服务中删除信息后,我们可能不会立即从备份系统中删除相应的信息,但会在备份更新时删除这些信息。 <br /> |
| | | <b>(四)索取权</b> <br /> |
| | | 如您需要您的个人数据的副本,您可以通过本《影视大全布丸<span>隐私政策》文末提供的方式联系我们,在核实您的身份后,我们将向您提供您在我们的服务中的个人信息副本(包括基本资料、身份信息),但法律法规另有规定的或本政策另有约定的除外。</span> |
| | | <br /> |
| | | <b><span>(五)</span> <span>撤回同意权</span></b> <br /> |
| | | 如您想更改相关权限的授权(例如:位置、相册等),您可以通过您的硬件设备进行修改。如您在此过程中遇到操作问题的,可以通过本《影视大全布丸<span>隐私政策》文末提供的方式联系我们。</span> <br /> |
| | | <span>当您取消相关个人信息收集的授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但您知悉并同意,除非您行使前述</span>“ |
| | | 删除权”,否则您的该行为不会影响我们基于您之前的授权进行的个人信息的处理、存储。 <br /> |
| | | <b>(六)注销权</b> <br /> |
| | | 我们为您提供影视大全布丸账号注销权限,您可以通过发送邮件至yesbd@qq.com邮箱来注销您的账号。<b>一旦您注销账号,将无法使用我们提供的产品和服务且视为自动放弃已有的权益,</b><span>因此请您谨慎操作。除法律法规另有规定外,注销账号之后,我们将停止为您提供我们所有的产品和服务,您曾通过该账号使用的我们的产品与服务下的所有内容、信息、数据、记录将会被删除或匿名化处理。</span> |
| | | <br /> |
| | | <b><span>(七)提前获知产品与</span>/或服务停止运营权</b> <br /> |
| | | <span>我们将持续为您提供优质服务,若因特殊原因导致我们的部分或全部产品与</span>/或服务被迫停止运营,我们将提前在显著位置或向您发送推送消息或以其他方式通知您,并将停止对您个人信息的收集,同时在超出法律法规规定的必需且最短期限后,我们将会对所持有的您的个人信息进行删除或匿名化处理。 |
| | | <br /> |
| | | <b>(八)帮助反馈权</b> <br /> |
| | | <span>我们为您提供了多种反馈渠道,具体请见本政策</span>“如何联系我们”章节。 <br /> |
| | | <b><i>例外情形</i></b> <br /> |
| | | <span>请您理解并知悉,根据法律法规等规定,在下述情况下,我们可能不会响应您的关于访问、更正</span>/修改权、删除权、撤回同意权、索取权的请求: <br /> |
| | | ● 与国家安全、国防安全有关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益有关的; <br /> |
| | | ● 与犯罪侦查、起诉、审判和判决执行等有关的; <br /> |
| | | ● 我们有充分证据表明您存在主观恶意或滥用权利的; <br /> |
| | | ● 响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的; <br /> |
| | | ● 涉及商业秘密的; <br /> |
| | | ● 法律法规等规定的其他情形。 |
| | | </p> |
| | | <h2> |
| | | <b><span>六、我们如何存储和保护您的个人信息</span> </b><b><br /> |
| | | </b><b><span>(一)个人信息的存储</span> </b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | ● <b>存储地点:我们依照法律法规的规定,将您的个人信息存储于中华人民共和国境内。目前我们暂时不存在跨境存储您的个人信息或向境外提供个人信息的场景。</b>如需跨境存储或向境外提供个人信息的,我们会单独向您明确告知(包括出境的目的、接收方、使用方式与范围、使用内容、安全保障措施、安全风险等)并再次征得您的授权同意,并严格要求接收方按照本《影视大全布丸<span>隐私政策》以及其他相关要求来处理您的个人信息;</span> |
| | | <br /> |
| | | ● |
| | | 存储期限:我们在为提供我们的产品和服务之目的所必需且最短的期间内保留您的个人信息,例如:当您使用我们的注册功能时,我们需要收集您的手机号码,且在您提供后并在您使用该功能期间,我们需要持续为您保留您的手机号码,以向您正常提供该功能、保障您的账号和系统安全。在超出上述存储期限后,我们会对您的个人信息进行删除或匿名化处理。但您行使删除权或法律法规另有规定的除外(例如:《电子商务法》规定:商品和服务信息、交易信息保存时间自交易完成之日起不少于三年)。 |
| | | <br /> |
| | | <b>(二)个人信息的保护措施</b> <br /> |
| | | <span>我们一直都极为重视保护用户的个人信息安全,为此我们采用了符合行业标准的安全技术措施及配套的组织架构和管理体系等多层面保护措施以最大程度降低您的信息被泄露、毁损、误用、非授权访问、非授权披露和更改的风险。包括:</span> |
| | | <br /> |
| | | ● 数据安全技术措施 <br /> |
| | | <span>(</span>1)数据安全收集方面,通过个人信息安全影响评估确认数据收集的合法性、正当性和必要性,识别并以清晰、准确的方式告知用户以征得同意,同时对用户的授权同意采集行为进行日志记录;采用敏感识别工具对收集的用户数据进行分类分级,针对不同级别的数据设置不同等级的安全策略;采用技术措施对收集或产生数据的来源方进行身份识别,确保数据来源的准确性和抗抵赖性; |
| | | <br /> |
| | | <span>(</span>2) 数据安全传输方面,使用安全通道传输个人信息,并通过合适的加密算法进行安全加密、脱敏处理,确保数据传输过程中个人信息的秘密性和完整性; <br /> |
| | | <span>(</span>3)数据安全存储方面,采用数据分类分级管理制度,针对数据分类分级结果采取不同的信息存储策略;采用数据分类分级管理制度,针对数据分类分级结果采取不同的信息存储策略;个人敏感信息需加密存储,确保数据安全使用规范能够落实到位;针对存储有个人信息的数据库加强权限控制与安全审计;定期对个人信息进行备份与恢复,确保个人信息在存储使用过程中的完整性; |
| | | <br /> |
| | | <span>(</span>4)数据安全处理方面,依照使用场景和安全需求对个人信息进行脱敏处理,例如:在前端显示个人敏感信息之前需在服务端完成脱敏处理;开发、测试环境严禁使用真实用户信息;实施严格的数据权限控制机制,采取多重身份认证、网络/数据隔离等技术措施,确保能够对处理个人信息的行为进行有效监控,避免数据被违规访问和未授权使用; |
| | | <br /> |
| | | <span>(</span>5)数据安全销毁方面,根据法律法规要求和业务实际需求设定个人信息存储的最小可用期限,对到期的数据通过安全删除技术进行处理,确保已销毁数据不可恢复,技术手段包括但不限于数据彻底清除方案、磁盘销毁、物理销毁等; |
| | | <br /> |
| | | <span>(</span>6) 建立完整的审计机制,对数据生命周期的全流程进行监控与审计,防止您的个人信息遭遇未经授权的访问、公开披露、使用、修改、人为或意外的损坏或丢失; <br /> |
| | | <span>(</span>7) 其他实现数据安全保护的措施。 <br /> |
| | | ● 数据安全组织和管理措施 <br /> |
| | | <span>(</span>1)成立专门的个人信息保护责任部门,建立相关的内控管理流程,对可能接触到您的信息的工作人员采取最小化权限原则; <br /> |
| | | <span>(</span>2)建立数据分类分级制度、业务数据安全使用规范、数据合作规范等管理体系,保障您的信息在收集、传输、使用、存储、转移、销毁等环节的处置满足法律法规相关规范和安全要求; <br /> |
| | | <span>(</span>3)定期组织员工参加安全与隐私保护相关培训并要求完成规定的考核,加强员工对于保护个人信息重要性的认知; <br /> |
| | | <span>(</span>4)其他可行的安全组织和管理措施。 <br /> |
| | | ● 合作协议条款保证 <br /> |
| | | <span>(</span>1)在我们从第三方间接收集您的个人信息前,我们会明确以书面形式(如合作协议、承诺书)要求该第三方在已经取得您明示同意后收集以及处理(如共享等)个人信息,在书面协议层面要求第三方对个人信息来源的合法性和合规性作出承诺,如第三方有违反行为的,我们会明确要求该第三方承担相应法律责任; |
| | | <br /> |
| | | <span>(</span>2)在我们向业务合作伙伴共享您的个人信息前,我们会严格要求合作伙伴的信息保护义务与责任,并要求业务合作伙伴在合作前签署关于数据安全的保护协议,一旦业务合作伙伴有任何违反协议的行为,将须承担相应法律责任; |
| | | <br /> |
| | | <span>(</span>3)其他合作协议中明确约定的内容。 <br /> |
| | | ● 安全事件的处理 <br /> |
| | | <span>(</span>1)如不幸发生个人信息安全事件的,我们将按照法律法规的要求,及时向您告知安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施等。我们将及时将事件相关情况以短信、推送通知、站内消息等一种或多种方式告知您,难以逐一告知个人信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,主动上报个人信息安全事件的处置情况; |
| | | <br /> |
| | | <span>(</span>2)请您知悉并理解,互联网并非绝对安全的环境,我们强烈建议您通过安全方式、使用复杂密码,协助我们保证您的账号安全。如您发现自己的个人信息泄密,尤其是您的账户或密码发生泄露,请您立即根据本隐私政策文末中提供的联系方式联络我们,以便我们采取相应措施来保护您的信息安全。 |
| | | </p> |
| | | <h2> |
| | | <b>七、未成年人保护</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | 影视大全布丸<span>一直非常注重对未成年人的保护,致力于践行我们的企业社会责任。</span> <br /> |
| | | 影视大全布丸<span>的绝大部分产品与</span>/或服务主要面向成年人提供,针对这部分产品与/或服务,我们不会主动直接向未成年人收集其个人信息,如未成年人需要使用的,应首先取得其监护人的同意(包括本政策),在监护人同意后和指导下进行使用、提交个人信息;我们希望监护人亦能积极的教育和引导未成年人增强个人信息保护意识和能力,保护未成年人个人信息安全。影视大全布丸<span>会严格履行法律规定的未成年人保护义务与责任,我们只会在法律允许、监护人同意或保护未成年人所必要的情况下收集、使用、共享、转让或披露未成年人个人信息,如果我们发现未成年人在未事先获得其监护人同意的情况下使用了我们的产品与</span>/或服务的,我们会尽最大努力与监护人取得联系,并在监护人要求下尽快删除相关未成年人个人信息。 |
| | | </p> |
| | | <h2> |
| | | <b>八、本《</b><b>影视大全布丸</b><b>隐私政策》的更新</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <b>我们鼓励您在每次使用我们的产品或服务时都查阅我们的《</b><b>影视大全布丸</b><b>隐私政策》。</b>为了给您提供更好的服务,我们会根据产品的更新情况及法律法规的相关要求更新本《影视大全布丸隐私政策》的条款,该等更新构成本《影视大全布丸隐私政策》的一部分。如该等更新造成您在本《影视大全布丸隐私政策》下权利的实质减少或重大变更,我们将在本政策生效前通过在显著位置提示或向您发送推送消息或以其他方式通知您,若您继续使用我们的服务,即表示您充分阅读、理解并同意受经修订的《影视大全布丸<span>隐私政策》的约束。为保障您的合法权益,我们建议您可以定期在我们平台的设置页面中查看本政策。</span> |
| | | <br /> |
| | | <span>上述的</span>“重大变更”包括但不限于: <br /> |
| | | ● 我们的服务模式发生重大变化。如处理个人信息的目的、处理的个人信息的类型、个人信息的使用方式等; <br /> |
| | | ● 我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等; <br /> |
| | | ● 个人信息共享、转让或公开披露的主要对象发生变化; <br /> |
| | | ● 您参与个人信息处理方面的权利及其行使方式发生重大变化; <br /> |
| | | ● 我们负责处理个人信息安全的责任部门、联络方式及投诉渠道发生变化时; <br /> |
| | | ● 个人信息安全影响评估报告表明存在高风险时; <br /> |
| | | ● 其他重要的或可能严重影响您的个人权益的情况发生时。 |
| | | </p> |
| | | <h2> |
| | | <b>九、如何联系我们</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | (一)如您对本《影视大全布丸<span>隐私政策》的执行或使用我们的服务时遇到的与隐私保护相关的事宜有任何问题(包括问题咨询、投诉等),我们专门为您提供了多种反馈通道,希望为您提供满意的解决方案:</span> <br /> |
| | | ● 客服/其他在线意见反馈通道:您可与我们平台上产品功能页面的客服联系或者在线提交意见反馈; <br /> |
| | | ● 专设的邮件通道:为更好地保护您的权益,我们专门设立了yesbd@qq.com<span>邮箱,您可以通过该邮箱与我们联系;</span> <br /> |
| | | <span>(二)我们会在收到您的意见及建议后,并在验证您的用户身份后的</span>15个工作日内或法律法规规定的期限内尽快向您回复,一般情况下,我们不会因此对您收取服务费。但是,在以下情形下,您理解并知悉,我们将无法响应您的请求: |
| | | <br /> |
| | | ● 与国家安全、国防安全有关的; <br /> |
| | | ● 与公共安全、公共卫生、重大公共利益有关的; <br /> |
| | | ● 与犯罪侦查、起诉和审判等有关的; <br /> |
| | | ● 有充分证据表明您存在主观恶意或滥用权利的; <br /> |
| | | ● 响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的; <br /> |
| | | ● 涉及商业秘密的; <br /> |
| | | ● 法律法规等规定的其他情形。 <br /> |
| | | <span>(三)如果您对我们的回复不满意,或我们对您个人信息的处理方式侵害了您的合法权益,且在您向我们反馈后我们仍拒绝改进的,您可以向工商、公安等监管部门进行投诉、举报。</span> |
| | | </p> |
| | | <h2> |
| | | <b>十、其他</b><b></b> |
| | | </h2> |
| | | <p class="p"> |
| | | <b>(一)本《</b><b>影视大全布丸</b><b>隐私政策》的解释及争议解决均应适用中华人民共和国大陆地区法律。与本《</b><b>影视大全布丸</b><b>隐私政策》相关的任何纠纷,双方应协商友好解决;若不能协商解决,您同意将争议提交至重庆市江北区人民法院诉讼解决。</b> <br /> |
| | | (二)本《影视大全布丸<span>隐私政策》的标题仅为方便及阅读而设,并不影响正文其中任何规定的含义或解释。</span> |
| | | </p> |
| | | <p class="MsoNormal"> |
| | | |
| | | </p> |
| | | <p class="MsoNormal" align="right" style="text-align:right;"> |
| | | 重庆椰视网络科技有限公司 |
| | | </p> |
| | | <p class="MsoNormal" align="right" style="text-align:right;"> |
| | | 2020年12月28日修订 |
| | | </p> |
| | | </p> |
| | | |
| | | </body> |
| | | |
| | | </html> |
New file |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.internal.util.AlipaySignature; |
| | | import com.yeshi.buwan.util.user.VipUtil; |
| | | import org.json.JSONObject; |
| | | import org.junit.Test; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | | import org.yeshi.utils.entity.alipay.AlipayAppInfo; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | import java.util.Properties; |
| | | |
| | | public class AlipayTest { |
| | | |
| | | @Test |
| | | public void test1() { |
| | | Properties properties = new Properties(); |
| | | try { |
| | | properties.load(AlipayTest.this.getClass().getClassLoader().getResourceAsStream("alipay.properties")); |
| | | String privateKey = properties.getProperty("private_key"); |
| | | String publicKey = properties.getProperty("alipay_public_key"); |
| | | System.out.println(privateKey); |
| | | System.out.println(publicKey); |
| | | String orderNo = "123123"; |
| | | BigDecimal money = new BigDecimal("0.1"); |
| | | String goodsTitle = "影视大全会员充值"; |
| | | String returnUrl = "http://vip.ysdq.yeshitv.com"; |
| | | String notifyUrl = "http://api.ysdq.yeshitv.com:8089/BuWan/api/callback/alipay"; |
| | | AlipayAppInfo appInfo = new AlipayAppInfo("2021002122664142", privateKey, publicKey); |
| | | String form = AlipayH5PayUtil.createOrderForm(appInfo, orderNo, money, goodsTitle, returnUrl, notifyUrl); |
| | | System.out.println(form); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testSign() { |
| | | String result = "{\"gmt_create\":\"2021-01-10 15:43:01\",\"charset\":\"GBK\",\"seller_email\":\"pay@banliapp.com\",\"subject\":\"影视大全会员充值\",\"sign\":\"HaLg1jxJBbO1V8yS52g+7amfOc5YpooTW3rEBJ6us0dNuk76em9LZGF6nrvgmAiftxKiDC6iItK9OM7/UJLDVoRs6KMuIhrheWILEwob+x6bN3360sGos+e3aEc6DFxCAEcqg8L3221+zubXsx/hUAkSWe6l87aRI+L1fxesnQ3CFsRTOoRFdI0BlbD3CBi+NG4M0BN0zMIqOTUHv/nWnLgoseJeYSv1xvlarVO98vPWRLb+fwx1HYh/xFtItYvZgS3J8CDG/faKAAi/OoTDXJBh82RuEn3q1yC/5SP9iiplvOmzXvCludfjjTncICXX9Jcy/ljXNhbF8wUDxB26KQ==\",\"buyer_id\":\"2088812685461771\",\"invoice_amount\":\"0.01\",\"notify_id\":\"2021011000222154302061771416253509\",\"fund_bill_list\":\"[{\\\"amount\\\":\\\"0.01\\\",\\\"fundChannel\\\":\\\"PCREDIT\\\"}]\",\"notify_type\":\"trade_status_sync\",\"trade_status\":\"TRADE_SUCCESS\",\"receipt_amount\":\"0.01\",\"buyer_pay_amount\":\"0.01\",\"app_id\":\"2021002122664142\",\"sign_type\":\"RSA2\",\"seller_id\":\"2088231353656741\",\"gmt_payment\":\"2021-01-10 15:43:02\",\"notify_time\":\"2021-01-10 15:43:02\",\"version\":\"1.0\",\"out_trade_no\":\"202101101542\",\"total_amount\":\"0.01\",\"trade_no\":\"2021011022001461771414408457\",\"auth_app_id\":\"2021002122664142\",\"buyer_logon_id\":\"185****8252\",\"point_amount\":\"0.00\"}\n"; |
| | | |
| | | JSONObject jsonObject = new JSONObject(result); |
| | | Map<String, String> map = new HashMap<>(); |
| | | for (Iterator<String> its = jsonObject.keys(); its.hasNext(); ) { |
| | | String key = its.next(); |
| | | String value = jsonObject.optString(key); |
| | | map.put(key, value); |
| | | } |
| | | |
| | | |
| | | AlipayAppInfo app = VipUtil.getAlipayApp(); |
| | | |
| | | try { |
| | | boolean signRight = AlipaySignature.rsaCheckV1(map, app.getAlipayPublicKey(), "GBK", map.get("sign_type")); |
| | | System.out.println(signRight); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public class DES { |
| | | @org.junit.Test |
| | | public void test1() { |
| | | String content = "iDp+mknN2urZPWPAdmBTv1ME3YqW7QwsI0S4GV2sKsTwABZcdfACSbEGzl/MEDLxB7SqGpvVnUYsGgkkd14zUSJq6w22b9X7OAJZuMljObiAdGUcZ6lP50QsMXwyMmW2USBUW86MilU4pw2w/qTJedKsYur+rnod+uLBaT+m3V0="; |
| | | String content = "iDp+mknN2urZPWPAdmBTv1ME3YqW7QwsTxe0hnynmQH+utoyj8ZggzXuO5BQNx/LZaJMsO+p530ojiuRKXMyQHMsBCbLU9AiTtXsqKAXHGNqTVeAvKTdRICRQjf2R/hIlhNeZmSTOMgZ7/RE40ohWMrdRTnWohCndZRg0YwTWQCF+nDmeoIVH1BVeNkGeEzz3GmpTES+2dyOnwV1pAJsa+hjLC2Z+KpqXc7RYD7pDJo8i38mb9dNTXIw69UWJqG0gB47YM49uKBGNwdlXqTLXnvA+zwWlfijHemd8bnlD8ow8RW3RqVoQeDvSKZscuU2MjV0DROXcsJi/KNduci91zZrnVmudkTgFY7ln6tmg2mbnufi6ZabJXoP+zbSNVctIDSXTHB7iYGx4f3cUfCucvLgzLiPOudPllVCFjfqhG4="; |
| | | System.out.println(DESUtil.decode(content)); } |
| | | } |
New file |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.domain.user.LoginUserExtra; |
| | | import org.junit.Test; |
| | | import org.yeshi.utils.generater.SpringComponentGenerater; |
| | | import org.yeshi.utils.generater.entity.MongoDBDaoData; |
| | | |
| | | public class DaoTest { |
| | | |
| | | @Test |
| | | public void createDao() { |
| | | |
| | | try { |
| | | SpringComponentGenerater.createMongoDao(new MongoDBDaoData.Builder().setBaseDaoClass(MongodbBaseDao.class).setDaoPackageName("com.yeshi.buwan.dao.user").setEntityClass(LoginUserExtra.class).create(),"D:\\workspace\\BuWan\\src\\main\\java\\com\\yeshi\\buwan\\dao\\user"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | VideoDetailUtil videoDeailUtil = BeanUtil.getBean(VideoDetailUtil.class); |
| | | VideoResourceUtil videoResouceUtil = BeanUtil.getBean(VideoResourceUtil.class); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds("android", Integer.parseInt("48")); |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(227562 + "", "19", resourceList, |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(null,227562 + "", "19", resourceList, |
| | | CacheUtil.getMD5Long(resourceList))); |
| | | System.out.println(info); |
| | | } |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.yeshi.buwan.dao.juhe.funtv.*; |
| | | import com.yeshi.buwan.domain.ResourceVideo; |
| | | import com.yeshi.buwan.dto.mq.VideoExtraInfoChangeMQMsg; |
| | | import com.yeshi.buwan.dao.juhe.funtv.FunTVAlbum2Dao; |
| | | import com.yeshi.buwan.dao.juhe.funtv.FunTVVideo2Dao; |
| | | import com.yeshi.buwan.dao.juhe.funtv.VideoFunTV2Dao; |
| | | import com.yeshi.buwan.dao.juhe.funtv.VideoFunTVNewDao; |
| | | import com.yeshi.buwan.funtv.FunTVNewApi; |
| | | import com.yeshi.buwan.funtv.FunTVUtil; |
| | | import com.yeshi.buwan.funtv.FunTVUtil2; |
| | | import com.yeshi.buwan.funtv.entity.*; |
| | | import com.yeshi.buwan.iqiyi.entity.VideoIqiyi; |
| | | import com.yeshi.buwan.funtv.entity.FunTVAlbum2; |
| | | import com.yeshi.buwan.funtv.entity.FunTVShortVideo2; |
| | | import com.yeshi.buwan.funtv.entity.FunTVVideo2; |
| | | import com.yeshi.buwan.funtv.entity.VideoFunTV2; |
| | | import com.yeshi.buwan.job.video.FunTV2VideoUpdate; |
| | | import com.yeshi.buwan.service.imp.ResourceVideoService; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.inter.juhe.FunTV2Service; |
| | | import com.yeshi.buwan.util.HtmlToolUtil; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import com.yeshi.buwan.vo.video.funtv.Funtv2ResultVO; |
| | | import net.sf.json.JSONArray; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | |
| | | import org.springframework.test.context.web.WebAppConfiguration; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.FileInputStream; |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Scanner; |
| | | |
| | | @RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试 |
| | | @ContextConfiguration(locations = {"classpath:spring.xml"}) |
| | |
| | | |
| | | @Test |
| | | public void test1() { |
| | | long now = System.currentTimeMillis(); |
| | | for (int d = 200; d >= 100; d--) { |
| | | Funtv2ResultVO result = FunTVNewApi.getVideos(1, 20, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), 1013, 1); |
| | | if (result != null && result.getList() != null && result.getList().size() > 0) |
| | | System.out.println(result); |
| | | } |
| | | // long now = System.currentTimeMillis(); |
| | | // for (int d = 200; d >= 100; d--) { |
| | | // Funtv2ResultVO result = FunTVNewApi.getVideos(1, 20, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), 1013, 1); |
| | | // if (result != null && result.getList() != null && result.getList().size() > 0) |
| | | // System.out.println(result); |
| | | // } |
| | | } |
| | | |
| | | @Test |
| | | public void syncAlbum() { |
| | | //1-电影 2-电视剧 3-动漫 4-综艺 5-少儿 |
| | | int channelId = 5; |
| | | Funtv2ResultVO vo = FunTVNewApi.getAlbums(1, 20, null, null, channelId, 1); |
| | | int channelId = 2; |
| | | Funtv2ResultVO vo = FunTVNewApi.getAlbums(1, 20, null, null, 1); |
| | | int totalCount = vo.getCount(); |
| | | int pageSize = 20; |
| | | int totalPage = totalCount % pageSize == 0 ? totalCount / pageSize : totalCount / pageSize + 1; |
| | | for (int p = 0; p < totalPage; p++) { |
| | | Funtv2ResultVO result = FunTVNewApi.getAlbums(p + 1, pageSize, null, null, channelId, 1); |
| | | Funtv2ResultVO result = FunTVNewApi.getAlbums(p + 1, pageSize, null, null, 1); |
| | | if (result != null) |
| | | for (Serializable a : result.getList()) { |
| | | FunTVAlbum2 album2 = (FunTVAlbum2) a; |
| | |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void syncShortVideo() { |
| | | long now = System.currentTimeMillis(); |
| | | for (int d = 30; d >= 0; d--) { |
| | | List<FunTVShortVideo2> shortVideo2List = new ArrayList<>(); |
| | | int pageSize = 100; |
| | | Funtv2ResultVO result = FunTVNewApi.getVideos(1, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, 1); |
| | | if (result != null) { |
| | | for (Serializable a : result.getList()) { |
| | | FunTVShortVideo2 video2 = (FunTVShortVideo2) a; |
| | | shortVideo2List.add(video2); |
| | | } |
| | | } |
| | | int count = result.getCount(); |
| | | int totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1; |
| | | if (totalPage > 1) |
| | | for (int p = 1; p < totalPage; p++) { |
| | | result = FunTVNewApi.getVideos(p + 1, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, 1); |
| | | if (result != null) { |
| | | for (Serializable a : result.getList()) { |
| | | FunTVShortVideo2 video2 = (FunTVShortVideo2) a; |
| | | shortVideo2List.add(video2); |
| | | } |
| | | } |
| | | } |
| | | for (FunTVShortVideo2 video2 : shortVideo2List) { |
| | | funTV2Service.saveShortVideo(video2); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | public void getAlbumDetail() { |
| | | FunTVAlbum2 album2 = FunTVNewApi.getAlbumsDetail("99989"); |
| | | System.out.println(album2); |
| | | } |
| | | // @Test |
| | | // public void syncShortVideo() { |
| | | // long now = System.currentTimeMillis(); |
| | | // for (int d = 30; d >= 0; d--) { |
| | | // List<FunTVShortVideo2> shortVideo2List = new ArrayList<>(); |
| | | // int pageSize = 100; |
| | | // Funtv2ResultVO result = FunTVNewApi.getVideos(1, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, 1); |
| | | // if (result != null) { |
| | | // for (Serializable a : result.getList()) { |
| | | // FunTVShortVideo2 video2 = (FunTVShortVideo2) a; |
| | | // shortVideo2List.add(video2); |
| | | // } |
| | | // } |
| | | // int count = result.getCount(); |
| | | // int totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1; |
| | | // if (totalPage > 1) |
| | | // for (int p = 1; p < totalPage; p++) { |
| | | // result = FunTVNewApi.getVideos(p + 1, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, 1); |
| | | // if (result != null) { |
| | | // for (Serializable a : result.getList()) { |
| | | // FunTVShortVideo2 video2 = (FunTVShortVideo2) a; |
| | | // shortVideo2List.add(video2); |
| | | // } |
| | | // } |
| | | // } |
| | | // for (FunTVShortVideo2 video2 : shortVideo2List) { |
| | | // funTV2Service.saveShortVideo(video2); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | |
| | | @Test |
| | | public void addToVideoInfo() { |
| | | List<FunTVAlbum2> album2List = funTVAlbum2Dao.listByChannelId(2, 0, 1000); |
| | | List<FunTVAlbum2> album2List = funTVAlbum2Dao.listByChannelId(3, 0, 1000); |
| | | for (FunTVAlbum2 album2 : album2List) { |
| | | //只加入免费的 |
| | | if (!album2.getFeeMode().equalsIgnoreCase("0")) { |
| | | continue; |
| | | } |
| | | System.out.println(album2.getName()); |
| | | List<FunTVVideo2> list = funTVVideo2Dao.listByMediaId(album2.getId(), 0, 2000); |
| | | album2.setEpisodes(list); |
| | |
| | | List<String[]> list = HtmlToolUtil.parseSQLYogExportHtmData("C:\\Users\\Administrator\\Desktop\\风行老版正片.htm", 3); |
| | | for (String[] sts : list) { |
| | | String videoId = sts[0]; |
| | | resourceVideoService.delete(videoId, FunTVUtil.RESOURCE_ID+""); |
| | | resourceVideoService.delete(videoId, FunTVUtil.RESOURCE_ID + ""); |
| | | // List<VideoFunTV> list1 = videoFunTVNewDao.listByVideoId(Long.parseLong(videoId)); |
| | | // |
| | | // if (list1 != null) |
| | |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | public void removeAlbum() { |
| | | for (int i = 0; i < 100; i++) { |
| | | List<VideoFunTV2> list = videoFunTV2Dao.listAll(0, 100); |
| | | for (VideoFunTV2 tv2 : list) { |
| | | try { |
| | | funTV2Service.offLineAlbum(tv2.getMediaId()); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String[] files = new String[]{ |
| | | "video_play.2021-01-06.log", "video_play.2021-01-07.log", "video_play.2021-01-08.log", "video_play.2021-01-09.log", "video_play.2021-01-10.log", "video_play.2021-01-11.log", "video_play.2021-01-12.log", "video_play.2021-01-13.log", "video_play.2021-01-14.log" |
| | | }; |
| | | for (String file : files) { |
| | | try { |
| | | List<String> list = getFunTVPlayData("C:\\Users\\Administrator\\Desktop\\日志\\布丸播放\\" + file); |
| | | System.out.println(list.size()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private static List<String> getFunTVPlayData(String path) throws Exception { |
| | | List<String> list = new ArrayList<>(); |
| | | |
| | | Scanner scanner = new Scanner(new FileInputStream(path)); |
| | | while (scanner.hasNextLine()) { |
| | | String line = scanner.nextLine(); |
| | | if (line.contains("playStatistic") && line.contains("#24")) { |
| | | list.add(line); |
| | | } |
| | | } |
| | | scanner.close(); |
| | | return list; |
| | | } |
| | | |
| | | } |
| | |
| | | // iqiyiUtil.updateAlbum(aid); |
| | | // } |
| | | // } |
| | | getAlbumDetail(); |
| | | test7(); |
| | | // System.out.println(IqiyiUtil.getVPicture("http://pic2.iqiyipic.com/image/20200814/1b/26/v_150716720_m_601_m3.jpg")); |
| | | } |
| | | |
| | | @Test |
| | | public static void test() { |
| | | VideoInfoDao infoDao = BeanUtil.getBean(VideoInfoDao.class); |
| | | infoDao.excute(new HibernateCallback<List<String>>() { |
| | |
| | | }); |
| | | } |
| | | |
| | | @Test |
| | | public static void test2() { |
| | | IqiyiUtil iqiyiUtil = BeanUtil.getBean(IqiyiUtil.class); |
| | | iqiyiUtil.addShortVideo("208536001"); |
| | | } |
| | | |
| | | @Test |
| | | public static void test3() { |
| | | // Map<String, Object> map = IqiYiAPI.getAlbumList("6", "220327201", 1, |
| | | // 50, -1); |
| | |
| | | int count = 0; |
| | | while (StringUtil.isNullOrEmpty(aid) && count < 3) { |
| | | if (StringUtil.isNullOrEmpty(queue.getAid())) { |
| | | aid =IqiYiNewAPI.getAidByUrl(queue.getUrl()); |
| | | aid = IqiYiNewAPI.getAidByUrl(queue.getUrl()); |
| | | count++; |
| | | try { |
| | | Thread.sleep(1000 * 2); |
| | |
| | | } |
| | | |
| | | public static void test7() { |
| | | String aid = IqiYiNewAPI.getAidByUrl("http://www.video.com/v_19rr1i5o2k.html"); |
| | | IqiyiUtil iqiyiUtil = BeanUtil.getBean(IqiyiUtil.class); |
| | | iqiyiUtil.updateAlbum(aid); |
| | | System.out.println(aid); |
| | | System.out.println(IqiyiUtil.getHPicture("http://pic7.iqiyipic.com/image/20201029/c8/70/a_100417138_m_601_m12.jpg")); |
| | | } |
| | | |
| | | |
| | | //获取所有专辑 |
| | | @Test |
| | | public static void getAllAlbums() { |
| | | List<IqiyiAlbum2> album2List = new ArrayList<>(); |
| | | IqiyiAlbumListResult result = IqiYiNewAPI.getAllAlbumAndVideoList(IqiYiNewAPI.TYPE_ZONGYI + "", null, true, 10); |
| | |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public static void getAlbumDetail() { |
| | | List<Long> ids = new ArrayList<>(); |
| | | ids.add(247738801L); |
| | |
| | | import com.yeshi.buwan.dao.juhe.iqiyi.VideoIqiyi2Dao; |
| | | import com.yeshi.buwan.dao.juhe.iqiyi.VideoIqiyiDao; |
| | | import com.yeshi.buwan.domain.ResourceVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.funtv.FunTVUtil2; |
| | | import com.yeshi.buwan.funtv.entity.VideoFunTV2; |
| | | import com.yeshi.buwan.iqiyi.IqiYiNewAPI; |
| | |
| | | import com.yeshi.buwan.query.Iqiyi2AlbumQuery; |
| | | import com.yeshi.buwan.service.imp.CategoryVideoService; |
| | | import com.yeshi.buwan.service.imp.ResourceVideoService; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.*; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import net.sf.json.JSONArray; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| | | import org.springframework.test.context.web.WebAppConfiguration; |
| | |
| | | @WebAppConfiguration |
| | | public class Iqiyi2 { |
| | | |
| | | private final static Logger errorLogger = LoggerFactory.getLogger("errorLogger"); |
| | | |
| | | @Resource |
| | | private IqiyiUtil2 iqiyiUtil2; |
| | | |
| | |
| | | private Iqiyi2Service iqiyi2Service; |
| | | |
| | | @Resource |
| | | private Iqiyi2VideoUpdate iqiyi2VideoUpdate; |
| | | |
| | | @Resource |
| | | private CategoryVideoService categoryVideoService; |
| | | |
| | | @Resource |
| | | private VideoIqiyi2Dao videoIqiyi2Dao; |
| | | private ResourceVideoService resourceVideoService; |
| | | |
| | | @Resource |
| | | private ResourceVideoService resourceVideoService; |
| | | private Iqiyi2VideoUpdate iqiyi2VideoUpdate; |
| | | |
| | | |
| | | @Test |
| | |
| | | // 246508201L, 248886801L, 230798901L, 1569537751867101L, |
| | | // }; |
| | | |
| | | iqiyiUtil2.syncByAid(7643537550826500L); |
| | | // iqiyiUtil2.syncByAid(7643537550826500L); |
| | | |
| | | // IqiyiAlbum2 album2 = iqiyi2Service.selectAlbumById(240793601L); |
| | | // if (album2 != null) { |
| | | // iqiyi2Service.addToVideoInfo(album2); |
| | | // } |
| | | |
| | | Long qikuID = 242404801L; |
| | | |
| | | IqiyiAlbum2 album2 = iqiyi2Service.selectAlbumById(qikuID); |
| | | if (album2 != null) { |
| | | iqiyi2Service.addToVideoInfo(album2); |
| | | } |
| | | |
| | | // CMQManager.getInstance().addSolrMsg(8169108L+""); |
| | | |
| | | |
| | | // errorLogger.error("测试错误"); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @Test |
| | | public void test6() { |
| | | for (int i = 0; i < 10; i++) { |
| | | List<Long> ids = iqiyiAlbum2Dao.listInvalid(0, 1000); |
| | | for (long id : ids) |
| | | iqiyiAlbum2Dao.delete(id); |
| | | //saveToFile(ids); |
| | | try { |
| | | iqiyi2VideoUpdate.updateVideoByPlayerUrl("https://www.iqiyi.com/v_bwlvq0dul8.html?vfrm=pcw_dianshiju&vfrmblk=B&vfrmrst=fcs_2_p1"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | |
| | | public void count() { |
| | | // long count = iqiyiAlbum2Dao.countVideoByAid(253120001L); |
| | | // System.out.println(count); |
| | | IqiyiAlbum2 album2 = iqiyiAlbum2Dao.get(730266600L); |
| | | IqiyiAlbum2 album2 = iqiyiAlbum2Dao.get(1842274140085101L); |
| | | iqiyi2Service.addToVideoInfo(album2); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void sync() { |
| | | |
| | | iqiyi2Service.convertAlbumToVideoInfo(iqiyiAlbum2Dao.get(253593801L)); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Resource |
| | | private VideoInfoService videoInfoService; |
| | | |
| | | @Resource |
| | | private SolrAlbumDataManager solrDataManager; |
| | | |
| | | @Test |
| | | public void addResources() { |
| | | // List<String> videoIds = new ArrayList<>(); |
| | | // List<VideoIqiyi2> list = videoIqiyi2Dao.listAll(0, 5000); |
| | | // for (VideoIqiyi2 video : list) { |
| | | // long count = resourceVideoService.countByVideoIdAndResourceId(video.getVideoId() + "", IqiyiUtil2.RESOURCE_ID); |
| | | // if (count == 0L) { |
| | | // videoIds.add(video.getVideoId() + ""); |
| | | // } |
| | | // } |
| | | |
| | | String json = "[\"588808\",\"466573\",\"475946\",\"328312\",\"475934\",\"359261\",\"276279\",\"322163\",\"276768\"]"; |
| | | JSONArray array = JSONArray.fromObject(json); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | resourceVideoService.addVideoResource(array.optString(i), IqiyiUtil2.RESOURCE_ID + ""); |
| | | try { |
| | | VideoInfo videoInfo = videoInfoService.getVideoInfo(8174476+""); |
| | | if (videoInfo != null) { |
| | | if ("1".equalsIgnoreCase(videoInfo.getShow())) { |
| | | List<VideoResource> resourceList = new ArrayList<>(); |
| | | List<ResourceVideo> rvList = resourceVideoService.getResourceList(videoInfo.getId()); |
| | | if (rvList != null) |
| | | for (ResourceVideo rv : rvList) |
| | | resourceList.add(rv.getResource()); |
| | | videoInfo.setResourceList(resourceList); |
| | | solrDataManager.saveOrUpdate(videoInfo); |
| | | } else |
| | | solrDataManager.deleteById(videoInfo.getId()); |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | //["588808","466573","475946","328312","475934","359261","276279","322163","276768"] |
| | | } |
| | | |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.LoginUser; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.service.imp.UserService; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | | import com.yeshi.buwan.util.OSSManager; |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.yeshi.buwan.pptv.PPTVApiUtil; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import com.yeshi.buwan.service.inter.juhe.PPTVService; |
| | | import org.junit.Test; |
| | | |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | //@RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试 |
| | | //@ContextConfiguration(locations = {"classpath:spring.xml"}) |
| | | //@WebAppConfiguration |
| | | public class PPTVTest { |
| | | |
| | | @Test |
| | | public void pptvShort() { |
| | | // SolrUtil.search("崔神驾到", 1); |
| | | // PPTVService pptvService = BeanUtil.getBean(PPTVService.class); |
| | | // PPTVShortVideo pv = new PPTVShortVideo(); |
| | | // pv.setAid("158552322"); |
| | | // pptvService.deletePPTVShort(pv); |
| | | // VideoManager vm = BeanUtil.getBean(VideoManager.class); |
| | | // vm.deleteVideo("921153"); |
| | | PPTVUtil pptvUtil=BeanUtil.getBean(PPTVUtil.class); |
| | | pptvUtil.startParseTV(); |
| | | @Resource |
| | | private PPTVService pptvService; |
| | | |
| | | } |
| | | @Test |
| | | public void save() { |
| | | List<PPTVSeries> list = PPTVApiUtil.getUpdateList(); |
| | | // pptvService.save(list); |
| | | } |
| | | |
| | | @Test |
| | | public void getDetail() { |
| | | PPTVSeries pptvSeries = pptvService.getSeriesDetail("201161"); |
| | | System.out.println(pptvSeries); |
| | | } |
| | | |
| | | @Test |
| | | public void test(){ |
| | | PPTVApiUtil.getOpenId("123"); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void getApiDetail(){ |
| | | PPTVApiUtil.getDetail("32159127,10215224,15326213"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.yeshi.buwan.domain.HomeNotice; |
| | | import com.yeshi.buwan.domain.SolrVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.dto.search.SolrResultDTO; |
| | | import com.yeshi.buwan.dto.search.SolrVideoSearchFilter; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | |
| | | |
| | | @Test |
| | | public void test1() { |
| | | List<SolrVideo> list = solrDataManager.findByKey("苍", 1, 150, 1, 20).getVideoList(); |
| | | System.out.println(list.size()); |
| | | list = solrDataManager.findByKey("苍", 0, 150, 1, 20).getVideoList(); |
| | | System.out.println(list.size()); |
| | | list = solrDataManager.findByKey("苍", 1, 151, 1, 20).getVideoList(); |
| | | System.out.println(list.size()); |
| | | SolrVideoSearchFilter filter = new SolrVideoSearchFilter(); |
| | | filter.setKey("吉他"); |
| | | filter.setVideoType(null); |
| | | filter.setContentType(1); |
| | | filter.setResourceIds(new String[]{"24"}); |
| | | |
| | | SolrResultDTO dto = solrDataManager.find(filter, 1, 10); |
| | | System.out.println(dto); |
| | | } |
| | | |
| | | @Test |
| | | public void addSolrAlbum() { |
| | | solrDataManager.syncAlbum("7993147"); |
| | | solrDataManager.syncAlbum("8172667"); |
| | | } |
| | | |
| | | @Test |
| | | public void test2() { |
| | | solrDataManager.clear(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds("android", Integer.parseInt(70 + "")); |
| | | |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(3400048 + "", 13 + "", resourceList, |
| | | VideoInfo info = (videoDeailUtil.getVideoInfo(null,3400048 + "", 13 + "", resourceList, |
| | | CacheUtil.getMD5Long(resourceList))); |
| | | |
| | | List<VideoType> typeList = classService.getVideoTypeList(info.getId()); |
| | |
| | | import com.yeshi.buwan.iqiyi.IqiYiNewAPI; |
| | | import com.yeshi.buwan.iqiyi.entity.IqiyiUpdateQueue; |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.imp.juhe.IqiyiQueueService; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | |
| | | } |
| | | } |
| | | |
| | | // @Test |
| | | public static void pptv() { |
| | | PPTVUtil pptvUtil = BeanUtil.getBean(PPTVUtil.class); |
| | | pptvUtil.startParseShow(); |
| | | } |
| | | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | import com.yeshi.buwan.sohu.SoHuUtil; |
| | | import com.yeshi.buwan.util.BeanUtil; |
| | | import org.junit.Test; |
| | | |
| | | public class VideoUpdateTest { |
| | | |
| | | public static void main(String[] args) { |
| | | public static void main(String[] args) { |
| | | |
| | | } |
| | | } |
| | | |
| | | // @Test |
| | | public void iqiyi() { |
| | | IqiyiUtil iqiyiUtil = (IqiyiUtil) BeanUtil.getBean("iqiyiUtil"); |
| | | iqiyiUtil.updateAlbum("424141100"); |
| | | } |
| | | // @Test |
| | | public void iqiyi() { |
| | | IqiyiUtil iqiyiUtil = (IqiyiUtil) BeanUtil.getBean("iqiyiUtil"); |
| | | iqiyiUtil.updateAlbum("424141100"); |
| | | } |
| | | |
| | | // @Test |
| | | public void sohu() { |
| | | SoHuUtil soHuUtil = (SoHuUtil) BeanUtil.getBean("soHuUtil"); |
| | | soHuUtil.parseAll(); |
| | | } |
| | | // @Test |
| | | public void sohu() { |
| | | SoHuUtil soHuUtil = (SoHuUtil) BeanUtil.getBean("soHuUtil"); |
| | | soHuUtil.parseAll(); |
| | | } |
| | | |
| | | @Test |
| | | public void pptv() { |
| | | PPTVUtil pptvUtil = BeanUtil.getBean(PPTVUtil.class); |
| | | pptvUtil.startParseShow(); |
| | | } |
| | | |
| | | // @Test |
| | | public void soHu() { |
| | | SoHuUtil soHuUtil = (SoHuUtil) BeanUtil.getBean("soHuUtil"); |
| | | soHuUtil.parseAll(); |
| | | } |
| | | // @Test |
| | | public void soHu() { |
| | | SoHuUtil soHuUtil = (SoHuUtil) BeanUtil.getBean("soHuUtil"); |
| | | soHuUtil.parseAll(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.hxh.spring.test.video; |
| | | |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| | | import org.springframework.test.context.web.WebAppConfiguration; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | @RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试 |
| | | @ContextConfiguration(locations = {"classpath:spring.xml"}) |
| | | @WebAppConfiguration |
| | | public class VideoResourceMapExtraInfoTest { |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | @Test |
| | | public void list() { |
| | | String[] videos = new String[]{"1", "2"}; |
| | | Long[] resourceIds = new Long[]{24L, 25L}; |
| | | Map<String, VideoResourceMapExtraInfo> map = videoResourceMapExtraInfoService.listMap(Arrays.asList(videos), Arrays.asList(resourceIds)); |
| | | System.out.println(map); |
| | | } |
| | | |
| | | |
| | | } |