| | |
| | | <?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.activity.ActivityRuleUserMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser"> |
| | | <id column="aru_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="aru_rule_code" property="ruleCode" jdbcType="INTEGER" /> |
| | | <result column="aru_order_by" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="aru_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <association property="activityUser" column="aru_id_user_id" |
| | | select="com.yeshi.fanli.dao.mybatis.activity.ActivityUserMapper.selectByPrimaryKey"></association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">aru_id,aru_id_user_id,aru_rule_code,aru_order_by,aru_create_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_activity_rule_user where aru_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByUserIdAndRuleCode" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_activity_rule_user where aru_id_user_id = #{userId} and |
| | | aru_rule_code=#{ruleCode} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="listByRuleCode" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_activity_rule_user where aru_rule_code=#{ruleCode} order |
| | | by aru_order_by limit #{start},#{count} |
| | | </select> |
| | | |
| | | |
| | | <select id="countByRuleCode" resultType="java.lang.Long" |
| | | parameterType="java.lang.Integer"> |
| | | select |
| | | count(aru_id) |
| | | from yeshi_ec_activity_rule_user |
| | | where aru_rule_code=#{0} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_activity_rule_user where aru_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_activity_rule_user |
| | | (aru_id,aru_id_user_id,aru_rule_code,aru_order_by,aru_create_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{activityUser.id,jdbcType=BIGINT},#{ruleCode,jdbcType=INTEGER},#{orderBy,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_activity_rule_user |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">aru_id,</if> |
| | | <if test="activityUser != null">aru_id_user_id,</if> |
| | | <if test="ruleCode != null">aru_rule_code,</if> |
| | | <if test="orderBy != null">aru_order_by,</if> |
| | | <if test="createTime != null">aru_create_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="activityUser != null">#{activityUser.id,jdbcType=BIGINT},</if> |
| | | <if test="ruleCode != null">#{ruleCode,jdbcType=INTEGER},</if> |
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser">update yeshi_ec_activity_rule_user set aru_id_user_id = |
| | | #{activityUser.id,jdbcType=BIGINT},aru_rule_code = |
| | | #{ruleCode,jdbcType=INTEGER},aru_order_by = |
| | | #{orderBy,jdbcType=INTEGER},aru_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP} where aru_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser"> |
| | | update yeshi_ec_activity_rule_user |
| | | <set> |
| | | <if test="activityUser != null">aru_id_user_id=#{activityUser.id,jdbcType=BIGINT},</if> |
| | | <if test="ruleCode != null">aru_rule_code=#{ruleCode,jdbcType=INTEGER},</if> |
| | | <if test="orderBy != null">aru_order_by=#{orderBy,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">aru_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where aru_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.activity.ActivityRuleUserMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser">
|
| | | <id column="aru_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="aru_rule_code" property="ruleCode" jdbcType="INTEGER" />
|
| | | <result column="aru_order_by" property="orderBy" jdbcType="INTEGER" />
|
| | | <result column="aru_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <association property="activityUser" column="aru_id_user_id"
|
| | | select="com.yeshi.fanli.dao.mybatis.activity.ActivityUserMapper.selectByPrimaryKey"></association>
|
| | |
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">aru_id,aru_id_user_id,aru_rule_code,aru_order_by,aru_create_time
|
| | | </sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_activity_rule_user where aru_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="selectByUserIdAndRuleCode" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_activity_rule_user where aru_id_user_id = #{userId} and
|
| | | aru_rule_code=#{ruleCode}
|
| | | </select>
|
| | |
|
| | |
|
| | |
|
| | | <select id="listByRuleCode" resultMap="BaseResultMap">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_activity_rule_user where aru_rule_code=#{ruleCode} order
|
| | | by aru_order_by limit #{start},#{count}
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="countByRuleCode" resultType="java.lang.Long"
|
| | | parameterType="java.lang.Integer">
|
| | | select
|
| | | count(aru_id)
|
| | | from yeshi_ec_activity_rule_user
|
| | | where aru_rule_code=#{0}
|
| | | </select>
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_activity_rule_user where aru_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert"
|
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_activity_rule_user
|
| | | (aru_id,aru_id_user_id,aru_rule_code,aru_order_by,aru_create_time)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{activityUser.id,jdbcType=BIGINT},#{ruleCode,jdbcType=INTEGER},#{orderBy,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP})
|
| | | </insert>
|
| | | <insert id="insertSelective"
|
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_activity_rule_user
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">aru_id,</if>
|
| | | <if test="activityUser != null">aru_id_user_id,</if>
|
| | | <if test="ruleCode != null">aru_rule_code,</if>
|
| | | <if test="orderBy != null">aru_order_by,</if>
|
| | | <if test="createTime != null">aru_create_time,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="activityUser != null">#{activityUser.id,jdbcType=BIGINT},</if>
|
| | | <if test="ruleCode != null">#{ruleCode,jdbcType=INTEGER},</if>
|
| | | <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey"
|
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser">update yeshi_ec_activity_rule_user set aru_id_user_id =
|
| | | #{activityUser.id,jdbcType=BIGINT},aru_rule_code =
|
| | | #{ruleCode,jdbcType=INTEGER},aru_order_by =
|
| | | #{orderBy,jdbcType=INTEGER},aru_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP} where aru_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective"
|
| | | parameterType="com.yeshi.fanli.entity.bus.activity.ActivityRuleUser">
|
| | | update yeshi_ec_activity_rule_user
|
| | | <set>
|
| | | <if test="activityUser != null">aru_id_user_id=#{activityUser.id,jdbcType=BIGINT},</if>
|
| | | <if test="ruleCode != null">aru_rule_code=#{ruleCode,jdbcType=INTEGER},</if>
|
| | | <if test="orderBy != null">aru_order_by=#{orderBy,jdbcType=INTEGER},</if>
|
| | | <if test="createTime != null">aru_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | </set>
|
| | | where aru_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|