12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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.caimei.modules.miniprogram.dao.CmWxPopularSearchDao">
-
- <sql id="cmWxPopularSearchColumns">
- a.id AS "id",
- a.sort AS "sort",
- a.keyword AS "keyword",
- a.clickCount AS "clickCount",
- a.addTime AS "addTime",
- a.status AS "status"
- </sql>
-
- <sql id="cmWxPopularSearchJoins">
- </sql>
-
- <select id="get" resultType="CmWxPopularSearch">
- SELECT
- <include refid="cmWxPopularSearchColumns"/>
- FROM cm_wx_popular_search a
- <include refid="cmWxPopularSearchJoins"/>
- WHERE a.id = #{id}
- </select>
-
- <select id="findList" resultType="CmWxPopularSearch">
- SELECT
- <include refid="cmWxPopularSearchColumns"/>
- FROM cm_wx_popular_search a
- <include refid="cmWxPopularSearchJoins"/>
- <where>
-
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy} desc
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
-
- <select id="findAllList" resultType="CmWxPopularSearch">
- SELECT
- <include refid="cmWxPopularSearchColumns"/>
- FROM cm_wx_popular_search a
- <include refid="cmWxPopularSearchJoins"/>
- <where>
- <if test="keyword != null and keyword != ''">
- AND a.keyword = #{keyword}
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy} desc
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
-
- <insert id="insert" parameterType="CmWxPopularSearch" keyProperty="id" useGeneratedKeys="true">
- INSERT INTO cm_wx_popular_search(
- id,
- sort,
- keyword,
- addTime,
- status
- ) VALUES (
- #{id},
- #{sort},
- #{keyword},
- #{addTime},
- #{status}
- )
- </insert>
-
- <update id="update">
- UPDATE cm_wx_popular_search SET
- sort = #{sort},
- keyword = #{keyword},
- addTime = #{addTime},
- status = #{status}
- WHERE id = #{id}
- </update>
-
- <delete id="delete">
- DELETE FROM cm_wx_popular_search
- WHERE id = #{id}
- </delete>
-
- </mapper>
|