音色表添加,修改增加方法查询
parent
05fa43df54
commit
e4e69c2759
@ -0,0 +1,16 @@
|
||||
package com.pjilisense.flxai.dao;
|
||||
|
||||
import com.pjilisense.flxai.base.dao.BaseDao;
|
||||
import com.pjilisense.flxai.entity.VoiceRefFilesEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 音频参考文件
|
||||
*
|
||||
* @author liushujing liushujing@philisense.com
|
||||
* @since 1.0.0 2025-02-28
|
||||
*/
|
||||
@Mapper
|
||||
public interface VoiceRefFilesDao extends BaseDao<VoiceRefFilesEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.pjilisense.flxai.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 音频参考文件
|
||||
*
|
||||
* @author liushujing liushujing@philisense.com
|
||||
* @since 1.0.0 2025-02-28
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "音频参考文件")
|
||||
public class VoiceRefFilesDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "音频存路径")
|
||||
private String voicePath;
|
||||
|
||||
@ApiModelProperty(value = "显示图片路径")
|
||||
private String imgPath;
|
||||
|
||||
@ApiModelProperty(value = "语言")
|
||||
private String language;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.pjilisense.flxai.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 音频参考文件
|
||||
*
|
||||
* @author liushujing liushujing@philisense.com
|
||||
* @since 1.0.0 2025-02-28
|
||||
*/
|
||||
@Data
|
||||
@TableName("voice_ref_files")
|
||||
public class VoiceRefFilesEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 音频存路径
|
||||
*/
|
||||
private String voicePath;
|
||||
/**
|
||||
* 显示图片路径
|
||||
*/
|
||||
private String imgPath;
|
||||
/**
|
||||
* 语言
|
||||
*/
|
||||
private String language;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.pjilisense.flxai.service;
|
||||
|
||||
import com.pjilisense.flxai.base.service.CrudService;
|
||||
import com.pjilisense.flxai.dto.VoiceRefFilesDTO;
|
||||
import com.pjilisense.flxai.entity.VoiceRefFilesEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 音频参考文件
|
||||
*
|
||||
* @author liushujing liushujing@philisense.com
|
||||
* @since 1.0.0 2025-02-28
|
||||
*/
|
||||
public interface VoiceRefFilesService extends CrudService<VoiceRefFilesEntity, VoiceRefFilesDTO> {
|
||||
|
||||
List<VoiceRefFilesDTO> getAll(VoiceRefFilesDTO dto);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.pjilisense.flxai.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.pjilisense.flxai.base.service.impl.CrudServiceImpl;
|
||||
import com.pjilisense.flxai.dao.VoiceRefFilesDao;
|
||||
import com.pjilisense.flxai.dto.DigitalImgDTO;
|
||||
import com.pjilisense.flxai.dto.VoiceRefFilesDTO;
|
||||
import com.pjilisense.flxai.entity.DigitalImgEntity;
|
||||
import com.pjilisense.flxai.entity.VoiceRefFilesEntity;
|
||||
import com.pjilisense.flxai.service.VoiceRefFilesService;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.pjilisense.flxai.utils.ConvertUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 音频参考文件
|
||||
*
|
||||
* @author liushujing liushujing@philisense.com
|
||||
* @since 1.0.0 2025-02-28
|
||||
*/
|
||||
@Service
|
||||
public class VoiceRefFilesServiceImpl extends CrudServiceImpl<VoiceRefFilesDao, VoiceRefFilesEntity, VoiceRefFilesDTO> implements VoiceRefFilesService {
|
||||
|
||||
@Override
|
||||
public QueryWrapper<VoiceRefFilesEntity> getWrapper(Map<String, Object> params){
|
||||
String id = (String)params.get("id");
|
||||
|
||||
QueryWrapper<VoiceRefFilesEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StrUtil.isNotBlank(id), "id", id);
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VoiceRefFilesDTO> getAll(VoiceRefFilesDTO dto) {
|
||||
QueryWrapper<VoiceRefFilesEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getLanguage()), "language", dto.getLanguage());
|
||||
wrapper.eq(StrUtil.isNotBlank(dto.getId()), "id", dto.getId());
|
||||
wrapper.orderByAsc("id");
|
||||
List<VoiceRefFilesEntity> entityList =baseDao.selectList(wrapper);
|
||||
return ConvertUtils.sourceToTarget(entityList, VoiceRefFilesDTO.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.pjilisense.flxai.dao.VoiceRefFilesDao">
|
||||
|
||||
<resultMap type="com.pjilisense.flxai.entity.VoiceRefFilesEntity" id="voiceRefFilesMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="voicePath" column="voice_path"/>
|
||||
<result property="imgPath" column="img_path"/>
|
||||
<result property="language" column="language"/>
|
||||
</resultMap>
|
||||
<resultMap type="java.util.Map" id="BaseResultMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="voicePath" column="voice_path"/>
|
||||
<result property="imgPath" column="img_path"/>
|
||||
<result property="language" column="language"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue