dyjh 6 年之前
父節點
當前提交
74a04bdb3b

+ 2 - 2
app/Http/Controllers/Api/V1/FurnitureController.php

xqd xqd
@@ -1008,7 +1008,7 @@ class FurnitureController extends Controller
      *          "store_id": 1,
      *          "username": "roger",
      *          "role": 0,                        //用户类型:0:普通用户;1:生产部 2:包装部 3:经理
-     *          "wechat_union_id": "olAS94uwfTdsL3nDnvG67p_v5Vks",
+     *          "wechat_open_id": "olAS94uwfTdsL3nDnvG67p_v5Vks",
      *          "avatar": "https://wx.qlogo.cn/mmopen/vi_32/IOcxico8l4A7W3qxDeA53Id5kVAj2ibUGvQib9QibicTp5c1RNshDj6EKz2PKWp3reHfib0xxT4wa7jJzcb7a4EggkVw/132",
      *          "is_dealer": 0                 //是否经销商 0:不是 1:是
      *          },
@@ -1080,7 +1080,7 @@ class FurnitureController extends Controller
         $session_key = $session['session_key'];
         $decryptedData = $app->encryptor->decryptData($session_key, $iv, $encryptData);
        // dd($decryptedData);
-        $userinfo = AlbumUserModel::where('wechat_union_id', $decryptedData['unionId'])->where('store_id', $storeid)->first(['id', 'username', 'wechat_union_id', 'avatar']);
+        $userinfo = AlbumUserModel::where('wechat_union_id', $decryptedData['unionId'])->where('store_id', $storeid)->first(['id', 'username', 'wechat_open_id', 'avatar']);
 
         if (!$userinfo) {
             $data['wechat_open_id'] = $openid;

+ 33 - 0
database/migrations/2019_01_29_172314_add_column_open_id_to_album_user.php

xqd
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddColumnOpenIdToAlbumUser extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_user', function (Blueprint $table) {
+            //
+            $table->string('openId',255)->comment('openid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_user', function (Blueprint $table) {
+            //
+        });
+    }
+}