| | |
| | | |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.service.manager.search.SolrAlbumVideoDataManager; |
| | | import com.yeshi.buwan.service.manager.SolrCommonVideoDataManager; |
| | | import com.yeshi.buwan.util.SolrUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import org.springframework.stereotype.Component; |
| | | import org.yeshi.utils.LinuxRemoteCommandUtil; |
| | | |
| | |
| | | public class SolrJob { |
| | | |
| | | @Resource |
| | | private SolrAlbumDataManager solrAlbumDataManager; |
| | | private SolrAlbumVideoDataManager solrAlbumDataManager; |
| | | |
| | | @Resource |
| | | private SolrCommonVideoDataManager solrCommonVideoDataManager; |
| | | |
| | | @XxlJob("solr-watch") |
| | | public ReturnT<String> reStartSolr(String param) throws Exception { |
| | |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | @XxlJob("solr-syncCommonVideo") |
| | | public ReturnT<String> syncCommonVideo(String param) throws Exception { |
| | | Long minId = null; |
| | | if (!StringUtil.isNullOrEmpty(param)) { |
| | | minId = Long.parseLong(param); |
| | | } |
| | | //同步视频 |
| | | solrCommonVideoDataManager.syncAllVideo(minId); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | } |