mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
fix:音色表id为String (#602)
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ public class TimbreController {
|
||||
@Operation(summary = "音色修改")
|
||||
@RequiresPermissions("sys:role:superAdmin")
|
||||
public Result<Void> update(
|
||||
@PathVariable Long id,
|
||||
@PathVariable String id,
|
||||
@RequestBody TimbreDataDTO dto) {
|
||||
ValidatorUtils.validateEntity(dto);
|
||||
timbreService.update(id, dto);
|
||||
|
||||
@@ -45,14 +45,14 @@ public interface TimbreService extends BaseService<TimbreEntity> {
|
||||
* @param timbreId 需要修改的id
|
||||
* @param dto 需要修改的数据
|
||||
*/
|
||||
void update(Long timbreId, TimbreDataDTO dto);
|
||||
void update(String timbreId, TimbreDataDTO dto);
|
||||
|
||||
/**
|
||||
* 批量删除音色
|
||||
*
|
||||
* @param ids 需要被删除的音色id列表
|
||||
*/
|
||||
void delete(Long[] ids);
|
||||
void delete(String[] ids);
|
||||
|
||||
List<String> getVoiceNames(String ttsModelId, String voiceName);
|
||||
}
|
||||
+2
-2
@@ -70,7 +70,7 @@ public class TimbreServiceImpl extends BaseServiceImpl<TimbreDao, TimbreEntity>
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(Long timbreId, TimbreDataDTO dto) {
|
||||
public void update(String timbreId, TimbreDataDTO dto) {
|
||||
isTtsModelId(dto.getTtsModelId());
|
||||
TimbreEntity timbreEntity = ConvertUtils.sourceToTarget(dto, TimbreEntity.class);
|
||||
timbreEntity.setId(timbreId);
|
||||
@@ -79,7 +79,7 @@ public class TimbreServiceImpl extends BaseServiceImpl<TimbreDao, TimbreEntity>
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Long[] ids) {
|
||||
public void delete(String[] ids) {
|
||||
baseDao.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user