diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 293ecc66..393dd082 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -739,7 +739,7 @@ class OrderService $productsTotalAmount += $product['total_amount']; $vipDiscountAmount += $product['vip_discount_amount']; $couponDiscountAmount += $product['coupon_discount_amount']; - $salesValue = bcadd($salesValue, $product['total_sales_value']); + $salesValue = bcadd($salesValue, $product['total_sales_value'], 2); $bargainAmount += $product['bargain_amount']; } diff --git a/app/Services/Payment/WxpayService.php b/app/Services/Payment/WxpayService.php index 5792fa1c..5fc4c9ce 100644 --- a/app/Services/Payment/WxpayService.php +++ b/app/Services/Payment/WxpayService.php @@ -57,9 +57,10 @@ class WxpayService /** * 微信企业付款到零钱 - * + * * @param array $params * @return array + * @throws WeChatPayException */ public function transfer(array $params) { @@ -87,7 +88,7 @@ class WxpayService /** * 查询 微信企业付款到零钱 的订单 - * + * * @param string $no 商户订单号 * @return array */ diff --git a/database/seeders/ShippingSeeder.php b/database/seeders/ShippingSeeder.php index 980795dd..ab05163e 100644 --- a/database/seeders/ShippingSeeder.php +++ b/database/seeders/ShippingSeeder.php @@ -4,6 +4,7 @@ namespace Database\Seeders; use Illuminate\Database\Seeder; use App\Models\{ShippingTemplate, ShippingRule, Zone}; +use Illuminate\Support\Facades\DB; class ShippingSeeder extends Seeder { @@ -18,11 +19,13 @@ class ShippingSeeder extends Seeder 'name' => '自提' ]); - \DB::table('shipping_rules')->insert([ + $zons = Zone::where('type', Zone::TYPE_AREA)->pluck('id')->map(fn($v) => $v.""); + + DB::table('shipping_rules')->insert([ 'template_id' => $template->id, 'type' => 1, 'info' => json_encode(["threshold" => "0"]), - 'zones' => json_encode(Zone::where('type', Zone::TYPE_AREA)->pluck('id')), + 'zones' => json_encode($zons), 'created_at' => now(), 'updated_at' => now() ]);