| | |
| | | <?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.clazz.GoodsSubClassLabelMapMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap"> |
| | | <id column="sclm_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sclm_order_by" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="sclm_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sclm_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <association property="label" column="sclm_label_id" |
| | | select="com.yeshi.fanli.dao.mybatis.clazz.GoodsSubClassLabelMapper.selectByPrimaryKey"> |
| | | </association> |
| | | <association property="goodsSubClass" column="sclm_sub_class_id" |
| | | select="com.yeshi.fanli.dao.mybatis.GoodsSubClassMapper.selectByPrimaryKey"> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sclm_id,sclm_label_id,sclm_sub_class_id,sclm_order_by,sclm_create_time,sclm_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label_map where sclm_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByLabelIdAndSubClassId" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label_map where |
| | | sclm_sub_class_id=#{subClassId} and sclm_label_id=#{labelId} |
| | | </select> |
| | | |
| | | |
| | | <select id="listMapByLabelId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label_map where sclm_label_id=#{labelId} order |
| | | by sclm_order_by,sclm_create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectBySubClassId" resultMap="BaseResultMap" parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label_map where |
| | | sclm_sub_class_id=#{0} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_sub_class_label_map where sclm_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" |
| | | parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_sub_class_label_map |
| | | (sclm_id,sclm_label_id,sclm_sub_class_id,sclm_order_by,sclm_create_time,sclm_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{label.id,jdbcType=BIGINT},#{goodsSubClass.id,jdbcType=BIGINT},#{orderBy,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_sub_class_label_map |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sclm_id,</if> |
| | | <if test="label != null">sclm_label_id,</if> |
| | | <if test="goodsSubClass != null">sclm_sub_class_id,</if> |
| | | <if test="orderBy != null">sclm_order_by,</if> |
| | | <if test="createTime != null">sclm_create_time,</if> |
| | | <if test="updateTime != null">sclm_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="label != null">#{label.id,jdbcType=BIGINT},</if> |
| | | <if test="goodsSubClass != null">#{goodsSubClass.id,jdbcType=BIGINT},</if> |
| | | <if test="orderBy != null">#{orderBy,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.bus.clazz.GoodsSubClassLabelMap">update yeshi_ec_sub_class_label_map set sclm_label_id = |
| | | #{label.id,jdbcType=BIGINT},sclm_sub_class_id = |
| | | #{goodsSubClass.id,jdbcType=BIGINT},sclm_order_by = |
| | | #{orderBy,jdbcType=INTEGER},sclm_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},sclm_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where sclm_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap"> |
| | | update yeshi_ec_sub_class_label_map |
| | | <set> |
| | | <if test="label != null">sclm_label_id=#{label.id,jdbcType=BIGINT},</if> |
| | | <if test="goodsSubClass != null">sclm_sub_class_id=#{goodsSubClass.id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="orderBy != null">sclm_order_by=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">sclm_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sclm_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where sclm_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.clazz.GoodsSubClassLabelMapMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap">
|
| | | <id column="sclm_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="sclm_order_by" property="orderBy" jdbcType="INTEGER" />
|
| | | <result column="sclm_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <result column="sclm_update_time" property="updateTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <association property="label" column="sclm_label_id"
|
| | | select="com.yeshi.fanli.dao.mybatis.clazz.GoodsSubClassLabelMapper.selectByPrimaryKey">
|
| | | </association>
|
| | | <association property="goodsSubClass" column="sclm_sub_class_id"
|
| | | select="com.yeshi.fanli.dao.mybatis.GoodsSubClassMapper.selectByPrimaryKey">
|
| | | </association>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">sclm_id,sclm_label_id,sclm_sub_class_id,sclm_order_by,sclm_create_time,sclm_update_time
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_sub_class_label_map where sclm_id =
|
| | | #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="selectByLabelIdAndSubClassId" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_sub_class_label_map where
|
| | | sclm_sub_class_id=#{subClassId} and sclm_label_id=#{labelId}
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="listMapByLabelId" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_sub_class_label_map where sclm_label_id=#{labelId} order
|
| | | by sclm_order_by,sclm_create_time desc
|
| | | </select>
|
| | | |
| | | |
| | | <select id="selectBySubClassId" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
| | | select |
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_sub_class_label_map where
|
| | | sclm_sub_class_id=#{0} |
| | | </select>
|
| | | |
| | |
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_sub_class_label_map where sclm_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert"
|
| | | parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_sub_class_label_map
|
| | | (sclm_id,sclm_label_id,sclm_sub_class_id,sclm_order_by,sclm_create_time,sclm_update_time)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{label.id,jdbcType=BIGINT},#{goodsSubClass.id,jdbcType=BIGINT},#{orderBy,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
| | | </insert>
|
| | | <insert id="insertSelective"
|
| | | parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_sub_class_label_map
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">sclm_id,</if>
|
| | | <if test="label != null">sclm_label_id,</if>
|
| | | <if test="goodsSubClass != null">sclm_sub_class_id,</if>
|
| | | <if test="orderBy != null">sclm_order_by,</if>
|
| | | <if test="createTime != null">sclm_create_time,</if>
|
| | | <if test="updateTime != null">sclm_update_time,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="label != null">#{label.id,jdbcType=BIGINT},</if>
|
| | | <if test="goodsSubClass != null">#{goodsSubClass.id,jdbcType=BIGINT},</if>
|
| | | <if test="orderBy != null">#{orderBy,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.bus.clazz.GoodsSubClassLabelMap">update yeshi_ec_sub_class_label_map set sclm_label_id =
|
| | | #{label.id,jdbcType=BIGINT},sclm_sub_class_id =
|
| | | #{goodsSubClass.id,jdbcType=BIGINT},sclm_order_by =
|
| | | #{orderBy,jdbcType=INTEGER},sclm_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP},sclm_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} where sclm_id =
|
| | | #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective"
|
| | | parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap">
|
| | | update yeshi_ec_sub_class_label_map
|
| | | <set>
|
| | | <if test="label != null">sclm_label_id=#{label.id,jdbcType=BIGINT},</if>
|
| | | <if test="goodsSubClass != null">sclm_sub_class_id=#{goodsSubClass.id,jdbcType=BIGINT},
|
| | | </if>
|
| | | <if test="orderBy != null">sclm_order_by=#{orderBy,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">sclm_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">sclm_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set>
|
| | | where sclm_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|