feat: 1:视频剪辑模板管理
2:视频剪辑任务管理
3:设备管理
This commit is contained in:
@@ -3,6 +3,16 @@
|
||||
|
||||
<mapper namespace="com.central.device.mapper.AgeDeviceMapper">
|
||||
<select id="findList" resultType="com.central.device.model.AgeDevice">
|
||||
select * from manage_device t
|
||||
select * from manage_device t where 1=1
|
||||
<if test="p.deviceName != null and p.deviceName != ''">
|
||||
and t.device_name like concat('%', #{p.deviceName}, '%')
|
||||
</if>
|
||||
<if test="p.deviceSn != null and p.deviceSn != ''">
|
||||
and t.device_sn = #{p.deviceSn}
|
||||
</if>
|
||||
<if test="p.deviceType != null and p.deviceType != ''">
|
||||
and t.device_type = #{p.deviceType}
|
||||
</if>
|
||||
order by t.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+4
-4
@@ -58,7 +58,7 @@ public class AutoCutVideoController {
|
||||
// 1. 验证订单状态
|
||||
Order order = orderService.getOrderByNumber(orderNo);
|
||||
if (order == null || !OrderStatus.isValidForEdit(order.getOrderStatus())) {
|
||||
return Result.failed("订单状态不允许生成视频");
|
||||
return Result.failed("订单状态不允许生成剪辑视频");
|
||||
}
|
||||
|
||||
// 1. 检查是否开启一键成片
|
||||
@@ -204,7 +204,7 @@ public class AutoCutVideoController {
|
||||
|
||||
@Operation(summary = "获取剪辑任务列表")
|
||||
@GetMapping("/list")
|
||||
public Result<PageResult<EditTask>> getTaskList(
|
||||
public PageResult<EditTask> getTaskList(
|
||||
@RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "10") Integer limit,
|
||||
@RequestParam(required = false) String orderSn,
|
||||
@@ -220,11 +220,11 @@ public class AutoCutVideoController {
|
||||
.build();
|
||||
|
||||
PageResult<EditTask> result = editTaskService.getTaskList(params);
|
||||
return Result.succeed(result);
|
||||
return result;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("查询剪辑任务列表失败", e);
|
||||
return Result.failed("查询任务列表失败");
|
||||
return new PageResult<>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-1
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.central.common.model.PageResult;
|
||||
import com.central.common.service.impl.SuperServiceImpl;
|
||||
import com.central.common.utils.StringUtils;
|
||||
import com.central.order.mapper.VideoTemplateMapper;
|
||||
import com.central.order.model.VideoTemplate;
|
||||
import com.central.order.service.IVideoTemplateService;
|
||||
@@ -26,7 +27,15 @@ public class VideoTemplateServiceImpl extends SuperServiceImpl<VideoTemplateMapp
|
||||
LambdaQueryWrapper<VideoTemplate> wrapper = new LambdaQueryWrapper<VideoTemplate>()
|
||||
.eq(VideoTemplate::getIsDel, 0)
|
||||
.orderByDesc(VideoTemplate::getCreateTime);
|
||||
|
||||
if(StringUtils.isNotEmpty(MapUtils.getString(params,"templateName"))){
|
||||
wrapper.like(VideoTemplate::getTemplateName,MapUtils.getString(params,"templateName"));
|
||||
}
|
||||
if(StringUtils.isNotEmpty(MapUtils.getString(params,"templateId"))){
|
||||
wrapper.eq(VideoTemplate::getTemplateId,MapUtils.getString(params,"templateId"));
|
||||
}
|
||||
if((MapUtils.getInteger(params,"status"))!=null ){
|
||||
wrapper.eq(VideoTemplate::getStatus,MapUtils.getString(params,"status"));
|
||||
}
|
||||
Page<VideoTemplate> result = baseMapper.selectPage(page, wrapper);
|
||||
return PageResult.<VideoTemplate>builder().data(result.getRecords()).count(result.getTotal()).build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user