| | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.util.mq.CMQManager; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Query; |
| | | import org.hibernate.Session; |
| | |
| | | import com.yeshi.buwan.dao.ResourceVideoDao; |
| | | import com.yeshi.buwan.domain.ResourceVideo; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | public class ResourceVideoService { |
| | |
| | | |
| | | /** |
| | | * 获取资源列表 |
| | | * |
| | | * @param videoId |
| | | * @return |
| | | */ |
| | |
| | | resourceVideoDao.delete(rv); |
| | | } |
| | | |
| | | @Transactional |
| | | public void delete(String videoId, String resourceId) { |
| | | ResourceVideo resourceVideo = resourceVideoDao.selectByVideoIdAndResourceId(videoId, resourceId + ""); |
| | | if (resourceVideo != null) |
| | | resourceVideoDao.delete(resourceVideo); |
| | | CMQManager.getInstance().addVideoResourceDeleteMsg(videoId); |
| | | } |
| | | |
| | | |
| | | } |