Authored by mali

寄存二期

... ... @@ -44,4 +44,6 @@ public class DepositOrder {
private BigDecimal renewFee; // 续约费用
private Integer renewDay;// 续约天数
private Integer depositId; // 库存表的ID
}
\ No newline at end of file
... ...
... ... @@ -18,10 +18,11 @@
<result column="late_fee" property="lateFee" jdbcType="DECIMAL" />
<result column="renew_fee" property="renewFee" jdbcType="DECIMAL" />
<result column="renew_day" property="renewDay" jdbcType="INTEGER" />
<result column="deposit_id" property="depositId" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status,
create_time, update_time, ship_fee, contract_fee, late_fee, renew_fee, renew_day
create_time, update_time, ship_fee, contract_fee, late_fee, renew_fee, renew_day,deposit_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
... ... @@ -34,12 +35,12 @@
insert into deposit_order (id, uid, order_code,
deposit_code, amount, payment,
client_type, event_type, status,
create_time, update_time, contract_fee,ship_fee, late_fee, renew_fee, renew_day)
create_time, update_time, contract_fee,ship_fee, late_fee, renew_fee, renew_day, deposit_id)
values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT},
#{depositCode,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{payment,jdbcType=INTEGER},
#{clientType,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{contractFee,jdbcType=DECIMAL}, #{shipFee,jdbcType=DECIMAL}
, #{lateFee,jdbcType=DECIMAL}, #{renewFee,jdbcType=DECIMAL}, #{renewDay,jdbcType=INTEGER})
, #{lateFee,jdbcType=DECIMAL}, #{renewFee,jdbcType=DECIMAL}, #{renewDay,jdbcType=INTEGER}, #{depositId,jdbcType=INTEGER})
</insert>
<update id="updatePayment" parameterType="com.yohoufo.dal.order.model.DepositOrder">
... ...
... ... @@ -136,13 +136,13 @@ public class DepositOrderService {
DepositOrderComputeResp.PriceInfo priceInfo = getFeeInfo(orderCode, req.getAddress_id(), req.getUid());
DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(new BigDecimal(priceInfo.getAmount()))
.contractFee(new BigDecimal(priceInfo.getContractFee()))
.contractFee(new BigDecimal(priceInfo.getContractFee()))
.shipFee(new BigDecimal(priceInfo.getShipFee()))
.lateFee(BigDecimal.valueOf(0.00))
.renewFee(BigDecimal.valueOf(0.00))
.renewDay(0)
.createTime(now).depositCode(req.getDepositCode())
.eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
.createTime(now).depositCode(req.getDepositCode()).depositId(storageDeposit.getId())
.eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
// 创建召回地址
LOG.info("enter publishRecallAddress begin save getOrderCode {} addressId is {} ", storageDeposit.getOrderCode(), req.getAddress_id());
... ... @@ -171,7 +171,7 @@ public class DepositOrderService {
}
public DepositOrder selectByOrderCode(Long orderCode) {
return depositOrderMapper.selectByOrderCode(orderCode);
return selectByOrderCodeUid(orderCode, 0);
}
/**
... ... @@ -401,7 +401,7 @@ public class DepositOrderService {
.contractFee(BigDecimal.valueOf(0.00))
.shipFee(BigDecimal.valueOf(0.00))
.renewDay(priceInfo.getRenewDay())
.createTime(now).depositCode(req.getDepositCode())
.createTime(now).depositCode(req.getDepositCode()).depositId(storageDeposit.getId())
.eventType(DepositEventTypeEnum.DEPOSIT_RENEW_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder);
... ...