【优化】产品接口

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; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corewing.app.dto.website.ProductCategoryRequest; 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.mapper.BizProductCategoryMapper;
import com.corewing.app.service.BizProductCategoryService; import com.corewing.app.service.BizProductCategoryService;
import com.corewing.app.service.BizProductService; import com.corewing.app.service.BizProductService;
import com.google.gson.internal.LinkedTreeMap;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;

View File

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

View File

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