yujian
2020-03-24 88c7df1d5089d8e39f356a68eaccc18f308e190c
fanli/src/main/java/com/yeshi/fanli/mapping/order/InviteOrderSubsidyMapper.xml
@@ -14,14 +14,24 @@
      <result column="os_update_time" property="updateTime" jdbcType="TIMESTAMP" />
      <result column="os_original_money" property="originalMoney"
         jdbcType="DECIMAL" />
      <result column="os_pre_get_time" property="preGetTime"
         jdbcType="TIMESTAMP" />
      <result column="os_get_time" property="getTime" jdbcType="TIMESTAMP" />
      <result column="os_level" property="level" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List">os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time,os_original_money
   <sql id="Base_Column_List">os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time,os_original_money,os_pre_get_time,os_get_time,os_level
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_invite_order_subsidy where os_id = #{id,jdbcType=BIGINT}
   </select>
   <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_invite_order_subsidy where os_id = #{0} for update
   </select>
   <select id="listByOrderNoAndType" resultMap="BaseResultMap">
      select
@@ -35,9 +45,9 @@
   <insert id="insert" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy"
      useGeneratedKeys="true" keyProperty="id">insert into
      yeshi_ec_invite_order_subsidy
      (os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time,os_original_money)
      (os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time,os_original_money,os_pre_get_time,os_get_time,os_level)
      values
      (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{orderNo,jdbcType=VARCHAR},#{sourceType,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{originalMoney,jdbcType=DECIMAL})
      (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{orderNo,jdbcType=VARCHAR},#{sourceType,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{originalMoney,jdbcType=DECIMAL},#{preGetTime,jdbcType=TIMESTAMP},#{getTime,jdbcType=TIMESTAMP},#{level,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy"
      useGeneratedKeys="true" keyProperty="id">
@@ -52,6 +62,9 @@
         <if test="createTime != null">os_create_time,</if>
         <if test="updateTime != null">os_update_time,</if>
         <if test="originalMoney != null">os_original_money,</if>
         <if test="preGetTime != null">os_pre_get_time,</if>
         <if test="getTime != null">os_get_time,</if>
         <if test="level != null">os_level,</if>
      </trim>
      values
      <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -63,7 +76,10 @@
         <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="originalMoney != null">#{originalMoney,jdbcType=DECIMAL}</if>
         <if test="originalMoney != null">#{originalMoney,jdbcType=DECIMAL},</if>
         <if test="preGetTime != null">#{preGetTime,jdbcType=TIMESTAMP},</if>
         <if test="getTime != null">#{getTime,jdbcType=TIMESTAMP},</if>
         <if test="level != null">#{level,jdbcType=INTEGER}</if>
      </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy">update
@@ -75,8 +91,10 @@
      #{state,jdbcType=INTEGER},os_create_time =
      #{createTime,jdbcType=TIMESTAMP},os_update_time =
      #{updateTime,jdbcType=TIMESTAMP} ,os_original_money
      =#{originalMoney,jdbcType=DECIMAL} where os_id = #{id,jdbcType=BIGINT}
   </update>
      =#{originalMoney,jdbcType=DECIMAL} ,os_pre_get_time
      =#{preGetTime,jdbcType=TIMESTAMP} ,os_get_time
      =#{getTime,jdbcType=TIMESTAMP} ,os_level =#{level,jdbcType=INTEGER}
      where os_id = #{id,jdbcType=BIGINT}</update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy">
      update yeshi_ec_invite_order_subsidy
      <set>
@@ -89,25 +107,20 @@
         <if test="updateTime != null">os_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="originalMoney !=null">os_original_money =#{originalMoney,jdbcType=DECIMAL},
         </if>
         <if test="preGetTime !=null">os_pre_get_time =#{preGetTime,jdbcType=TIMESTAMP},</if>
         <if test="getTime !=null">os_get_time =#{getTime,jdbcType=TIMESTAMP},</if>
         <if test="level !=null">os_level =#{level,jdbcType=INTEGER},</if>
      </set>
      where os_id = #{id,jdbcType=BIGINT}
   </update>
   <select id="getByOrderNoAndType" resultMap="BaseResultMap">SELECT * FROM
      yeshi_ec_invite_order_subsidy WHERE os_uid = #{uid} AND os_order_no =
      #{orderNo} AND os_source_type = #{type} LIMIT 1
   </select>
      #{orderNo} AND os_source_type = #{type} LIMIT 1</select>
   <select id="getByOrderNoAndTypeForUpdate" resultMap="BaseResultMap">SELECT *
      FROM
      yeshi_ec_invite_order_subsidy WHERE os_uid = #{uid} AND
      os_order_no =
      #{orderNo} AND os_source_type = #{type} for update
      FROM yeshi_ec_invite_order_subsidy WHERE os_uid = #{uid} AND
      os_order_no = #{orderNo} AND os_source_type = #{type} for update
   </select>
   <select id="countByOrderNoAndType" resultType="java.lang.Long">SELECT count(*)
      FROM yeshi_ec_invite_order_subsidy WHERE os_order_no = #{orderNo} AND
      os_source_type = #{type}
   </select>
      os_source_type = #{type}</select>
</mapper>