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
475f8aba
Commit
475f8aba
authored
Aug 03, 2021
by
suntengda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 自提点相关接口
parent
8eae48df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
0 deletions
+74
-0
TakePlace.php
application/modules/Marketing/controllers/TakePlace.php
+74
-0
No files found.
application/modules/Marketing/controllers/TakePlace.php
0 → 100644
View file @
475f8aba
<?php
/**
* Author : Tengda
* Date : 2021/7/29
* Time : 11:12 上午
*/
use
App\Base\Base
;
use
App\Services\marketing\TakePlaceService
;
use
Validate\TakePlaceValidate
;
class
TakeplaceController
extends
Base
{
/**
* 获取自提点列表
* http://ydwiki.yidian-inc.com/pages/viewpage.action?pageId=71671761
* @throws \App\Exception\custom\ParamException
*/
public
function
listAction
()
{
(
new
TakePlaceValidate
())
->
scene
(
'list'
)
->
validate
();
$keywords
=
$this
->
params
[
'keywords'
]
??
''
;
$offset
=
$this
->
params
[
'offset'
]
??
0
;
$limit
=
$this
->
params
[
'limit'
]
??
20
;
$res
=
TakePlaceService
::
searchList
(
$keywords
,
$offset
,
$limit
);
$this
->
success
([
'data'
=>
$res
]);
}
/**
* 添加自提点
* http://ydwiki.yidian-inc.com/pages/viewpage.action?pageId=71671759
* @throws \App\Exception\custom\ParamException
*/
public
function
addAction
()
{
(
new
takePlaceValidate
())
->
scene
(
'add'
)
->
validate
();
$res
=
TakePlaceService
::
add
(
$this
->
params
);
$this
->
success
([
'status'
=>
$res
?
'success'
:
'failed'
]);
}
/**
* 删除自提点
* @throws \App\Exception\custom\ParamException
*/
public
function
deleteAction
()
{
(
new
takePlaceValidate
())
->
scene
(
'delete'
)
->
validate
();
$res
=
TakePlaceService
::
delete
(
$this
->
params
[
'take_place_id'
]);
$this
->
success
([
'status'
=>
$res
?
'success'
:
'failed'
]);
}
/**
* 获取活动绑定的自提点列表
* @throws \App\Exception\custom\ParamException
*/
public
function
get_bind_listAction
()
{
(
new
takePlaceValidate
())
->
scene
(
'bindList'
)
->
validate
();
$marketingPindanId
=
$this
->
params
[
'marketing_pindan_id'
];
$offset
=
$this
->
params
[
'offset'
]
??
0
;
$limit
=
$this
->
params
[
'limit'
]
??
20
;
$data
=
TakePlaceService
::
getPindanTakePlaceList
(
$marketingPindanId
,
$offset
,
$limit
);
$this
->
success
([
'data'
=>
$data
]);
}
}
\ No newline at end of file
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