完成部分接口调试
This commit is contained in:
parent
052b63bca8
commit
6a8583d634
|
|
@ -64,9 +64,9 @@ public class EffectTemplate extends BaseDO {
|
|||
private String subtitleText;
|
||||
|
||||
/**
|
||||
* 关联的字幕样式ID
|
||||
* 关联的字幕样式JSON
|
||||
*/
|
||||
private Long subtitleStyleId;
|
||||
private String subtitleStyle;
|
||||
|
||||
/**
|
||||
* 字幕默认X位置(可为固定值或表达式)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class EffectTemplateQuery implements Serializable {
|
|||
private String size;
|
||||
private Double length;
|
||||
private String subtitleText;
|
||||
private Long subtitleStyleId;
|
||||
private String subtitleStyle;
|
||||
private String subtitlePositionX;
|
||||
private String subtitlePositionY;
|
||||
private String coverUrl;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class EffectTemplateReq extends BaseReq {
|
|||
/**
|
||||
* 关联的字幕样式ID
|
||||
*/
|
||||
private Long subtitleStyleId;
|
||||
private String subtitleStyle;
|
||||
|
||||
/**
|
||||
* 字幕默认X位置(可为固定值或表达式)
|
||||
|
|
|
|||
|
|
@ -59,11 +59,6 @@ public class EffectTemplateDetailResp extends BaseResp {
|
|||
*/
|
||||
private String subtitleText;
|
||||
|
||||
/**
|
||||
* 关联的字幕样式ID
|
||||
*/
|
||||
private Long subtitleStyleId;
|
||||
|
||||
/**
|
||||
* 字幕默认X位置(可为固定值或表达式)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ public class EffectTemplateResp extends BaseResp {
|
|||
/**
|
||||
* 默认尺寸({"width": w, "height": h})
|
||||
*/
|
||||
private String size_width;
|
||||
private Integer sizeWidth;
|
||||
|
||||
private String size_height;
|
||||
private Integer sizeHeight;
|
||||
|
||||
/**
|
||||
* 默认持续时间(秒),0表示无限
|
||||
|
|
@ -61,10 +61,7 @@ public class EffectTemplateResp extends BaseResp {
|
|||
*/
|
||||
private String subtitleText;
|
||||
|
||||
/**
|
||||
* 关联的字幕样式ID
|
||||
*/
|
||||
private Long subtitleStyleId;
|
||||
private String subtitleStyle;
|
||||
|
||||
/**
|
||||
* 字幕默认X位置(可为固定值或表达式)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
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.query.EffectTemplatePageQuery;
|
||||
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.EffectTemplateResp;
|
||||
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.starter.extension.crud.model.resp.PageResp;
|
||||
import top.continew.starter.extension.crud.service.impl.BaseServiceImpl;
|
||||
|
|
@ -40,7 +38,7 @@ public class EffectTemplateServiceImpl extends BaseServiceImpl<EffectTemplateMap
|
|||
if (query.getIsCustom() != null) {
|
||||
wrapper.eq(EffectTemplate::getIsCustom, query.getIsCustom());
|
||||
}
|
||||
query.setUserId(LoginHelper.getUserId().toString());
|
||||
//query.setUserId(LoginHelper.getUserId().toString());
|
||||
if (query.getUserId() != null) {
|
||||
wrapper.eq(EffectTemplate::getUserId, query.getUserId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ public class SubtitleStyleServiceImpl extends BaseServiceImpl<SubtitleStyleMappe
|
|||
wrapper.orderByDesc(SubtitleStyle::getCreateTime);
|
||||
|
||||
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.setTotal(result.getTotal());
|
||||
pageResp.setList(result.getRecords().stream().map(this::convertToResp).toList());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue