Authored by qinchao

Merge branch 'dev' of http://git.yoho.cn/ufo/yohoufo-fore into dev

... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.controller;
import com.yohobuy.ufo.model.order.resp.PageResp;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.cache.Cachable;
import com.yohoufo.order.common.TabType;
import com.yohoufo.order.model.request.OrderListRequest;
import com.yohoufo.order.model.request.OrderRequest;
... ... @@ -174,7 +175,7 @@ public class BuyerOrderController {
}
@RequestMapping(value = "/confirmReceive", params = "method=ufo.depot.confirmReceive")
@RequestMapping(value = "/confirmReceive")
@ResponseBody
public ApiResponse confirmReceive(@RequestParam("orderCode") long orderCode) {
LOG.info("method ufo.depot.confirmReceive in, orderCode is {}", orderCode);
... ...
... ... @@ -3,6 +3,7 @@ package com.yohoufo.order.controller;
import com.google.common.collect.Lists;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.cache.Cachable;
import com.yohoufo.order.model.request.ShoppingRequest;
import com.yohoufo.order.model.response.OrderSubmitResponse;
import com.yohoufo.order.model.response.OrderSummaryResp;
... ... @@ -69,6 +70,7 @@ public class ShoppingController {
* @return
*/
@RequestMapping(params = "method=ufo.order.summary")
//@Cachable(expire = 300, excludeArgs = {1})
public ApiResponse submit(@RequestParam(name = "uid") int uid,
@RequestParam(name = "client_type", required = false) String clientType){
OrderSummaryResp orderSummaryResp1 = sellerOrderService.selectOrderNumByUid(uid);
... ...
... ... @@ -23,6 +23,13 @@ public class SellerOrderComputeHandler {
private double earnestmoney_max;
private BigDecimal[] EARNESTMONEYRANGE = new BigDecimal[2];
@Value("${order.seller.appraiseFee:5}")
private Double appraiseFee;
/**
* 有货包装费(暂定5元)
*/
@Value("${order.seller.packageFee:5}")
private Double packageFee ;
@PostConstruct
public void init(){
... ... @@ -79,6 +86,14 @@ public class SellerOrderComputeHandler {
).subtract(platformFee));
}
public Double getAppraiseFee() {
return appraiseFee;
}
public Double getPackageFee() {
return packageFee;
}
/**
* 通过相加得出的数据
* TODO 服务费参与计算后需要考虑精度问题(四舍五入)
... ... @@ -86,8 +101,10 @@ public class SellerOrderComputeHandler {
*/
private PlatformFeeDto calPlatformFee(){
PlatformFeeDto platformFee = new PlatformFeeDto();
BigDecimal appraiseFee = platformFee.getAppraiseFee();
BigDecimal packageFee = platformFee.getPackageFee();
BigDecimal appraiseFee = halfUp(new BigDecimal(getAppraiseFee()));
BigDecimal packageFee = halfUp(new BigDecimal(getPackageFee()));
platformFee.setAppraiseFee(appraiseFee);
platformFee.setPackageFee(packageFee);
BigDecimal total = appraiseFee.add(packageFee);
platformFee.setTotal(total);
return platformFee;
... ...
... ... @@ -89,3 +89,5 @@ redis.proxy.port=6379
buyer.delivery.way.cost.sf=0
order.seller.earnestmoney.min=1
order.seller.earnestmoney.max=200
order.seller.packageFee=0.1
order.seller.appraiseFee=0.1
\ No newline at end of file
... ...
... ... @@ -55,8 +55,9 @@ wechat.app.appid=wx049fdaa3ba9cdd7a
wechat.notifyurl=${wechat.notifyurl}
alipay.notifyurl=${alipay.notifyurl}
buyer.delivery.way.cost.sf=0
order.seller.earnestmoney.min=1
order.seller.earnestmoney.max=200
buyer.delivery.way.cost.sf=${buyer.delivery.way.cost.sf}
order.seller.earnestmoney.min=${order.seller.earnestmoney.min}
order.seller.earnestmoney.max=${order.seller.earnestmoney.max}
order.seller.packageFee=${order.seller.packageFee}
order.seller.appraiseFee=${order.seller.appraiseFee}
erp-gateway.url=${erp-gateway.url}
\ No newline at end of file
... ...