迁移搜索服务

This commit is contained in:
YunaiV
2020-08-03 20:38:12 +08:00
parent 72ed490334
commit 128b9dc21a
57 changed files with 366 additions and 871 deletions

View File

@@ -1,23 +0,0 @@
package cn.iocoder.mall.product.dao;
import cn.iocoder.mall.product.dataobject.ProductSpuDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Collection;
import java.util.List;
@Repository
public interface ProductSpuMapper {
/**
* 获得大于 id 的商品编号数组
*
* @param id 商品编号
* @param limit 数量
* @return 商品编号数组
*/
List<Integer> selectIdListByIdGt(@Param("id") Integer id,
@Param("limit") Integer limit);
}

View File

@@ -1,25 +0,0 @@
<?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="cn.iocoder.mall.product.dao.ProductSpuMapper">
<sql id="FIELDS">
id, name, sell_point, description, cid,
pic_urls, visible, sort, price, quantity,
create_time
</sql>
<select id="selectIdListByIdGt" parameterType="Integer" resultType="Integer">
SELECT
<include refid="FIELDS" />
FROM product_spu
<where>
<if test="id != null">
id > #{id}
</if>
AND deleted = 0
</where>
ORDER BY id ASC
LIMIT #{limit}
</select>
</mapper>