|
@@ -1213,4 +1213,70 @@ public class BatchController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IKuaiShouVideoGetService videoGetService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取视频信息
|
|
|
+ *
|
|
|
+ * @param accountId
|
|
|
+ * @param photoId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/getVideoDetail")
|
|
|
+ public Result<KuaiShouVideoGet> getVideoDetail(Long accountId, String photoId) {
|
|
|
+ Result<KuaiShouVideoGet> result = new Result<>();
|
|
|
+ try {
|
|
|
+ if (Check.isNull(accountId) || Check.isNull(photoId)) {
|
|
|
+ throw new Exception("参数错误");
|
|
|
+ }
|
|
|
+ QueryWrapper<KuaiShouVideoGet> videoGetQueryWrapper = new QueryWrapper<>();
|
|
|
+ videoGetQueryWrapper.eq("account_id", accountId);
|
|
|
+ videoGetQueryWrapper.eq("photo_id", photoId);
|
|
|
+ videoGetQueryWrapper.orderByDesc("create_time").last("limit 1");
|
|
|
+ KuaiShouVideoGet video = videoGetService.getOne(videoGetQueryWrapper);
|
|
|
+ result.setResult(video);
|
|
|
+ result.setSuccess(true);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ result.setSuccess(false);
|
|
|
+
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IKuaiShouImageGetService imageGetService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取图片信息
|
|
|
+ *
|
|
|
+ * @param accountId
|
|
|
+ * @param imageToken
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/getImageDetail")
|
|
|
+ public Result<KuaiShouImageGet> getImageDetail(Long accountId, String imageToken) {
|
|
|
+ Result<KuaiShouImageGet> result = new Result<>();
|
|
|
+ try {
|
|
|
+ if (Check.isNull(accountId) || Check.isNull(imageToken)) {
|
|
|
+ throw new Exception("参数错误");
|
|
|
+ }
|
|
|
+ QueryWrapper<KuaiShouImageGet> imageGetQueryWrapper = new QueryWrapper<>();
|
|
|
+ imageGetQueryWrapper.eq("account_id", accountId);
|
|
|
+ imageGetQueryWrapper.eq("image_token", imageToken);
|
|
|
+ imageGetQueryWrapper.orderByDesc("create_time").last("limit 1");
|
|
|
+ KuaiShouImageGet image = imageGetService.getOne(imageGetQueryWrapper);
|
|
|
+ result.setResult(image);
|
|
|
+ result.setSuccess(true);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ result.setSuccess(false);
|
|
|
+
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|