Authored by wujiexiang

Merge branch 'dev_bid' into test6.9.13

... ... @@ -79,7 +79,7 @@ public class BuyerBidController {
@RequestMapping(params = "method=ufo.buyer.bid.prePublish")
public ApiResponse prePublish(@RequestParam(name = "uid") int uid,
@RequestParam(name = "storage_id") int storage_id,
@RequestParam(name = "address_id", required = false) String address_id,
@RequestParam(name = "address_id") String address_id,
@RequestParam(name = "price") String price) {
logger.info("in ufo.buyer.bid.prePublish, uid:{},storage_id:{},address_id:{},price:{}", uid, storage_id, address_id, price);
//1.校验如下规则
... ...
... ... @@ -4,22 +4,23 @@ import com.yohoufo.order.utils.BeanTool;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
@Data
public class BuyerBidConfig {
//求购价配置
private BidAndSuggestConfig basConfig;
private BidAndSuggestConfig basConfig = new BidAndSuggestConfig();
//定金配置
private DepositConfig dConfig;
private DepositConfig dConfig = new DepositConfig();
public static BuyerBidConfig convert(String json) {
if (StringUtils.isEmpty(json)) {
return new BuyerBidConfig();
} else {
BuyerBidConfig config = BeanTool.string2Value(json, BuyerBidConfig.class);
return config;
BuyerBidConfig config = BeanTool.string2Value(json, BuyerBidConfig.class);
if (Objects.isNull(config)) {
config = new BuyerBidConfig();
}
return config;
}
@Data
... ...
... ... @@ -19,7 +19,8 @@ import java.util.stream.Collectors;
@NoArgsConstructor
public class BidComputeResponse {
String amount;
//定金金额
String depositAmount;
/**
* 费用列表
... ...
... ... @@ -7,7 +7,7 @@ import lombok.Data;
@Builder
public class BidPrePublishResponse {
String amount;
String depositAmount;
/**
* 对话框
... ...
... ... @@ -14,14 +14,4 @@ public class BidPublishResponse {
private long orderCode;
//Y 已支付,N 为支付
private String paymentStatus;
//提示
private Tip tip;
public static class Tip {
//用于区别不同的场景
int code;
String content1;
String content2;
}
}
\ No newline at end of file
... ...
... ... @@ -129,7 +129,7 @@ public class BuyerBidPublishService {
//返回结果
BidComputeResponse response = new BidComputeResponse();
response.setPromotionFormulaList(shoppingSupport.getPromotionFormula(chargeResult));
response.setAmount(MathUtils.formatStr(deposit.getAmount()));
response.setDepositAmount(MathUtils.formatStr(deposit.getAmount()));
return response;
}
... ... @@ -164,7 +164,7 @@ public class BuyerBidPublishService {
.title("建议求购价:" + OrderConstant.MONEY_SIGN + bidAndSuggestPrice.getSuggestPrice().toPlainString())
.content("高于建议求购价可以迅速提升求购速度成功率!").cancel("调整价格").confirm("继续求购").build();
}
return BidPrePublishResponse.builder().amount(MathUtils.formatStr(deposit.getAmount())).dialog(dialog).build();
return BidPrePublishResponse.builder().depositAmount(MathUtils.formatStr(deposit.getAmount())).dialog(dialog).build();
}
... ...