123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?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.hehe.dao.CmHeheFloorDao">
-
- <sql id="cmHeheFloorColumns">
- a.id AS "id",
- a.title AS "title",
- a.description AS "description",
- a.sort AS "sort",
- a.status AS "status",
- a.createTime AS "createTime"
- </sql>
-
- <sql id="cmHeheFloorJoins">
- </sql>
-
- <select id="get" resultType="cmHeheFloor">
- SELECT
- <include refid="cmHeheFloorColumns"/>
- FROM cm_hehe_floor a
- <include refid="cmHeheFloorJoins"/>
- WHERE a.id = #{id}
- </select>
-
- <select id="findList" resultType="cmHeheFloor">
- SELECT
- <include refid="cmHeheFloorColumns"/>
- FROM cm_hehe_floor a
- <include refid="cmHeheFloorJoins"/>
- <where>
-
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- order by a.sort asc,a.createTime desc
- </otherwise>
- </choose>
- </select>
-
- <select id="findAllList" resultType="cmHeheFloor">
- SELECT
- <include refid="cmHeheFloorColumns"/>
- FROM cm_hehe_floor a
- <include refid="cmHeheFloorJoins"/>
- <where>
-
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <insert id="insert" parameterType="cmHeheFloor" keyProperty="id" useGeneratedKeys="true">
- INSERT INTO cm_hehe_floor(
- title,
- description,
- sort,
- status,
- createTime
- ) VALUES (
- #{title},
- #{description},
- #{sort},
- #{status},
- #{createTime}
- )
- </insert>
-
- <update id="update">
- UPDATE cm_hehe_floor SET
- title = #{title},
- description = #{description},
- sort = #{sort},
- status = #{status}
- WHERE id = #{id}
- </update>
- <update id="updateStatusByFloorId">
- update cm_hehe_floor set status = #{status} where id = #{floorId}
- </update>
- <update id="saveSort">
- update cm_hehe_floor set sort = #{sort} where id = #{floorId}
- </update>
- <delete id="delete">
- DELETE FROM cm_hehe_floor
- WHERE id = #{id}
- </delete>
-
- </mapper>
|