[积分商城]优化对接API

This commit is contained in:
2026-03-30 11:47:32 +08:00
parent b30ef21780
commit 4a42899bfe
55 changed files with 835 additions and 1241 deletions

View File

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