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
e6a98bef
authored
Mar 04, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
领取询价
parent
e8257fb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
app/Http/Controllers/ApiController.php
app/Model/InquiryItemsModel.php
app/Http/Controllers/ApiController.php
View file @
e6a98bef
...
...
@@ -120,7 +120,10 @@ class ApiController extends Controller
// 领取询价
public
function
ApiTakeInquiry
(
$request
,
$id
)
{
Export
((
new
InquiryItemsModel
())
->
takeInquiry
(
$request
));
$input
=
$_REQUEST
;
$input
[
"user_id"
]
=
$this
->
user_id
;
$input
[
"email"
]
=
$this
->
user_name
;
Export
((
new
InquiryItemsModel
())
->
takeInquiry
(
$input
));
}
//报价列表
...
...
app/Model/InquiryItemsModel.php
View file @
e6a98bef
...
...
@@ -83,9 +83,9 @@ class InquiryItemsModel extends Model
}
// 领取询价
public
function
takeInquiry
(
$
reques
t
)
public
function
takeInquiry
(
$
inpu
t
)
{
$id
=
$
request
->
input
(
'id'
,
0
)
;
$id
=
$
input
[
'id'
]
;
if
(
!
$id
)
return
[
-
1
,
'参数缺失'
];
...
...
@@ -96,12 +96,12 @@ class InquiryItemsModel extends Model
$map
=
[];
$map
[
'inquiry_items_id'
]
=
$id
;
$map
[
'assign_uid'
]
=
$
request
->
user
->
userId
;
$map
[
'assign_uid'
]
=
$
input
[
'user_id'
]
;
$res
=
$InquiryItemsAssignModel
->
where
(
$map
)
->
value
(
'id'
);
if
(
$res
)
return
[
-
1
,
'该询价已领取'
];
$InquiryItemsAssignModel
->
assign
(
$id
,
$
request
->
user
->
userId
);
$InquiryItemsAssignModel
->
assign
(
$id
,
$
input
[
'user_id'
]
);
// 添加操作日志
$inquiry_items
=
$this
->
find
(
$id
);
...
...
@@ -112,8 +112,8 @@ class InquiryItemsModel extends Model
$data
[
'types'
]
=
1
;
$data
[
'relation_id'
]
=
$id
;
$data
[
'content'
]
=
'领取询价,商品名称:'
.
$inquiry_items
[
'goods_name'
];
$data
[
'create_uid'
]
=
$
request
->
user
->
userId
;
$data
[
'create_name'
]
=
$UserModel
->
FinduserInfoName
(
$
request
->
user
->
userId
);
$data
[
'create_uid'
]
=
$
input
[
'user_id'
]
;
$data
[
'create_name'
]
=
$UserModel
->
FinduserInfoName
(
$
input
[
'user_id'
]
);
OplogModel
::
log
(
$data
);
}
catch
(
Exception
$e
)
{
...
...
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