Commit b35f33bd by 杨树贤

询价接口

parent 434e9d31
......@@ -3,8 +3,9 @@
<component name="ChangeListManager">
<list default="true" id="fb90add0-1393-48c2-9f26-72365d42cd03" name="变更" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/SkuController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/SkuController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Api/InquiryApiController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/InquiryApiController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Services/InquiryService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Services/InquiryService.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Inquiry.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Inquiry.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/storage/app/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/storage/app/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/storage/app/public/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/storage/app/public/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/storage/framework/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/storage/framework/.gitignore" afterDir="false" />
......@@ -149,18 +150,18 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/app/Http/Controllers" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resources/views" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\resources\views" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\resources\views\sku" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\resources\views\mall" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\app\Http\Controllers" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\app\Http\Services" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\app\Http\Requests" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\app\Http\Controllers\Api" />
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\app\Exceptions" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="\\wsl$\Ubuntu-20.04\data\www\semour_web\resources\views\home" />
......@@ -183,7 +184,7 @@
<updated>1666170258203</updated>
<workItem from="1666170260162" duration="17108000" />
<workItem from="1666835076791" duration="693000" />
<workItem from="1667266026118" duration="20780000" />
<workItem from="1667266026118" duration="22846000" />
</task>
<servers />
</component>
......
......@@ -26,4 +26,13 @@ class InquiryApiController extends Controller
return $this->setSuccess('Add inquiry success');
}
public function lists(Request $request)
{
$searchKeyWord = $request->input('keyword');
$status = $request->input('status');
$userId = $request->user->id;
$result = InquiryService::getInquiryList($userId,$searchKeyWord, $status);
return $this->setSuccessData($result);
}
}
......@@ -35,4 +35,12 @@ class InquiryService
});
}
public function getInquiryList($userId,$searchKeyWord,$status)
{
$query = Inquiry::where('user_id',$userId)->orderBy('inquiry_id', 'desc');
if (!empty($searchKeyWord)) {
// $query->where('goods_name')
}
}
}
......@@ -9,6 +9,11 @@ class Inquiry extends Model
//
public $timestamps = false;
public function inquiry_items()
{
return $this->hasMany(InquiryItems::class, 'inquiry_id', 'inquiry_id');
}
public static function addInquiry($inquiry)
{
return self::insertGetId($inquiry);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment