| | |
| | | <?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.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper">
|
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.order.CommonOrderGoods">
|
| | | <id column="cog_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="cog_goods_id" property="goodsId" jdbcType="VARCHAR" />
|
| | | <result column="cog_goods_type" property="goodsType" jdbcType="INTEGER" />
|
| | | <result column="cog_title" property="title" jdbcType="VARCHAR" />
|
| | | <result column="cog_picture" property="picture" jdbcType="VARCHAR" />
|
| | | <result column="cog_price" property="price" jdbcType="DECIMAL" />
|
| | | <result column="cog_shop_id" property="shopId" jdbcType="BIGINT" />
|
| | | <result column="cog_shop_name" property="shopName" jdbcType="VARCHAR" />
|
| | | <result column="cog_shop_type" property="shopType" jdbcType="VARCHAR" />
|
| | | <result column="cog_state" property="state" jdbcType="INTEGER" />
|
| | | <result column="cog_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="cog_update_time" property="updateTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | </resultMap>
|
| | |
|
| | | <sql id="Base_Column_List">cog_id,cog_goods_id,cog_goods_type,cog_title,cog_picture,cog_price,cog_shop_id,cog_shop_name,cog_shop_type,cog_state,cog_create_time,cog_update_time
|
| | | </sql>
|
| | |
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_common_order_goods where cog_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="listByGoodsIdAndGoodsType" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_common_order_goods where cog_goods_id = #{goodsId} and
|
| | | cog_goods_type=#{goodsType}
|
| | | </select>
|
| | |
|
| | |
|
| | |
|
| | | <select id="listNoTitle" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_common_order_goods where cog_title is null limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_common_order_goods where cog_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_common_order_goods
|
| | | (cog_id,cog_goods_id,cog_goods_type,cog_title,cog_picture,cog_price,cog_shop_id,cog_shop_name,cog_shop_type,cog_state,cog_create_time,cog_update_time)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{goodsId,jdbcType=VARCHAR},#{goodsType,jdbcType=INTEGER},#{title,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{price,jdbcType=DECIMAL},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{shopType,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_common_order_goods
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">cog_id,</if>
|
| | | <if test="goodsId != null">cog_goods_id,</if>
|
| | | <if test="goodsType != null">cog_goods_type,</if>
|
| | | <if test="title != null">cog_title,</if>
|
| | | <if test="picture != null">cog_picture,</if>
|
| | | <if test="price != null">cog_price,</if>
|
| | | <if test="shopId != null">cog_shop_id,</if>
|
| | | <if test="shopName != null">cog_shop_name,</if>
|
| | | <if test="shopType != null">cog_shop_type,</if>
|
| | | <if test="state != null">cog_state,</if>
|
| | | <if test="createTime != null">cog_create_time,</if>
|
| | | <if test="updateTime != null">cog_update_time,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsType != null">#{goodsType,jdbcType=INTEGER},</if>
|
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="price != null">#{price,jdbcType=DECIMAL},</if>
|
| | | <if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
| | | <if test="shopName != null">#{shopName,jdbcType=VARCHAR},</if>
|
| | | <if test="shopType != null">#{shopType,jdbcType=VARCHAR},</if>
|
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods">update
|
| | | yeshi_ec_common_order_goods set cog_goods_id =
|
| | | #{goodsId,jdbcType=VARCHAR},cog_goods_type =
|
| | | #{goodsType,jdbcType=INTEGER}cog_title =
|
| | | #{title,jdbcType=VARCHAR},cog_picture =
|
| | | #{picture,jdbcType=VARCHAR},cog_price =
|
| | | #{price,jdbcType=DECIMAL},cog_shop_id =
|
| | | #{shopId,jdbcType=BIGINT},cog_shop_name =
|
| | | #{shopName,jdbcType=VARCHAR},cog_shop_type =
|
| | | #{shopType,jdbcType=VARCHAR},cog_state =
|
| | | #{state,jdbcType=INTEGER},cog_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},cog_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} where cog_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods">
|
| | | update yeshi_ec_common_order_goods
|
| | | <set>
|
| | | <if test="goodsId != null">cog_goods_id=#{goodsId,jdbcType=VARCHAR},</if>
|
| | | <if test="goodsType != null">cog_goods_type=#{goodsType,jdbcType=INTEGER},</if>
|
| | | <if test="title != null">cog_title=#{title,jdbcType=VARCHAR},</if>
|
| | | <if test="picture != null">cog_picture=#{picture,jdbcType=VARCHAR},</if>
|
| | | <if test="price != null">cog_price=#{price,jdbcType=DECIMAL},</if>
|
| | | <if test="shopId != null">cog_shop_id=#{shopId,jdbcType=BIGINT},</if>
|
| | | <if test="shopName != null">cog_shop_name=#{shopName,jdbcType=VARCHAR},</if>
|
| | | <if test="shopType != null">cog_shop_type=#{shopType,jdbcType=VARCHAR},</if>
|
| | | <if test="state != null">cog_state=#{state,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">cog_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">cog_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set>
|
| | | where cog_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | |
|
| | | </mapper>
|
| | | <?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.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.order.CommonOrderGoods"> |
| | | <id column="cog_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="cog_goods_id" property="goodsId" jdbcType="VARCHAR" /> |
| | | <result column="cog_goods_type" property="goodsType" jdbcType="INTEGER" /> |
| | | <result column="cog_title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="cog_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="cog_price" property="price" jdbcType="DECIMAL" /> |
| | | <result column="cog_shop_id" property="shopId" jdbcType="BIGINT" /> |
| | | <result column="cog_shop_name" property="shopName" jdbcType="VARCHAR" /> |
| | | <result column="cog_shop_type" property="shopType" jdbcType="VARCHAR" /> |
| | | <result column="cog_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="cog_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="cog_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="cog_actual_price" property="actualPrice" |
| | | jdbcType="DECIMAL" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">cog_id,cog_goods_id,cog_goods_type,cog_title,cog_picture,cog_price,cog_shop_id,cog_shop_name,cog_shop_type,cog_state,cog_create_time,cog_update_time,cog_actual_price |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_common_order_goods where cog_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="listByGoodsIdAndGoodsType" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_common_order_goods where cog_goods_id = #{goodsId} and |
| | | cog_goods_type=#{goodsType} |
| | | </select> |
| | | <select id="listNoTitle" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_common_order_goods where cog_title is null limit |
| | | #{start},#{count} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_common_order_goods where cog_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_common_order_goods |
| | | (cog_id,cog_goods_id,cog_goods_type,cog_title,cog_picture,cog_price,cog_shop_id,cog_shop_name,cog_shop_type,cog_state,cog_create_time,cog_update_time,cog_actual_price) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{goodsId,jdbcType=VARCHAR},#{goodsType,jdbcType=INTEGER},#{title,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{price,jdbcType=DECIMAL},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{shopType,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{actualPrice,jdbcType=DECIMAL}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_common_order_goods |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">cog_id,</if> |
| | | <if test="goodsId != null">cog_goods_id,</if> |
| | | <if test="goodsType != null">cog_goods_type,</if> |
| | | <if test="title != null">cog_title,</if> |
| | | <if test="picture != null">cog_picture,</if> |
| | | <if test="price != null">cog_price,</if> |
| | | <if test="shopId != null">cog_shop_id,</if> |
| | | <if test="shopName != null">cog_shop_name,</if> |
| | | <if test="shopType != null">cog_shop_type,</if> |
| | | <if test="state != null">cog_state,</if> |
| | | <if test="createTime != null">cog_create_time,</if> |
| | | <if test="updateTime != null">cog_update_time,</if> |
| | | <if test="actualPrice != null">cog_actual_price</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsType != null">#{goodsType,jdbcType=INTEGER},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="price != null">#{price,jdbcType=DECIMAL},</if> |
| | | <if test="shopId != null">#{shopId,jdbcType=BIGINT},</if> |
| | | <if test="shopName != null">#{shopName,jdbcType=VARCHAR},</if> |
| | | <if test="shopType != null">#{shopType,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualPrice != null">#{actualPrice,jdbcType=DECIMAL}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods">update |
| | | yeshi_ec_common_order_goods set cog_goods_id = |
| | | #{goodsId,jdbcType=VARCHAR},cog_goods_type = |
| | | #{goodsType,jdbcType=INTEGER}cog_title = |
| | | #{title,jdbcType=VARCHAR},cog_picture = |
| | | #{picture,jdbcType=VARCHAR},cog_price = |
| | | #{price,jdbcType=DECIMAL},cog_shop_id = |
| | | #{shopId,jdbcType=BIGINT},cog_shop_name = |
| | | #{shopName,jdbcType=VARCHAR},cog_shop_type = |
| | | #{shopType,jdbcType=VARCHAR},cog_state = |
| | | #{state,jdbcType=INTEGER},cog_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},cog_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} ,cog_actual_price |
| | | =#{actualPrice,jdbcType=DECIMAL} where cog_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.CommonOrderGoods"> |
| | | update yeshi_ec_common_order_goods |
| | | <set> |
| | | <if test="goodsId != null">cog_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsType != null">cog_goods_type=#{goodsType,jdbcType=INTEGER},</if> |
| | | <if test="title != null">cog_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">cog_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="price != null">cog_price=#{price,jdbcType=DECIMAL},</if> |
| | | <if test="shopId != null">cog_shop_id=#{shopId,jdbcType=BIGINT},</if> |
| | | <if test="shopName != null">cog_shop_name=#{shopName,jdbcType=VARCHAR},</if> |
| | | <if test="shopType != null">cog_shop_type=#{shopType,jdbcType=VARCHAR},</if> |
| | | <if test="state != null">cog_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">cog_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">cog_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualPrice !=null">cog_actual_price =#{actualPrice,jdbcType=DECIMAL}</if> |
| | | </set> |
| | | where cog_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |