| | |
| | | package com.yeshi.buwan.service.imp; |
| | | |
| | | import com.yeshi.buwan.dao.CategoryVideoDao; |
| | | import com.yeshi.buwan.dao.ResourceVideoDao; |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.CategoryVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoType; |
| | | import com.yeshi.buwan.dto.mq.VideoDataChangeMQMsg; |
| | | import com.yeshi.buwan.dto.mq.VideoExtraInfoChangeMQMsg; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Query; |
| | | import org.hibernate.Session; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | import org.yeshi.utils.StringUtil; |
| | | |
| | |
| | | cv.setVideoType(new VideoType(categoryId)); |
| | | categoryVideoDao.save(cv); |
| | | CMQManager.getInstance().addVideoExtraInfoChanged(new VideoExtraInfoChangeMQMsg(VideoExtraInfoChangeMQMsg.TYPE_CATEGORY, videoId, VideoExtraInfoChangeMQMsg.ACTION_ADD)); |
| | | CMQManager.getInstance().addVideoDataChanged(new VideoDataChangeMQMsg(VideoDataChangeMQMsg.TYPE_VIDEO_CATEGORY, videoId, VideoDataChangeMQMsg.ACTION_ADD)); |
| | | } |
| | | } |
| | | |
| | |
| | | return categoryVideoDao.list(hql); |
| | | } |
| | | |
| | | public List<CategoryVideo> getCategoryList(String videoId) { |
| | | String hql = "from CategoryVideo cv where cv.video.id=" + videoId; |
| | | return categoryVideoDao.list(hql); |
| | | } |
| | | |
| | | |
| | | } |