feature/main20240421
郭嘉 6 months ago
parent f28d075702
commit ea3d3133b5
  1. 6
      app/api/service/order/PaySuccess.php
  2. 1
      public/install/data/install_struct.sql

@ -354,6 +354,12 @@ class PaySuccess extends BaseService
], ['order_no' => $orderInfo['order_no']]);
//增加商户支付详情
$model = \app\store\model\Merchant::detail($orderInfo['merchant_id']);
$precent = 1;
if ($model['commission_ratio']) {
$precent = (1 - $model['commission_ratio'] / 1000);
}
$orderInfo['pay_price'] = (float)($precent * $orderInfo['pay_price']);
(new merchantPayModel())->addDetail($orderInfo);
//累计商户余额支付金额

@ -1746,6 +1746,7 @@ CREATE TABLE `yoshop_merchant` (
`is_select_mechant` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否精选商户',
`total_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计金额',
`available_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '可用金额',
`commission_ratio` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '抽佣比例',
PRIMARY KEY (`merchant_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商户表';

Loading…
Cancel
Save