|
@@ -170,17 +170,7 @@ public class Api05Controller extends BladeController {
|
|
Consign consign = consignService.getById(orderConsign.getConsignId());
|
|
Consign consign = consignService.getById(orderConsign.getConsignId());
|
|
//收款金额 默认等于抢购金额
|
|
//收款金额 默认等于抢购金额
|
|
BigDecimal collectionPrice = new BigDecimal(consign.getConsignPrice());
|
|
BigDecimal collectionPrice = new BigDecimal(consign.getConsignPrice());
|
|
- //判断商品抢购价和进货价是否产生收益
|
|
|
|
- if(consign.getObtainPrice() < consign.getConsignPrice()){
|
|
|
|
- //收益金额
|
|
|
|
- BigDecimal bigDecimal = new BigDecimal(consign.getConsignPrice()).subtract(new BigDecimal(consign.getObtainPrice())).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- //税费金额 todo 0.03修改为配置
|
|
|
|
- BigDecimal bigDecimal1 = bigDecimal.multiply(new BigDecimal(0.03)).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- //收款金额需扣除税费
|
|
|
|
- collectionPrice = new BigDecimal(consign.getConsignPrice()).subtract(bigDecimal1).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- //将税费扣除到平台账户
|
|
|
|
- orderConsign(outTradeNo, request.getOrderNo(), orderConsign.getConsignPrice());
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
//使用收款账户进行打款
|
|
//使用收款账户进行打款
|
|
boolean flg = orderConsign(outTradeNo, request.getOrderNo(), collectionPrice.doubleValue());
|
|
boolean flg = orderConsign(outTradeNo, request.getOrderNo(), collectionPrice.doubleValue());
|
|
if (flg){//是否发起统一收单
|
|
if (flg){//是否发起统一收单
|