feat(theme): 新增键盘主题风格管理功能
新增 Controller/Service/Mapper/VO 等全套模块,支持主题风格分页、保存及异常错误码定义
This commit is contained in:
@@ -0,0 +1,106 @@
|
|||||||
|
package com.yolo.keyboard.controller.admin.themestyles;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesPageReqVO;
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesRespVO;
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesSaveReqVO;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.themestyles.KeyboardThemeStylesDO;
|
||||||
|
import com.yolo.keyboard.service.themestyles.KeyboardThemeStylesService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import jakarta.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.CommonResult;
|
||||||
|
import com.yolo.keyboard.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.yolo.keyboard.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import static com.yolo.keyboard.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 主题风格")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/keyboard-server/keyboard-theme-styles")
|
||||||
|
@Validated
|
||||||
|
public class KeyboardThemeStylesController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private KeyboardThemeStylesService keyboardThemeStylesService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建主题风格")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:create')")
|
||||||
|
public CommonResult<Long> createKeyboardThemeStyles(@Valid @RequestBody KeyboardThemeStylesSaveReqVO createReqVO) {
|
||||||
|
return success(keyboardThemeStylesService.createKeyboardThemeStyles(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新主题风格")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:update')")
|
||||||
|
public CommonResult<Boolean> updateKeyboardThemeStyles(@Valid @RequestBody KeyboardThemeStylesSaveReqVO updateReqVO) {
|
||||||
|
keyboardThemeStylesService.updateKeyboardThemeStyles(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除主题风格")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:delete')")
|
||||||
|
public CommonResult<Boolean> deleteKeyboardThemeStyles(@RequestParam("id") Long id) {
|
||||||
|
keyboardThemeStylesService.deleteKeyboardThemeStyles(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete-list")
|
||||||
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
|
@Operation(summary = "批量删除主题风格")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:delete')")
|
||||||
|
public CommonResult<Boolean> deleteKeyboardThemeStylesList(@RequestParam("ids") List<Long> ids) {
|
||||||
|
keyboardThemeStylesService.deleteKeyboardThemeStylesListByIds(ids);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得主题风格")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:query')")
|
||||||
|
public CommonResult<KeyboardThemeStylesRespVO> getKeyboardThemeStyles(@RequestParam("id") Long id) {
|
||||||
|
KeyboardThemeStylesDO keyboardThemeStyles = keyboardThemeStylesService.getKeyboardThemeStyles(id);
|
||||||
|
return success(BeanUtils.toBean(keyboardThemeStyles, KeyboardThemeStylesRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得主题风格分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:query')")
|
||||||
|
public CommonResult<PageResult<KeyboardThemeStylesRespVO>> getKeyboardThemeStylesPage(@Valid KeyboardThemeStylesPageReqVO pageReqVO) {
|
||||||
|
PageResult<KeyboardThemeStylesDO> pageResult = keyboardThemeStylesService.getKeyboardThemeStylesPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, KeyboardThemeStylesRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出主题风格 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('keyboard-server:keyboard-theme-styles:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportKeyboardThemeStylesExcel(@Valid KeyboardThemeStylesPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<KeyboardThemeStylesDO> list = keyboardThemeStylesService.getKeyboardThemeStylesPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "主题风格.xls", "数据", KeyboardThemeStylesRespVO.class,
|
||||||
|
BeanUtils.toBean(list, KeyboardThemeStylesRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.yolo.keyboard.controller.admin.themestyles.vo;
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 主题风格分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class KeyboardThemeStylesPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "风格名称", example = "赵六")
|
||||||
|
private String styleName;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.yolo.keyboard.controller.admin.themestyles.vo;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import cn.idev.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 主题风格 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class KeyboardThemeStylesRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9451")
|
||||||
|
@ExcelProperty("主键 Id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "风格名称", example = "赵六")
|
||||||
|
@ExcelProperty("风格名称")
|
||||||
|
private String styleName;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@ExcelProperty("更新时间")
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.yolo.keyboard.controller.admin.themestyles.vo;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 主题风格新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class KeyboardThemeStylesSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键 Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9451")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "风格名称", example = "赵六")
|
||||||
|
private String styleName;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.yolo.keyboard.dal.dataobject.themestyles;
|
||||||
|
import com.yolo.keyboard.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主题风格 DO
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@TableName("keyboard_theme_styles")
|
||||||
|
@KeySequence("keyboard_theme_styles_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TenantIgnore
|
||||||
|
public class KeyboardThemeStylesDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键 Id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 风格名称
|
||||||
|
*/
|
||||||
|
private String styleName;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.yolo.keyboard.dal.mysql.themestyles;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesPageReqVO;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.themestyles.KeyboardThemeStylesDO;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
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 KeyboardThemeStylesMapper extends BaseMapperX<KeyboardThemeStylesDO> {
|
||||||
|
|
||||||
|
default PageResult<KeyboardThemeStylesDO> selectPage(KeyboardThemeStylesPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<KeyboardThemeStylesDO>()
|
||||||
|
.likeIfPresent(KeyboardThemeStylesDO::getStyleName, reqVO.getStyleName())
|
||||||
|
.eqIfPresent(KeyboardThemeStylesDO::getCreatedAt, reqVO.getCreatedAt())
|
||||||
|
.eqIfPresent(KeyboardThemeStylesDO::getUpdatedAt, reqVO.getUpdatedAt())
|
||||||
|
.orderByDesc(KeyboardThemeStylesDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.yolo.keyboard.service.themestyles;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesPageReqVO;
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesSaveReqVO;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.themestyles.KeyboardThemeStylesDO;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主题风格 Service 接口
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
public interface KeyboardThemeStylesService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建主题风格
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createKeyboardThemeStyles(@Valid KeyboardThemeStylesSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新主题风格
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateKeyboardThemeStyles(@Valid KeyboardThemeStylesSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除主题风格
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteKeyboardThemeStyles(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除主题风格
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deleteKeyboardThemeStylesListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得主题风格
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 主题风格
|
||||||
|
*/
|
||||||
|
KeyboardThemeStylesDO getKeyboardThemeStyles(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得主题风格分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 主题风格分页
|
||||||
|
*/
|
||||||
|
PageResult<KeyboardThemeStylesDO> getKeyboardThemeStylesPage(KeyboardThemeStylesPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.yolo.keyboard.service.themestyles;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesPageReqVO;
|
||||||
|
import com.yolo.keyboard.controller.admin.themestyles.vo.KeyboardThemeStylesSaveReqVO;
|
||||||
|
import com.yolo.keyboard.dal.dataobject.themestyles.KeyboardThemeStylesDO;
|
||||||
|
import com.yolo.keyboard.dal.mysql.themestyles.KeyboardThemeStylesMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageResult;
|
||||||
|
import com.yolo.keyboard.framework.common.pojo.PageParam;
|
||||||
|
import com.yolo.keyboard.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
|
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.diffList;
|
||||||
|
import static com.yolo.keyboard.module.infra.enums.ErrorCodeConstants.KEYBOARD_THEME_STYLES_NOT_EXISTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主题风格 Service 实现类
|
||||||
|
*
|
||||||
|
* @author ziin
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class KeyboardThemeStylesServiceImpl implements KeyboardThemeStylesService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private KeyboardThemeStylesMapper keyboardThemeStylesMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createKeyboardThemeStyles(KeyboardThemeStylesSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
KeyboardThemeStylesDO keyboardThemeStyles = BeanUtils.toBean(createReqVO, KeyboardThemeStylesDO.class);
|
||||||
|
keyboardThemeStylesMapper.insert(keyboardThemeStyles);
|
||||||
|
|
||||||
|
// 返回
|
||||||
|
return keyboardThemeStyles.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateKeyboardThemeStyles(KeyboardThemeStylesSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateKeyboardThemeStylesExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
KeyboardThemeStylesDO updateObj = BeanUtils.toBean(updateReqVO, KeyboardThemeStylesDO.class);
|
||||||
|
keyboardThemeStylesMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteKeyboardThemeStyles(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateKeyboardThemeStylesExists(id);
|
||||||
|
// 删除
|
||||||
|
keyboardThemeStylesMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteKeyboardThemeStylesListByIds(List<Long> ids) {
|
||||||
|
// 删除
|
||||||
|
keyboardThemeStylesMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void validateKeyboardThemeStylesExists(Long id) {
|
||||||
|
if (keyboardThemeStylesMapper.selectById(id) == null) {
|
||||||
|
throw exception(KEYBOARD_THEME_STYLES_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KeyboardThemeStylesDO getKeyboardThemeStyles(Long id) {
|
||||||
|
return keyboardThemeStylesMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<KeyboardThemeStylesDO> getKeyboardThemeStylesPage(KeyboardThemeStylesPageReqVO pageReqVO) {
|
||||||
|
return keyboardThemeStylesMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?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.yolo.keyboard.dal.mysql.themes.KeyboardThemesMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?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.yolo.keyboard.dal.mysql.themestyles.KeyboardThemeStylesMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?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.yolo.keyboard.dal.mysql.user.KeyboardUserMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -73,4 +73,5 @@ public interface ErrorCodeConstants {
|
|||||||
// ========== 键盘用户 1-001-202-000 ==========
|
// ========== 键盘用户 1-001-202-000 ==========
|
||||||
ErrorCode KEYBOARD_USER_NOT_EXISTS = new ErrorCode(1_001_202_000, "键盘用户不存在");
|
ErrorCode KEYBOARD_USER_NOT_EXISTS = new ErrorCode(1_001_202_000, "键盘用户不存在");
|
||||||
ErrorCode THEMES_NOT_EXISTS = new ErrorCode(1_001_202_001, "键盘皮肤不存在");
|
ErrorCode THEMES_NOT_EXISTS = new ErrorCode(1_001_202_001, "键盘皮肤不存在");
|
||||||
|
ErrorCode KEYBOARD_THEME_STYLES_NOT_EXISTS = new ErrorCode(1_001_202_002, "主题风格不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user