完成部分接口调试

This commit is contained in:
wangzhiwei 2026-01-05 11:20:42 +08:00
parent 052b63bca8
commit 6a8583d634
8 changed files with 20 additions and 19 deletions

View File

@ -64,9 +64,9 @@ public class EffectTemplate extends BaseDO {
private String subtitleText; private String subtitleText;
/** /**
* 关联的字幕样式ID * 关联的字幕样式JSON
*/ */
private Long subtitleStyleId; private String subtitleStyle;
/** /**
* 字幕默认X位置可为固定值或表达式 * 字幕默认X位置可为固定值或表达式

View File

@ -19,7 +19,7 @@ public class EffectTemplateQuery implements Serializable {
private String size; private String size;
private Double length; private Double length;
private String subtitleText; private String subtitleText;
private Long subtitleStyleId; private String subtitleStyle;
private String subtitlePositionX; private String subtitlePositionX;
private String subtitlePositionY; private String subtitlePositionY;
private String coverUrl; private String coverUrl;

View File

@ -59,7 +59,7 @@ public class EffectTemplateReq extends BaseReq {
/** /**
* 关联的字幕样式ID * 关联的字幕样式ID
*/ */
private Long subtitleStyleId; private String subtitleStyle;
/** /**
* 字幕默认X位置可为固定值或表达式 * 字幕默认X位置可为固定值或表达式

View File

@ -59,11 +59,6 @@ public class EffectTemplateDetailResp extends BaseResp {
*/ */
private String subtitleText; private String subtitleText;
/**
* 关联的字幕样式ID
*/
private Long subtitleStyleId;
/** /**
* 字幕默认X位置可为固定值或表达式 * 字幕默认X位置可为固定值或表达式
*/ */

View File

@ -47,9 +47,9 @@ public class EffectTemplateResp extends BaseResp {
/** /**
* 默认尺寸{"width": w, "height": h} * 默认尺寸{"width": w, "height": h}
*/ */
private String size_width; private Integer sizeWidth;
private String size_height; private Integer sizeHeight;
/** /**
* 默认持续时间0表示无限 * 默认持续时间0表示无限
@ -61,10 +61,7 @@ public class EffectTemplateResp extends BaseResp {
*/ */
private String subtitleText; private String subtitleText;
/** private String subtitleStyle;
* 关联的字幕样式ID
*/
private Long subtitleStyleId;
/** /**
* 字幕默认X位置可为固定值或表达式 * 字幕默认X位置可为固定值或表达式

View File

@ -8,7 +8,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import top.continew.admin.business.mapper.EffectTemplateMapper; import top.continew.admin.business.mapper.EffectTemplateMapper;
import top.continew.admin.business.model.entity.Effect;
import top.continew.admin.business.model.entity.EffectTemplate; import top.continew.admin.business.model.entity.EffectTemplate;
import top.continew.admin.business.model.query.EffectTemplatePageQuery; import top.continew.admin.business.model.query.EffectTemplatePageQuery;
import top.continew.admin.business.model.query.EffectTemplateQuery; import top.continew.admin.business.model.query.EffectTemplateQuery;
@ -16,7 +15,6 @@ import top.continew.admin.business.model.req.EffectTemplateReq;
import top.continew.admin.business.model.resp.EffectTemplateDetailResp; import top.continew.admin.business.model.resp.EffectTemplateDetailResp;
import top.continew.admin.business.model.resp.EffectTemplateResp; import top.continew.admin.business.model.resp.EffectTemplateResp;
import top.continew.admin.business.service.EffectTemplateService; import top.continew.admin.business.service.EffectTemplateService;
import top.continew.admin.common.util.helper.LoginHelper;
import top.continew.admin.system.service.FileService; import top.continew.admin.system.service.FileService;
import top.continew.starter.extension.crud.model.resp.PageResp; import top.continew.starter.extension.crud.model.resp.PageResp;
import top.continew.starter.extension.crud.service.impl.BaseServiceImpl; import top.continew.starter.extension.crud.service.impl.BaseServiceImpl;
@ -40,7 +38,7 @@ public class EffectTemplateServiceImpl extends BaseServiceImpl<EffectTemplateMap
if (query.getIsCustom() != null) { if (query.getIsCustom() != null) {
wrapper.eq(EffectTemplate::getIsCustom, query.getIsCustom()); wrapper.eq(EffectTemplate::getIsCustom, query.getIsCustom());
} }
query.setUserId(LoginHelper.getUserId().toString()); //query.setUserId(LoginHelper.getUserId().toString());
if (query.getUserId() != null) { if (query.getUserId() != null) {
wrapper.eq(EffectTemplate::getUserId, query.getUserId()); wrapper.eq(EffectTemplate::getUserId, query.getUserId());
} }

View File

@ -48,8 +48,8 @@ public class SubtitleStyleServiceImpl extends BaseServiceImpl<SubtitleStyleMappe
wrapper.orderByDesc(SubtitleStyle::getCreateTime); wrapper.orderByDesc(SubtitleStyle::getCreateTime);
Page<SubtitleStyle> page = new Page<>(pageQuery.getPage(), pageQuery.getSize()); Page<SubtitleStyle> page = new Page<>(pageQuery.getPage(), pageQuery.getSize());
Page<SubtitleStyle> result = subtitleStyleMapper.selectPage(page, wrapper);
Page<SubtitleStyle> result = subtitleStyleMapper.selectPage(page, wrapper);
PageResp<SubtitleStyleResp> pageResp = new PageResp(); PageResp<SubtitleStyleResp> pageResp = new PageResp();
pageResp.setTotal(result.getTotal()); pageResp.setTotal(result.getTotal());
pageResp.setList(result.getRecords().stream().map(this::convertToResp).toList()); pageResp.setList(result.getRecords().stream().map(this::convertToResp).toList());

View File

@ -0,0 +1,11 @@
package top.continew.admin.common.util;
import org.springframework.data.convert.Jsr310Converters;
import java.time.LocalDateTime;
public class LocalDateTimeUtil {
public static LocalDateTime toLocalDateTime(String dateString) {
return Jsr310Converters.StringToLocalDateTimeConverter.INSTANCE.convert(dateString);
}
}