Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b35f33bd
authored
Nov 07, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
询价接口
parent
434e9d31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
7 deletions
.idea/workspace.xml
app/Http/Controllers/Api/InquiryApiController.php
app/Http/Services/InquiryService.php
app/Models/Inquiry.php
.idea/workspace.xml
View file @
b35f33bd
...
...
@@ -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/Controller
s"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/
resources/view
s"
/>
<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=
"2
0780
000"
/>
<workItem
from=
"1667266026118"
duration=
"2
2846
000"
/>
</task>
<servers
/>
</component>
...
...
app/Http/Controllers/Api/InquiryApiController.php
View file @
b35f33bd
...
...
@@ -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
);
}
}
app/Http/Services/InquiryService.php
View file @
b35f33bd
...
...
@@ -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')
}
}
}
app/Models/Inquiry.php
View file @
b35f33bd
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment