@@ -473,7 +473,7 @@ public class PhotoSpeakVideoController extends BaseController { | |||||
@ApiOperation("获取视频是否生成成功") | @ApiOperation("获取视频是否生成成功") | ||||
@GetMapping("/checkVideoStatus") | @GetMapping("/checkVideoStatus") | ||||
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
public ResultData checkVideoStatus(String time) { | |||||
return photoSpeakVideoService.checkVideoStatus(getMemberId(),time); | |||||
public ResultData checkVideoStatus(List<Long> list) { | |||||
return photoSpeakVideoService.checkVideoStatus(getMemberId(),list); | |||||
} | } | ||||
} | } |
@@ -23,5 +23,5 @@ public interface PhotoSpeakVideoMapper extends CommonMapper<PhotoSpeakVideo, Lon | |||||
List<PhotoSpeakVideo> getSortList(PhotoSpeakVideo record); | List<PhotoSpeakVideo> getSortList(PhotoSpeakVideo record); | ||||
Integer checkVideoStatus(@Param("userId") Long userId,@Param("time") String time); | |||||
Integer checkVideoStatus(@Param("userId") Long userId,@Param("list") List<Long> list); | |||||
} | } |
@@ -65,5 +65,5 @@ public interface PhotoSpeakVideoService { | |||||
List<PhotoSpeakVideo> getNotHyUploadList(); | List<PhotoSpeakVideo> getNotHyUploadList(); | ||||
ResultData checkVideoStatus(Long userId, String time); | |||||
ResultData checkVideoStatus(Long userId, List<Long> time); | |||||
} | } |
@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.data.redis.core.RedisTemplate; | import org.springframework.data.redis.core.RedisTemplate; | ||||
import org.springframework.scheduling.annotation.Async; | import org.springframework.scheduling.annotation.Async; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import org.springframework.util.CollectionUtils; | |||||
import org.springframework.util.ObjectUtils; | import org.springframework.util.ObjectUtils; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
@@ -413,8 +414,12 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | |||||
} | } | ||||
@Override | @Override | ||||
public ResultData checkVideoStatus(Long userId, String time) { | |||||
Integer integer = photoSpeakVideoMapper.checkVideoStatus(userId,time); | |||||
public ResultData checkVideoStatus(Long userId, List<Long> list) { | |||||
if (CollectionUtils.isEmpty(list)){ | |||||
return new ResultData(); | |||||
} | |||||
Integer integer = photoSpeakVideoMapper.checkVideoStatus(userId,list); | |||||
if (integer > 0){ | if (integer > 0){ | ||||
return new ResultData("生成视频成功"); | return new ResultData("生成视频成功"); | ||||
} | } | ||||
@@ -159,8 +159,13 @@ | |||||
<select id="checkVideoStatus" resultType="java.lang.Integer"> | <select id="checkVideoStatus" resultType="java.lang.Integer"> | ||||
select count(1) | select count(1) | ||||
from photo_speak_video | from photo_speak_video | ||||
where video_status = 5 and create_video_date >= #{time} and user_id = #{userId} | |||||
where video_status = 5 and user_id = #{userId} | |||||
<if test="list != null and list.size > 0"> | |||||
id in | |||||
<foreach collection="list" index="index" item="id" open="(" separator="," close=")"> | |||||
#{id} | |||||
</foreach> | |||||
</if> | |||||
</select> | </select> | ||||
</mapper> | </mapper> |