pull/5/head
wanghousheng 4 months ago
parent 6e8338fd91
commit 5ff301969e
  1. 7
      app/common/model/dealer/Order.php

@ -153,8 +153,6 @@ class Order extends BaseModel
*/
private static function calculateGoodsCapital(array $setting, OrderGoodsModel $goods, string $goodsPrice): array
{
// 判断是否开启商品单独分销
if (!$goods['is_ind_dealer']) {
Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($setting), 'created_at' => date('Y-m-d H:i:s')]);
$arr = [
'first_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['first_money'], 100)),
@ -163,6 +161,11 @@ class Order extends BaseModel
];
Db::table('yoshop_wx_server')->insertGetId(['content' => 'arr数据', 'created_at' => date('Y-m-d H:i:s')]);
Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($arr), 'created_at' => date('Y-m-d H:i:s')]);
Db::table('yoshop_wx_server')->insertGetId(['content' => '商品数据', 'created_at' => date('Y-m-d H:i:s')]);
Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($goods), 'created_at' => date('Y-m-d H:i:s')]);
// 判断是否开启商品单独分销
if (!$goods['is_ind_dealer']) {
// 全局分销比例
return [
'first_money' => helper::bcmul($goodsPrice, helper::bcdiv($setting['first_money'], 100)),

Loading…
Cancel
Save