Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
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
628a579c
authored
Mar 03, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
f1deaf13
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
9 deletions
app/Http/Controllers/ApiController.php
app/Http/routes.php
app/Model/InquiryItemsModel.php
app/Model/InquiryModel.php
app/Http/Controllers/ApiController.php
View file @
628a579c
...
...
@@ -49,6 +49,10 @@ class ApiController extends Controller
public
function
ApiInquiryItemsClose
(
$request
,
$id
){
Export
((
new
InquiryItemsModel
())
->
inquiryItemsClose
(
$request
->
input
(
'inquiry_items_id'
)));
}
//关闭整个询价单
private
function
ApiUrgePrice
(
$request
,
$id
){
Export
((
new
InquiryModel
())
->
inquiryClose
(
$request
->
input
(
'inquiry_id'
)));
}
//询价列表
private
function
ApiInquiryList
(
$request
,
$id
){
$input
=
$_REQUEST
;
...
...
app/Http/routes.php
View file @
628a579c
<?php
Route
::
group
([
'middleware'
=>
'web'
],
function
()
{
Route
::
get
(
'/'
,
'WebController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/web/{key}'
,
'WebController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/api/{key}'
,
'ApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/hd/{key}'
,
'HdController@Entrance'
);
});
//Route::group(['middleware' => 'web'], function () {
// Route::get('/', 'WebController@info');
// Route::match(['get', 'post'],'/web/{key}', 'WebController@info');
// Route::match(['get', 'post'],'/api/{key}', 'ApiController@Entrance');
// Route::match(['get', 'post'],'/hd/{key}', 'HdController@Entrance');
//});
Route
::
match
([
'get'
,
'post'
],
'/hd/{key}'
,
'HdController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/{key}'
,
'ApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/server/{key}'
,
'ServerController@Entrance'
);
//
对外提供导出回调接口
\ No newline at end of file
app/Model/InquiryItemsModel.php
View file @
628a579c
...
...
@@ -142,8 +142,17 @@ class InquiryItemsModel extends Model
return
[
1001
,
"询价明细id不得为空!"
];
}
$this
->
where
(
"id"
,
$inquiry_items_id
)
->
update
([
"status"
=>-
1
,
"update_time"
=>
time
()]);
return
[
0
,
"
更新
成功"
];
return
[
0
,
"
关闭询价单明细
成功"
];
}
/*
* 吹报价
*/
public
function
urgePrice
(){
$Redis
=
\RedisDB
::
connection
();
}
}
\ No newline at end of file
app/Model/InquiryModel.php
View file @
628a579c
...
...
@@ -135,7 +135,7 @@ class InquiryModel extends Model
*/
public
function
inquiryClose
(
$inquiry_id
){
$this
->
where
(
"id"
,
$inquiry_id
)
->
update
([
"status"
=>-
1
,
"update_time"
=>
time
()]);
return
[
0
,
"
更新
成功"
];
return
[
0
,
"
关闭整个询价单
成功"
];
}
/**
...
...
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