Authored by wujiexiang

Merge branch 'dev_bid' into test6.9.13

@@ -79,7 +79,7 @@ public class BuyerBidController { @@ -79,7 +79,7 @@ public class BuyerBidController {
79 @RequestMapping(params = "method=ufo.buyer.bid.prePublish") 79 @RequestMapping(params = "method=ufo.buyer.bid.prePublish")
80 public ApiResponse prePublish(@RequestParam(name = "uid") int uid, 80 public ApiResponse prePublish(@RequestParam(name = "uid") int uid,
81 @RequestParam(name = "storage_id") int storage_id, 81 @RequestParam(name = "storage_id") int storage_id,
82 - @RequestParam(name = "address_id", required = false) String address_id, 82 + @RequestParam(name = "address_id") String address_id,
83 @RequestParam(name = "price") String price) { 83 @RequestParam(name = "price") String price) {
84 logger.info("in ufo.buyer.bid.prePublish, uid:{},storage_id:{},address_id:{},price:{}", uid, storage_id, address_id, price); 84 logger.info("in ufo.buyer.bid.prePublish, uid:{},storage_id:{},address_id:{},price:{}", uid, storage_id, address_id, price);
85 //1.校验如下规则 85 //1.校验如下规则
@@ -4,22 +4,23 @@ import com.yohoufo.order.utils.BeanTool; @@ -4,22 +4,23 @@ import com.yohoufo.order.utils.BeanTool;
4 import lombok.Data; 4 import lombok.Data;
5 import org.apache.commons.lang3.StringUtils; 5 import org.apache.commons.lang3.StringUtils;
6 6
  7 +import java.util.Objects;
  8 +
7 @Data 9 @Data
8 public class BuyerBidConfig { 10 public class BuyerBidConfig {
9 11
10 //求购价配置 12 //求购价配置
11 - private BidAndSuggestConfig basConfig; 13 + private BidAndSuggestConfig basConfig = new BidAndSuggestConfig();
12 14
13 //定金配置 15 //定金配置
14 - private DepositConfig dConfig; 16 + private DepositConfig dConfig = new DepositConfig();
15 17
16 public static BuyerBidConfig convert(String json) { 18 public static BuyerBidConfig convert(String json) {
17 - if (StringUtils.isEmpty(json)) {  
18 - return new BuyerBidConfig();  
19 - } else {  
20 - BuyerBidConfig config = BeanTool.string2Value(json, BuyerBidConfig.class);  
21 - return config; 19 + BuyerBidConfig config = BeanTool.string2Value(json, BuyerBidConfig.class);
  20 + if (Objects.isNull(config)) {
  21 + config = new BuyerBidConfig();
22 } 22 }
  23 + return config;
23 } 24 }
24 25
25 @Data 26 @Data
@@ -19,7 +19,8 @@ import java.util.stream.Collectors; @@ -19,7 +19,8 @@ import java.util.stream.Collectors;
19 @NoArgsConstructor 19 @NoArgsConstructor
20 public class BidComputeResponse { 20 public class BidComputeResponse {
21 21
22 - String amount; 22 + //定金金额
  23 + String depositAmount;
23 24
24 /** 25 /**
25 * 费用列表 26 * 费用列表
@@ -7,7 +7,7 @@ import lombok.Data; @@ -7,7 +7,7 @@ import lombok.Data;
7 @Builder 7 @Builder
8 public class BidPrePublishResponse { 8 public class BidPrePublishResponse {
9 9
10 - String amount; 10 + String depositAmount;
11 11
12 /** 12 /**
13 * 对话框 13 * 对话框
@@ -14,14 +14,4 @@ public class BidPublishResponse { @@ -14,14 +14,4 @@ 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 - //提示  
19 - private Tip tip;  
20 -  
21 - public static class Tip {  
22 - //用于区别不同的场景  
23 - int code;  
24 - String content1;  
25 - String content2;  
26 - }  
27 } 17 }
@@ -129,7 +129,7 @@ public class BuyerBidPublishService { @@ -129,7 +129,7 @@ public class BuyerBidPublishService {
129 //返回结果 129 //返回结果
130 BidComputeResponse response = new BidComputeResponse(); 130 BidComputeResponse response = new BidComputeResponse();
131 response.setPromotionFormulaList(shoppingSupport.getPromotionFormula(chargeResult)); 131 response.setPromotionFormulaList(shoppingSupport.getPromotionFormula(chargeResult));
132 - response.setAmount(MathUtils.formatStr(deposit.getAmount())); 132 + response.setDepositAmount(MathUtils.formatStr(deposit.getAmount()));
133 133
134 return response; 134 return response;
135 } 135 }
@@ -164,7 +164,7 @@ public class BuyerBidPublishService { @@ -164,7 +164,7 @@ public class BuyerBidPublishService {
164 .title("建议求购价:" + OrderConstant.MONEY_SIGN + bidAndSuggestPrice.getSuggestPrice().toPlainString()) 164 .title("建议求购价:" + OrderConstant.MONEY_SIGN + bidAndSuggestPrice.getSuggestPrice().toPlainString())
165 .content("高于建议求购价可以迅速提升求购速度成功率!").cancel("调整价格").confirm("继续求购").build(); 165 .content("高于建议求购价可以迅速提升求购速度成功率!").cancel("调整价格").confirm("继续求购").build();
166 } 166 }
167 - return BidPrePublishResponse.builder().amount(MathUtils.formatStr(deposit.getAmount())).dialog(dialog).build(); 167 + return BidPrePublishResponse.builder().depositAmount(MathUtils.formatStr(deposit.getAmount())).dialog(dialog).build();
168 } 168 }
169 169
170 170