【优化】产品接口
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user