123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <?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.yonge.cooleshow.mbg.mapper.OmsCartItemMapper">
- <resultMap id="BaseResultMap" type="com.yonge.cooleshow.mbg.model.OmsCartItem">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="product_id" jdbcType="BIGINT" property="productId" />
- <result column="product_sku_id" jdbcType="BIGINT" property="productSkuId" />
- <result column="member_id" jdbcType="BIGINT" property="memberId" />
- <result column="quantity" jdbcType="INTEGER" property="quantity" />
- <result column="price" jdbcType="DECIMAL" property="price" />
- <result column="product_pic" jdbcType="VARCHAR" property="productPic" />
- <result column="product_name" jdbcType="VARCHAR" property="productName" />
- <result column="product_sub_title" jdbcType="VARCHAR" property="productSubTitle" />
- <result column="product_sku_code" jdbcType="VARCHAR" property="productSkuCode" />
- <result column="member_nickname" jdbcType="VARCHAR" property="memberNickname" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
- <result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
- <result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
- <result column="product_brand" jdbcType="VARCHAR" property="productBrand" />
- <result column="product_sn" jdbcType="VARCHAR" property="productSn" />
- <result column="product_attr" jdbcType="VARCHAR" property="productAttr" />
- <result column="hidden_" jdbcType="VARCHAR" property="hidden" />
- <result column="promoter_id" property="promoterId" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- id, product_id, product_sku_id, member_id, quantity, price, product_pic, product_name,
- product_sub_title, product_sku_code, member_nickname, create_date, modify_date, delete_status,
- product_category_id, product_brand, product_sn, product_attr,hidden_,promoter_id
- </sql>
- <select id="selectByExample" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItemExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from oms_cart_item
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from oms_cart_item
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from oms_cart_item
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <delete id="deleteByExample" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItemExample">
- delete from oms_cart_item
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItem">
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into oms_cart_item (product_id, product_sku_id, member_id,
- quantity, price, product_pic,
- product_name, product_sub_title, product_sku_code,
- member_nickname, create_date, modify_date,
- delete_status, product_category_id, product_brand,
- product_sn, product_attr,hidden_,promoter_id)
- values (#{productId,jdbcType=BIGINT}, #{productSkuId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
- #{quantity,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{productPic,jdbcType=VARCHAR},
- #{productName,jdbcType=VARCHAR}, #{productSubTitle,jdbcType=VARCHAR}, #{productSkuCode,jdbcType=VARCHAR},
- #{memberNickname,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP},
- #{deleteStatus,jdbcType=INTEGER}, #{productCategoryId,jdbcType=BIGINT}, #{productBrand,jdbcType=VARCHAR},
- #{productSn,jdbcType=VARCHAR}, #{productAttr,jdbcType=VARCHAR},#{hidden},#{promoterId})
- </insert>
- <insert id="insertSelective" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItem">
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into oms_cart_item
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="productId != null">
- product_id,
- </if>
- <if test="productSkuId != null">
- product_sku_id,
- </if>
- <if test="memberId != null">
- member_id,
- </if>
- <if test="quantity != null">
- quantity,
- </if>
- <if test="price != null">
- price,
- </if>
- <if test="productPic != null">
- product_pic,
- </if>
- <if test="productName != null">
- product_name,
- </if>
- <if test="productSubTitle != null">
- product_sub_title,
- </if>
- <if test="productSkuCode != null">
- product_sku_code,
- </if>
- <if test="memberNickname != null">
- member_nickname,
- </if>
- <if test="createDate != null">
- create_date,
- </if>
- <if test="modifyDate != null">
- modify_date,
- </if>
- <if test="deleteStatus != null">
- delete_status,
- </if>
- <if test="productCategoryId != null">
- product_category_id,
- </if>
- <if test="productBrand != null">
- product_brand,
- </if>
- <if test="productSn != null">
- product_sn,
- </if>
- <if test="productAttr != null">
- product_attr,
- </if>
- <if test="hidden != null">
- hidden_,
- </if>
- <if test="promoterId != null">
- promoter_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="productId != null">
- #{productId,jdbcType=BIGINT},
- </if>
- <if test="productSkuId != null">
- #{productSkuId,jdbcType=BIGINT},
- </if>
- <if test="memberId != null">
- #{memberId,jdbcType=BIGINT},
- </if>
- <if test="quantity != null">
- #{quantity,jdbcType=INTEGER},
- </if>
- <if test="price != null">
- #{price,jdbcType=DECIMAL},
- </if>
- <if test="productPic != null">
- #{productPic,jdbcType=VARCHAR},
- </if>
- <if test="productName != null">
- #{productName,jdbcType=VARCHAR},
- </if>
- <if test="productSubTitle != null">
- #{productSubTitle,jdbcType=VARCHAR},
- </if>
- <if test="productSkuCode != null">
- #{productSkuCode,jdbcType=VARCHAR},
- </if>
- <if test="memberNickname != null">
- #{memberNickname,jdbcType=VARCHAR},
- </if>
- <if test="createDate != null">
- #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="modifyDate != null">
- #{modifyDate,jdbcType=TIMESTAMP},
- </if>
- <if test="deleteStatus != null">
- #{deleteStatus,jdbcType=INTEGER},
- </if>
- <if test="productCategoryId != null">
- #{productCategoryId,jdbcType=BIGINT},
- </if>
- <if test="productBrand != null">
- #{productBrand,jdbcType=VARCHAR},
- </if>
- <if test="productSn != null">
- #{productSn,jdbcType=VARCHAR},
- </if>
- <if test="productAttr != null">
- #{productAttr,jdbcType=VARCHAR},
- </if>
- <if test="hidden != null">
- #{hidden},
- </if>
- <if test="promoterId != null">
- #{promoterId},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItemExample" resultType="java.lang.Long">
- select count(*) from oms_cart_item
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update oms_cart_item
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=BIGINT},
- </if>
- <if test="record.productId != null">
- product_id = #{record.productId,jdbcType=BIGINT},
- </if>
- <if test="record.productSkuId != null">
- product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
- </if>
- <if test="record.memberId != null">
- member_id = #{record.memberId,jdbcType=BIGINT},
- </if>
- <if test="record.quantity != null">
- quantity = #{record.quantity,jdbcType=INTEGER},
- </if>
- <if test="record.price != null">
- price = #{record.price,jdbcType=DECIMAL},
- </if>
- <if test="record.productPic != null">
- product_pic = #{record.productPic,jdbcType=VARCHAR},
- </if>
- <if test="record.productName != null">
- product_name = #{record.productName,jdbcType=VARCHAR},
- </if>
- <if test="record.productSubTitle != null">
- product_sub_title = #{record.productSubTitle,jdbcType=VARCHAR},
- </if>
- <if test="record.productSkuCode != null">
- product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
- </if>
- <if test="record.memberNickname != null">
- member_nickname = #{record.memberNickname,jdbcType=VARCHAR},
- </if>
- <if test="record.createDate != null">
- create_date = #{record.createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.modifyDate != null">
- modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.deleteStatus != null">
- delete_status = #{record.deleteStatus,jdbcType=INTEGER},
- </if>
- <if test="record.productCategoryId != null">
- product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
- </if>
- <if test="record.productBrand != null">
- product_brand = #{record.productBrand,jdbcType=VARCHAR},
- </if>
- <if test="record.productSn != null">
- product_sn = #{record.productSn,jdbcType=VARCHAR},
- </if>
- <if test="record.productAttr != null">
- product_attr = #{record.productAttr,jdbcType=VARCHAR},
- </if>
- <if test="record.hidden != null">
- hidden_ = #{record.hidden},
- </if>
- <if test="record.promoterId != null">
- promoter_id = #{record.promoterId},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update oms_cart_item
- set id = #{record.id,jdbcType=BIGINT},
- product_id = #{record.productId,jdbcType=BIGINT},
- product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
- member_id = #{record.memberId,jdbcType=BIGINT},
- quantity = #{record.quantity,jdbcType=INTEGER},
- price = #{record.price,jdbcType=DECIMAL},
- product_pic = #{record.productPic,jdbcType=VARCHAR},
- product_name = #{record.productName,jdbcType=VARCHAR},
- product_sub_title = #{record.productSubTitle,jdbcType=VARCHAR},
- product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
- member_nickname = #{record.memberNickname,jdbcType=VARCHAR},
- create_date = #{record.createDate,jdbcType=TIMESTAMP},
- modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
- delete_status = #{record.deleteStatus,jdbcType=INTEGER},
- product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
- product_brand = #{record.productBrand,jdbcType=VARCHAR},
- product_sn = #{record.productSn,jdbcType=VARCHAR},
- product_attr = #{record.productAttr,jdbcType=VARCHAR},
- promoter_id = #{record.promoterId},
- hidden_ = #{record.hidden}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItem">
- update oms_cart_item
- <set>
- <if test="productId != null">
- product_id = #{productId,jdbcType=BIGINT},
- </if>
- <if test="productSkuId != null">
- product_sku_id = #{productSkuId,jdbcType=BIGINT},
- </if>
- <if test="memberId != null">
- member_id = #{memberId,jdbcType=BIGINT},
- </if>
- <if test="quantity != null">
- quantity = #{quantity,jdbcType=INTEGER},
- </if>
- <if test="price != null">
- price = #{price,jdbcType=DECIMAL},
- </if>
- <if test="productPic != null">
- product_pic = #{productPic,jdbcType=VARCHAR},
- </if>
- <if test="productName != null">
- product_name = #{productName,jdbcType=VARCHAR},
- </if>
- <if test="productSubTitle != null">
- product_sub_title = #{productSubTitle,jdbcType=VARCHAR},
- </if>
- <if test="productSkuCode != null">
- product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
- </if>
- <if test="memberNickname != null">
- member_nickname = #{memberNickname,jdbcType=VARCHAR},
- </if>
- <if test="createDate != null">
- create_date = #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="modifyDate != null">
- modify_date = #{modifyDate,jdbcType=TIMESTAMP},
- </if>
- <if test="deleteStatus != null">
- delete_status = #{deleteStatus,jdbcType=INTEGER},
- </if>
- <if test="productCategoryId != null">
- product_category_id = #{productCategoryId,jdbcType=BIGINT},
- </if>
- <if test="productBrand != null">
- product_brand = #{productBrand,jdbcType=VARCHAR},
- </if>
- <if test="productSn != null">
- product_sn = #{productSn,jdbcType=VARCHAR},
- </if>
- <if test="productAttr != null">
- product_attr = #{productAttr,jdbcType=VARCHAR},
- </if>
- <if test="hidden != null">
- hidden_ = #{hidden},
- </if>
- <if test="promoterId != null">
- promoter_id = #{promoterId},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.yonge.cooleshow.mbg.model.OmsCartItem">
- update oms_cart_item
- set product_id = #{productId,jdbcType=BIGINT},
- product_sku_id = #{productSkuId,jdbcType=BIGINT},
- member_id = #{memberId,jdbcType=BIGINT},
- quantity = #{quantity,jdbcType=INTEGER},
- price = #{price,jdbcType=DECIMAL},
- product_pic = #{productPic,jdbcType=VARCHAR},
- product_name = #{productName,jdbcType=VARCHAR},
- product_sub_title = #{productSubTitle,jdbcType=VARCHAR},
- product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
- member_nickname = #{memberNickname,jdbcType=VARCHAR},
- create_date = #{createDate,jdbcType=TIMESTAMP},
- modify_date = #{modifyDate,jdbcType=TIMESTAMP},
- delete_status = #{deleteStatus,jdbcType=INTEGER},
- product_category_id = #{productCategoryId,jdbcType=BIGINT},
- product_brand = #{productBrand,jdbcType=VARCHAR},
- product_sn = #{productSn,jdbcType=VARCHAR},
- product_attr = #{productAttr,jdbcType=VARCHAR},
- promoter_id = #{promoterId},
- hidden_ = #{hidden}
- where id = #{id,jdbcType=BIGINT}
- </update>
- </mapper>
|