Authored by wujiexiang

求购-返还定金金额

... ... @@ -5,8 +5,6 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data
@Builder
@AllArgsConstructor
... ... @@ -17,5 +15,5 @@ public class BidPublishResult {
//发布时间
private int publishTime;
//定金金额
private BigDecimal orderAmount;
private double depositAmount;
}
... ...
... ... @@ -14,4 +14,6 @@ public class BidPublishResponse {
private long orderCode;
//Y 已支付,N 为支付
private String paymentStatus;
//定金
String depositAmount;
}
\ No newline at end of file
... ...
... ... @@ -21,6 +21,7 @@ import com.yohoufo.order.model.response.BidPublishResponse;
import com.yohoufo.order.service.proxy.BidProductProxyService;
import com.yohoufo.order.service.support.BuyerOrderMetaMapperSupport;
import com.yohoufo.order.utils.LoggerUtils;
import com.yohoufo.order.utils.MathUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
... ... @@ -129,8 +130,10 @@ public class BuyerBidPriceService {
buyerBidPublishService.processAfterBidPublish(request.getUid(), bidPublishResult);
}
// 返回结果
return BidPublishResponse.builder().skup(bidPublishResult.getSkup()).orderCode(bidPublishResult.getOrderCode())
return BidPublishResponse.builder().skup(bidPublishResult.getSkup())
.orderCode(bidPublishResult.getOrderCode())
.paymentStatus(OrderConstant.N_STR)
.depositAmount(MathUtils.formatStr(bidPublishResult.getDepositAmount()))
.build();
}
... ...
... ... @@ -184,8 +184,10 @@ public class BuyerBidPublishService {
processAfterBidPublish(uid, bidPublishResult);
// 返回结果
return BidPublishResponse.builder().skup(bidPublishResult.getSkup()).orderCode(bidPublishResult.getOrderCode())
return BidPublishResponse.builder().skup(bidPublishResult.getSkup())
.orderCode(bidPublishResult.getOrderCode())
.paymentStatus(OrderConstant.N_STR)
.depositAmount(MathUtils.formatStr(bidPublishResult.getDepositAmount()))
.build();
}
... ... @@ -288,7 +290,7 @@ public class BuyerBidPublishService {
BidPublishResult publishResult = BidPublishResult.builder().skup(skup).orderCode(orderCode)
.publishTime(submitResult.getSubmitTime())
.orderAmount(orderBuilder.getAmount())
.depositAmount(deposit.getAmount())
.build();
logger.info("[{}] bid publish success,result:{}", uid, publishResult);
... ... @@ -350,7 +352,7 @@ public class BuyerBidPublishService {
BuyerOrder buyerOrder = new BuyerOrder();
buyerOrder.setUid(uid);
buyerOrder.setOrderCode(bidPublishResult.getOrderCode());
buyerOrder.setAmount(bidPublishResult.getOrderAmount());
buyerOrder.setAmount(BigDecimal.valueOf(bidPublishResult.getDepositAmount()));
buyerOrder.setCreateTime(bidPublishResult.getPublishTime());
orderChangeListenerContainer.fireAsyncEvent(new BuyerOrderChangeEvent(buyerOrder, BuyerOrderChangeEvent.BizCase.CREATE, OrderStatus.WAITING_PAY_DEPOSIT));
}
... ...