<?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="com.yami.shop.dao.SearchTermMapper">

    <select id="hotSearchWord" resultType="com.yami.shop.bean.model.SearchTerm">
        SELECT *
        FROM tz_search_term
        WHERE type = #{type}
          and `status` = 1
          and effective_time &lt;= CURDATE()
          AND end_time &gt;= CURDATE()
        ORDER BY create_time desc, id desc
    </select>
</mapper>