Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
aad130d3
Commit
aad130d3
authored
Aug 13, 2021
by
suntengda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 批量获取自提点信息接口
parent
e78036e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
Takeplace.php
application/modules/Marketing/controllers/Takeplace.php
+14
-0
TakePlaceService.php
application/services/marketing/TakePlaceService.php
+11
-0
No files found.
application/modules/Marketing/controllers/Takeplace.php
View file @
aad130d3
...
...
@@ -19,6 +19,20 @@ class TakeplaceController extends Base
$res
=
TakePlaceService
::
detail
(
$this
->
params
[
'take_place_id'
]);
$this
->
success
([
'result'
=>
$res
]);
}
/**
* 批量获取自提点信息
* @throws Exception
*/
public
function
get_detail_by_idsAction
()
{
if
(
empty
(
$this
->
params
[
'take_place_ids'
]))
{
$this
->
success
([
'result'
=>
[]]);
}
$res
=
TakePlaceService
::
getDetailByIds
(
$this
->
params
[
'take_place_ids'
]);
$this
->
success
([
'result'
=>
$res
]);
}
/**
* 获取自提点列表
...
...
application/services/marketing/TakePlaceService.php
View file @
aad130d3
...
...
@@ -34,6 +34,17 @@ class TakePlaceService
return
TakePlace
::
get
(
'*'
,[
'take_place_id'
=>
$takePlaceId
]);
}
/**
* 批量获取自提点信息
* @param $takePlaceIds
* @return \Api\PhpUtils\Mysql\MysqlBase
*/
public
static
function
getDetailByIds
(
$takePlaceIds
)
{
$result
=
TakePlace
::
select
(
'*'
,[
'take_place_id'
=>
$takePlaceIds
]);
return
$result
?
array_column
(
$result
,
null
,
'take_place_id'
)
:
[];
}
/**
* 添加自提点
* @param $params
...
...
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