dyjh 6 years ago
parent
commit
0c92b32917

+ 1 - 1
app/Http/Controllers/Api/V1/AlbumController.php

xqd
@@ -1968,7 +1968,7 @@ class AlbumController extends Controller
         $add = $request->input();
         if($userAuth->is_dealer!=1) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户不是经销商!', $validator->messages());
         $user_agent = AlbumAgentModel::where('user_id',$userAuth->id)->first();
-        $customer = CustomerDetailsModel::where([['store_id',$store_id],['open_id',$open_id],['agent_id',$user_agent->id]])->first(['purpose_level','comment','tips']);
+        $customer = CustomerDetailsModel::where([['store_id',$store_id],['open_id',$open_id],['agent_id',$user_agent->id]])->first(['purpose_level','comment','tips','address']);
         $add['agent_id'] = $user_agent->id;
         $user = CustomerDetailsModel::create($add);
         $customer->phone = $user->phone;

+ 1 - 1
database/migrations/2019_01_19_152156_create_table_customer_details.php

xqd
@@ -17,7 +17,7 @@ class CreateTableCustomerDetails extends Migration
             $table->increments('id');
             $table->unsignedInteger('agent_id')->comment('经销商id');
             $table->unsignedInteger('store_id')->comment('store_id');
-            $table->unsignedInteger('open_id')->comment('open_id');
+            $table->string('open_id',255)->comment('open_id');
             $table->string('tips',255)->nullable()->default(null)->comment('标签');
             $table->unsignedInteger('purpose_level')->default(1)->comment('意向等级 1 25% 2 50% 3 75% 4 100%');
             $table->string('comment',255)->nullable()->default(null)->comment('备注');