| | |
| | | package com.yeshi.buwan.controller.admin.api; |
| | | |
| | | import com.google.gson.*; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.domain.vip.UserVIPInfo; |
| | | import com.yeshi.buwan.domain.vip.VIPOrderRecord; |
| | | import com.yeshi.buwan.service.inter.LoginUserService; |
| | | import com.yeshi.buwan.service.inter.vip.VIPService; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import com.yeshi.buwan.vo.vip.UserVIPInfoVO; |
| | | import com.yeshi.buwan.web.tag.PageEntity; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.yeshi.utils.JsonUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.PrintWriter; |
| | | import java.lang.reflect.Type; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @Resource |
| | | private VIPService vipService; |
| | | |
| | | @Resource |
| | | private LoginUserService loginUserService; |
| | | |
| | | private Gson getGson() { |
| | | |
| | | Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | | Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | | @Override |
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) { |
| | | if (value == null) { |
| | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/vipUserList", method = RequestMethod.POST) |
| | | public String vipUserList(Boolean vip,String uid, int page) { |
| | | public void vipUserList(Boolean vip, String uid, int page, PrintWriter out) { |
| | | Date minDate = null; |
| | | Date maxDate = null; |
| | | if (vip != null) { |
| | |
| | | maxDate = new Date(); |
| | | } |
| | | } |
| | | List<UserVIPInfo> list = new ArrayList<>(); |
| | | long count = 0; |
| | | if (!StringUtil.isNullOrEmpty(uid)) { |
| | | UserVIPInfo vipInfo = vipService.getVIPInfo(uid); |
| | | if (vipInfo != null) { |
| | | list.add(vipInfo); |
| | | count = 1; |
| | | } |
| | | } else { |
| | | list = vipService.listVIPUser(minDate, maxDate, page, Constant.pageCount); |
| | | count = vipService.countVIPUser(minDate, maxDate); |
| | | } |
| | | |
| | | List<UserVIPInfo> list = vipService.listVIPUser(minDate, maxDate, page, Constant.pageCount); |
| | | long count = vipService.countVIPUser(minDate, maxDate); |
| | | List<UserVIPInfoVO> voList = new ArrayList<>(); |
| | | for (UserVIPInfo vipInfo : list) { |
| | | UserVIPInfoVO vo = new UserVIPInfoVO(); |
| | | vo.setCreateTime(vipInfo.getCreateTime()); |
| | | vo.setExpireDate(vipInfo.getExpireDate()); |
| | | vo.setUpdateTime(vipInfo.getUpdateTime()); |
| | | LoginUser loginUser = loginUserService.getLoginUser(vipInfo.getUid()); |
| | | vo.setUser(loginUser); |
| | | voList.add(vo); |
| | | } |
| | | |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("pageEntity", new PageEntity(page, Constant.pageCount,(int)count)); |
| | | data.put("list", getGson().toJson(list)); |
| | | return JsonUtil.loadTrueResult(data); |
| | | data.put("list", getGson().toJson(voList)); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/vipOrderList", method = RequestMethod.POST) |
| | | public String vipOrderList(Boolean pay, String uid, int page) { |
| | | public void vipOrderList(Boolean pay, String uid, int page, PrintWriter out) { |
| | | if (StringUtil.isNullOrEmpty(uid)) { |
| | | uid = null; |
| | | } |
| | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("pageEntity", new PageEntity(page, Constant.pageCount,(int)count)); |
| | | data.put("list", getGson().toJson(list)); |
| | | return JsonUtil.loadTrueResult(data); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | | |
| | |
| | | if (StringUtil.isNullOrEmpty(method)) |
| | | return; |
| | | |
| | | if (method.equalsIgnoreCase("getConfig")) {// 获取用户编号 |
| | | if (method.equalsIgnoreCase("getConfig")) {// 获取配置信息 |
| | | configParser.getConfig(acceptData, request, out); |
| | | } |
| | | |
| | |
| | | VIPOrderRecord record = new VIPOrderRecord(); |
| | | record.setUid(loginUid); |
| | | record.setType(vipPrice.getType()); |
| | | record.setMoney(vipPrice.getPrice()); |
| | | record.setMoney(vipPrice.getActualPrice()); |
| | | record.setPayWay(payWay); |
| | | record.setState(VIPOrderRecord.STATE_NOT_PAY); |
| | | record.setIpInfo(IPUtil.getRemotIP(request) + ":" + IPUtil.getRemotePort(request)); |
| | | try { |
| | | vipService.addVIPRecord(record); |
| | | } catch (VIPException e) { |
| | |
| | | .PAY_WAY_WX: { |
| | | //生成微信支付订单 |
| | | try { |
| | | String payUrl = VipUtil.createWXOrder(record.getId(), ip, orderNo, vipPrice.getPrice(), "影视大全VIP-" + vipPrice.getType().getName()); |
| | | String payUrl = VipUtil.createWXOrder(record.getId(), ip, orderNo, vipPrice.getActualPrice(), "影视大全VIP-" + vipPrice.getType().getName()); |
| | | org.json.JSONObject data = new org.json.JSONObject(); |
| | | data.put("payUrl", payUrl); |
| | | data.put("payWay", payWay); |
| | |
| | | VideoType vt = new VideoType(Constant.VIDEO_TYPE_VIP); |
| | | vt.setName("VIP"); |
| | | vt.setShow("1"); |
| | | vt.setIcon("https://hbimg.huabanimg.com/12834704bb4aa39342c2fb51e0c644181b13997b70eb-CqlE1I_fw658/format/webp"); |
| | | vt.setIcon("https://hbimg.huabanimg.com/4690ea8f8144f3d46c11e417c77daa5debcb71f9201f-WpAbfw_fw658/format/jpg"); |
| | | sty.setType(vt); |
| | | boolean isC = false; |
| | | for (SuperVideoType svt : list) { |
| | |
| | | |
| | | String parentId = request.getParameter("ParentId"); |
| | | |
| | | //是否包含VIP的分类 |
| | | boolean containsVIPType = false; |
| | | try { |
| | | List<Integer> vipTypeList = Arrays.asList(Constant.vipTypes); |
| | | containsVIPType = vipTypeList.contains(Integer.parseInt(parentId)); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | if (StringUtil.isNullOrEmpty(parentId)) { |
| | | out.print(JsonUtil.loadFalseJson("请上传ParentId")); |
| | | return; |
| | |
| | | list.remove(0); |
| | | } |
| | | |
| | | } else if ((Constant.VIDEO_TYPE_VIP + "").equalsIgnoreCase(parentId)) { |
| | | } else if (containsVIPType) { |
| | | //VIP分类 |
| | | |
| | | //VIP根分类 |
| | | if (Constant.VIDEO_TYPE_VIP == Integer.parseInt(parentId)) { |
| | | VideoType type = new VideoType(Constant.VIDEO_TYPE_VIP); |
| | | type.setName("全部"); |
| | | type.setShow("1"); |
| | |
| | | // type.setShow("1"); |
| | | // type.setCategoryType("area"); |
| | | // list.add(type); |
| | | } else { |
| | | VideoType type = new VideoType(Integer.parseInt(parentId)); |
| | | type.setName("全部"); |
| | | type.setShow("1"); |
| | | type.setCategoryType("area"); |
| | | list.add(type); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | List<VideoType> clist = classService.getFirstTypeList(parentId); |
| | |
| | | if ("310".equals(typeid)) { // 310做的特殊处理:前端处理的是HomeAd,所有需要返回homeAD的形式 |
| | | Object vi = json.get("VideoInfo"); |
| | | json.put("Video", vi); |
| | | //设置banner的比例 |
| | | object.put("bannerSizeRate", "0.56"); |
| | | } |
| | | json.put("LinkType", "1"); |
| | | array.add(json); |
| | |
| | | ad.put("videoSearch", adConfig == null ? "" : adConfig.getType()); |
| | | adNew.put("videoSearch", gson.toJson(adConfig)); |
| | | |
| | | //pptv免广告激励视频 |
| | | adConfig = getAdShowType("pptv_no_ad_reward", acceptData.getChannel(), acceptData.getVersion(), map); |
| | | if (hiddenAll) |
| | | adConfig = null; |
| | | adNew.put("pptvNoAdReward", gson.toJson(adConfig)); |
| | | |
| | | data.put("ad", ad); |
| | | data.put("adNew", adNew); |
| | | //PPTV免广告权益时长,暂时设置为3小时 |
| | | data.put("pptvNoAdRewardHour", 3); |
| | | |
| | | |
| | | out.print(JsonUtil.loadTrueJson(data.toString())); |
| | | } |
| | | |
| | |
| | | if (!StringUtil.isNullOrEmpty(ad.getParams())) { |
| | | ad.setParams(ad.getParams().replace("\"", "\\" + "\"")); |
| | | } |
| | | |
| | | // 3.4.7以上的版本才可以用 |
| | | // com.weikou.beibeivideo.ui.mine.FXBrowserActivity |
| | | if ("com.weikou.beibeivideo.ui.mine.FXBrowserActivity".equalsIgnoreCase(ad.getClazz()) |
| | | && acceptData.getVersion() < 71) |
| | | ad.setClazz("com.weikou.beibeivideo.ui.mine.BrowserActivity"); |
| | | else |
| | | ad.setClazz("com.weikou.beibeivideo.ui.mine.FXBrowserActivity"); |
| | | } |
| | | object.put("count", (new StringBuilder(String.valueOf(list.size()))).toString()); |
| | | JSONArray array = new JSONArray(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | public HomeType convertHomeVideoList(HomeType type) { |
| | | List<VideoInfo> vlist = new ArrayList<VideoInfo>(); |
| | | List<HomeVideo> list = type.getHomeVideoList(); |
| | |
| | | if (daoQuery.uid != null) { |
| | | hql += " and r.uid=" + daoQuery.uid; |
| | | } |
| | | |
| | | hql += " order by r.createTime desc"; |
| | | return hql; |
| | | } |
| | | |
| | |
| | | private String params; |
| | | @Expose |
| | | private boolean hasMore; |
| | | |
| | | //是否需要填充广告 |
| | | @Expose |
| | | private boolean needAd; |
| | | |
| | | @Expose |
| | | private String iosControl; |
| | | @Expose |
| | |
| | | @Expose |
| | | private int number;// 显示多少个 |
| | | |
| | | |
| | | public boolean isNeedAd() { |
| | | return needAd; |
| | | } |
| | | |
| | | public void setNeedAd(boolean needAd) { |
| | | this.needAd = needAd; |
| | | } |
| | | |
| | | private SystemInfo system; |
| | | |
| | | private VideoType videoType; //20170914 |
| | |
| | | @Transient |
| | | private int free; |
| | | |
| | | |
| | | //0-普清 1-高清 |
| | | @Expose |
| | | @Transient |
| | | private int definition; |
| | | |
| | | @Transient |
| | | private VideoResourceMapExtraInfo videoResourceMapExtraInfo; |
| | | |
| | |
| | | public void setFree(int free) { |
| | | this.free = free; |
| | | } |
| | | |
| | | |
| | | public int getDefinition() { |
| | | return definition; |
| | | } |
| | | |
| | | public void setDefinition(int definition) { |
| | | this.definition = definition; |
| | | } |
| | | } |
| | |
| | | package com.yeshi.buwan.domain.video; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | |
| | | //专辑视频映射 |
| | | @Document(collection="albumVideoMap") |
| | | public class AlbumVideoMap { |
| | | @Id |
| | | private String id; |
| | | private String videoId;//视频ID |
| | | private long rootVideoType;//根视频类型 |
| | | private int videoCount;//视频数量 |
| | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | } |
| | |
| | | private Integer payWay; |
| | | //支付金额 |
| | | private BigDecimal payMoney; |
| | | |
| | | private String ipInfo; |
| | | |
| | | //付款时间 |
| | | private Date payTime; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | |
| | | |
| | | //会员开始时间 |
| | | private Date vipStartTime; |
| | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | |
| | | public String getIpInfo() { |
| | | return ipInfo; |
| | | } |
| | | |
| | | public void setIpInfo(String ipInfo) { |
| | | this.ipInfo = ipInfo; |
| | | } |
| | | } |
| | |
| | | private VIPPriceType type; |
| | | @Expose |
| | | private BigDecimal price; |
| | | //原始价格 |
| | | @Expose |
| | | private BigDecimal actualPrice; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | |
| | | public void setShow(Boolean show) { |
| | | this.show = show; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getId() { |
| | |
| | | public void setPptvGoodsNo(String pptvGoodsNo) { |
| | | this.pptvGoodsNo = pptvGoodsNo; |
| | | } |
| | | |
| | | public BigDecimal getActualPrice() { |
| | | return actualPrice; |
| | | } |
| | | |
| | | public void setActualPrice(BigDecimal actualPrice) { |
| | | this.actualPrice = actualPrice; |
| | | } |
| | | } |
| | |
| | | package com.yeshi.buwan.domain.web; |
| | | |
| | | public class StatisticXY { |
| | | import java.io.Serializable; |
| | | |
| | | public class StatisticXY implements Serializable { |
| | | |
| | | private long y; |
| | | private String time; |
| | |
| | | videoType = VideoConstant.VIDEO_CATEGORY_DONGMAN; |
| | | break; |
| | | default: |
| | | return null; |
| | | } |
| | | |
| | | return (long) videoType; |
| | |
| | | String score = series.getScore(); |
| | | |
| | | String tag = ""; |
| | | VideoType videoType = new VideoType(getVideoType(series)); |
| | | Long videoTypeId = getVideoType(series); |
| | | if (videoTypeId == null) |
| | | return null; |
| | | VideoType videoType = new VideoType(videoTypeId); |
| | | |
| | | |
| | | //电影 |
| | | if (videoType.getId() == VideoConstant.VIDEO_CATEGORY_DIANYING) { |
| | |
| | | |
| | | import java.math.BigInteger; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | //清除数据库中的死数据 |
| | | @Service |
| | | public class ClearService { |
| | | |
| | | |
| | | private final String[] videoTables = new String[]{"wk_category_video", "wk_resource_video", "wk_video_attention", |
| | | "wk_video_banquan_video", "wk_video_banquan_webvideo", "wk_video_collection", "wk_video_comment", |
| | | "wk_video_comment2", "wk_video_getscore_collect", "wk_video_homead", "wk_video_homevideo", |
| | | "wk_video_hotstar_video", "wk_video_iqiyi", "wk_video_letv", "wk_video_play_statistics", |
| | | "wk_video_pptv", "wk_video_sohu", "wk_video_special_video", "wk_video_youku", "wk_video_youku_dj"}; |
| | | |
| | | @Resource |
| | | private VideoInfoDao videoInfoDao; |
| | | |
| | |
| | | // 清楚依赖VideoInfo的数据 |
| | | @SuppressWarnings("rawtypes") |
| | | public void clearDependVideo() { |
| | | String[] tables = new String[]{"wk_category_video", "wk_resource_video", "wk_video_attention", |
| | | "wk_video_banquan_video", "wk_video_banquan_webvideo", "wk_video_collection", "wk_video_comment", |
| | | "wk_video_comment2", "wk_video_getscore_collect", "wk_video_homead", "wk_video_homevideo", |
| | | "wk_video_hotstar_video", "wk_video_iqiyi", "wk_video_letv", "wk_video_play_statistics", |
| | | "wk_video_pptv", "wk_video_sohu", "wk_video_special_video", "wk_video_youku", "wk_video_youku_dj"}; |
| | | |
| | | for (String table : tables) { |
| | | |
| | | for (String table : videoTables) { |
| | | final String sql = String.format( |
| | | "SELECT vv.id FROM `%s` vv LEFT JOIN wk_video_video v ON v.`id`=vv.`videoid` WHERE v.`id` IS NULL", |
| | | table); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 清理SQL数据库依赖视频 |
| | | * |
| | | * @param videoId |
| | | */ |
| | | public void clearDependVideo(final String videoId) { |
| | | clearDependVideo(Arrays.asList(new String[]{videoId})); |
| | | } |
| | | |
| | | |
| | | public void clearDependVideo(final List<String> videoIds) { |
| | | videoInfoDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | session.getTransaction().begin(); |
| | | List<String> ors = new ArrayList<>(); |
| | | for (String videoId : videoIds) { |
| | | ors.add("videoid=" + videoId); |
| | | } |
| | | |
| | | for (String table : videoTables) |
| | | session.createSQLQuery( |
| | | String.format("delete from %s where %s", table, org.yeshi.utils.StringUtil.concat(ors, " or "))) |
| | | .executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | return null; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 清除无效的爱奇艺视频 |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | |
| | | resourceWhere = resourceWhere.substring(0, resourceWhere.length() - 2); |
| | | List resultList = session |
| | | .createSQLQuery( |
| | | "SELECT ht.`id` as htid,ht.`name` as htname,ht.`columns` as htcolumns ,ht.`hasmore`,ht.`activity` ,ht.`params` ,ht.`ioscontrol`,ht.number,hvideo.id as hvid,hvideo.`videoid` AS hvvideoid,hvideo.`picture`as hvpicture ,hvideo.`tag` as hvtag, v.`id` as vid ,v.`picture` as vpicture ,v.`name` as vname ,v.`tag` as vtag ,v.`hpicture` as vhpicture ,v.`latest_hpicture` as vlatest_hpicture ,v.`watchcount` as vwatchcount,v.commentcount,ht.icon as hicon,ht.orderby as htorder,hvideo.orderby as hvorder FROM (SELECT hv.* FROM `wk_resource_video` rv LEFT JOIN `wk_video_homevideo` hv ON rv.`videoid` =hv.`videoid` LEFT JOIN `wk_video_video` v ON v.`id` =hv.`videoid` LEFT JOIN `wk_video_banquan_video` bv ON bv.`videoid`=hv.`videoid` AND bv.`detailsystemid`=" |
| | | "SELECT ht.`id` as htid,ht.`name` as htname,ht.`columns` as htcolumns ,ht.`hasmore`,ht.`activity` ,ht.`params` ,ht.`ioscontrol`,ht.number,hvideo.id as hvid,hvideo.`videoid` AS hvvideoid,hvideo.`picture`as hvpicture ,hvideo.`tag` as hvtag, v.`id` as vid ,v.`picture` as vpicture ,v.`name` as vname ,v.`tag` as vtag ,v.`hpicture` as vhpicture ,v.`latest_hpicture` as vlatest_hpicture ,v.`watchcount` as vwatchcount,v.commentcount,ht.icon as hicon,ht.orderby as htorder,hvideo.orderby as hvorder,need_ad FROM (SELECT hv.* FROM `wk_resource_video` rv LEFT JOIN `wk_video_homevideo` hv ON rv.`videoid` =hv.`videoid` LEFT JOIN `wk_video_video` v ON v.`id` =hv.`videoid` LEFT JOIN `wk_video_banquan_video` bv ON bv.`videoid`=hv.`videoid` AND bv.`detailsystemid`=" |
| | | + detailSystem |
| | | + " AND bv.`show`=1 LEFT JOIN `wk_video_hometype` ht ON ht.id=hv.hometype WHERE (hv.`id`>0 AND v.`show` =1 AND ht.vtid='" |
| | | + vtid + "' AND (" + resourceWhere |
| | |
| | | ht.setNumber(Integer.parseInt(obj[7] + "")); |
| | | |
| | | ht.setOrderby(obj[21] + ""); |
| | | ht.setNeedAd(Boolean.parseBoolean(obj[23]+"")); |
| | | |
| | | HomeVideo hv = new HomeVideo(); |
| | | hv.setId(obj[8] + ""); |
| | |
| | | |
| | | if (videoType == 0 && commonSolrPage > 0) { |
| | | //搜索原始的 |
| | | try { |
| | | List<VideoInfo> solrList = SolrUtil.search(key, commonSolrPage); |
| | | for (VideoInfo vi : solrList) { |
| | | if (!solrAlbumVids.contains(vi.getId())) { |
| | | localList.add(vi); |
| | | } |
| | | } |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | } |
| | | System.out.println("搜索耗时:" + (System.currentTimeMillis() - startt)); |
| | | |
| | |
| | | @Resource |
| | | private VideoResourceService videoResourceService; |
| | | |
| | | @Resource |
| | | private ClearService clearService; |
| | | |
| | | public VideoInfo getVideoInfo(String vid) { |
| | | return videoInfoDao.find(VideoInfo.class, vid); |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据名称与主演 |
| | | * |
| | |
| | | import javax.persistence.ManyToOne; |
| | | import javax.persistence.OneToMany; |
| | | |
| | | import com.yeshi.buwan.domain.video.AlbumVideoMap; |
| | | import com.yeshi.buwan.service.inter.juhe.AlbumVideoMapService; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | |
| | | private VideoTypeDao videoTypeDao; |
| | | @Resource |
| | | private VideoDetailInfoDao videoDetailInfoDao; |
| | | |
| | | @Resource |
| | | private ClearService clearService; |
| | | |
| | | /** |
| | | * 主键查询某一个视频的信息 |
| | |
| | | |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | |
| | | @Resource |
| | | private AlbumVideoMapService albumVideoMapService; |
| | | |
| | | /** |
| | | * 删除视频 |
| | | * |
| | | * @param videoId |
| | | */ |
| | | public void deleteVideo(final String videoId) { |
| | | try { |
| | | videoInfoDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | try { |
| | | List<HomeVideo> hlist = session.createQuery("from HomeVideo v where v.video.id=?") |
| | | .setParameter(0, videoId).list(); |
| | | session.getTransaction().begin(); |
| | | JuheVideoUtil.clearData(session, videoId); |
| | | if (hlist != null && hlist.size() > 0) { |
| | | for (HomeVideo hv : hlist) { |
| | | session.delete(hv); |
| | | } |
| | | } |
| | | // 删除收藏 |
| | | session.createSQLQuery("delete from wk_video_collection where videoid=" + videoId) |
| | | .executeUpdate(); |
| | | |
| | | List<VideoBanQuanVideo> qlist = session |
| | | .createQuery("from VideoBanQuanVideo c where c.info.id=?").setParameter(0, videoId) |
| | | .list(); |
| | | if (qlist != null && qlist.size() > 0) { |
| | | for (VideoBanQuanVideo c : qlist) |
| | | session.delete(c); |
| | | } |
| | | |
| | | List<HomeAd> hdList = session |
| | | .createQuery("from HomeAd ha where ha.linkType=1 and ha.video.id=?") |
| | | .setParameter(0, videoId).list(); |
| | | |
| | | for (HomeAd had : hdList) { |
| | | List<SuperHomeAd> shadL = session |
| | | .createQuery("from SuperHomeAd shad where shad.homeAd.id=?") |
| | | .setParameter(0, had.getId()).list(); |
| | | for (SuperHomeAd shad : shadL) |
| | | session.delete(shad); |
| | | session.delete(had); |
| | | } |
| | | |
| | | // 专题视频删除 |
| | | List<SpecialVideo> svList = session.createQuery("from SpecialVideo ha where ha.video.id=?") |
| | | .setParameter(0, videoId).list(); |
| | | |
| | | for (SpecialVideo sv : svList) { |
| | | List<SuperSpecial> shadL = session |
| | | .createQuery("from SuperSpecial shad where shad.special.id=?") |
| | | .setParameter(0, sv.getSpecial().getId()).list(); |
| | | for (SuperSpecial shad : shadL) |
| | | session.delete(shad); |
| | | session.delete(sv); |
| | | } |
| | | |
| | | // 合集视频删除 |
| | | List<VideoIntersectionVideo> viList = session |
| | | .createQuery("from VideoIntersectionVideo ha where ha.video.id=?") |
| | | .setParameter(0, videoId).list(); |
| | | for (VideoIntersectionVideo sv : viList) { |
| | | session.delete(sv); |
| | | } |
| | | |
| | | // 视频删除 |
| | | List<VideoDetailInfo> list = session.createQuery("from VideoDetailInfo v where v.video.id=?") |
| | | .setParameter(0, videoId).list(); |
| | | // 删除视频的详细信息 |
| | | for (VideoDetailInfo object : list) { |
| | | // 删除链接信息 |
| | | for (VideoUrl vu : object.getUrls()) |
| | | session.delete(vu); |
| | | // 删除详情 |
| | | session.delete(object); |
| | | } |
| | | |
| | | // 删除视频源信息 |
| | | session.createSQLQuery("delete from wk_video_video where id=?").setParameter(0, videoId) |
| | | .executeUpdate(); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | session.getTransaction().rollback(); |
| | | } |
| | | return null; |
| | | } |
| | | }); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | //清除sql数据表相关依赖 |
| | | clearService.clearDependVideo(videoId); |
| | | //清除MongoDB相关依赖 |
| | | albumVideoMapService.deleteByVideoId(videoId); |
| | | //更新搜索引擎数据 |
| | | CMQManager.getInstance().addSolrMsg(videoId); |
| | | videoInfoDao.delete(new VideoInfo(videoId)); |
| | | } |
| | | |
| | | // 更新视频的观看数 |
| | |
| | | public AlbumVideoMap selectByVideoId(String videoId) { |
| | | return albumVideoMapDao.selectByVideoId(videoId); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByVideoId(String videoId) { |
| | | albumVideoMapDao.deleteByPrimaryKey(videoId); |
| | | } |
| | | } |
| | |
| | | |
| | | //加入专辑视频映射 |
| | | AlbumVideoMap map = new AlbumVideoMap(); |
| | | map.setId(newVideoInfo.getId()); |
| | | map.setCreateTime(new Date()); |
| | | map.setVideoId(newVideoInfo.getId()); |
| | | map.setRootVideoType(newVideoInfo.getVideoType().getId()); |
| | |
| | | |
| | | //加入专辑视频映射 |
| | | AlbumVideoMap map = new AlbumVideoMap(); |
| | | map.setId(newVideoInfo.getId()); |
| | | map.setCreateTime(new Date()); |
| | | map.setVideoId(newVideoInfo.getId()); |
| | | map.setRootVideoType(newVideoInfo.getVideoType().getId()); |
| | |
| | | |
| | | import com.yeshi.buwan.dao.VideoInfoDao; |
| | | import com.yeshi.buwan.dao.VideoResourceMapExtraInfoDao; |
| | | import com.yeshi.buwan.dao.VideoTypeDao; |
| | | 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.video.AlbumVideoMapDao; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoResourceMapExtraInfo; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | | import com.yeshi.buwan.domain.video.AlbumVideoMap; |
| | | import com.yeshi.buwan.dto.mq.PPTVMQMsg; |
| | | import com.yeshi.buwan.pptv.PPTVQuery; |
| | |
| | | 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.imp.VideoTypeService; |
| | | import com.yeshi.buwan.service.inter.juhe.PPTVService; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private CategoryVideoService categoryVideoService; |
| | | |
| | | @Resource |
| | | private VideoTypeService videoTypeService; |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoDao videoResourceMapExtraInfoDao; |
| | | |
| | | |
| | |
| | | return; |
| | | |
| | | VideoInfo newVideoInfo = PPTVUtil.convertToVideoInfo(series); |
| | | if (newVideoInfo == null) |
| | | return; |
| | | // if (newVideoInfo.getVideoType() != null) { |
| | | // newVideoInfo.setVideoType(videoTypeService.getVideoType(newVideoInfo.getVideoType().getId())); |
| | | // } |
| | | VideoPPTVMap videoPPTV = videoPPTVMapDao.selectByInfoId(series.getInfoID()); |
| | | if (videoPPTV != null) {//渠道视频已经存在 |
| | | VideoInfo videoInfo = videoInfoService.getVideoInfo(videoPPTV.getVideoId() + ""); |
| | |
| | | |
| | | //加入专辑视频映射 |
| | | AlbumVideoMap map = new AlbumVideoMap(); |
| | | map.setId(newVideoInfo.getId()); |
| | | map.setCreateTime(new Date()); |
| | | map.setVideoId(newVideoInfo.getId()); |
| | | map.setRootVideoType(newVideoInfo.getVideoType().getId()); |
| | |
| | | |
| | | @Override |
| | | public void addPrice(VIPPrice price) throws VIPException { |
| | | if (price == null || price.getPrice() == null || price.getType() == null) { |
| | | if (price == null || price.getActualPrice() == null || price.getType() == null) { |
| | | throw new VIPException(1, "参数不完整"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (price.getOrder() == null) { |
| | | price.setOrder(price.getPrice().multiply(new BigDecimal(100)).intValue()); |
| | | price.setOrder(price.getActualPrice().multiply(new BigDecimal(100)).intValue()); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.yeshi.buwan.domain.video.AlbumVideoMap; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | public interface AlbumVideoMapService { |
| | |
| | | */ |
| | | public AlbumVideoMap selectByVideoId(String videoId); |
| | | |
| | | |
| | | @Resource |
| | | public void deleteByVideoId(String videoId); |
| | | |
| | | } |
| | |
| | | |
| | | public static boolean IsOutNet = true;// 是否为外网 |
| | | |
| | | public static boolean JobTasker = true; |
| | | public static boolean JobTasker = false; |
| | | |
| | | public static int pageCount = 20; |
| | | public static int HOT_SEARCH_COUNT = 20; |
| | |
| | | |
| | | public static InputStream getAsInputStream(String url) { |
| | | HttpClient client = new HttpClient(); |
| | | client.getHttpConnectionManager().getParams().setConnectionTimeout(5000); |
| | | GetMethod method = new GetMethod(url); |
| | | try { |
| | | client.executeMethod(method); |
| | |
| | | return ip; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取远程端口 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static int getRemotePort(HttpServletRequest request) { |
| | | return request.getRemotePort(); |
| | | } |
| | | |
| | | public static String getIPContry(String ip) { |
| | | IPInfo ipInfo = getIPInfo(ip); |
| | | return ipInfo == null ? "" : ipInfo.getCountry(); |
| | |
| | | solrDataManager.saveOrUpdate(videoInfo); |
| | | } else |
| | | solrDataManager.deleteById(videoInfo.getId()); |
| | | } else {//视频已经删除 |
| | | solrDataManager.deleteById(solrVideo.getId()); |
| | | } |
| | | CMQManager.getInstance().deleteSolrMsg(solrVideo.getHandler()); |
| | | } catch (Exception e) { |
| | |
| | | } |
| | | CMQManager.getInstance().deletePPTVSeriesUpdateMsg(pptvmqMsg.getHandler()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | logger.error("PPTV添加到视频出错:" + e.getMessage()); |
| | | logger.error("infoId:" + pptvmqMsg.getInfoId()); |
| | | } |
| | |
| | | de.setWatchCount(info.getWatchCount()); |
| | | de.setYear(info.getYear()); |
| | | de.setShare(info.getShare()); |
| | | de.setCanSave(info.getCanSave()); |
| | | de.setCanSave(info.getCanSave()==null?false:info.getCanSave()); |
| | | de.setResourceList(info.getResourceList()); |
| | | de.setPlayPicture(info.getPlayPicture()); |
| | | de.setShowType(info.getShowType()); |
| | |
| | | import com.yeshi.buwan.domain.solr.SolrAlbumVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | | import com.yeshi.buwan.pptv.PPTVUtil; |
| | | |
| | | public class VideoInfoFactory { |
| | | |
| | |
| | | video.setName(solrVideo.getName()); |
| | | video.setUpdatetime(solrVideo.getUpdatetime()); |
| | | video.setVideoType(new VideoType(solrVideo.getRootVideoType())); |
| | | //PPTV来源需要返回高清标识 |
| | | if (solrVideo.getResourceIds()!=null&&solrVideo.getResourceIds().contains(PPTVUtil.RESOURCE_ID + "")) |
| | | video.setDefinition(1); |
| | | else |
| | | video.setDefinition(0); |
| | | |
| | | return video; |
| | | } |
New file |
| | |
| | | package com.yeshi.buwan.vo.vip; |
| | | |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class UserVIPInfoVO { |
| | | private LoginUser user; |
| | | //到期时间 |
| | | private Date expireDate; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | public LoginUser getUser() { |
| | | return user; |
| | | } |
| | | |
| | | public void setUser(LoginUser user) { |
| | | this.user = user; |
| | | } |
| | | |
| | | public Date getExpireDate() { |
| | | return expireDate; |
| | | } |
| | | |
| | | public void setExpireDate(Date expireDate) { |
| | | this.expireDate = expireDate; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | <property name="iosControl" column="ioscontrol" type="string"></property> |
| | | <property name="params" type="string"></property> |
| | | <property name="hasMore" column="hasmore" type="boolean"></property> |
| | | <property name="needAd" column="need_ad" type="boolean"></property> |
| | | <property name="number" column="number" type="int"></property> |
| | | <many-to-one name="admin" column="adminid"></many-to-one> |
| | | <property name="icon" type="string"></property> |
| | |
| | | <property name="vipStartTime" column="vip_start_time" type="timestamp"></property> |
| | | <property name="vipEndTime" column="vip_end_time" type="timestamp"></property> |
| | | |
| | | <property name="ipInfo" column="ip_info" type="string"></property> |
| | | |
| | | </class> |
| | | |
| | | |
| | |
| | | <beans xmlns="http://www.springframework.org/schema/beans" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xmlns:solr="http://www.springframework.org/schema/data/solr" |
| | | xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd |
| | | http://www.springframework.org/schema/data/solr http://www.springframework.org/schema/data/solr/spring-solr-2.0.xsd"> |
| | | xsi:schemaLocation="http://www.springframework.org/schema/data/solr |
| | | http://www.springframework.org/schema/data/solr/spring-solr-2.0.xsd |
| | | http://www.springframework.org/schema/beans |
| | | http://www.springframework.org/schema/beans/spring-beans.xsd"> |
| | | |
| | | <solr:solr-client id="client" url="${solr.url}"></solr:solr-client> |
| | | |
| | |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| | | <title>评论管理</title> |
| | | <title>会员订单</title> |
| | | <link href="css/bootstrap.min.css" rel="stylesheet"> |
| | | <link href="css/maincontent.css" rel="stylesheet"> |
| | | <!--[if lt IE 9]> |
| | | <script src="js/html5shiv.js"></script> |
| | | <script src="js/respond.min.js"></script> |
| | | <style> |
| | | td { |
| | | line-height: 105px; |
| | | } |
| | | |
| | | tr { |
| | | line-height: 105px !important; |
| | | } |
| | | |
| | | </style> |
| | | <![endif]--> |
| | | </head> |
| | | |
| | |
| | | <td> |
| | | <form class="form-inline" role="form"> |
| | | <div class="form-group" role="search"> |
| | | <select class="form-control vip-type"> |
| | | <option value="0">全部</option> |
| | | <option value="1" selected>已支付</option> |
| | | <option value="2">未支付</option> |
| | | </select> |
| | | |
| | | <input type="text" class="form-control" style="width: 200px;" |
| | | placeholder="用户昵称/评论关键字"> |
| | | placeholder="用户ID"> |
| | | |
| | | </div> |
| | | <button type="button" class="btn btn-default search">搜索</button> |
| | | <button type="button" class="btn btn-default search" v-on:click="search">搜索</button> |
| | | </form> |
| | | </td> |
| | | <td> |
| | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | <div class="bottom"> |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"><a href="#">«</a></li> |
| | | <li><a href="#" class="next">1</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" id="customPage" |
| | | placeholder="页数"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="zhuti"> |
| | | <div class="zhutisousuo"> |
| | | <table class="table"> |
| | | <thead> |
| | | <tr> |
| | | <th width="7%">选择</th> |
| | | <th width="7%">编号</th> |
| | | <th width="15%">用户ID</th> |
| | | <th width="30%">内容</th> |
| | | <th width="10%">视频ID</th> |
| | | <th width="15%">创建时间</th> |
| | | <th width="7%">删除</th> |
| | | <th width="5%">订单ID</th> |
| | | <th width="5%">用户ID</th> |
| | | <th width="5%">订单金额</th> |
| | | <th width="5%">订单状态</th> |
| | | <th width="8%">付款金额</th> |
| | | <th width="8%">付款方式</th> |
| | | <th width="10%">付款时间</th> |
| | | <th width="10%">会员开始时间</th> |
| | | <th width="10%">会员结束时间</th> |
| | | <th width="10%">订单创建时间</th> |
| | | <th width="10%">订单修改时间</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | <div class="liebiao"> |
| | | <table class="table"> |
| | | <tbody> |
| | | <tr style="display: none;"> |
| | | <td width="7%"> |
| | | <div class="xuanze"> |
| | | <label> <input type="checkbox" value="#"> |
| | | </label> |
| | | <tr v-for="(item,index) in list" style="text-align: center; height: 105px;line-height: 105px;" |
| | | v-bind:style="{'background':index%2==0?'#EEEEEE':'#FFFFFF'}"> |
| | | <td width="5%"> |
| | | <div class="uid">{{item.id}}</div> |
| | | </td> |
| | | <td width="5%"> |
| | | <div>{{item.uid}}</div> |
| | | </td> |
| | | <td width="5%"> |
| | | <div>¥{{item.money}}</div> |
| | | </td> |
| | | <td width="5%"> |
| | | <div v-bind:style="{'color': item.state==1?'green':'red' }">{{item.state==1?'已支付':'未支付'}} |
| | | </div> |
| | | </td> |
| | | <td width="7%"> |
| | | <div class="bianhao">623</div> |
| | | </td> |
| | | <td width="15%" style="text-align: center; line-height: 105px;"> |
| | | <div class="uid">123123</div> |
| | | </td> |
| | | <td width="31%"> |
| | | <div class="content">内容</div> |
| | | </td> |
| | | |
| | | <td width="11%"> |
| | | <div class=videoId>视频ID</div> |
| | | <td width="8%"> |
| | | <div v-if="item.payMoney>0">¥{{item.payMoney}}</div> |
| | | </td> |
| | | <td width="15%" style="text-align: center; line-height: 105px;" |
| | | class="createtime">2016-09-27 12:20</td> |
| | | <td width="7%"> |
| | | <div class="anniu" name="del"> |
| | | <img src="image/dustbin.png" data-toggle="modal" |
| | | data-target="#myModal"> |
| | | </div> |
| | | |
| | | <td width="10%"> |
| | | <div v-if="item.payWay>0">{{item.payWay==1?'支付宝':'微信'}}</div> |
| | | </td> |
| | | |
| | | <td width="10%"> |
| | | <div>{{item.payTime}}</div> |
| | | </td> |
| | | |
| | | <td width="10%"> |
| | | <div>{{item.vipStartTime}}</div> |
| | | </td> |
| | | |
| | | <td width="10%"> |
| | | <div>{{item.vipEndTime}}</div> |
| | | </td> |
| | | |
| | | <td width="10%"> |
| | | <div>{{item.createTime}}</div> |
| | | </td> |
| | | <td width="10%"> |
| | | <div>{{item.updateTime}}</div> |
| | | </td> |
| | | |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="qx"> |
| | | <div class="checkbox"> |
| | | <label> <input type="checkbox" class="checkAll"> |
| | | 全选 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <button class="btn btn-warning delAll" type="button">批量删除</button> |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"><a href="#">«</a></li> |
| | | <li><a href="#" class="next">1</a></li> |
| | | <li><a href="#" class="next">»</a></li> |
| | | </ul> |
| | | <div class="form-group"> |
| | |
| | | <script src="js/page.js"></script> |
| | | <script src="js/nav.js"></script> |
| | | <script src="js/common.js"></script> |
| | | <script src="js/vue.min.js"></script> |
| | | <script src="layer/layer.js"></script> |
| | | |
| | | <script> |
| | | var trHTML; |
| | | var appHTML; |
| | | $(function(){ |
| | | var $tbody = $(".liebiao > .table > tbody"); |
| | | trHTML = $tbody.html(); |
| | | appHTML = $tbody.find(".appnametd").html(); |
| | | getData(1); |
| | | |
| | | $(".checkAll").bind("click",function(){ |
| | | if(this.checked) { |
| | | $(".xuanze > label >input ").prop('checked', true) |
| | | var app = new Vue({ |
| | | el: "#neirong", |
| | | data: { |
| | | list: [], |
| | | count: 0, |
| | | pageEntity: { |
| | | pageIndex: 0, |
| | | totalCount: 0, |
| | | pageSize: 20, |
| | | }, |
| | | }, |
| | | methods: { |
| | | search: function () { |
| | | app.pageEntity.pageIndex = 0; |
| | | app.requestData(app.pageEntity.pageIndex + 1); |
| | | }, |
| | | requestData(page) { |
| | | var pay = $(".vip-type").val(); |
| | | if (pay == 0) { |
| | | pay = null; |
| | | } else if (pay == 1) { |
| | | pay = true; |
| | | } else { |
| | | $(".xuanze > label >input ").prop('checked', false) |
| | | pay = false; |
| | | } |
| | | var uid = $("input[type=text]").val(); |
| | | if (uid == '') |
| | | uid = null; |
| | | |
| | | $.post("api/vip/vipOrderList", {"page": page, "pay": pay, "uid": uid}, function (data) { |
| | | if (data.code == 0) { |
| | | fillPage(data.data.pageEntity, function (pageIndex) { |
| | | app.requestData(pageIndex); |
| | | }); |
| | | |
| | | |
| | | app.list = data.data.list; |
| | | |
| | | app.pageEntity = data.data.pageEntity; |
| | | } |
| | | }, 'json'); |
| | | }, |
| | | } |
| | | }); |
| | | |
| | | $(".search").bind("click",function(){ |
| | | getData(1); |
| | | }); |
| | | |
| | | $(".delAll").bind("click", function() { |
| | | var arr=""; |
| | | var selectAll = $(".xuanze label input").each(function(){ |
| | | var cur = $(this); |
| | | var ck= cur.context.checked; |
| | | if (ck) { |
| | | var val = cur.attr("key"); |
| | | arr += val + ","; |
| | | } |
| | | }); |
| | | if(arr==""){ |
| | | layer.msg("请先选择数据!"); |
| | | return; |
| | | } |
| | | layer.confirm('是否批量删除?', { |
| | | btn: ['否','是'] |
| | | }, function(index){ |
| | | layer.close(index); |
| | | return false; |
| | | }, function(){ |
| | | delComment(arr); |
| | | }); |
| | | |
| | | }); |
| | | app.requestData(1); |
| | | |
| | | }); |
| | | </script> |
| | | <script> |
| | | |
| | | function delComment(ids){ |
| | | $.post("api/comment/delComment", { "ids":ids}, function(data) { |
| | | if(data == "yes") { |
| | | layer.msg("删除成功!"); |
| | | getData(1); |
| | | }else{ |
| | | layer.msg("删除失败!"); |
| | | } |
| | | }, 'text'); |
| | | } |
| | | |
| | | function getData(pageIndex) { |
| | | var index= layer.load(1, { |
| | | shade: false |
| | | }); |
| | | var key = $(".form-inline > .form-group >input").val(); |
| | | var detailsystemId= $("select[name='select']").find("option:checked").attr("key"); |
| | | $.post("api/comment/commentList", { "pageIndex": pageIndex , "key":key }, function(data) { |
| | | layer.close(index); |
| | | if(data.code == 0) { |
| | | setData(data,pageIndex); |
| | | fillPage(data.pageEntity, function(page) { |
| | | getData(page); |
| | | }); |
| | | } |
| | | }, 'json'); |
| | | } |
| | | |
| | | function setData(data,pageIndex){ |
| | | pageIndex = pageIndex - 1; |
| | | var $tbody = $(".liebiao > .table > tbody"); |
| | | $(".liebiao tbody").empty(); |
| | | var pageSize = data.pageEntity.pageSize; |
| | | var totalCount = data.pageEntity.totalCount; |
| | | var len = (pageSize < totalCount - (pageIndex * pageSize)) ? pageSize : totalCount - (pageIndex * pageSize); |
| | | len = (pageIndex * pageSize) + len; |
| | | var ii = pageIndex * pageSize; |
| | | for(var mm = 0; ii < len && ii < totalCount; ii++,mm++) { |
| | | var id = data.commentList[mm].id; |
| | | var name = data.commentList[mm].user.Nickname+"("+data.commentList[mm].user.id+")"; |
| | | var content = data.commentList[mm].content; |
| | | var videoName= data.commentList[mm].video.name+"("+data.commentList[mm].video.id+")";; |
| | | var createtime = data.commentList[mm].createtime; |
| | | $tbody.append(trHTML); |
| | | $tbody.find("tr").eq(mm).css("display","table-row"); |
| | | var $curCheck = $tbody.find(".xuanze label input").eq(mm); |
| | | $curCheck.attr("key",id); |
| | | var $curCode = $tbody.find(".bianhao").eq(mm); |
| | | $curCode.text(id); |
| | | $tbody.find(".uid").eq(mm).text(name); |
| | | $tbody.find(".content").eq(mm).text(content); |
| | | $tbody.find(".videoId").eq(mm).text(videoName); |
| | | |
| | | var mydate = new Date(parseInt(createtime)).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " "); |
| | | $tbody.find(".createtime").eq(mm).text(mydate); |
| | | $tbody.find("tr").eq(mm).find(".anniu").attr("key",id); |
| | | } |
| | | |
| | | $("div[name='del']").bind("click",function(){ |
| | | var $obj=$(this); |
| | | layer.confirm('您确定要删除?', { |
| | | btn: ['否','是'] //按钮 |
| | | }, function(index){ |
| | | layer.close(index); |
| | | return false; |
| | | }, function(){ |
| | | var id = $obj.attr("key"); |
| | | delComment(id); |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | </script> |
| | | </body> |
| | | |
| | |
| | | <!--[if lt IE 9]> |
| | | <script src="js/html5shiv.js"></script> |
| | | <script src="js/respond.min.js"></script> |
| | | <style> |
| | | td{ |
| | | line-height: 105px; |
| | | } |
| | | |
| | | tr{ |
| | | line-height: 105px !important; |
| | | } |
| | | |
| | | </style> |
| | | <![endif]--> |
| | | </head> |
| | | |
| | |
| | | <td> |
| | | <form class="form-inline" role="form"> |
| | | <div class="form-group" role="search"> |
| | | <select class="form-control"> |
| | | <select class="form-control vip-type"> |
| | | <option value="0">全部</option> |
| | | <option value="1" selected>会员</option> |
| | | <option value="2">会员过期</option> |
| | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | <div class="bottom"> |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"><a href="#">«</a></li> |
| | | <li><a href="#" class="next">1</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" id="customPage" |
| | | placeholder="页数"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="zhuti"> |
| | | <div class="zhutisousuo"> |
| | | <table class="table"> |
| | | <thead> |
| | | <tr> |
| | | <th width="15%">用户ID</th> |
| | | <th width="10%">用户ID</th> |
| | | <th width="10%">昵称</th> |
| | | <th width="10%">头像</th> |
| | | <th width="30%">会员到期时间</th> |
| | | <th width="10%">创建时间</th> |
| | | <th width="15%">更新时间</th> |
| | |
| | | <div class="liebiao"> |
| | | <table class="table"> |
| | | <tbody> |
| | | <tr style="display: none;" v-for="item in list"> |
| | | <td width="15%" style="text-align: center; line-height: 105px;"> |
| | | <div class="uid">{{item.id}}</div> |
| | | <tr v-for="(item,index) in list" v-bind:style="{'background':index%2==0?'#EEEEEE':'#FFFFFF'}" style="text-align: center; height: 105px;line-height: 105px;"> |
| | | <td width="10%"> |
| | | <div class="uid">{{item.user.id}}</div> |
| | | </td> |
| | | <td width="31%"> |
| | | <div class="vipExpireDate">{{item.vipExpireDate}}</div> |
| | | <td width="10%"> |
| | | <div>{{item.user.Nickname}}</div> |
| | | </td> |
| | | <td width="10%"> |
| | | <div><img v-bind:src="item.user.portrait" |
| | | style="width:60px;height: 60px;border-radius: 60px;"/></div> |
| | | </td> |
| | | <td width="30%"> |
| | | <div class="vipExpireDate">{{item.expireDate}}</div> |
| | | </td> |
| | | |
| | | <td width="11%"> |
| | | <td width="10%"> |
| | | <div class="createTime">{{item.createTime}}</div> |
| | | </td> |
| | | <td width="11%"> |
| | | <td width="15%"> |
| | | <div class="updateTime">{{item.updateTime}}</div> |
| | | </td> |
| | | |
| | |
| | | <div class="page"> |
| | | <ul class="pagination"> |
| | | <li class="disabled pre"><a href="#">«</a></li> |
| | | <li><a href="#" class="next">1</a></li> |
| | | <li><a href="#" class="next">»</a></li> |
| | | </ul> |
| | | <div class="form-group"> |
| | |
| | | }, |
| | | methods: { |
| | | search: function () { |
| | | app.pageEntity.pageIndex = 0; |
| | | app.requestData(app.pageEntity.pageIndex + 1); |
| | | }, |
| | | requestData(page) { |
| | | |
| | | var vip = $("select").val(); |
| | | var vip = $(".vip-type").val(); |
| | | if (vip == 0) { |
| | | vip = null; |
| | | } else if (vip == 1) { |
| | |
| | | uid = null; |
| | | |
| | | $.post("api/vip/vipUserList", {"page": page, "vip": vip, "uid": uid}, function (data) { |
| | | layer.close(index); |
| | | if (data.code == 0) { |
| | | if (page == 1) |
| | | fillPage(data.data.pageEntity, function (pageIndex) { |
| | | app.requestData(pageIndex); |
| | | }); |
| | | |
| | | |
| | | app.list = data.data.list; |
| | | else { |
| | | app.list = app.list.concat(data.data.list); |
| | | } |
| | | |
| | | app.pageEntity = data.data.pageEntity; |
| | | } |
| | | }, 'json'); |
| | |
| | | } |
| | | }); |
| | | |
| | | app.requestData(1); |
| | | |
| | | }); |
| | | </script> |
| | | <script> |
| | |
| | | // iqiyi2Service.addToVideoInfo(album2); |
| | | // } |
| | | |
| | | Long qikuID = 8354256491713801L; |
| | | Long qikuID = 6376917677133701L; |
| | | |
| | | IqiyiAlbum2 album2 = iqiyi2Service.selectAlbumById(qikuID); |
| | | if (album2 != null) { |
| | |
| | | @Test |
| | | public void test6() { |
| | | try { |
| | | iqiyi2VideoUpdate.updateVideoByPlayerUrl("https://www.iqiyi.com/v_wy9ak8ezio.html?vfrm=pcw_dianshiju&vfrmblk=B&vfrmrst=fcs_2_p3"); |
| | | iqiyi2VideoUpdate.updateVideoByPlayerUrl("https://www.iqiyi.com/v_1nwrspklijs.html?vfrm=pcw_dianshiju&vfrmblk=B&vfrmrst=fcs_2_p1"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.yeshi.buwan.dao.HomeNoticeDao; |
| | | import com.yeshi.buwan.dao.video.AlbumVideoMapDao; |
| | | 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.VideoInfoService; |
| | | import com.yeshi.buwan.service.inter.juhe.AlbumVideoMapService; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumVideoDataManager; |
| | | import com.yeshi.buwan.service.manager.SolrCommonVideoDataManager; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | 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.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | @RunWith(SpringJUnit4ClassRunner.class) |
| | |
| | | |
| | | @Resource |
| | | private HomeNoticeDao homeNoticeDao; |
| | | @Resource |
| | | private AlbumVideoMapService albumVideoMapService; |
| | | |
| | | @Test |
| | | public void test1() { |
| | |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private AlbumVideoMapDao albumVideoMapDao; |
| | | |
| | | @Test |
| | | public void test2() { |
| | | |
| | | for(int i=0;i<100;i++) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("id").type(7)); |
| | | query.limit(100); |
| | | List<AlbumVideoMap> list = albumVideoMapDao.findList(query); |
| | | |
| | | |
| | | for (AlbumVideoMap map : list) { |
| | | AlbumVideoMap newMap = new AlbumVideoMap(); |
| | | newMap.setVideoCount(map.getVideoCount()); |
| | | newMap.setRootVideoType(map.getRootVideoType()); |
| | | newMap.setVideoId(map.getVideoId()); |
| | | newMap.setCreateTime(new Date()); |
| | | newMap.setId(map.getVideoId()); |
| | | albumVideoMapDao.save(newMap); |
| | | albumVideoMapDao.deleteByPrimaryKey(map.getId()); |
| | | } |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| | | import org.springframework.test.context.web.WebAppConfiguration; |
| | | import org.yeshi.utils.HttpUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.regex.Pattern; |
| | | |
| | | @RunWith(SpringJUnit4ClassRunner.class) |
| | | @ContextConfiguration(locations = {"classpath:spring.xml"}) |
| | | @WebAppConfiguration |
| | | public class VideoTest { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | videoService.addNOAddToCategoryVideo(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | |
| | | System.out.println(isMatch); |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private VideoManager videoManager; |
| | | |
| | | @Test |
| | | public void deleteVideo() { |
| | | videoManager.deleteVideo("8234976"); |
| | | videoManager.deleteVideo("8254725"); |
| | | videoManager.deleteVideo("8254726"); |
| | | } |
| | | |
| | | } |
| | |
| | | @Test |
| | | public void addVIPPrice() { |
| | | VIPPrice price = new VIPPrice(); |
| | | // price.setActualPrice(new BigDecimal("8.8")); |
| | | price.setActualPrice(new BigDecimal("14.8")); |
| | | price.setPrice(new BigDecimal("14.8")); |
| | | price.setType(VIPPriceType.month); |
| | | price.setPptvGoodsNo("DA7559531560894"); |
| | |
| | | } |
| | | |
| | | price = new VIPPrice(); |
| | | // price.setActualPrice(new BigDecimal("22.8")); |
| | | price.setActualPrice(new BigDecimal("37.8")); |
| | | price.setPrice(new BigDecimal("37.8")); |
| | | price.setType(VIPPriceType.season); |
| | | price.setPptvGoodsNo("DA7559574625089"); |
| | |
| | | |
| | | |
| | | price = new VIPPrice(); |
| | | // price.setActualPrice(new BigDecimal("42")); |
| | | price.setActualPrice(new BigDecimal("68.8")); |
| | | price.setPrice(new BigDecimal("68.8")); |
| | | price.setType(VIPPriceType.halfYear); |
| | | price.setPptvGoodsNo("DA6989580247516"); |
| | |
| | | |
| | | |
| | | price = new VIPPrice(); |
| | | // price.setActualPrice(new BigDecimal("77.8")); |
| | | price.setActualPrice(new BigDecimal("128.8")); |
| | | price.setPrice(new BigDecimal("128.8")); |
| | | price.setType(VIPPriceType.year); |
| | | price.setPptvGoodsNo("DA8129574268091"); |
| | |
| | | public void addOrderRecord() { |
| | | VIPPrice price = vipPriceService.selectByPrimaryKey("172a8327fcd3685ab3c0f740d031da09"); |
| | | VIPOrderRecord record = new VIPOrderRecord(); |
| | | record.setMoney(price.getPrice()); |
| | | record.setMoney(price.getActualPrice()); |
| | | record.setType(price.getType()); |
| | | record.setUid(766693 + ""); |
| | | |