package com.yeshi.buwan.service.imp.juhe;
|
|
import com.yeshi.buwan.dao.VideoInfoDao;
|
import com.yeshi.buwan.dao.VideoResourceDao;
|
import com.yeshi.buwan.dao.juhe.funtv.FunTVAlbumDao;
|
import com.yeshi.buwan.dao.juhe.funtv.FunTVAlbumVideoMapDao;
|
import com.yeshi.buwan.dao.juhe.funtv.FunTVVideoDao;
|
import com.yeshi.buwan.dao.juhe.funtv.VideoFunTVNewDao;
|
import com.yeshi.buwan.domain.*;
|
import com.yeshi.buwan.domain.entity.PlayUrl;
|
import com.yeshi.buwan.domain.push.VideoPushHistory;
|
import com.yeshi.buwan.videos.funtv.FunTVUtil;
|
import com.yeshi.buwan.videos.funtv.entity.FunTVAlbum;
|
import com.yeshi.buwan.videos.funtv.entity.FunTVAlbumVideoMap;
|
import com.yeshi.buwan.videos.funtv.entity.FunTVVideo;
|
import com.yeshi.buwan.videos.funtv.entity.VideoFunTV;
|
import com.yeshi.buwan.service.imp.*;
|
import com.yeshi.buwan.service.imp.push.PushService;
|
import com.yeshi.buwan.util.StringUtil;
|
import net.sf.json.JSONObject;
|
import org.apache.log4j.Logger;
|
import org.hibernate.HibernateException;
|
import org.hibernate.Session;
|
import org.springframework.data.domain.Sort;
|
import org.springframework.orm.hibernate4.HibernateCallback;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import java.io.Serializable;
|
import java.math.BigInteger;
|
import java.util.*;
|
|
@Service
|
public class FunTVService implements IVideoDetail {
|
@Resource
|
private VideoFunTVNewDao videoFunTVNewDao;
|
|
@Resource
|
private FunTVVideoDao funTVVideoDao;
|
|
@Resource
|
private FunTVAlbumDao funTVAlbumDao;
|
|
@Resource
|
private FunTVAlbumVideoMapDao funTVAlbumVideoMapDao;
|
|
@Resource
|
private StatisticsService statisticsService;
|
@Resource
|
private PushService pushService;
|
|
@Resource
|
private VideoService videoService;
|
@Resource
|
private VideoResourceService videoResourceService;
|
@Resource
|
private BanQuanService banQuanService;
|
|
@Resource
|
private VideoInfoDao videoInfoDao;
|
|
@Resource
|
private VideoResourceDao videoResourceDao;
|
|
@Resource
|
private VideoManager videoManager;
|
|
@Resource
|
private ResourceVideoService resourceVideoService;
|
|
static Logger logger = Logger.getLogger(FunTVService.class);
|
|
//TODO 迁移走
|
public FunTVAlbum getAlbumByAid(String aid) {
|
FunTVAlbum album = funTVAlbumDao.get(aid);
|
return album;
|
}
|
|
public FunTVVideo getFunTVVideoByVid(String vid) {
|
FunTVVideo video = funTVVideoDao.get(vid);
|
return video;
|
}
|
|
public void saveAlbum(FunTVAlbum album) {
|
if (album.getUpdatetime() == null)
|
album.setUpdatetime(new Date());
|
funTVAlbumDao.save(album);
|
}
|
|
public void saveVideo(FunTVVideo video) {
|
funTVVideoDao.save(video);
|
}
|
|
public void saveFunTVAlbum(FunTVAlbum pm, List<FunTVVideo> videoList) {
|
FunTVAlbum dpm = getAlbumByAid(pm.getAid());
|
if (dpm == null) {
|
saveAlbum(pm);
|
}
|
|
for (FunTVVideo pv : videoList) {
|
FunTVVideo dpv = getFunTVVideoByVid(pv.getVid());
|
if (dpv == null) {
|
saveVideo(pv);
|
}
|
|
FunTVAlbumVideoMap pvm = new FunTVAlbumVideoMap(pm.getAid(), pv.getVid());
|
funTVAlbumVideoMapDao.save(pvm);
|
}
|
}
|
|
|
@SuppressWarnings("unchecked")
|
public void updateVideoInfo(final VideoInfo info, final VideoInfo video, final FunTVAlbum p,
|
final boolean isUpdate) {
|
final VideoInfo vi = video;
|
videoResourceDao.excute(new HibernateCallback() {
|
public Object doInHibernate(Session session) throws HibernateException {
|
|
vi.setTag(info.getTag());
|
vi.setVideocount(p.getVideoList() != null ? p.getVideoList().size() : 1);
|
vi.setLatestHpicture(info.getLatestHpicture());
|
vi.setLatestVpicture(info.getLatestVpicture());
|
try {
|
session.getTransaction().begin();
|
|
if (isUpdate)
|
vi.setUpdatetime(System.currentTimeMillis() + "");
|
session.update(vi);
|
|
VideoFunTV vft = new VideoFunTV();
|
vft.setAid(p.getAid());
|
vft.setVideoId(Long.parseLong(vi.getId()));
|
vft.setVid(null);
|
vft.setId(vft.createId());
|
|
|
long count = videoFunTVNewDao.countByVideoIdAndAid(Long.parseLong(vi.getId()), p.getAid());
|
if (count <= 0L) {// 加入
|
VideoFunTV ftv = new VideoFunTV();
|
ftv.setVideoId(Long.parseLong(vi.getId()));
|
ftv.setAid(p.getAid());
|
ftv.setId(ftv.createId());
|
videoFunTVNewDao.save(ftv);
|
}
|
|
Object obj = session.createSQLQuery(String.format(
|
"select count(*) from wk_resource_video rv where rv.videoid=%s and rv.resourceid=%s",
|
vi.getId(), 19 + "")).uniqueResult();
|
if (Integer.parseInt(obj + "") <= 0) {// 加入
|
session.createSQLQuery(String.format(
|
"insert into wk_resource_video(videoid,resourceid) values(%s,%s)", vi.getId(), 19 + ""))
|
.executeUpdate();
|
}
|
|
// 获取最新一集的信息
|
List<FunTVVideo> plist = funTVVideoDao.listByAid(p.getAid(), "num", Sort.Direction.DESC, 0, 1);
|
if (plist.size() > 0) {
|
List<VideoDetailInfo> detailList = new ArrayList<>();
|
detailList.add(FunTVUtil.convertFunTVVideoToVideoDetail(plist.get(0), p));
|
vi.setVideoDetailList(detailList);
|
}
|
session.flush();
|
session.getTransaction().commit();
|
} catch (Exception e) {
|
session.getTransaction().rollback();
|
System.out.println("出错:" + e.getMessage());
|
}
|
|
return null;
|
}
|
});
|
if (isUpdate) {
|
if (vi.getVideoDetailList() != null && vi.getVideoDetailList().size() > 0) {
|
VideoPushHistory vh = new VideoPushHistory();
|
vh.setCreatetime(System.currentTimeMillis() + "");
|
vh.setDetailId(vi.getVideoDetailList().get(0).getExtraId());
|
vh.setResourceId(19 + "");
|
vh.setTag(vi.getTag());
|
vh.setType(vi.getVideoDetailList().get(0).getType());
|
vh.setVideoInfo(vi);
|
pushService.addVideoPushHistory(vh);
|
}
|
}
|
}
|
|
// 添加单个视频进入
|
@SuppressWarnings("unchecked")
|
public void updateVideoInfo(final VideoInfo info, final VideoInfo video, final FunTVVideo p, final String genre) {
|
final VideoInfo vi = video;
|
videoResourceDao.excute(new HibernateCallback() {
|
public Object doInHibernate(Session session) throws HibernateException {
|
|
vi.setTag(info.getTag());
|
vi.setLatestHpicture(info.getLatestHpicture());
|
vi.setLatestVpicture(info.getLatestVpicture());
|
try {
|
session.getTransaction().begin();
|
session.update(vi);
|
VideoFunTV vft = new VideoFunTV();
|
vft.setAid(null);
|
vft.setVideoId(Long.parseLong(vi.getId()));
|
vft.setVid(p.getVid());
|
vft.setId(vft.createId());
|
|
long count = videoFunTVNewDao.countByVideoIdAndVid(Long.parseLong(vi.getId()), p.getVid());
|
|
if (count <= 0) {// 加入
|
VideoFunTV ftv = new VideoFunTV();
|
ftv.setVideoId(vft.getVideoId());
|
ftv.setVid(vft.getVid());
|
ftv.setId(ftv.createId());
|
videoFunTVNewDao.save(ftv);
|
}
|
|
Object obj = null;
|
|
List<Integer> typeList = FunTVUtil.getShortVideoType(p, p.getCate(), p.getSubCate());
|
if (typeList != null)
|
for (Integer ty : typeList) {
|
CategoryVideo cv = new CategoryVideo();
|
cv.setVideo(new VideoInfo(vi.getId()));
|
cv.setVideoType(new VideoType(ty));
|
obj = session
|
.createQuery(
|
"select count(*) from CategoryVideo cv where cv.videoType.id=? and cv.video.id=?")
|
.setParameter(0, (long) ty).setParameter(1, vi.getId()).uniqueResult();
|
if (Integer.parseInt(obj + "") <= 0)
|
videoService.addCategoryVideo(cv);
|
}
|
|
obj = session.createQuery(String.format(
|
"select count(*) from ResourceVideo rv where rv.video.id=%s and rv.resource.id=%s",
|
vi.getId(), 19 + "")).uniqueResult();
|
if (Integer.parseInt(obj + "") <= 0) {// 加入
|
ResourceVideo rv = new ResourceVideo();
|
rv.setResource(new VideoResource(19 + ""));
|
rv.setVideo(new VideoInfo(vi.getId()));
|
session.createSQLQuery(String.format(
|
"insert into wk_resource_video(videoid,resourceid) values(%s,%s)", vi.getId(), 19 + ""))
|
.executeUpdate();
|
}
|
session.flush();
|
session.getTransaction().commit();
|
} catch (Exception e) {
|
System.out.println("出错:" + e.getMessage());
|
}
|
|
return null;
|
}
|
});
|
|
}
|
|
public Serializable addVideoInfo(VideoInfo info, FunTVAlbum p) {
|
Serializable id = videoInfoDao.save(info);
|
return id;
|
}
|
|
public Serializable addVideoInfo(VideoInfo info, FunTVVideo p) {
|
Serializable id = videoInfoDao.save(info);
|
return id;
|
}
|
|
public void saveVideoFunTV(VideoFunTV vyk) {
|
try {
|
if (vyk.getId() == null)
|
vyk.setId(vyk.createId());
|
videoFunTVNewDao.save(vyk);
|
} catch (Exception e) {
|
|
}
|
|
}
|
|
// 错误
|
public void addPlayStatistics(String detailSystemId, String id) {
|
List<VideoFunTV> list = videoFunTVNewDao.listByVid(id);
|
if (list != null && list.size() > 0) {
|
statisticsService.addStatistics(detailSystemId, list.get(0).getVideoId() + "");
|
} else {
|
list = videoFunTVNewDao.listByAid(id);
|
if (list != null && list.size() > 0)
|
statisticsService.addStatistics(detailSystemId, list.get(0).getVideoId() + "");
|
}
|
}
|
|
|
public VideoDetailInfo getLatestVideoDetail(String videoid) {
|
List<VideoFunTV> list = videoFunTVNewDao.listByVideoId(Long.parseLong(videoid));
|
if (list != null && list.size() > 0) {
|
final VideoFunTV vft = list.get(0);
|
if (vft.getAid() != null) {// 按节目查找视频
|
List<FunTVVideo> videoList = funTVVideoDao.listByAid(vft.getAid(), "num", Sort.Direction.DESC, 0, 1);
|
List<VideoDetailInfo> detailList = new ArrayList<>();
|
for (FunTVVideo pv : videoList) {
|
FunTVAlbum album = funTVAlbumDao.get(pv.getAid());
|
detailList.add(FunTVUtil.convertFunTVVideoToVideoDetail(pv, album));
|
}
|
return detailList.get(0);
|
} else if (vft.getVid() != null) {// 单个视频----待定
|
}
|
}
|
|
return null;
|
}
|
|
@SuppressWarnings("unchecked")
|
public void addFunTVAlbumToVideoInfo(final FunTVAlbum p, final boolean isUpdate) {
|
|
final VideoInfo info = FunTVUtil.convertFunTVAlbumToVideoInfo(p);
|
// 类型计算
|
final List<Integer> typeList = new ArrayList<>();
|
|
int type = FunTVUtil.getFunTVAlbumType(p);
|
boolean exist = false;
|
for (Integer i : typeList)
|
if (i == type)
|
exist = true;
|
if (!exist && type > 0)
|
typeList.add(type);
|
|
if (typeList.size() == 0)
|
typeList.add(299);
|
|
try {
|
List<VideoInfo> infoList = videoInfoDao.list("from VideoInfo vi where vi.name=?",
|
new Serializable[]{p.getTitle()});
|
boolean isSame = false;
|
VideoInfo video = null;
|
for (VideoInfo vi : infoList) {
|
final VideoInfo newVi = vi;
|
boolean issame = (Boolean) videoInfoDao.excute(new HibernateCallback<Boolean>() {
|
public Boolean doInHibernate(Session session) throws HibernateException {
|
return FunTVUtil.isSameVideo(typeList, p, newVi, session);
|
}
|
});
|
if (issame) {
|
isSame = true;
|
video = vi;
|
break;
|
}
|
}
|
|
if (infoList != null && infoList.size() > 0 && isSame) {// 无需加入
|
updateVideoInfo(info, video, p, isUpdate);
|
} else {// 需要新加入videoinfo
|
Serializable id = addVideoInfo(info, p);
|
|
if (id != null) {
|
info.setId(id.toString());
|
|
for (Integer ty : typeList) {
|
CategoryVideo cv = new CategoryVideo();
|
cv.setVideo(new VideoInfo(info.getId()));
|
cv.setVideoType(new VideoType(ty));
|
videoService.addCategoryVideo(cv);
|
}
|
|
VideoFunTV vft = new VideoFunTV();
|
vft.setAid(p.getAid());
|
vft.setVideoId(Long.parseLong(info.getId()));
|
vft.setVid(null);
|
vft.setId(vft.createId());
|
saveVideoFunTV(vft);
|
|
videoResourceService.excuteSQL(String.format(
|
"insert into wk_resource_video(videoid,resourceid) values(%s,%s)", info.getId(), 19 + ""));
|
}
|
}
|
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
|
}
|
|
public void addVideoToVideoInfo(final FunTVVideo p) {
|
VideoInfo info = FunTVUtil.convertVideoToVideoInfo(p);
|
try {
|
synchronized (p.getTitle().intern()) { // 发现了有重复生成VideoInfo.所有根据名称加个锁(一定要加intern())cxx
|
|
List<VideoInfo> infoList = videoInfoDao.list("from VideoInfo vi where vi.name=?",
|
new Serializable[]{p.getTitle()});
|
if (infoList != null && infoList.size() > 0) {// 无需加入
|
// updateVideoInfo(info, infoList.get(0), p, genre);
|
return;
|
} else {// 需要新加入videoinfo
|
Serializable id = addVideoInfo(info, p);
|
List<Integer> typeList = new ArrayList<>();
|
typeList = FunTVUtil.getShortVideoType(p, p.getCate(), p.getSubCate());
|
|
if (typeList == null || typeList.size() <= 0)
|
return;
|
|
if (id != null) {
|
info.setId(id.toString());
|
|
for (Integer ty : typeList) {
|
CategoryVideo cv = new CategoryVideo();
|
cv.setVideo(new VideoInfo(info.getId()));
|
cv.setVideoType(new VideoType(ty));
|
videoService.addCategoryVideo(cv);
|
}
|
|
VideoFunTV vft = new VideoFunTV();
|
vft.setAid(null);
|
vft.setVideoId(Long.parseLong(info.getId()));
|
vft.setVid(p.getVid());
|
vft.setId(vft.createId());
|
saveVideoFunTV(vft);
|
videoResourceService.excuteSQL(
|
String.format("insert into wk_resource_video(videoid,resourceid) values(%s,%s)",
|
info.getId(), 19 + ""));
|
}
|
}
|
}
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
|
}
|
|
public int getShowType(String videoId) {
|
List<VideoFunTV> list = videoFunTVNewDao.listByVideoId(Long.parseLong(videoId));
|
if (list != null && list.size() > 0) {
|
if (list.get(0) != null) {
|
FunTVAlbum album = funTVAlbumDao.get(list.get(0).getAid());
|
|
if (album.getVideoType().contains("电视剧") || album.getVideoType().contains("动漫"))
|
return 2;
|
} else {
|
return 1;
|
}
|
}
|
|
return 1;
|
}
|
|
@SuppressWarnings("unchecked")
|
public PlayUrl getPlayUrl(String detailSystemId, String id, String type, int resourceid, String videoId) {
|
logger.info(String.format("%s#%s#%s#%s", detailSystemId, resourceid, type, id));
|
PlayUrl playUrl = new PlayUrl();
|
|
List<VideoResource> list = videoResourceDao.list("from VideoResource vr where vr.id=" + resourceid);
|
if (list != null && list.size() > 0)
|
playUrl.setResource(list.get(0));
|
if (StringUtil.isNullOrEmpty(videoId))
|
addPlayStatistics(detailSystemId, id);
|
else
|
statisticsService.addStatistics(detailSystemId, videoId);
|
if (!type.equalsIgnoreCase("funtvvideo")) {
|
List<BigInteger> idList = (List<BigInteger>) videoResourceDao.sqlList(
|
"SELECT yk.`videoid` FROM wk_video_funtv yk WHERE yk.`albumid`= ( SELECT p.`aid` FROM wk_funtv_video v LEFT JOIN wk_funtv_album_video_map p ON p.`funvideoid`=v.`id` WHERE v.`id`=?)",
|
new Serializable[]{id});
|
if (idList != null && idList.size() > 0) {
|
boolean isNeedWeb = banQuanService.isNeedWebPlay(detailSystemId, idList.get(0) + "");
|
if (isNeedWeb)
|
playUrl.setPlayType(1);
|
}
|
}
|
|
FunTVVideo fvideo = funTVVideoDao.get(id);
|
JSONObject object = new JSONObject();
|
object.put("vid", fvideo.getVid());
|
playUrl.setParams(object.toString());
|
if (fvideo.getPlayMUrl() != null)
|
playUrl.setUrl(fvideo.getPlayMUrl().replace("alliance=2501", "malliance=0"));
|
playUrl.setPlayType(1);// 全部跳转网页
|
return playUrl;
|
}
|
|
public List<VideoDetailInfo> getVideoDetailList(String videoid, int page, int pageSize) {
|
List<VideoFunTV> list = videoFunTVNewDao.listByVideoId(Long.parseLong(videoid));
|
if (list != null && list.size() > 0) {
|
final VideoFunTV vft = list.get(0);
|
if (vft != null && vft.getAid() != null) {// 按节目查找视频
|
String aid = vft.getAid();
|
FunTVAlbum album = funTVAlbumDao.get(aid);
|
if (album == null) {
|
resourceVideoService.delete(videoid, FunTVUtil.RESOURCE_ID + "");
|
}
|
final String type = album.getVideoType();
|
Sort.Direction sort = Sort.Direction.ASC;
|
if (type != null)
|
if (type.contains("电影")) {
|
sort = Sort.Direction.DESC;
|
} else if (type.contains("电视剧")) {
|
sort = Sort.Direction.ASC;
|
} else if (type.contains("综艺")) {
|
sort = Sort.Direction.DESC;
|
} else if (type.contains("动漫")) {
|
sort = Sort.Direction.ASC;
|
} else
|
sort = Sort.Direction.DESC;
|
|
|
List<FunTVVideo> videoList = funTVVideoDao.listByAid(aid, "num", sort, (page - 1) * pageSize, pageSize);
|
if (album == null && videoList.size() > 0) {//处理电影
|
album = new FunTVAlbum();
|
album.setTitle(videoList.get(0).getTitle());
|
album.setVideoType(videoList.get(0).getCate());
|
}
|
|
List<VideoDetailInfo> detailList = new ArrayList<>();
|
for (FunTVVideo pv : videoList)
|
detailList.add(FunTVUtil.convertFunTVVideoToVideoDetail(pv, album));
|
return detailList;
|
} else if (vft.getVid() != null) {// 单个视频
|
FunTVVideo pv = funTVVideoDao.get(vft.getVid());
|
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 vu = new VideoUrl();
|
vu.setAdmin(null);
|
vu.setBaseUrl(pv.getPlayUrl());
|
vu.setInvalid(0 + "");
|
vu.setResource(new VideoResource("19"));
|
vu.setUrl(pv.getPlayMUrl());
|
urlList.add(vu);
|
detail.setUrls(urlList);
|
detailList.add(detail);
|
return detailList;
|
}
|
}else{//删除来源
|
resourceVideoService.delete(videoid,FunTVUtil.RESOURCE_ID+"");
|
}
|
|
return null;
|
}
|
|
public FunTVVideo getLatestFunTVVideo(String programid) {
|
FunTVVideo video = funTVVideoDao.getLatestVideo(programid);
|
return video;
|
}
|
|
public void deleteVideoByAid(String aid) {
|
// 查询出对应的VID与videoid
|
final FunTVAlbum album = getAlbumByAid(aid);
|
|
if (album != null) {
|
String videoId = (String) videoResourceDao.excute(new HibernateCallback<String>() {
|
@SuppressWarnings("unchecked")
|
public String doInHibernate(Session session) throws HibernateException {
|
String videoid = null;
|
List<FunTVVideo> list = funTVVideoDao.listByAid(album.getAid(), 0, 1000);
|
session.getTransaction().begin();
|
try {
|
for (FunTVVideo tv : list) {// 删除视频
|
funTVVideoDao.delete(tv.getVid());
|
}
|
funTVAlbumDao.delete(album.getAid());// 删除专辑
|
List<VideoFunTV> ftlist = videoFunTVNewDao.listByAid(album.getAid());
|
|
if (ftlist.size() > 0) {
|
Object obj = session.createQuery(
|
"select count(*) from ResourceVideo rv where rv.resource.id!=19 and rv.video.id="
|
+ ftlist.get(0).getVideoId())
|
.uniqueResult();
|
if (Integer.parseInt(obj + "") <= 0) {
|
videoid = ftlist.get(0).getVideoId() + "";
|
}
|
}
|
for (VideoFunTV funTV : ftlist)
|
videoFunTVNewDao.delete(funTV.getId());
|
session.flush();
|
session.getTransaction().commit();
|
} catch (Exception e) {
|
session.getTransaction().rollback();
|
}
|
return videoid;
|
}
|
});
|
|
if (videoId != null) {// 可以删除视频
|
videoManager.deleteVideo(videoId);
|
}
|
|
}
|
|
}
|
|
public void deleteVideoByVid(String vid) {
|
// 查询出对应的VID与videoid
|
final FunTVVideo video = getFunTVVideoByVid(vid);
|
if (video != null) {
|
String videoId = (String) videoResourceDao.excute(new HibernateCallback<String>() {
|
|
@SuppressWarnings("unchecked")
|
public String doInHibernate(Session session) throws HibernateException {
|
String videoid = null;
|
|
//TODO 处理
|
List<FunTVVideo> list = session
|
.createQuery("select m.video from FunTVAlbumVideoMap m where m.album.id=" + video.getId())
|
.list();
|
session.getTransaction().begin();
|
try {
|
|
for (FunTVVideo tv : list) {// 删除视频
|
session.delete(tv);
|
}
|
session.delete(video);// 删除专辑
|
List<VideoFunTV> ftlist = session
|
.createQuery(
|
"from VideoFunTV vf where vf.vid=" + video.getVid())
|
.list();
|
if (ftlist.size() > 0) {
|
Object obj = session.createQuery(
|
"select count(*) from ResourceVideo rv where rv.resource.id!=19 and rv.video.id="
|
+ ftlist.get(0).getVideoId())
|
.uniqueResult();
|
if (Integer.parseInt(obj + "") <= 0) {
|
videoid = ftlist.get(0).getVideoId() + "";
|
}
|
}
|
for (VideoFunTV funTV : ftlist) {
|
videoFunTVNewDao.delete(funTV.getId());
|
}
|
session.flush();
|
session.getTransaction().commit();
|
} catch (Exception e) {
|
session.getTransaction().rollback();
|
}
|
return videoid;
|
}
|
});
|
|
if (videoId != null) {// 可以删除视频
|
videoManager.deleteVideo(videoId);
|
}
|
|
}
|
|
}
|
|
public PlayUrl getPlayUrl(String detailSystemId, String resourceid, String type, String id) {
|
return null;
|
}
|
|
}
|