【优化】产品接口

This commit is contained in:
MichaelWin
2026-01-27 17:30:17 +08:00
parent 6da2b05345
commit de8f44f063
3 changed files with 3 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
package com.corewing.app.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corewing.app.dto.website.ProductCategoryRequest;
@@ -10,7 +9,6 @@ import com.corewing.app.entity.BizProductCategory;
import com.corewing.app.mapper.BizProductCategoryMapper;
import com.corewing.app.service.BizProductCategoryService;
import com.corewing.app.service.BizProductService;
import com.google.gson.internal.LinkedTreeMap;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

View File

@@ -14,7 +14,7 @@
<include refid="selectVOSql"/>
<where>
<if test="productCategoryRequest.searchKey != null and productCategoryRequest.searchKey != ''">
pc.category_title like CONCAT('%', #{productCategoryRequest.searchKey}, '%')
and pc.category_title like CONCAT('%', #{productCategoryRequest.searchKey}, '%')
</if>
</where>
</select>

View File

@@ -15,11 +15,11 @@
<include refid="selectVOSql"/>
<where>
<if test="productPageRequest.categoryId != null and productPageRequest.categoryId != ''">
pcr.category_id = #{productPageRequest.categoryId}
and pcr.category_id = #{productPageRequest.categoryId}
</if>
<if test="productPageRequest.searchKey != null and productPageRequest.searchKey != ''">
p.title like CONCAT('%', #{productPageRequest.searchKey}, '%')
and p.title like CONCAT('%', #{productPageRequest.searchKey}, '%')
</if>
</where>
</select>