Authored by mali

寄存二期

@@ -44,4 +44,6 @@ public class DepositOrder { @@ -44,4 +44,6 @@ public class DepositOrder {
44 private BigDecimal renewFee; // 续约费用 44 private BigDecimal renewFee; // 续约费用
45 45
46 private Integer renewDay;// 续约天数 46 private Integer renewDay;// 续约天数
  47 +
  48 + private Integer depositId; // 库存表的ID
47 } 49 }
@@ -18,10 +18,11 @@ @@ -18,10 +18,11 @@
18 <result column="late_fee" property="lateFee" jdbcType="DECIMAL" /> 18 <result column="late_fee" property="lateFee" jdbcType="DECIMAL" />
19 <result column="renew_fee" property="renewFee" jdbcType="DECIMAL" /> 19 <result column="renew_fee" property="renewFee" jdbcType="DECIMAL" />
20 <result column="renew_day" property="renewDay" jdbcType="INTEGER" /> 20 <result column="renew_day" property="renewDay" jdbcType="INTEGER" />
  21 + <result column="deposit_id" property="depositId" jdbcType="INTEGER" />
21 </resultMap> 22 </resultMap>
22 <sql id="Base_Column_List" > 23 <sql id="Base_Column_List" >
23 id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status, 24 id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status,
24 - create_time, update_time, ship_fee, contract_fee, late_fee, renew_fee, renew_day 25 + create_time, update_time, ship_fee, contract_fee, late_fee, renew_fee, renew_day,deposit_id
25 </sql> 26 </sql>
26 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > 27 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
27 select 28 select
@@ -34,12 +35,12 @@ @@ -34,12 +35,12 @@
34 insert into deposit_order (id, uid, order_code, 35 insert into deposit_order (id, uid, order_code,
35 deposit_code, amount, payment, 36 deposit_code, amount, payment,
36 client_type, event_type, status, 37 client_type, event_type, status,
37 - create_time, update_time, contract_fee,ship_fee, late_fee, renew_fee, renew_day) 38 + create_time, update_time, contract_fee,ship_fee, late_fee, renew_fee, renew_day, deposit_id)
38 values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}, 39 values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT},
39 #{depositCode,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{payment,jdbcType=INTEGER}, 40 #{depositCode,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{payment,jdbcType=INTEGER},
40 #{clientType,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 41 #{clientType,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
41 #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{contractFee,jdbcType=DECIMAL}, #{shipFee,jdbcType=DECIMAL} 42 #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{contractFee,jdbcType=DECIMAL}, #{shipFee,jdbcType=DECIMAL}
42 - , #{lateFee,jdbcType=DECIMAL}, #{renewFee,jdbcType=DECIMAL}, #{renewDay,jdbcType=INTEGER}) 43 + , #{lateFee,jdbcType=DECIMAL}, #{renewFee,jdbcType=DECIMAL}, #{renewDay,jdbcType=INTEGER}, #{depositId,jdbcType=INTEGER})
43 </insert> 44 </insert>
44 45
45 <update id="updatePayment" parameterType="com.yohoufo.dal.order.model.DepositOrder"> 46 <update id="updatePayment" parameterType="com.yohoufo.dal.order.model.DepositOrder">
@@ -136,13 +136,13 @@ public class DepositOrderService { @@ -136,13 +136,13 @@ public class DepositOrderService {
136 DepositOrderComputeResp.PriceInfo priceInfo = getFeeInfo(orderCode, req.getAddress_id(), req.getUid()); 136 DepositOrderComputeResp.PriceInfo priceInfo = getFeeInfo(orderCode, req.getAddress_id(), req.getUid());
137 137
138 DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(new BigDecimal(priceInfo.getAmount())) 138 DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(new BigDecimal(priceInfo.getAmount()))
139 - .contractFee(new BigDecimal(priceInfo.getContractFee())) 139 + .contractFee(new BigDecimal(priceInfo.getContractFee()))
140 .shipFee(new BigDecimal(priceInfo.getShipFee())) 140 .shipFee(new BigDecimal(priceInfo.getShipFee()))
141 .lateFee(BigDecimal.valueOf(0.00)) 141 .lateFee(BigDecimal.valueOf(0.00))
142 .renewFee(BigDecimal.valueOf(0.00)) 142 .renewFee(BigDecimal.valueOf(0.00))
143 .renewDay(0) 143 .renewDay(0)
144 - .createTime(now).depositCode(req.getDepositCode())  
145 - .eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build(); 144 + .createTime(now).depositCode(req.getDepositCode()).depositId(storageDeposit.getId())
  145 + .eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
146 146
147 // 创建召回地址 147 // 创建召回地址
148 LOG.info("enter publishRecallAddress begin save getOrderCode {} addressId is {} ", storageDeposit.getOrderCode(), req.getAddress_id()); 148 LOG.info("enter publishRecallAddress begin save getOrderCode {} addressId is {} ", storageDeposit.getOrderCode(), req.getAddress_id());
@@ -171,7 +171,7 @@ public class DepositOrderService { @@ -171,7 +171,7 @@ public class DepositOrderService {
171 } 171 }
172 172
173 public DepositOrder selectByOrderCode(Long orderCode) { 173 public DepositOrder selectByOrderCode(Long orderCode) {
174 - return depositOrderMapper.selectByOrderCode(orderCode); 174 + return selectByOrderCodeUid(orderCode, 0);
175 } 175 }
176 176
177 /** 177 /**
@@ -401,7 +401,7 @@ public class DepositOrderService { @@ -401,7 +401,7 @@ public class DepositOrderService {
401 .contractFee(BigDecimal.valueOf(0.00)) 401 .contractFee(BigDecimal.valueOf(0.00))
402 .shipFee(BigDecimal.valueOf(0.00)) 402 .shipFee(BigDecimal.valueOf(0.00))
403 .renewDay(priceInfo.getRenewDay()) 403 .renewDay(priceInfo.getRenewDay())
404 - .createTime(now).depositCode(req.getDepositCode()) 404 + .createTime(now).depositCode(req.getDepositCode()).depositId(storageDeposit.getId())
405 .eventType(DepositEventTypeEnum.DEPOSIT_RENEW_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build(); 405 .eventType(DepositEventTypeEnum.DEPOSIT_RENEW_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
406 406
407 LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder); 407 LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder);