|
|
|
@ -0,0 +1,26 @@
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!-- 定义XML文档类型为MyBatis的mapper,指定了DTD的URL -->
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<!-- 定义了一个mapper元素,指定了namespace,这个namespace对应于Mapper接口的全路径 -->
|
|
|
|
|
<mapper namespace="com.yami.shop.dao.HotSearchMapper">
|
|
|
|
|
|
|
|
|
|
<!-- 定义了一个查询操作,用于根据店铺ID获取热搜DTO -->
|
|
|
|
|
<select id="getHotSearchDtoByShopId" resultType="com.yami.shop.bean.dto.HotSearchDto">
|
|
|
|
|
<!-- 查询语句,选择hot_search_id, content, title字段 -->
|
|
|
|
|
SELECT
|
|
|
|
|
hot_search_id,
|
|
|
|
|
content,
|
|
|
|
|
title
|
|
|
|
|
<!-- 从tz_hot_search表中查询 -->
|
|
|
|
|
FROM
|
|
|
|
|
tz_hot_search
|
|
|
|
|
<!-- 条件是shop_id等于传入的shopId参数,并且status字段等于1 -->
|
|
|
|
|
WHERE
|
|
|
|
|
shop_id = #{shopId}
|
|
|
|
|
AND `status` = 1
|
|
|
|
|
<!-- 按照seq字段排序 -->
|
|
|
|
|
ORDER BY
|
|
|
|
|
seq
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|