fix(service): 修复 themeStyle=9999 时查询逻辑缺失

This commit is contained in:
2025-12-09 19:50:39 +08:00
parent bdb4f009d0
commit 1d258ce5ee
4 changed files with 36 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import com.yolo.keyborad.common.ResultUtils;
import com.yolo.keyborad.model.vo.themes.KeyboardThemeStylesRespVO;
import com.yolo.keyborad.model.vo.themes.KeyboardThemesRespVO;
import com.yolo.keyborad.service.KeyboardThemeStylesService;
import com.yolo.keyborad.service.KeyboradThemesService;
import com.yolo.keyborad.service.KeyboardThemesService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
@@ -28,10 +28,10 @@ import java.util.List;
public class ThemesController {
@Resource
private KeyboradThemesService themesService;
private KeyboardThemesService themesService;
@Resource
private KeyboradThemesService keyboradThemesService;
private KeyboardThemesService keyboardThemesService;
@Resource
private KeyboardThemeStylesService keyboardThemeStylesService;

View File

@@ -10,7 +10,7 @@ import java.util.List;
* @date: 2025/12/9 14:51
*/
public interface KeyboradThemesService extends IService<KeyboardThemes>{
public interface KeyboardThemesService extends IService<KeyboardThemes>{
/**
* 查询所有主题列表(未删除且上架)

View File

@@ -8,14 +8,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yolo.keyborad.mapper.KeyboardThemesMapper;
import com.yolo.keyborad.model.entity.KeyboardThemes;
import com.yolo.keyborad.model.vo.themes.KeyboardThemesRespVO;
import com.yolo.keyborad.service.KeyboradThemesService;
import com.yolo.keyborad.service.KeyboardThemesService;
/*
* @author: ziin
* @date: 2025/12/9 14:51
*/
@Service
public class KeyboradThemesServiceImpl extends ServiceImpl<KeyboardThemesMapper, KeyboardThemes> implements KeyboradThemesService{
public class KeyboardThemesServiceImpl extends ServiceImpl<KeyboardThemesMapper, KeyboardThemes> implements KeyboardThemesService {
@Override
public List<KeyboardThemesRespVO> selectAllThemes() {

View File

@@ -0,0 +1,30 @@
<?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.keyborad.mapper.KeyboardThemesMapper">
<resultMap id="BaseResultMap" type="com.yolo.keyborad.model.entity.KeyboardThemes">
<!--@mbg.generated-->
<!--@Table keyboard_themes-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="theme_name" jdbcType="VARCHAR" property="themeName" />
<result column="theme_price" jdbcType="NUMERIC" property="themePrice" />
<result column="theme_tag" jdbcType="VARCHAR" property="themeTag" />
<result column="theme_download" jdbcType="VARCHAR" property="themeDownload" />
<result column="theme_style" jdbcType="BIGINT" property="themeStyle" />
<result column="theme_status" jdbcType="BOOLEAN" property="themeStatus" />
<result column="theme_purchases_number" jdbcType="BIGINT" property="themePurchasesNumber" />
<result column="deleted" jdbcType="BOOLEAN" property="deleted" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="theme_preview_image_url" jdbcType="VARCHAR" property="themePreviewImageUrl" />
<result column="is_free" jdbcType="BOOLEAN" property="isFree" />
<result column="theme_download_url" jdbcType="VARCHAR" property="themeDownloadUrl" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="real_download_count" jdbcType="BIGINT" property="realDownloadCount" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, theme_name, theme_price, theme_tag, theme_download, theme_style, theme_status,
theme_purchases_number, deleted, created_at, updated_at, theme_preview_image_url,
is_free, theme_download_url, sort, real_download_count
</sql>
</mapper>