Compare commits
15 Commits
0d3a2cfd9f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ba86ac45f4 | |||
| d1f1e72732 | |||
| ab09d0ee74 | |||
| 407438fb99 | |||
| d0f4ad25c0 | |||
| da7bfbc9ce | |||
| 8cf9ad4436 | |||
| efc97b3584 | |||
| 980364efc1 | |||
| 08ec6cd010 | |||
| 7c1b515e6a | |||
| 9da3f3c0c5 | |||
| 331bba16c0 | |||
| 3a0d2b9c01 | |||
| abfcf7bfc8 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -53,3 +53,4 @@ application-my.yaml
|
|||||||
/yolo-ui-app/unpackage/
|
/yolo-ui-app/unpackage/
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
/.omc/
|
/.omc/
|
||||||
|
/AGENTS.md
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.yolo.keyboard.controller.admin.aicompanion;
|
package com.yolo.keyboard.controller.admin.aicompanion;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.aicompanion.AiCompanionI18nDO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -101,4 +102,56 @@ public class KeyboardAiCompanionController {
|
|||||||
BeanUtils.toBean(list, KeyboardAiCompanionRespVO.class));
|
BeanUtils.toBean(list, KeyboardAiCompanionRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 子表(AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍) ====================
|
||||||
|
|
||||||
|
@GetMapping("/ai-companion-i18n/page")
|
||||||
|
@Operation(summary = "获得AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍分页")
|
||||||
|
@Parameter(name = "id", description = "主键ID")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:ai-companion:query')")
|
||||||
|
public CommonResult<PageResult<AiCompanionI18nDO>> getAiCompanionI18nPage(PageParam pageReqVO,
|
||||||
|
@RequestParam("id") Long id) {
|
||||||
|
return success(aiCompanionService.getAiCompanionI18nPage(pageReqVO, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/ai-companion-i18n/create")
|
||||||
|
@Operation(summary = "创建AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:ai-companion:create')")
|
||||||
|
public CommonResult<Long> createAiCompanionI18n(@Valid @RequestBody AiCompanionI18nDO aiCompanionI18n) {
|
||||||
|
return success(aiCompanionService.createAiCompanionI18n(aiCompanionI18n));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/ai-companion-i18n/update")
|
||||||
|
@Operation(summary = "更新AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:ai-companion:update')")
|
||||||
|
public CommonResult<Boolean> updateAiCompanionI18n(@Valid @RequestBody AiCompanionI18nDO aiCompanionI18n) {
|
||||||
|
aiCompanionService.updateAiCompanionI18n(aiCompanionI18n);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/ai-companion-i18n/delete")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@Operation(summary = "删除AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:ai-companion:delete')")
|
||||||
|
public CommonResult<Boolean> deleteAiCompanionI18n(@RequestParam("id") Long id) {
|
||||||
|
aiCompanionService.deleteAiCompanionI18n(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/ai-companion-i18n/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:ai-companion:delete')")
|
||||||
|
public CommonResult<Boolean> deleteAiCompanionI18nList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
aiCompanionService.deleteAiCompanionI18nListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/ai-companion-i18n/get")
|
||||||
|
@Operation(summary = "获得AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:ai-companion:query')")
|
||||||
|
public CommonResult<AiCompanionI18nDO> getAiCompanionI18n(@RequestParam("id") Long id) {
|
||||||
|
return success(aiCompanionService.getAiCompanionI18n(id));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -13,9 +13,6 @@ import static com.yolo.keyboard.framework.common.util.date.DateUtils.FORMAT_YEAR
|
|||||||
@Data
|
@Data
|
||||||
public class KeyboardAiCompanionPageReqVO extends PageParam {
|
public class KeyboardAiCompanionPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "角色名称(展示用,如:Katie Leona)", example = "张三")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "角色头像URL,用于列表页和聊天页", example = "https://www.iocoder.cn")
|
@Schema(description = "角色头像URL,用于列表页和聊天页", example = "https://www.iocoder.cn")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
@@ -28,14 +25,8 @@ public class KeyboardAiCompanionPageReqVO extends PageParam {
|
|||||||
@Schema(description = "角色年龄段描述(如:20s、25-30)")
|
@Schema(description = "角色年龄段描述(如:20s、25-30)")
|
||||||
private String ageRange;
|
private String ageRange;
|
||||||
|
|
||||||
@Schema(description = "一句话人设描述,用于卡片或列表展示")
|
|
||||||
private String shortDesc;
|
|
||||||
|
|
||||||
@Schema(description = "角色详细介绍文案,用于角色详情页")
|
|
||||||
private String introText;
|
|
||||||
|
|
||||||
@Schema(description = "角色性格标签数组(如:温柔、黏人、治愈)")
|
@Schema(description = "角色性格标签数组(如:温柔、黏人、治愈)")
|
||||||
private List<String> personalityTags;
|
private Object personalityTags;
|
||||||
|
|
||||||
@Schema(description = "角色说话风格(如:撒娇型、理性型、活泼型)")
|
@Schema(description = "角色说话风格(如:撒娇型、理性型、活泼型)")
|
||||||
private String speakingStyle;
|
private String speakingStyle;
|
||||||
@@ -67,7 +58,7 @@ public class KeyboardAiCompanionPageReqVO extends PageParam {
|
|||||||
@Schema(description = "开场白音频")
|
@Schema(description = "开场白音频")
|
||||||
private String prologueAudio;
|
private String prologueAudio;
|
||||||
|
|
||||||
@Schema(description = "音频Id", example = "31328")
|
@Schema(description = "音频Id", example = "4155")
|
||||||
private String voiceId;
|
private String voiceId;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -12,14 +12,10 @@ import cn.idev.excel.annotation.*;
|
|||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class KeyboardAiCompanionRespVO {
|
public class KeyboardAiCompanionRespVO {
|
||||||
|
|
||||||
@Schema(description = "陪聊角色唯一ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7816")
|
@Schema(description = "陪聊角色唯一ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28180")
|
||||||
@ExcelProperty("陪聊角色唯一ID")
|
@ExcelProperty("陪聊角色唯一ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "角色名称(展示用,如:Katie Leona)", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
|
||||||
@ExcelProperty("角色名称(展示用,如:Katie Leona)")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "角色头像URL,用于列表页和聊天页", example = "https://www.iocoder.cn")
|
@Schema(description = "角色头像URL,用于列表页和聊天页", example = "https://www.iocoder.cn")
|
||||||
@ExcelProperty("角色头像URL,用于列表页和聊天页")
|
@ExcelProperty("角色头像URL,用于列表页和聊天页")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
@@ -36,17 +32,9 @@ public class KeyboardAiCompanionRespVO {
|
|||||||
@ExcelProperty("角色年龄段描述(如:20s、25-30)")
|
@ExcelProperty("角色年龄段描述(如:20s、25-30)")
|
||||||
private String ageRange;
|
private String ageRange;
|
||||||
|
|
||||||
@Schema(description = "一句话人设描述,用于卡片或列表展示")
|
|
||||||
@ExcelProperty("一句话人设描述,用于卡片或列表展示")
|
|
||||||
private String shortDesc;
|
|
||||||
|
|
||||||
@Schema(description = "角色详细介绍文案,用于角色详情页")
|
|
||||||
@ExcelProperty("角色详细介绍文案,用于角色详情页")
|
|
||||||
private String introText;
|
|
||||||
|
|
||||||
@Schema(description = "角色性格标签数组(如:温柔、黏人、治愈)")
|
@Schema(description = "角色性格标签数组(如:温柔、黏人、治愈)")
|
||||||
@ExcelProperty("角色性格标签数组(如:温柔、黏人、治愈)")
|
@ExcelProperty("角色性格标签数组(如:温柔、黏人、治愈)")
|
||||||
private List<String> personalityTags;
|
private Object personalityTags;
|
||||||
|
|
||||||
@Schema(description = "角色说话风格(如:撒娇型、理性型、活泼型)")
|
@Schema(description = "角色说话风格(如:撒娇型、理性型、活泼型)")
|
||||||
@ExcelProperty("角色说话风格(如:撒娇型、理性型、活泼型)")
|
@ExcelProperty("角色说话风格(如:撒娇型、理性型、活泼型)")
|
||||||
@@ -88,7 +76,7 @@ public class KeyboardAiCompanionRespVO {
|
|||||||
@ExcelProperty("开场白音频")
|
@ExcelProperty("开场白音频")
|
||||||
private String prologueAudio;
|
private String prologueAudio;
|
||||||
|
|
||||||
@Schema(description = "音频Id", example = "31328")
|
@Schema(description = "音频Id", example = "4155")
|
||||||
@ExcelProperty("音频Id")
|
@ExcelProperty("音频Id")
|
||||||
private String voiceId;
|
private String voiceId;
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,9 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class KeyboardAiCompanionSaveReqVO {
|
public class KeyboardAiCompanionSaveReqVO {
|
||||||
|
|
||||||
@Schema(description = "陪聊角色唯一ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7816")
|
@Schema(description = "陪聊角色唯一ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28180")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "角色名称(展示用,如:Katie Leona)", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
|
||||||
@NotEmpty(message = "角色名称(展示用,如:Katie Leona)不能为空")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "角色头像URL,用于列表页和聊天页", example = "https://www.iocoder.cn")
|
@Schema(description = "角色头像URL,用于列表页和聊天页", example = "https://www.iocoder.cn")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
@@ -30,14 +26,8 @@ public class KeyboardAiCompanionSaveReqVO {
|
|||||||
@Schema(description = "角色年龄段描述(如:20s、25-30)")
|
@Schema(description = "角色年龄段描述(如:20s、25-30)")
|
||||||
private String ageRange;
|
private String ageRange;
|
||||||
|
|
||||||
@Schema(description = "一句话人设描述,用于卡片或列表展示")
|
|
||||||
private String shortDesc;
|
|
||||||
|
|
||||||
@Schema(description = "角色详细介绍文案,用于角色详情页")
|
|
||||||
private String introText;
|
|
||||||
|
|
||||||
@Schema(description = "角色性格标签数组(如:温柔、黏人、治愈)")
|
@Schema(description = "角色性格标签数组(如:温柔、黏人、治愈)")
|
||||||
private List<String> personalityTags;
|
private Object personalityTags;
|
||||||
|
|
||||||
@Schema(description = "角色说话风格(如:撒娇型、理性型、活泼型)")
|
@Schema(description = "角色说话风格(如:撒娇型、理性型、活泼型)")
|
||||||
private String speakingStyle;
|
private String speakingStyle;
|
||||||
@@ -60,13 +50,19 @@ public class KeyboardAiCompanionSaveReqVO {
|
|||||||
@Schema(description = "角色热度评分,用于推荐排序")
|
@Schema(description = "角色热度评分,用于推荐排序")
|
||||||
private Integer popularityScore;
|
private Integer popularityScore;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
@Schema(description = "开场白")
|
@Schema(description = "开场白")
|
||||||
private String prologue;
|
private String prologue;
|
||||||
|
|
||||||
@Schema(description = "开场白音频")
|
@Schema(description = "开场白音频")
|
||||||
private String prologueAudio;
|
private String prologueAudio;
|
||||||
|
|
||||||
@Schema(description = "音频Id", example = "31328")
|
@Schema(description = "音频Id", example = "4155")
|
||||||
private String voiceId;
|
private String voiceId;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.yolo.keyboard.controller.admin.character;
|
package com.yolo.keyboard.controller.admin.character;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.character.CharacterI18nDO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -100,5 +101,56 @@ public class KeyboardCharacterController {
|
|||||||
ExcelUtils.write(response, "键盘人设.xls", "数据", KeyboardCharacterRespVO.class,
|
ExcelUtils.write(response, "键盘人设.xls", "数据", KeyboardCharacterRespVO.class,
|
||||||
BeanUtils.toBean(list, KeyboardCharacterRespVO.class));
|
BeanUtils.toBean(list, KeyboardCharacterRespVO.class));
|
||||||
}
|
}
|
||||||
|
// ==================== 子表(键盘人设国际化内容) ====================
|
||||||
|
|
||||||
|
@GetMapping("/character-i18n/page")
|
||||||
|
@Operation(summary = "获得键盘人设国际化内容分页")
|
||||||
|
@Parameter(name = "characterId", description = "角色主表id")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:character:query')")
|
||||||
|
public CommonResult<PageResult<CharacterI18nDO>> getCharacterI18nPage(PageParam pageReqVO,
|
||||||
|
@RequestParam("characterId") Long characterId) {
|
||||||
|
return success(characterService.getCharacterI18nPage(pageReqVO, characterId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/character-i18n/create")
|
||||||
|
@Operation(summary = "创建键盘人设国际化内容")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:character:create')")
|
||||||
|
public CommonResult<Long> createCharacterI18n(@Valid @RequestBody CharacterI18nDO characterI18n) {
|
||||||
|
return success(characterService.createCharacterI18n(characterI18n));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/character-i18n/update")
|
||||||
|
@Operation(summary = "更新键盘人设国际化内容")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:character:update')")
|
||||||
|
public CommonResult<Boolean> updateCharacterI18n(@Valid @RequestBody CharacterI18nDO characterI18n) {
|
||||||
|
characterService.updateCharacterI18n(characterI18n);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/character-i18n/delete")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@Operation(summary = "删除键盘人设国际化内容")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:character:delete')")
|
||||||
|
public CommonResult<Boolean> deleteCharacterI18n(@RequestParam("id") Long id) {
|
||||||
|
characterService.deleteCharacterI18n(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/character-i18n/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除键盘人设国际化内容")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:character:delete')")
|
||||||
|
public CommonResult<Boolean> deleteCharacterI18nList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
characterService.deleteCharacterI18nListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/character-i18n/get")
|
||||||
|
@Operation(summary = "获得键盘人设国际化内容")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:character:query')")
|
||||||
|
public CommonResult<CharacterI18nDO> getCharacterI18n(@RequestParam("id") Long id) {
|
||||||
|
return success(characterService.getCharacterI18n(id));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -13,12 +13,6 @@ import static com.yolo.keyboard.framework.common.util.date.DateUtils.FORMAT_YEAR
|
|||||||
@Data
|
@Data
|
||||||
public class KeyboardCharacterPageReqVO extends PageParam {
|
public class KeyboardCharacterPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "标题", example = "王五")
|
|
||||||
private String characterName;
|
|
||||||
|
|
||||||
@Schema(description = "背景描述")
|
|
||||||
private String characterBackground;
|
|
||||||
|
|
||||||
@Schema(description = "角色头像", example = "https://www.iocoder.cn")
|
@Schema(description = "角色头像", example = "https://www.iocoder.cn")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
|
|||||||
@@ -16,14 +16,6 @@ public class KeyboardCharacterRespVO {
|
|||||||
@ExcelProperty("主键 Id")
|
@ExcelProperty("主键 Id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "标题", example = "王五")
|
|
||||||
@ExcelProperty("标题")
|
|
||||||
private String characterName;
|
|
||||||
|
|
||||||
@Schema(description = "背景描述")
|
|
||||||
@ExcelProperty("背景描述")
|
|
||||||
private String characterBackground;
|
|
||||||
|
|
||||||
@Schema(description = "角色头像", example = "https://www.iocoder.cn")
|
@Schema(description = "角色头像", example = "https://www.iocoder.cn")
|
||||||
@ExcelProperty("角色头像")
|
@ExcelProperty("角色头像")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|||||||
@@ -14,12 +14,6 @@ public class KeyboardCharacterSaveReqVO {
|
|||||||
@Schema(description = "主键 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7592")
|
@Schema(description = "主键 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7592")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "标题", example = "王五")
|
|
||||||
private String characterName;
|
|
||||||
|
|
||||||
@Schema(description = "背景描述")
|
|
||||||
private String characterBackground;
|
|
||||||
|
|
||||||
@Schema(description = "角色头像", example = "https://www.iocoder.cn")
|
@Schema(description = "角色头像", example = "https://www.iocoder.cn")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
|
|||||||
@@ -52,4 +52,7 @@ public class KeyboardProductItemsPageReqVO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "订阅等级")
|
@Schema(description = "订阅等级")
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
|
@Schema(description = "平台")
|
||||||
|
private String platform;
|
||||||
}
|
}
|
||||||
@@ -67,4 +67,7 @@ public class KeyboardProductItemsRespVO {
|
|||||||
|
|
||||||
@Schema(description = "订阅等级")
|
@Schema(description = "订阅等级")
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
|
@Schema(description = "平台")
|
||||||
|
private String platform;
|
||||||
}
|
}
|
||||||
@@ -59,4 +59,7 @@ public class KeyboardProductItemsSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "订阅等级")
|
@Schema(description = "订阅等级")
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
|
@Schema(description = "平台")
|
||||||
|
private String platform;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.yolo.keyboard.controller.admin.tag;
|
package com.yolo.keyboard.controller.admin.tag;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.tag.TagI18nDO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -100,5 +101,55 @@ public class KeyboardTagController {
|
|||||||
ExcelUtils.write(response, "人设标签.xls", "数据", KeyboardTagRespVO.class,
|
ExcelUtils.write(response, "人设标签.xls", "数据", KeyboardTagRespVO.class,
|
||||||
BeanUtils.toBean(list, KeyboardTagRespVO.class));
|
BeanUtils.toBean(list, KeyboardTagRespVO.class));
|
||||||
}
|
}
|
||||||
|
// ==================== 子表(人设标签国际化) ====================
|
||||||
|
|
||||||
|
@GetMapping("/tag-i18n/page")
|
||||||
|
@Operation(summary = "获得人设标签国际化分页")
|
||||||
|
@Parameter(name = "tagId", description = "标签主表ID,对应 keyboard_tag.id")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:tag:query')")
|
||||||
|
public CommonResult<PageResult<TagI18nDO>> getTagI18nPage(PageParam pageReqVO,
|
||||||
|
@RequestParam("tagId") Integer tagId) {
|
||||||
|
return success(tagService.getTagI18nPage(pageReqVO, tagId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/tag-i18n/create")
|
||||||
|
@Operation(summary = "创建人设标签国际化")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:tag:create')")
|
||||||
|
public CommonResult<Long> createTagI18n(@Valid @RequestBody TagI18nDO tagI18n) {
|
||||||
|
return success(tagService.createTagI18n(tagI18n));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/tag-i18n/update")
|
||||||
|
@Operation(summary = "更新人设标签国际化")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:tag:update')")
|
||||||
|
public CommonResult<Boolean> updateTagI18n(@Valid @RequestBody TagI18nDO tagI18n) {
|
||||||
|
tagService.updateTagI18n(tagI18n);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/tag-i18n/delete")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@Operation(summary = "删除人设标签国际化")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:tag:delete')")
|
||||||
|
public CommonResult<Boolean> deleteTagI18n(@RequestParam("id") Long id) {
|
||||||
|
tagService.deleteTagI18n(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/tag-i18n/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除人设标签国际化")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:tag:delete')")
|
||||||
|
public CommonResult<Boolean> deleteTagI18nList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
tagService.deleteTagI18nListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/tag-i18n/get")
|
||||||
|
@Operation(summary = "获得人设标签国际化")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard:tag:query')")
|
||||||
|
public CommonResult<TagI18nDO> getTagI18n(@RequestParam("id") Long id) {
|
||||||
|
return success(tagService.getTagI18n(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -56,4 +56,5 @@ public class KeyboardThemesPageReqVO extends PageParam {
|
|||||||
@Schema(description = "真实下载数量", example = "3353")
|
@Schema(description = "真实下载数量", example = "3353")
|
||||||
private Long realDownloadCount;
|
private Long realDownloadCount;
|
||||||
|
|
||||||
}
|
@Schema(description = "所属国家")
|
||||||
|
private String local;}
|
||||||
@@ -73,4 +73,7 @@ public class KeyboardThemesRespVO {
|
|||||||
@ExcelProperty("真实下载数量")
|
@ExcelProperty("真实下载数量")
|
||||||
private Long realDownloadCount;
|
private Long realDownloadCount;
|
||||||
|
|
||||||
|
@Schema(description = "所属国家")
|
||||||
|
@ExcelProperty("所属国家")
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -57,4 +57,6 @@ public class KeyboardThemesSaveReqVO {
|
|||||||
@Schema(description = "真实下载数量", example = "3353")
|
@Schema(description = "真实下载数量", example = "3353")
|
||||||
private Long realDownloadCount;
|
private Long realDownloadCount;
|
||||||
|
|
||||||
|
@Schema(description = "所属国家")
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -18,4 +18,6 @@ public class KeyboardThemeStylesPageReqVO extends PageParam {
|
|||||||
@Schema(description = "更新时间")
|
@Schema(description = "更新时间")
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
@Schema(description = "所属国家地区")
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -27,4 +27,6 @@ public class KeyboardThemeStylesRespVO {
|
|||||||
@ExcelProperty("更新时间")
|
@ExcelProperty("更新时间")
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
@Schema(description = "所属国家地区")
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -19,4 +19,6 @@ public class KeyboardThemeStylesSaveReqVO {
|
|||||||
@Schema(description = "更新时间")
|
@Schema(description = "更新时间")
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
@Schema(description = "所属国家地区")
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.yolo.keyboard.dal.dataobject.aicompanion;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍 DO
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@TableName("keyboard_ai_companion_i18n")
|
||||||
|
@KeySequence("keyboard_ai_companion_i18n_id_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TenantIgnore
|
||||||
|
public class AiCompanionI18nDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 陪聊角色主表ID,对应 keyboard_ai_companion.id
|
||||||
|
*/
|
||||||
|
private Long companionId;
|
||||||
|
/**
|
||||||
|
* 语言标识,如 zh-CN、en-US、ja-JP
|
||||||
|
*/
|
||||||
|
private String locale;
|
||||||
|
/**
|
||||||
|
* 角色名称(多语言)
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 一句话人设描述(多语言)
|
||||||
|
*/
|
||||||
|
private String shortDesc;
|
||||||
|
/**
|
||||||
|
* 角色详细介绍文案(多语言)
|
||||||
|
*/
|
||||||
|
private String introText;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
private String prologue;
|
||||||
|
|
||||||
|
private String prologueAudio;
|
||||||
|
}
|
||||||
@@ -29,10 +29,7 @@ public class KeyboardAiCompanionDO {
|
|||||||
*/
|
*/
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
|
||||||
* 角色名称(展示用,如:Katie Leona)
|
|
||||||
*/
|
|
||||||
private String name;
|
|
||||||
/**
|
/**
|
||||||
* 角色头像URL,用于列表页和聊天页
|
* 角色头像URL,用于列表页和聊天页
|
||||||
*/
|
*/
|
||||||
@@ -49,14 +46,6 @@ public class KeyboardAiCompanionDO {
|
|||||||
* 角色年龄段描述(如:20s、25-30)
|
* 角色年龄段描述(如:20s、25-30)
|
||||||
*/
|
*/
|
||||||
private String ageRange;
|
private String ageRange;
|
||||||
/**
|
|
||||||
* 一句话人设描述,用于卡片或列表展示
|
|
||||||
*/
|
|
||||||
private String shortDesc;
|
|
||||||
/**
|
|
||||||
* 角色详细介绍文案,用于角色详情页
|
|
||||||
*/
|
|
||||||
private String introText;
|
|
||||||
/**
|
/**
|
||||||
* 角色性格标签数组(如:温柔、黏人、治愈)
|
* 角色性格标签数组(如:温柔、黏人、治愈)
|
||||||
*/
|
*/
|
||||||
@@ -94,14 +83,6 @@ public class KeyboardAiCompanionDO {
|
|||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
/**
|
|
||||||
* 开场白
|
|
||||||
*/
|
|
||||||
private String prologue;
|
|
||||||
/**
|
|
||||||
* 开场白音频
|
|
||||||
*/
|
|
||||||
private String prologueAudio;
|
|
||||||
/**
|
/**
|
||||||
* 音频Id
|
* 音频Id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.yolo.keyboard.dal.dataobject.character;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 键盘人设国际化内容 DO
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@TableName("keyboard_character_i18n")
|
||||||
|
@KeySequence("keyboard_character_i18n_id_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TenantIgnore
|
||||||
|
public class CharacterI18nDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键 Id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 角色主表id
|
||||||
|
*/
|
||||||
|
private Long characterId;
|
||||||
|
/**
|
||||||
|
* 语言标识,如 zh-CN/en-US/ja-JP
|
||||||
|
*/
|
||||||
|
private String locale;
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String characterName;
|
||||||
|
/**
|
||||||
|
* 背景描述
|
||||||
|
*/
|
||||||
|
private String characterBackground;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,14 +28,6 @@ public class KeyboardCharacterDO {
|
|||||||
*/
|
*/
|
||||||
@TableId
|
@TableId
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
|
||||||
* 标题
|
|
||||||
*/
|
|
||||||
private String characterName;
|
|
||||||
/**
|
|
||||||
* 背景描述
|
|
||||||
*/
|
|
||||||
private String characterBackground;
|
|
||||||
/**
|
/**
|
||||||
* 角色头像
|
* 角色头像
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.yolo.keyboard.dal.dataobject.productitems;
|
package com.yolo.keyboard.dal.dataobject.productitems;
|
||||||
|
|
||||||
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -81,4 +82,6 @@ public class KeyboardProductItemsDO{
|
|||||||
* 订阅等级
|
* 订阅等级
|
||||||
*/
|
*/
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
|
private String platform;
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ import com.yolo.keyboard.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
* @author ziin
|
* @author ziin
|
||||||
*/
|
*/
|
||||||
@TableName("keyboard_tag")
|
@TableName("keyboard_tag")
|
||||||
@KeySequence("keyboard_tag_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
@KeySequence("keyboard_tag_id_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
@Data
|
@Data
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@Builder
|
@Builder
|
||||||
@@ -28,10 +28,6 @@ public class KeyboardTagDO{
|
|||||||
*/
|
*/
|
||||||
@TableId
|
@TableId
|
||||||
private Integer id;
|
private Integer id;
|
||||||
/**
|
|
||||||
* 标签名
|
|
||||||
*/
|
|
||||||
private String tagName;
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.yolo.keyboard.dal.dataobject.tag;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人设标签国际化 DO
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@TableName("keyboard_tag_i18n")
|
||||||
|
@KeySequence("keyboard_tag_i18n_id_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TenantIgnore
|
||||||
|
public class TagI18nDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键 Id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 标签主表ID,对应 keyboard_tag.id
|
||||||
|
*/
|
||||||
|
private Integer tagId;
|
||||||
|
/**
|
||||||
|
* 语言标识,如 zh-CN、en-US、ja-JP
|
||||||
|
*/
|
||||||
|
private String locale;
|
||||||
|
/**
|
||||||
|
* 标签名称(多语言)
|
||||||
|
*/
|
||||||
|
private String tagName;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.yolo.keyboard.dal.dataobject.themes;
|
package com.yolo.keyboard.dal.dataobject.themes;
|
||||||
|
|
||||||
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -88,5 +89,5 @@ public class KeyboardThemesDO {
|
|||||||
*/
|
*/
|
||||||
private Long realDownloadCount;
|
private Long realDownloadCount;
|
||||||
|
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.yolo.keyboard.dal.dataobject.themestyles;
|
package com.yolo.keyboard.dal.dataobject.themestyles;
|
||||||
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -38,5 +39,5 @@ public class KeyboardThemeStylesDO {
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
private String local;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yolo.keyboard.dal.mysql.aicompanion;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.aicompanion.AiCompanionI18nDO;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍 Mapper
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AiCompanionI18nMapper extends BaseMapperX<AiCompanionI18nDO> {
|
||||||
|
|
||||||
|
default PageResult<AiCompanionI18nDO> selectPage(PageParam reqVO, Long id) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<AiCompanionI18nDO>()
|
||||||
|
.eq(AiCompanionI18nDO::getCompanionId, id)
|
||||||
|
.orderByDesc(AiCompanionI18nDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteById(Long id) {
|
||||||
|
return delete(AiCompanionI18nDO::getId, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteByIds(List<Long> ids) {
|
||||||
|
return deleteBatch(AiCompanionI18nDO::getId, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,13 +19,10 @@ public interface KeyboardAiCompanionMapper extends BaseMapperX<KeyboardAiCompani
|
|||||||
|
|
||||||
default PageResult<KeyboardAiCompanionDO> selectPage(KeyboardAiCompanionPageReqVO reqVO) {
|
default PageResult<KeyboardAiCompanionDO> selectPage(KeyboardAiCompanionPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardAiCompanionDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardAiCompanionDO>()
|
||||||
.likeIfPresent(KeyboardAiCompanionDO::getName, reqVO.getName())
|
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getAvatarUrl, reqVO.getAvatarUrl())
|
.eqIfPresent(KeyboardAiCompanionDO::getAvatarUrl, reqVO.getAvatarUrl())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getCoverImageUrl, reqVO.getCoverImageUrl())
|
.eqIfPresent(KeyboardAiCompanionDO::getCoverImageUrl, reqVO.getCoverImageUrl())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getGender, reqVO.getGender())
|
.eqIfPresent(KeyboardAiCompanionDO::getGender, reqVO.getGender())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getAgeRange, reqVO.getAgeRange())
|
.eqIfPresent(KeyboardAiCompanionDO::getAgeRange, reqVO.getAgeRange())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getShortDesc, reqVO.getShortDesc())
|
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getIntroText, reqVO.getIntroText())
|
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getPersonalityTags, reqVO.getPersonalityTags())
|
.eqIfPresent(KeyboardAiCompanionDO::getPersonalityTags, reqVO.getPersonalityTags())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getSpeakingStyle, reqVO.getSpeakingStyle())
|
.eqIfPresent(KeyboardAiCompanionDO::getSpeakingStyle, reqVO.getSpeakingStyle())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getSystemPrompt, reqVO.getSystemPrompt())
|
.eqIfPresent(KeyboardAiCompanionDO::getSystemPrompt, reqVO.getSystemPrompt())
|
||||||
@@ -35,8 +32,6 @@ public interface KeyboardAiCompanionMapper extends BaseMapperX<KeyboardAiCompani
|
|||||||
.eqIfPresent(KeyboardAiCompanionDO::getPopularityScore, reqVO.getPopularityScore())
|
.eqIfPresent(KeyboardAiCompanionDO::getPopularityScore, reqVO.getPopularityScore())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getCreatedAt, reqVO.getCreatedAt())
|
.eqIfPresent(KeyboardAiCompanionDO::getCreatedAt, reqVO.getCreatedAt())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getUpdatedAt, reqVO.getUpdatedAt())
|
.eqIfPresent(KeyboardAiCompanionDO::getUpdatedAt, reqVO.getUpdatedAt())
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getPrologue, reqVO.getPrologue())
|
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getPrologueAudio, reqVO.getPrologueAudio())
|
|
||||||
.eqIfPresent(KeyboardAiCompanionDO::getVoiceId, reqVO.getVoiceId())
|
.eqIfPresent(KeyboardAiCompanionDO::getVoiceId, reqVO.getVoiceId())
|
||||||
.orderByDesc(KeyboardAiCompanionDO::getId));
|
.orderByDesc(KeyboardAiCompanionDO::getId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yolo.keyboard.dal.mysql.character;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.character.CharacterI18nDO;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 键盘人设国际化内容 Mapper
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CharacterI18nMapper extends BaseMapperX<CharacterI18nDO> {
|
||||||
|
|
||||||
|
default PageResult<CharacterI18nDO> selectPage(PageParam reqVO, Long characterId) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<CharacterI18nDO>()
|
||||||
|
.eq(CharacterI18nDO::getCharacterId, characterId)
|
||||||
|
.orderByDesc(CharacterI18nDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteByCharacterId(Long characterId) {
|
||||||
|
return delete(CharacterI18nDO::getCharacterId, characterId);
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteByCharacterIds(List<Long> characterIds) {
|
||||||
|
return deleteBatch(CharacterI18nDO::getCharacterId, characterIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,8 +19,6 @@ public interface KeyboardCharacterMapper extends BaseMapperX<KeyboardCharacterDO
|
|||||||
|
|
||||||
default PageResult<KeyboardCharacterDO> selectPage(KeyboardCharacterPageReqVO reqVO) {
|
default PageResult<KeyboardCharacterDO> selectPage(KeyboardCharacterPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardCharacterDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardCharacterDO>()
|
||||||
.likeIfPresent(KeyboardCharacterDO::getCharacterName, reqVO.getCharacterName())
|
|
||||||
.eqIfPresent(KeyboardCharacterDO::getCharacterBackground, reqVO.getCharacterBackground())
|
|
||||||
.eqIfPresent(KeyboardCharacterDO::getAvatarUrl, reqVO.getAvatarUrl())
|
.eqIfPresent(KeyboardCharacterDO::getAvatarUrl, reqVO.getAvatarUrl())
|
||||||
.eqIfPresent(KeyboardCharacterDO::getDownload, reqVO.getDownload())
|
.eqIfPresent(KeyboardCharacterDO::getDownload, reqVO.getDownload())
|
||||||
.eqIfPresent(KeyboardCharacterDO::getTag, reqVO.getTag())
|
.eqIfPresent(KeyboardCharacterDO::getTag, reqVO.getTag())
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ public interface KeyboardTagMapper extends BaseMapperX<KeyboardTagDO> {
|
|||||||
|
|
||||||
default PageResult<KeyboardTagDO> selectPage(KeyboardTagPageReqVO reqVO) {
|
default PageResult<KeyboardTagDO> selectPage(KeyboardTagPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardTagDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardTagDO>()
|
||||||
.likeIfPresent(KeyboardTagDO::getTagName, reqVO.getTagName())
|
|
||||||
.eqIfPresent(KeyboardTagDO::getCreatedAt, reqVO.getCreatedAt())
|
.eqIfPresent(KeyboardTagDO::getCreatedAt, reqVO.getCreatedAt())
|
||||||
.eqIfPresent(KeyboardTagDO::getUpdatedAt, reqVO.getUpdatedAt())
|
.eqIfPresent(KeyboardTagDO::getUpdatedAt, reqVO.getUpdatedAt())
|
||||||
.orderByDesc(KeyboardTagDO::getId));
|
.orderByDesc(KeyboardTagDO::getId));
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yolo.keyboard.dal.mysql.tag;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.tag.TagI18nDO;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人设标签国际化 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TagI18nMapper extends BaseMapperX<TagI18nDO> {
|
||||||
|
|
||||||
|
default PageResult<TagI18nDO> selectPage(PageParam reqVO, Integer tagId) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<TagI18nDO>()
|
||||||
|
.eq(TagI18nDO::getTagId, tagId)
|
||||||
|
.orderByDesc(TagI18nDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteByTagId(Integer tagId) {
|
||||||
|
return delete(TagI18nDO::getTagId, tagId);
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteByTagIds(List<Integer> tagIds) {
|
||||||
|
return deleteBatch(TagI18nDO::getTagId, tagIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.yolo.keyboard.job;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.user.KeyboardUserDO;
|
||||||
|
import com.yolo.keyboard.dal.mysql.user.KeyboardUserMapper;
|
||||||
|
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.yolo.keyboard.framework.quartz.core.handler.JobHandler;
|
||||||
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VIP 到期检查定时任务
|
||||||
|
* 定期执行,将 VIP 已过期的用户关闭 VIP 权限
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class VipExpiryCheckJob implements JobHandler {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private KeyboardUserMapper userMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@TenantIgnore
|
||||||
|
public String execute(String param) {
|
||||||
|
log.info("[VipExpiryCheckJob] 开始执行 VIP 到期检查任务");
|
||||||
|
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
|
// 查询 VIP 已过期且仍处于 VIP 状态的用户
|
||||||
|
List<KeyboardUserDO> expiredUsers = userMapper.selectList(
|
||||||
|
new LambdaQueryWrapperX<KeyboardUserDO>()
|
||||||
|
.eq(KeyboardUserDO::getIsVip, true)
|
||||||
|
.le(KeyboardUserDO::getVipExpiry, now)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(expiredUsers)) {
|
||||||
|
log.info("[VipExpiryCheckJob] 没有需要处理的过期 VIP 用户");
|
||||||
|
return "没有需要处理的过期 VIP 用户";
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (KeyboardUserDO user : expiredUsers) {
|
||||||
|
user.setIsVip(false);
|
||||||
|
user.setUpdatedAt(now);
|
||||||
|
userMapper.updateById(user);
|
||||||
|
count++;
|
||||||
|
|
||||||
|
log.info("[VipExpiryCheckJob] 用户 {} VIP 已过期,已关闭 VIP 权限,过期时间: {}",
|
||||||
|
user.getUid(), user.getVipExpiry());
|
||||||
|
}
|
||||||
|
|
||||||
|
String result = String.format("共处理 %d 个过期 VIP 用户", count);
|
||||||
|
log.info("[VipExpiryCheckJob] 任务执行完成: {}", result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,9 @@ package com.yolo.keyboard.service.aicompanion;
|
|||||||
|
|
||||||
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionPageReqVO;
|
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionPageReqVO;
|
||||||
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionSaveReqVO;
|
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionSaveReqVO;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.aicompanion.AiCompanionI18nDO;
|
||||||
import com.yolo.keyboard.dal.dataobject.aicompanion.KeyboardAiCompanionDO;
|
import com.yolo.keyboard.dal.dataobject.aicompanion.KeyboardAiCompanionDO;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
@@ -59,5 +61,51 @@ public interface KeyboardAiCompanionService {
|
|||||||
* @return AI陪聊角色表,用于定义恋爱/陪伴型虚拟角色的基础信息与人设分页
|
* @return AI陪聊角色表,用于定义恋爱/陪伴型虚拟角色的基础信息与人设分页
|
||||||
*/
|
*/
|
||||||
PageResult<KeyboardAiCompanionDO> getAiCompanionPage(KeyboardAiCompanionPageReqVO pageReqVO);
|
PageResult<KeyboardAiCompanionDO> getAiCompanionPage(KeyboardAiCompanionPageReqVO pageReqVO);
|
||||||
|
// ==================== 子表(AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍) ====================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍分页
|
||||||
|
*/
|
||||||
|
PageResult<AiCompanionI18nDO> getAiCompanionI18nPage(PageParam pageReqVO, Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍
|
||||||
|
*
|
||||||
|
* @param aiCompanionI18n 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createAiCompanionI18n(@Valid AiCompanionI18nDO aiCompanionI18n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍
|
||||||
|
*
|
||||||
|
* @param aiCompanionI18n 更新信息
|
||||||
|
*/
|
||||||
|
void updateAiCompanionI18n(@Valid AiCompanionI18nDO aiCompanionI18n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteAiCompanionI18n(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteAiCompanionI18nListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍
|
||||||
|
*/
|
||||||
|
AiCompanionI18nDO getAiCompanionI18n(Long id);
|
||||||
}
|
}
|
||||||
@@ -2,17 +2,22 @@ package com.yolo.keyboard.service.aicompanion;
|
|||||||
|
|
||||||
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionPageReqVO;
|
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionPageReqVO;
|
||||||
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionSaveReqVO;
|
import com.yolo.keyboard.controller.admin.aicompanion.vo.KeyboardAiCompanionSaveReqVO;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.aicompanion.AiCompanionI18nDO;
|
||||||
import com.yolo.keyboard.dal.dataobject.aicompanion.KeyboardAiCompanionDO;
|
import com.yolo.keyboard.dal.dataobject.aicompanion.KeyboardAiCompanionDO;
|
||||||
|
import com.yolo.keyboard.dal.mysql.aicompanion.AiCompanionI18nMapper;
|
||||||
import com.yolo.keyboard.dal.mysql.aicompanion.KeyboardAiCompanionMapper;
|
import com.yolo.keyboard.dal.mysql.aicompanion.KeyboardAiCompanionMapper;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
import com.yolo.keyboard.framework.common.util.object.BeanUtils;
|
import com.yolo.keyboard.framework.common.util.object.BeanUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.yolo.keyboard.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.yolo.keyboard.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.AI_COMPANION_I18N_NOT_EXISTS;
|
||||||
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.AI_COMPANION_NOT_EXISTS;
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.AI_COMPANION_NOT_EXISTS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,6 +31,8 @@ public class KeyboardAiCompanionServiceImpl implements KeyboardAiCompanionServic
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private KeyboardAiCompanionMapper aiCompanionMapper;
|
private KeyboardAiCompanionMapper aiCompanionMapper;
|
||||||
|
@Resource
|
||||||
|
private AiCompanionI18nMapper aiCompanionI18nMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createAiCompanion(KeyboardAiCompanionSaveReqVO createReqVO) {
|
public Long createAiCompanion(KeyboardAiCompanionSaveReqVO createReqVO) {
|
||||||
@@ -47,17 +54,25 @@ public class KeyboardAiCompanionServiceImpl implements KeyboardAiCompanionServic
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteAiCompanion(Long id) {
|
public void deleteAiCompanion(Long id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateAiCompanionExists(id);
|
validateAiCompanionExists(id);
|
||||||
// 删除
|
// 删除
|
||||||
aiCompanionMapper.deleteById(id);
|
aiCompanionMapper.deleteById(id);
|
||||||
|
|
||||||
|
// 删除子表
|
||||||
|
deleteAiCompanionI18nById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteAiCompanionListByIds(List<Long> ids) {
|
public void deleteAiCompanionListByIds(List<Long> ids) {
|
||||||
// 删除
|
// 删除
|
||||||
aiCompanionMapper.deleteByIds(ids);
|
aiCompanionMapper.deleteByIds(ids);
|
||||||
|
|
||||||
|
// 删除子表
|
||||||
|
deleteAiCompanionI18nByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -77,4 +92,56 @@ public class KeyboardAiCompanionServiceImpl implements KeyboardAiCompanionServic
|
|||||||
return aiCompanionMapper.selectPage(pageReqVO);
|
return aiCompanionMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 子表(AI陪聊角色国际化表,用于存储不同语言下的角色名称、一句话描述和详细介绍) ====================
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<AiCompanionI18nDO> getAiCompanionI18nPage(PageParam pageReqVO, Long id) {
|
||||||
|
return aiCompanionI18nMapper.selectPage(pageReqVO, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createAiCompanionI18n(AiCompanionI18nDO aiCompanionI18n) {
|
||||||
|
aiCompanionI18nMapper.insert(aiCompanionI18n);
|
||||||
|
return aiCompanionI18n.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAiCompanionI18n(AiCompanionI18nDO aiCompanionI18n) {
|
||||||
|
// 校验存在
|
||||||
|
validateAiCompanionI18nExists(aiCompanionI18n.getId());
|
||||||
|
// 更新
|
||||||
|
aiCompanionI18nMapper.updateById(aiCompanionI18n);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAiCompanionI18n(Long id) {
|
||||||
|
// 删除
|
||||||
|
aiCompanionI18nMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAiCompanionI18nListByIds(List<Long> ids) {
|
||||||
|
// 删除
|
||||||
|
aiCompanionI18nMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AiCompanionI18nDO getAiCompanionI18n(Long id) {
|
||||||
|
return aiCompanionI18nMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateAiCompanionI18nExists(Long id) {
|
||||||
|
if (aiCompanionI18nMapper.selectById(id) == null) {
|
||||||
|
throw exception(AI_COMPANION_I18N_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteAiCompanionI18nById(Long id) {
|
||||||
|
aiCompanionI18nMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteAiCompanionI18nByIds(List<Long> ids) {
|
||||||
|
aiCompanionI18nMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.yolo.keyboard.service.character;
|
package com.yolo.keyboard.service.character;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.character.CharacterI18nDO;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
import jakarta.validation.*;
|
import jakarta.validation.*;
|
||||||
import com.yolo.keyboard.controller.admin.character.vo.*;
|
import com.yolo.keyboard.controller.admin.character.vo.*;
|
||||||
import com.yolo.keyboard.dal.dataobject.character.KeyboardCharacterDO;
|
import com.yolo.keyboard.dal.dataobject.character.KeyboardCharacterDO;
|
||||||
@@ -57,5 +60,51 @@ public interface KeyboardCharacterService {
|
|||||||
* @return 键盘人设分页
|
* @return 键盘人设分页
|
||||||
*/
|
*/
|
||||||
PageResult<KeyboardCharacterDO> getCharacterPage(KeyboardCharacterPageReqVO pageReqVO);
|
PageResult<KeyboardCharacterDO> getCharacterPage(KeyboardCharacterPageReqVO pageReqVO);
|
||||||
|
// ==================== 子表(键盘人设国际化内容) ====================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得键盘人设国际化内容分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @param characterId 角色主表id
|
||||||
|
* @return 键盘人设国际化内容分页
|
||||||
|
*/
|
||||||
|
PageResult<CharacterI18nDO> getCharacterI18nPage(PageParam pageReqVO, Long characterId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建键盘人设国际化内容
|
||||||
|
*
|
||||||
|
* @param characterI18n 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createCharacterI18n(@Valid CharacterI18nDO characterI18n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新键盘人设国际化内容
|
||||||
|
*
|
||||||
|
* @param characterI18n 更新信息
|
||||||
|
*/
|
||||||
|
void updateCharacterI18n(@Valid CharacterI18nDO characterI18n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除键盘人设国际化内容
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteCharacterI18n(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除键盘人设国际化内容
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteCharacterI18nListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得键盘人设国际化内容
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 键盘人设国际化内容
|
||||||
|
*/
|
||||||
|
CharacterI18nDO getCharacterI18n(Long id);
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,23 @@
|
|||||||
package com.yolo.keyboard.service.character;
|
package com.yolo.keyboard.service.character;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import com.yolo.keyboard.controller.admin.character.vo.*;
|
import com.yolo.keyboard.controller.admin.character.vo.*;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.character.CharacterI18nDO;
|
||||||
import com.yolo.keyboard.dal.dataobject.character.KeyboardCharacterDO;
|
import com.yolo.keyboard.dal.dataobject.character.KeyboardCharacterDO;
|
||||||
|
import com.yolo.keyboard.dal.mysql.character.CharacterI18nMapper;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
import com.yolo.keyboard.framework.common.util.object.BeanUtils;
|
import com.yolo.keyboard.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
import com.yolo.keyboard.dal.mysql.character.KeyboardCharacterMapper;
|
import com.yolo.keyboard.dal.mysql.character.KeyboardCharacterMapper;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import static com.yolo.keyboard.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.yolo.keyboard.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.CHARACTER_I18N_NOT_EXISTS;
|
||||||
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.CHARACTER_NOT_EXISTS;
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.CHARACTER_NOT_EXISTS;
|
||||||
|
|
||||||
|
|
||||||
@@ -25,15 +30,27 @@ import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.CHARACTER_
|
|||||||
@Validated
|
@Validated
|
||||||
public class KeyboardCharacterServiceImpl implements KeyboardCharacterService {
|
public class KeyboardCharacterServiceImpl implements KeyboardCharacterService {
|
||||||
|
|
||||||
|
private static final String CHARACTER_CACHE_KEY_PREFIX = "character:";
|
||||||
|
private static final long CHARACTER_CACHE_TTL_MINUTES = 5L;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CharacterI18nMapper characterI18nMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private KeyboardCharacterMapper characterMapper;
|
private KeyboardCharacterMapper characterMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RedisTemplate<String, Object> redisTemplate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createCharacter(KeyboardCharacterSaveReqVO createReqVO) {
|
public Long createCharacter(KeyboardCharacterSaveReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
KeyboardCharacterDO character = BeanUtils.toBean(createReqVO, KeyboardCharacterDO.class);
|
KeyboardCharacterDO character = BeanUtils.toBean(createReqVO, KeyboardCharacterDO.class);
|
||||||
characterMapper.insert(character);
|
characterMapper.insert(character);
|
||||||
|
|
||||||
|
// 同步刷新 Redis 缓存,保证缓存内容与数据库最终落库数据一致
|
||||||
|
refreshCharacterCache(character.getId());
|
||||||
|
|
||||||
// 返回
|
// 返回
|
||||||
return character.getId();
|
return character.getId();
|
||||||
}
|
}
|
||||||
@@ -45,6 +62,9 @@ public class KeyboardCharacterServiceImpl implements KeyboardCharacterService {
|
|||||||
// 更新
|
// 更新
|
||||||
KeyboardCharacterDO updateObj = BeanUtils.toBean(updateReqVO, KeyboardCharacterDO.class);
|
KeyboardCharacterDO updateObj = BeanUtils.toBean(updateReqVO, KeyboardCharacterDO.class);
|
||||||
characterMapper.updateById(updateObj);
|
characterMapper.updateById(updateObj);
|
||||||
|
|
||||||
|
// 删除 Redis 缓存,下次读取时再从数据库加载最新数据
|
||||||
|
deleteCharacterCache(updateReqVO.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,14 +73,73 @@ public class KeyboardCharacterServiceImpl implements KeyboardCharacterService {
|
|||||||
validateCharacterExists(id);
|
validateCharacterExists(id);
|
||||||
// 删除
|
// 删除
|
||||||
characterMapper.deleteById(id);
|
characterMapper.deleteById(id);
|
||||||
|
|
||||||
|
// 同步删除 Redis 缓存,避免读取到已删除数据
|
||||||
|
deleteCharacterCache(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteCharacterListByIds(List<Long> ids) {
|
public void deleteCharacterListByIds(List<Long> ids) {
|
||||||
// 删除
|
// 删除
|
||||||
characterMapper.deleteByIds(ids);
|
characterMapper.deleteByIds(ids);
|
||||||
|
|
||||||
|
// 同步删除 Redis 缓存,避免批量删除后残留脏数据
|
||||||
|
deleteCharacterCaches(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 子表(键盘人设国际化内容) ====================
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<CharacterI18nDO> getCharacterI18nPage(PageParam pageReqVO, Long characterId) {
|
||||||
|
return characterI18nMapper.selectPage(pageReqVO, characterId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createCharacterI18n(CharacterI18nDO characterI18n) {
|
||||||
|
characterI18nMapper.insert(characterI18n);
|
||||||
|
return characterI18n.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateCharacterI18n(CharacterI18nDO characterI18n) {
|
||||||
|
// 校验存在
|
||||||
|
validateCharacterI18nExists(characterI18n.getId());
|
||||||
|
// 更新
|
||||||
|
characterI18nMapper.updateById(characterI18n);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteCharacterI18n(Long id) {
|
||||||
|
// 删除
|
||||||
|
characterI18nMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteCharacterI18nListByIds(List<Long> ids) {
|
||||||
|
// 删除
|
||||||
|
characterI18nMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharacterI18nDO getCharacterI18n(Long id) {
|
||||||
|
return characterI18nMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateCharacterI18nExists(Long id) {
|
||||||
|
if (characterI18nMapper.selectById(id) == null) {
|
||||||
|
throw exception(CHARACTER_I18N_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteCharacterI18nByCharacterId(Long characterId) {
|
||||||
|
characterI18nMapper.deleteByCharacterId(characterId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteCharacterI18nByCharacterIds(List<Long> characterIds) {
|
||||||
|
characterI18nMapper.deleteByCharacterIds(characterIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void validateCharacterExists(Long id) {
|
private void validateCharacterExists(Long id) {
|
||||||
if (characterMapper.selectById(id) == null) {
|
if (characterMapper.selectById(id) == null) {
|
||||||
@@ -78,4 +157,43 @@ public class KeyboardCharacterServiceImpl implements KeyboardCharacterService {
|
|||||||
return characterMapper.selectPage(pageReqVO);
|
return characterMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void refreshCharacterCache(Long characterId) {
|
||||||
|
if (characterId == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String cacheKey = CHARACTER_CACHE_KEY_PREFIX + characterId;
|
||||||
|
KeyboardCharacterDO latestCharacter = characterMapper.selectById(characterId);
|
||||||
|
if (latestCharacter == null) {
|
||||||
|
redisTemplate.delete(cacheKey);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
redisTemplate.opsForValue().set(cacheKey, latestCharacter, CHARACTER_CACHE_TTL_MINUTES, TimeUnit.MINUTES);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteCharacterCache(Long characterId) {
|
||||||
|
if (characterId == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
redisTemplate.delete(buildCharacterCacheKey(characterId));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteCharacterCaches(List<Long> characterIds) {
|
||||||
|
if (characterIds == null || characterIds.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Set<String> cacheKeys = new HashSet<>();
|
||||||
|
for (Long characterId : characterIds) {
|
||||||
|
if (characterId != null) {
|
||||||
|
cacheKeys.add(buildCharacterCacheKey(characterId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!cacheKeys.isEmpty()) {
|
||||||
|
redisTemplate.delete(cacheKeys);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildCharacterCacheKey(Long characterId) {
|
||||||
|
return CHARACTER_CACHE_KEY_PREFIX + characterId;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.yolo.keyboard.service.tag;
|
package com.yolo.keyboard.service.tag;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.dal.dataobject.tag.TagI18nDO;
|
||||||
import jakarta.validation.*;
|
import jakarta.validation.*;
|
||||||
import com.yolo.keyboard.controller.admin.tag.vo.*;
|
import com.yolo.keyboard.controller.admin.tag.vo.*;
|
||||||
import com.yolo.keyboard.dal.dataobject.tag.KeyboardTagDO;
|
import com.yolo.keyboard.dal.dataobject.tag.KeyboardTagDO;
|
||||||
@@ -58,5 +60,51 @@ public interface KeyboardTagService {
|
|||||||
* @return 人设标签分页
|
* @return 人设标签分页
|
||||||
*/
|
*/
|
||||||
PageResult<KeyboardTagDO> getTagPage(KeyboardTagPageReqVO pageReqVO);
|
PageResult<KeyboardTagDO> getTagPage(KeyboardTagPageReqVO pageReqVO);
|
||||||
|
// ==================== 子表(人设标签国际化) ====================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得人设标签国际化分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @param tagId 标签主表ID,对应 keyboard_tag.id
|
||||||
|
* @return 人设标签国际化分页
|
||||||
|
*/
|
||||||
|
PageResult<TagI18nDO> getTagI18nPage(PageParam pageReqVO, Integer tagId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人设标签国际化
|
||||||
|
*
|
||||||
|
* @param tagI18n 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createTagI18n(@Valid TagI18nDO tagI18n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人设标签国际化
|
||||||
|
*
|
||||||
|
* @param tagI18n 更新信息
|
||||||
|
*/
|
||||||
|
void updateTagI18n(@Valid TagI18nDO tagI18n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除人设标签国际化
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteTagI18n(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除人设标签国际化
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteTagI18nListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得人设标签国际化
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 人设标签国际化
|
||||||
|
*/
|
||||||
|
TagI18nDO getTagI18n(Long id);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.yolo.keyboard.service.tag;
|
package com.yolo.keyboard.service.tag;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.tag.TagI18nDO;
|
||||||
|
import com.yolo.keyboard.dal.mysql.tag.TagI18nMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -18,6 +20,7 @@ import com.yolo.keyboard.dal.mysql.tag.KeyboardTagMapper;
|
|||||||
import static com.yolo.keyboard.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.yolo.keyboard.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static com.yolo.keyboard.framework.common.util.collection.CollectionUtils.convertList;
|
import static com.yolo.keyboard.framework.common.util.collection.CollectionUtils.convertList;
|
||||||
import static com.yolo.keyboard.framework.common.util.collection.CollectionUtils.diffList;
|
import static com.yolo.keyboard.framework.common.util.collection.CollectionUtils.diffList;
|
||||||
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.TAG_I18N_NOT_EXISTS;
|
||||||
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.TAG_NOT_EXISTS;
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.TAG_NOT_EXISTS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,6 +35,9 @@ public class KeyboardTagServiceImpl implements KeyboardTagService {
|
|||||||
@Resource
|
@Resource
|
||||||
private KeyboardTagMapper tagMapper;
|
private KeyboardTagMapper tagMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TagI18nMapper tagI18nMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer createTag(KeyboardTagSaveReqVO createReqVO) {
|
public Integer createTag(KeyboardTagSaveReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
@@ -82,4 +88,55 @@ public class KeyboardTagServiceImpl implements KeyboardTagService {
|
|||||||
return tagMapper.selectPage(pageReqVO);
|
return tagMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 子表(人设标签国际化) ====================
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<TagI18nDO> getTagI18nPage(PageParam pageReqVO, Integer tagId) {
|
||||||
|
return tagI18nMapper.selectPage(pageReqVO, tagId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createTagI18n(TagI18nDO tagI18n) {
|
||||||
|
tagI18nMapper.insert(tagI18n);
|
||||||
|
return tagI18n.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTagI18n(TagI18nDO tagI18n) {
|
||||||
|
// 校验存在
|
||||||
|
validateTagI18nExists(tagI18n.getId());
|
||||||
|
// 更新
|
||||||
|
tagI18nMapper.updateById(tagI18n);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTagI18n(Long id) {
|
||||||
|
// 删除
|
||||||
|
tagI18nMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTagI18nListByIds(List<Long> ids) {
|
||||||
|
// 删除
|
||||||
|
tagI18nMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TagI18nDO getTagI18n(Long id) {
|
||||||
|
return tagI18nMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateTagI18nExists(Long id) {
|
||||||
|
if (tagI18nMapper.selectById(id) == null) {
|
||||||
|
throw exception(TAG_I18N_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteTagI18nByTagId(Integer tagId) {
|
||||||
|
tagI18nMapper.deleteByTagId(tagId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteTagI18nByTagIds(List<Integer> tagIds) {
|
||||||
|
tagI18nMapper.deleteByTagIds(tagIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -97,4 +97,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode AI_COMPANION_NOT_EXISTS = new ErrorCode(1_001_202_023, "AI陪聊角色表,用于定义恋爱/陪伴型虚拟角色的基础信息与人设不存在");
|
ErrorCode AI_COMPANION_NOT_EXISTS = new ErrorCode(1_001_202_023, "AI陪聊角色表,用于定义恋爱/陪伴型虚拟角色的基础信息与人设不存在");
|
||||||
ErrorCode WARNING_MESSAGE_NOT_EXISTS = new ErrorCode(1_001_202_024, "用户注销提示信息不存在");
|
ErrorCode WARNING_MESSAGE_NOT_EXISTS = new ErrorCode(1_001_202_024, "用户注销提示信息不存在");
|
||||||
ErrorCode APP_VERSIONS_NOT_EXISTS = new ErrorCode(1_001_202_025, "App 版本发布与更新检查表信息不存在");
|
ErrorCode APP_VERSIONS_NOT_EXISTS = new ErrorCode(1_001_202_025, "App 版本发布与更新检查表信息不存在");
|
||||||
|
ErrorCode CHARACTER_I18N_NOT_EXISTS = new ErrorCode(1_001_202_026, "键盘人设国际化内容不存在");
|
||||||
|
ErrorCode AI_COMPANION_I18N_NOT_EXISTS = new ErrorCode(1_001_202_027, "AI陪聊人设国际化内容不存在");
|
||||||
|
ErrorCode TAG_I18N_NOT_EXISTS = new ErrorCode(1_001_202_028, "人设标签国际化内容不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:postgresql://localhost:5432/keyborad_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:postgresql://43.162.81.217:5231/keyborad_db?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: 123asd
|
password: dpW7FHZ7FtK5czc4
|
||||||
# slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
# slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
# lazy: true # 开启懒加载,保证启动速度
|
# lazy: true # 开启懒加载,保证启动速度
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
||||||
@@ -59,9 +59,9 @@ spring:
|
|||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
host: 400-infra.server.iocoder.cn # 地址
|
port: 6379
|
||||||
port: 6379 # 端口
|
host: localhost
|
||||||
database: 1 # 数据库索引
|
database: 0
|
||||||
# password: 123456 # 密码,建议生产环境开启
|
# password: 123456 # 密码,建议生产环境开启
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
--- #################### 定时任务相关配置 ####################
|
||||||
|
|||||||
Reference in New Issue
Block a user