feature/main20240421
郭嘉 6 months ago
parent 7ddaa22dbe
commit 5984f753d5
  1. 4
      app/api/service/order/PaySuccess.php
  2. 6
      public/install/data/install_struct.sql

@ -361,10 +361,10 @@ class PaySuccess extends BaseService
$precent = (1 - $model['commission_ratio'] / 1000); $precent = (1 - $model['commission_ratio'] / 1000);
} }
$precentPrice = $precent * $orderInfo['pay_price']; $precentPrice = $precent * $orderInfo['pay_price'];
(new merchantPayModel())->addDetail($orderInfo, (float)$precentPrice); (new merchantPayModel())->addDetail($orderInfo, $precentPrice);
//累计商户余额支付金额 //累计商户余额支付金额
merchantModel::setIncTotal($orderInfo['merchant_id'], (float)$precentPrice); merchantModel::setIncTotal($orderInfo['merchant_id'], $precentPrice);
} }
// 将第三方交易记录更新为已支付状态 // 将第三方交易记录更新为已支付状态
if (in_array($this->method, [PaymentMethodEnum::WECHAT, PaymentMethodEnum::ALIPAY])) { if (in_array($this->method, [PaymentMethodEnum::WECHAT, PaymentMethodEnum::ALIPAY])) {

@ -1744,8 +1744,8 @@ CREATE TABLE `yoshop_merchant` (
`score` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '得分', `score` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '得分',
`sale` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '销量', `sale` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '销量',
`is_select_mechant` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否精选商户', `is_select_mechant` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否精选商户',
`total_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '累计金额', `total_amount` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '累计金额',
`available_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '可用金额', `available_amount` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '可用金额',
`commission_ratio` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '抽佣比例', `commission_ratio` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '抽佣比例',
PRIMARY KEY (`merchant_id`), PRIMARY KEY (`merchant_id`),
KEY `store_id` (`store_id`) KEY `store_id` (`store_id`)
@ -1760,7 +1760,7 @@ CREATE TABLE `yoshop_merchant_pay` (
`is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', `is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`total_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', `total_amount` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '金额',
`is_add` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否为收入金额', `is_add` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否为收入金额',
PRIMARY KEY (`merchant_pay_id`), PRIMARY KEY (`merchant_pay_id`),
KEY `store_id` (`store_id`) KEY `store_id` (`store_id`)

Loading…
Cancel
Save