[积分商城]优化对接API
This commit is contained in:
@@ -173,19 +173,9 @@ class PlayxOrder extends Backend
|
||||
|
||||
Db::startTrans();
|
||||
try {
|
||||
$asset = MallPlayxUserAsset::where('user_id', strval($order->user_id ?? ''))->find();
|
||||
$asset = MallPlayxUserAsset::where('playx_user_id', strval($order->user_id ?? ''))->find();
|
||||
if (!$asset) {
|
||||
$asset = MallPlayxUserAsset::create([
|
||||
'user_id' => strval($order->user_id ?? ''),
|
||||
'username' => strval($order->user_id ?? ''),
|
||||
'locked_points' => 0,
|
||||
'available_points' => 0,
|
||||
'today_limit' => 0,
|
||||
'today_claimed' => 0,
|
||||
'today_limit_date' => null,
|
||||
'create_time' => time(),
|
||||
'update_time' => time(),
|
||||
]);
|
||||
throw new \RuntimeException('User asset not found');
|
||||
}
|
||||
|
||||
$refund = intval($order->points_cost ?? 0);
|
||||
|
||||
Reference in New Issue
Block a user