|
|
|
@ -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), |
|
|
|
|