New file |
| | |
| | | <?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> |
New file |
| | |
| | | <?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.GoodsSubClassLabelMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel"> |
| | | <id column="scl_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="scl_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="scl_order_by" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="scl_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="scl_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <association property="goodsClass" column="scl_class_id" |
| | | select="com.yeshi.fanli.dao.mybatis.GoodsClassMapper.selectByPrimaryKey"></association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">scl_id,scl_name,scl_order_by,scl_class_id,scl_create_time,scl_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label where scl_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByClassIdAndName" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label where scl_name = #{name} and |
| | | scl_class_id=#{classId} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByClassId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_sub_class_label |
| | | <if test="classId!=null"> |
| | | where |
| | | scl_class_id=#{classId} |
| | | </if> |
| | | |
| | | order by scl_order_by |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_sub_class_label where scl_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_sub_class_label |
| | | (scl_id,scl_name,scl_order_by,scl_class_id,scl_create_time,scl_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{orderBy,jdbcType=INTEGER},#{goodsClass.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_sub_class_label |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">scl_id,</if> |
| | | <if test="name != null">scl_name,</if> |
| | | <if test="orderBy != null">scl_order_by,</if> |
| | | <if test="goodsClass != null">scl_class_id,</if> |
| | | <if test="createTime != null">scl_create_time,</if> |
| | | <if test="updateTime != null">scl_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="goodsClass != null">#{goodsClass.id,jdbcType=BIGINT},</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.GoodsSubClassLabel">update |
| | | yeshi_ec_sub_class_label set scl_name = |
| | | #{name,jdbcType=VARCHAR},scl_order_by = |
| | | #{orderBy,jdbcType=INTEGER},scl_class_id = |
| | | #{goodsClass.id,jdbcType=BIGINT},scl_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},scl_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where scl_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel"> |
| | | update yeshi_ec_sub_class_label |
| | | <set> |
| | | <if test="name != null">scl_name=#{name,jdbcType=VARCHAR},</if> |
| | | <if test="orderBy != null">scl_order_by=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="goodsClass != null">scl_class_id=#{goodsClass.id,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">scl_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">scl_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where scl_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |