YS:充值列表

es
yangsai@163.com 8 months ago
parent 11543ece17
commit 9fc0881c14
  1. 5
      app/common/model/user/BalanceLog.php

@ -12,6 +12,7 @@ declare (strict_types=1);
namespace app\common\model\user;
use app\api\model\recharge\Order;
use cores\BaseModel;
use think\model\relation\BelongsTo;
use app\common\enum\user\balanceLog\Scene as SceneEnum;
@ -51,6 +52,10 @@ class BalanceLog extends BaseModel
public static function add(int $scene, array $data, array $describeParam, ?int $storeId = null)
{
$model = new static;
if(empty($storeId)){
$REmodel = Order::getPayDetail($data['order_no']);
$storeId = $REmodel['store_id'];
}
$model->save(array_merge([
'scene' => $scene,
'describe' => vsprintf(SceneEnum::data()[$scene]['describe'], $describeParam),

Loading…
Cancel
Save