|
@@ -165,15 +165,7 @@ public class Api05Controller extends BladeController {
|
|
|
response.setOutTradeNo(outTradeNo);
|
|
|
|
|
|
OrderConsign orderConsign = orderConsignService.getOne(Wrappers.lambdaQuery(OrderConsign.class).eq(OrderConsign::getOutTradeNo,outTradeNo));
|
|
|
- String collectionAccount = properties.getPayeeUserId();
|
|
|
- if (0 != orderConsign.getConsignUserId()){
|
|
|
-
|
|
|
-
|
|
|
- LambdaQueryWrapper<UserApp> wrapper = Wrappers.lambdaQuery(UserApp.class);
|
|
|
- wrapper.eq(UserApp::getUserId,orderConsign.getConsignUserId());
|
|
|
- UserApp collectionUser = userAppMapper.selectOne(wrapper);
|
|
|
- collectionAccount = collectionUser.getAlipayUserId();
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
Consign consign = consignService.getById(orderConsign.getConsignId());
|
|
|
|
|
@@ -182,16 +174,15 @@ public class Api05Controller extends BladeController {
|
|
|
if(consign.getObtainPrice() < consign.getConsignPrice()){
|
|
|
|
|
|
BigDecimal bigDecimal = new BigDecimal(consign.getConsignPrice()).subtract(new BigDecimal(consign.getObtainPrice())).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
-
|
|
|
+
|
|
|
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(), properties.getPayeeUserId(), orderConsign.getConsignPrice());
|
|
|
+ orderConsign(outTradeNo, request.getOrderNo(), orderConsign.getConsignPrice());
|
|
|
}
|
|
|
-
|
|
|
|
|
|
- boolean flg = orderConsign(outTradeNo, request.getOrderNo(), collectionAccount, collectionPrice.doubleValue());
|
|
|
+ boolean flg = orderConsign(outTradeNo, request.getOrderNo(), collectionPrice.doubleValue());
|
|
|
if (flg){
|
|
|
|
|
|
flg = orderGrantService.thaw(orderGrant);
|
|
@@ -372,11 +363,10 @@ public class Api05Controller extends BladeController {
|
|
|
* 预支付统一收单
|
|
|
* @param outTradeNo 订单号
|
|
|
* @param orderNo 授权
|
|
|
- * @param collectionAccount 收款账户
|
|
|
* @param price 打款金额
|
|
|
* @return R
|
|
|
*/
|
|
|
- public boolean orderConsign(String outTradeNo, String orderNo, String collectionAccount, Double price) {
|
|
|
+ public boolean orderConsign(String outTradeNo, String orderNo, Double price) {
|
|
|
|
|
|
Order order = orderService.getOne(Wrappers.<Order>lambdaQuery().eq(Order::getOutTradeNo, outTradeNo));
|
|
|
|
|
@@ -406,7 +396,7 @@ public class Api05Controller extends BladeController {
|
|
|
|
|
|
data.put("auth_confirm_mode", "NOT_COMPLETE");
|
|
|
}
|
|
|
- data.put("seller_id", collectionAccount);
|
|
|
+ data.put("seller_id", properties.getPayeeUserId());
|
|
|
|
|
|
data.put("buyer_id", query.getAlipayUserId());
|
|
|
|