This commit is contained in:
2025-12-22 16:51:58 +08:00
parent 46f479a235
commit 54af6a7f46
+7 -2
View File
@@ -5,6 +5,7 @@ namespace app\common\service;
use app\common\logic\AuthLogic;
use app\common\model\Post;
use app\common\model\PostOld;
use app\common\model\Sku;
use app\common\model\UserOld;
use app\common\validate\UserValidate;
use app\common\traits\crud\CrudServiceTrait;
@@ -270,7 +271,7 @@ class UserService
//'unionid' => $wxinfo['unionid'],
'name' => $name,
'sn' => $sn,
'is_release' => 2,
'is_release' => 0,
'avatar' => 'bsh_datax/user/20251021/a4ee815405a1506abeec1af0f738f70f_68f6e76514b66.jpg'
]
);
@@ -309,11 +310,15 @@ class UserService
$postOld = PostOld::where('mobile', $mobile)->get();
if (!empty($postOld)) {
foreach ($postOld as $item) {
$sku = Sku::where('model', $item->model)->first();
if(!$sku){ //如果商品不存在则直接跳过
continue;
}
$post = [
"id" => $item->id,
"user_id" => $uinfo->id,
"category_id" => $item->id,
"sku_id" => $item->sku_id,
"sku_id" => $sku->id,
"content" => $item->content,
"shop_name" => $item->shop_name,
"location_name" => $item->location_name,