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