admin
2024-01-23 81da61b828e29b7745e1382dfbbaeb685dc083ef
fanli/src/main/resource/mapping/user/UserSystemCouponRecordMapper.xml
@@ -4,7 +4,7 @@
<mapper namespace="com.yeshi.fanli.dao.mybatis.user.UserSystemCouponRecordMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord">
    <id column="ucr_id" property="id" jdbcType="BIGINT"/>
    <result column="ucr_good_id" property="goodId" jdbcType="BIGINT"/>
    <result column="ucr_good_id" property="goodId" jdbcType="VARCHAR"/>
    <result column="ucr_good_source" property="goodSource" jdbcType="VARCHAR"/>
    <result column="ucr_coupon_type" property="couponType" jdbcType="VARCHAR"/>
    <result column="ucr_order_no" property="orderNo" jdbcType="VARCHAR"/>
@@ -21,7 +21,7 @@
    <include refid="Base_Column_List"/>from yeshi_ec_user_system_coupon_record where ucr_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_system_coupon_record where ucr_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_system_coupon_record (ucr_id,ucr_good_id,ucr_good_source,ucr_user_coupon_id,ucr_coupon_type,ucr_order_no,ucr_state,ucr_create_time,ucr_update_time) values (#{id,jdbcType=BIGINT},#{goodId,jdbcType=BIGINT},#{goodSource,jdbcType=VARCHAR},#{userSystemCoupon.id,jdbcType=BIGINT},#{couponType,jdbcType=VARCHAR},#{orderNo,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_system_coupon_record (ucr_id,ucr_good_id,ucr_good_source,ucr_user_coupon_id,ucr_coupon_type,ucr_order_no,ucr_state,ucr_create_time,ucr_update_time) values (#{id,jdbcType=BIGINT},#{goodId,jdbcType=VARCHAR},#{goodSource,jdbcType=VARCHAR},#{userSystemCoupon.id,jdbcType=BIGINT},#{couponType,jdbcType=VARCHAR},#{orderNo,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_system_coupon_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">ucr_id,</if>
@@ -36,7 +36,7 @@
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="goodId != null">#{goodId,jdbcType=BIGINT},</if>
      <if test="goodId != null">#{goodId,jdbcType=VARCHAR},</if>
      <if test="goodSource != null">#{goodSource,jdbcType=VARCHAR},</if>
      <if test="userSystemCoupon != null">#{userSystemCoupon.id,jdbcType=BIGINT},</if>
      <if test="couponType != null">#{couponType,jdbcType=VARCHAR},</if>
@@ -46,10 +46,10 @@
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord">update yeshi_ec_user_system_coupon_record set ucr_good_id = #{goodId,jdbcType=BIGINT},ucr_good_source = #{goodSource,jdbcType=VARCHAR},ucr_user_coupon_id = #{userSystemCoupon.id,jdbcType=BIGINT},ucr_coupon_type = #{couponType,jdbcType=VARCHAR},ucr_order_no = #{orderNo,jdbcType=VARCHAR},ucr_state = #{state,jdbcType=INTEGER},ucr_create_time = #{createTime,jdbcType=TIMESTAMP},ucr_update_time = #{updateTime,jdbcType=TIMESTAMP} where ucr_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord">update yeshi_ec_user_system_coupon_record set ucr_good_id = #{goodId,jdbcType=VARCHAR},ucr_good_source = #{goodSource,jdbcType=VARCHAR},ucr_user_coupon_id = #{userSystemCoupon.id,jdbcType=BIGINT},ucr_coupon_type = #{couponType,jdbcType=VARCHAR},ucr_order_no = #{orderNo,jdbcType=VARCHAR},ucr_state = #{state,jdbcType=INTEGER},ucr_create_time = #{createTime,jdbcType=TIMESTAMP},ucr_update_time = #{updateTime,jdbcType=TIMESTAMP} where ucr_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord">update yeshi_ec_user_system_coupon_record
    <set>
      <if test="goodId != null">ucr_good_id=#{goodId,jdbcType=BIGINT},</if>
      <if test="goodId != null">ucr_good_id=#{goodId,jdbcType=VARCHAR},</if>
      <if test="goodSource != null">ucr_good_source=#{goodSource,jdbcType=VARCHAR},</if>
      <if test="userSystemCoupon != null">ucr_user_coupon_id=#{userSystemCoupon.id,jdbcType=BIGINT},</if>
      <if test="couponType != null">ucr_coupon_type=#{couponType,jdbcType=VARCHAR},</if>