Helius
2021-06-16 4e51778362c2130598a4c73ec4cebe6629dbc53f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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.xzx.gc.order.mapper.RebateWeightPriceMapper">
  <resultMap id="BaseResultMap" type="com.xzx.gc.entity.RebateWeightPrice">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="product_type" jdbcType="VARCHAR" property="productType" />
    <result column="money" jdbcType="VARCHAR" property="money" />
    <result column="weight" jdbcType="VARCHAR" property="weight" />
    <result column="rule_id" jdbcType="BIGINT" property="ruleId" />
    <result column="package_id" jdbcType="VARCHAR" property="packageId" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="start_time" jdbcType="VARCHAR" property="startTime" />
    <result column="end_time" jdbcType="VARCHAR" property="endTime" />
  </resultMap>
 
  <select id="queryRulePriceList" resultType="com.xzx.gc.model.admin.WeightPriceModel">
    select * from xzx_rebate_weight_price where rule_id=#{ruleId}
  </select>
 
  <insert id="addRoyaltyRule">
    INSERT INTO `xzx_rebate_weight_price` (`product_type`, `money`, `weight`, `rule_id`, `package_id`, `create_time`, `start_time`, `end_time`)
    VALUES (#{productType}, #{money}, #{weight}, #{ruleId}, #{packageId}, #{createTime}, #{startTime}, #{endTime})
  </insert>
 
  <delete id="deleteByRuleId">
    update xzx_rebate_weight_price  set del_flag=1 where rule_id=#{ruleId}
  </delete>
 
    <select id="queryOldItemList" resultType="com.xzx.gc.model.admin.RebateWeightPriceModel">
        select * from xzx_rebate_weight_price where rule_id=#{ruleId} and del_flag=0
    </select>
 
 
</mapper>