123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?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.product.dao.ProductCustomClassificationDao">
-
- <sql id="productCustomClassificationColumns">
- a.id AS "id",
- a.productID AS "productID",
- a.bigTypeID AS "bigTypeID",
- a.smallTypeID AS "smallTypeID",
- a.tinyTypeID AS "tinyTypeID",
- a.createDate AS "createDate",
- a.updateDate AS "updateDate"
- </sql>
-
- <sql id="productCustomClassificationJoins">
- </sql>
-
- <select id="get" resultType="ProductCustomClassification">
- SELECT
- <include refid="productCustomClassificationColumns"/>
- FROM product_custom_classification a
- <include refid="productCustomClassificationJoins"/>
- WHERE a.id = #{id}
- </select>
-
- <select id="findList" resultType="ProductCustomClassification">
- SELECT
- <include refid="productCustomClassificationColumns"/>
- FROM product_custom_classification a
- <include refid="productCustomClassificationJoins"/>
- <where>
-
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
-
- <select id="findAllList" resultType="ProductCustomClassification">
- SELECT
- <include refid="productCustomClassificationColumns"/>
- FROM product_custom_classification a
- <include refid="productCustomClassificationJoins"/>
- <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="ProductCustomClassification" keyProperty="id" useGeneratedKeys="true">
- INSERT INTO product_custom_classification(
- id,
- productID,
- bigTypeID,
- smallTypeID,
- tinyTypeID,
- createDate,
- updateDate
- ) VALUES (
- #{id},
- #{productID},
- #{bigTypeID},
- #{smallTypeID},
- #{tinyTypeID},
- #{createDate},
- #{updateDate}
- )
- </insert>
-
- <update id="update">
- UPDATE product_custom_classification SET
- productID = #{productID},
- bigTypeID = #{bigTypeID},
- smallTypeID = #{smallTypeID},
- tinyTypeID = #{tinyTypeID},
- createDate = #{createDate},
- updateDate = #{updateDate}
- WHERE id = #{id}
- </update>
-
- <delete id="delete">
- DELETE FROM product_custom_classification
- WHERE id = #{id}
- </delete>
- <select id="findCustomClassification" resultType="com.caimei.modules.product.entity.ProductCustomClassification">
- select <include refid="productCustomClassificationColumns"/>
- from product_custom_classification a where a.productID = #{productID}
- </select>
-
- </mapper>
|