mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 23:23:55 +08:00
Merge branch 'main' into test-server-pr
This commit is contained in:
+3
-3
@@ -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);
|
||||
@@ -85,8 +85,8 @@ public class TimbreController {
|
||||
@DeleteMapping("/{id}")
|
||||
@Operation(summary = "音色删除")
|
||||
@RequiresPermissions("sys:role:superAdmin")
|
||||
public Result<Void> delete(@PathVariable Long id) {
|
||||
timbreService.delete(new Long[] { id });
|
||||
public Result<Void> delete(@PathVariable String id) {
|
||||
timbreService.delete(new String[] { id });
|
||||
return new Result<>();
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<appender name="LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>/system/logs/admin.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<FileNamePattern>/home/system/logs/admin.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志大小-->
|
||||
<maxFileSize>1MB</maxFileSize>
|
||||
<!--日志文件保留天数-->
|
||||
|
||||
Reference in New Issue
Block a user