视频分类删除接口优化,存在视频不能删除
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| package com.stdiet.web.controller; | ||||
|  | ||||
| import com.stdiet.common.utils.AliyunVideoUtils; | ||||
| import com.stdiet.common.utils.StringUtils; | ||||
| import com.stdiet.common.utils.poi.ExcelUtil; | ||||
| import com.stdiet.custom.domain.SysNutritionQuestion; | ||||
| @@ -43,6 +44,27 @@ public class MyApplicationRunner implements ApplicationRunner { | ||||
|         System.out.println("--------------项目启动调用方法结束-------------"); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 给现有视频更新截图图片 | ||||
|      */ | ||||
|     public void getVideoSn(){ | ||||
|         List<SysNutritionalVideo> list = sysNutritionalVideoService.selectSysNutritionalVideoList(new SysNutritionalVideo(), false); | ||||
|         int success = 0; | ||||
|         if(list != null && list.size() > 0){ | ||||
|             for (SysNutritionalVideo video : list) { | ||||
|                 try{ | ||||
|                     Thread.sleep(500); | ||||
|                 }catch (Exception e){ | ||||
|                     e.printStackTrace(); | ||||
|                 } | ||||
|                 if(AliyunVideoUtils.submitVideoSnapshot(video.getVideoId())){ | ||||
|                     success ++; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         System.out.println("成功数量:" + success); | ||||
|     } | ||||
|  | ||||
|  | ||||
|     /** | ||||
|      * 从微信用户表中查询openid更新到用户打卡日志表中 | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| package com.stdiet.web.controller.custom; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import com.stdiet.custom.typehandler.ArrayJsonHandler; | ||||
| import org.springframework.security.access.prepost.PreAuthorize; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | ||||
| @@ -92,7 +94,11 @@ public class SysVideoClassifyController extends BaseController | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable Long[] ids) | ||||
|     { | ||||
|         return toAjax(sysVideoClassifyService.deleteSysVideoClassifyByIds(ids)); | ||||
|         if(ids != null && ids.length == 1){ | ||||
|             //只支持单个删除 | ||||
|             return sysVideoClassifyService.deleteSysVideoClassifyById(ids[0]); | ||||
|         } | ||||
|         return AjaxResult.error(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user