Authored by wujiexiang

Merge branch 'dev_bid' into test6.9.13

@@ -5,8 +5,6 @@ import lombok.Builder; @@ -5,8 +5,6 @@ import lombok.Builder;
5 import lombok.Data; 5 import lombok.Data;
6 import lombok.NoArgsConstructor; 6 import lombok.NoArgsConstructor;
7 7
8 -import java.math.BigDecimal;  
9 -  
10 @Data 8 @Data
11 @Builder 9 @Builder
12 @AllArgsConstructor 10 @AllArgsConstructor
@@ -17,5 +15,5 @@ public class BidPublishResult { @@ -17,5 +15,5 @@ public class BidPublishResult {
17 //发布时间 15 //发布时间
18 private int publishTime; 16 private int publishTime;
19 //定金金额 17 //定金金额
20 - private BigDecimal orderAmount; 18 + private double depositAmount;
21 } 19 }
@@ -14,4 +14,6 @@ public class BidPublishResponse { @@ -14,4 +14,6 @@ public class BidPublishResponse {
14 private long orderCode; 14 private long orderCode;
15 //Y 已支付,N 为支付 15 //Y 已支付,N 为支付
16 private String paymentStatus; 16 private String paymentStatus;
  17 + //定金
  18 + String depositAmount;
17 } 19 }
@@ -21,6 +21,7 @@ import com.yohoufo.order.model.response.BidPublishResponse; @@ -21,6 +21,7 @@ import com.yohoufo.order.model.response.BidPublishResponse;
21 import com.yohoufo.order.service.proxy.BidProductProxyService; 21 import com.yohoufo.order.service.proxy.BidProductProxyService;
22 import com.yohoufo.order.service.support.BuyerOrderMetaMapperSupport; 22 import com.yohoufo.order.service.support.BuyerOrderMetaMapperSupport;
23 import com.yohoufo.order.utils.LoggerUtils; 23 import com.yohoufo.order.utils.LoggerUtils;
  24 +import com.yohoufo.order.utils.MathUtils;
24 import org.apache.commons.collections.CollectionUtils; 25 import org.apache.commons.collections.CollectionUtils;
25 import org.apache.commons.lang3.StringUtils; 26 import org.apache.commons.lang3.StringUtils;
26 import org.apache.commons.lang3.tuple.Pair; 27 import org.apache.commons.lang3.tuple.Pair;
@@ -129,8 +130,10 @@ public class BuyerBidPriceService { @@ -129,8 +130,10 @@ public class BuyerBidPriceService {
129 buyerBidPublishService.processAfterBidPublish(request.getUid(), bidPublishResult); 130 buyerBidPublishService.processAfterBidPublish(request.getUid(), bidPublishResult);
130 } 131 }
131 // 返回结果 132 // 返回结果
132 - return BidPublishResponse.builder().skup(bidPublishResult.getSkup()).orderCode(bidPublishResult.getOrderCode()) 133 + return BidPublishResponse.builder().skup(bidPublishResult.getSkup())
  134 + .orderCode(bidPublishResult.getOrderCode())
133 .paymentStatus(OrderConstant.N_STR) 135 .paymentStatus(OrderConstant.N_STR)
  136 + .depositAmount(MathUtils.formatStr(bidPublishResult.getDepositAmount()))
134 .build(); 137 .build();
135 } 138 }
136 139
@@ -184,8 +184,10 @@ public class BuyerBidPublishService { @@ -184,8 +184,10 @@ public class BuyerBidPublishService {
184 processAfterBidPublish(uid, bidPublishResult); 184 processAfterBidPublish(uid, bidPublishResult);
185 185
186 // 返回结果 186 // 返回结果
187 - return BidPublishResponse.builder().skup(bidPublishResult.getSkup()).orderCode(bidPublishResult.getOrderCode()) 187 + return BidPublishResponse.builder().skup(bidPublishResult.getSkup())
  188 + .orderCode(bidPublishResult.getOrderCode())
188 .paymentStatus(OrderConstant.N_STR) 189 .paymentStatus(OrderConstant.N_STR)
  190 + .depositAmount(MathUtils.formatStr(bidPublishResult.getDepositAmount()))
189 .build(); 191 .build();
190 } 192 }
191 193
@@ -288,7 +290,7 @@ public class BuyerBidPublishService { @@ -288,7 +290,7 @@ public class BuyerBidPublishService {
288 290
289 BidPublishResult publishResult = BidPublishResult.builder().skup(skup).orderCode(orderCode) 291 BidPublishResult publishResult = BidPublishResult.builder().skup(skup).orderCode(orderCode)
290 .publishTime(submitResult.getSubmitTime()) 292 .publishTime(submitResult.getSubmitTime())
291 - .orderAmount(orderBuilder.getAmount()) 293 + .depositAmount(deposit.getAmount())
292 .build(); 294 .build();
293 295
294 logger.info("[{}] bid publish success,result:{}", uid, publishResult); 296 logger.info("[{}] bid publish success,result:{}", uid, publishResult);
@@ -350,7 +352,7 @@ public class BuyerBidPublishService { @@ -350,7 +352,7 @@ public class BuyerBidPublishService {
350 BuyerOrder buyerOrder = new BuyerOrder(); 352 BuyerOrder buyerOrder = new BuyerOrder();
351 buyerOrder.setUid(uid); 353 buyerOrder.setUid(uid);
352 buyerOrder.setOrderCode(bidPublishResult.getOrderCode()); 354 buyerOrder.setOrderCode(bidPublishResult.getOrderCode());
353 - buyerOrder.setAmount(bidPublishResult.getOrderAmount()); 355 + buyerOrder.setAmount(BigDecimal.valueOf(bidPublishResult.getDepositAmount()));
354 buyerOrder.setCreateTime(bidPublishResult.getPublishTime()); 356 buyerOrder.setCreateTime(bidPublishResult.getPublishTime());
355 orderChangeListenerContainer.fireAsyncEvent(new BuyerOrderChangeEvent(buyerOrder, BuyerOrderChangeEvent.BizCase.CREATE, OrderStatus.WAITING_PAY_DEPOSIT)); 357 orderChangeListenerContainer.fireAsyncEvent(new BuyerOrderChangeEvent(buyerOrder, BuyerOrderChangeEvent.BizCase.CREATE, OrderStatus.WAITING_PAY_DEPOSIT));
356 } 358 }