Authored by mali

寄存订单试算

... ... @@ -16,7 +16,7 @@ public class DepositOrder {
private String depositCode;
private BigDecimal amount;
private BigDecimal amount; // ×Ü·ÑÓÃ
private Integer payment;
... ... @@ -29,4 +29,8 @@ public class DepositOrder {
private Integer createTime;
private Integer updateTime;
private BigDecimal contractFee; //Î¥Ô¼·ÑÓÃ
private BigDecimal shipFee; //ÔË·Ñ
}
\ No newline at end of file
... ...
... ... @@ -7,6 +7,8 @@
<result column="order_code" property="orderCode" jdbcType="BIGINT" />
<result column="deposit_code" property="depositCode" jdbcType="VARCHAR" />
<result column="amount" property="amount" jdbcType="DECIMAL" />
<result column="contract_fee" property="contractFee" jdbcType="DECIMAL" />
<result column="ship_fee" property="shipFee" jdbcType="DECIMAL" />
<result column="payment" property="payment" jdbcType="INTEGER" />
<result column="client_type" property="clientType" jdbcType="INTEGER" />
<result column="event_type" property="eventType" jdbcType="INTEGER" />
... ... @@ -16,7 +18,7 @@
</resultMap>
<sql id="Base_Column_List" >
id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status,
create_time, update_time
create_time, update_time, ship_fee, contract_fee
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
... ... @@ -29,11 +31,11 @@
insert into deposit_order (id, uid, order_code,
deposit_code, amount, payment,
client_type, event_type, status,
create_time, update_time)
create_time, update_time, contract_fee,ship_fee)
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})
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{contractFee,jdbcType=DECIMAL}, #{shipFee,jdbcType=DECIMAL})
</insert>
... ...
... ... @@ -113,7 +113,8 @@ public class DepositOrderService {
// 生成订单数据,insert db
int now = (int) (System.currentTimeMillis()/1000);
DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(new BigDecimal(30)).createTime(now).depositCode(req.getDepositCode())
DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(new BigDecimal(30))
.contractFee(new BigDecimal(15)).shipFee(new BigDecimal(15)).createTime(now).depositCode(req.getDepositCode())
.eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder);
... ...