ProductAttrValueMapper.xml 2.5 KB
Newer Older
YunaiV's avatar
YunaiV committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
<?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="cn.iocoder.mall.product.dao.ProductAttrValueMapper">

    <sql id="FIELDS">
        id, attr_id, name, status, create_time
    </sql>

    <!--<select id="selectList" resultType="ProductCategoryDO">-->
        <!--SELECT-->
        <!--<include refid="FIELDS" />-->
        <!--FROM product_category-->
        <!--WHERE deleted = 0-->
    <!--</select>-->

    <select id="selectById" parameterType="Integer" resultType="ProductAttrValueDO">
        SELECT
            <include refid="FIELDS" />
        FROM product_attr_value
        WHERE id = #{id}
        AND deleted = 0
    </select>

    <!--<insert id="insert" parameterType="ProductCategoryDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">-->
        <!--INSERT INTO product_category (-->
          <!--pid, name, description, pic_url, sort,-->
          <!--status, create_time, deleted-->
        <!--) VALUES (-->
          <!--#{pid}, #{name}, #{description}, #{picUrl}, #{sort},-->
          <!--#{status}, #{createTime}, #{deleted}-->
        <!--)-->
    <!--</insert>-->

    <!--<update id="update" parameterType="ProductCategoryDO">-->
        <!--UPDATE product_category-->
        <!--<set>-->
            <!--<if test="pid != null">-->
                <!--pid = #{pid},-->
            <!--</if>-->
            <!--<if test="name != null">-->
                <!--name = #{name},-->
            <!--</if>-->
            <!--<if test="description != null">-->
                <!--description = #{description},-->
            <!--</if>-->
            <!--<if test="picUrl != null">-->
                <!--pic_url = #{picUrl},-->
            <!--</if>-->
            <!--<if test="sort != null">-->
                <!--sort = #{sort},-->
            <!--</if>-->
            <!--<if test="status != null">-->
                <!--status = #{status},-->
            <!--</if>-->
            <!--<if test="deleted != null">-->
                <!--deleted = #{deleted}-->
            <!--</if>-->
        <!--</set>-->
        <!--WHERE id = #{id}-->
    <!--</update>-->

    <select id="selectListByIds" resultType="ProductAttrValueDO">
        SELECT
            <include refid="FIELDS" />
        FROM product_attr_value
        WHERE id IN
            <foreach item="id" collection="ids" separator="," open="(" close=")" index="">
                #{id}
            </foreach>
        AND deleted = 0
    </select>

</mapper>