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
fc350e10
Commit
fc350e10
authored
Aug 06, 2021
by
suntengda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 获取自提点列表支持按生活号id筛选
parent
2c62d0d1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
23 deletions
+18
-23
TakePlace.php
application/models/marketing/mysql/TakePlace.php
+14
-14
Takeplace.php
application/modules/Marketing/controllers/Takeplace.php
+1
-4
TakePlaceService.php
application/services/marketing/TakePlaceService.php
+3
-5
No files found.
application/models/marketing/mysql/TakePlace.php
View file @
fc350e10
...
@@ -20,26 +20,26 @@ class TakePlace extends MysqlBase
...
@@ -20,26 +20,26 @@ class TakePlace extends MysqlBase
/**
/**
* 获取
* 获取
* @param $keywords
* @param $params
* @param int $offset
* @param int $limit
* @return mixed
* @return mixed
*/
*/
public
static
function
searchList
(
$
keywords
,
$offset
=
0
,
$limit
=
20
)
public
static
function
searchList
(
$
params
)
{
{
$lifeAccountId
=
$params
[
'life_account_id'
]
??
0
;
$keywords
=
$params
[
'keywords'
]
??
''
;
$offset
=
$params
[
'offset'
]
??
0
;
$limit
=
$params
[
'limit'
]
??
20
;
if
(
$lifeAccountId
)
{
$where
[
'life_account_id'
]
=
$lifeAccountId
;
}
if
(
$keywords
)
{
if
(
$keywords
)
{
$where
=
[
$where
[
'OR'
]
=
[
'AND'
=>
[
'take_place_name[~]'
=>
$keywords
,
'OR'
=>
[
'contact_name[~]'
=>
$keywords
,
'take_place_name[~]'
=>
$keywords
,
'contact_name[~]'
=>
$keywords
,
],
'is_delete'
=>
TakePlace
::
STATUS_NORMAL
,
],
];
];
}
else
{
$where
=
[
'is_delete'
=>
TakePlace
::
STATUS_NORMAL
];
}
}
$where
[
'is_delete'
]
=
TakePlace
::
STATUS_NORMAL
;
$where
[
'ORDER'
]
=
[
'take_place_id'
=>
'DESC'
];
$where
[
'ORDER'
]
=
[
'take_place_id'
=>
'DESC'
];
$where
[
'LIMIT'
]
=
[
$offset
,
$limit
];
$where
[
'LIMIT'
]
=
[
$offset
,
$limit
];
...
...
application/modules/Marketing/controllers/Takeplace.php
View file @
fc350e10
...
@@ -20,10 +20,7 @@ class TakeplaceController extends Base
...
@@ -20,10 +20,7 @@ class TakeplaceController extends Base
{
{
(
new
TakePlaceValidate
())
->
scene
(
'list'
)
->
validate
();
(
new
TakePlaceValidate
())
->
scene
(
'list'
)
->
validate
();
$keywords
=
$this
->
params
[
'keywords'
]
??
''
;
$res
=
TakePlaceService
::
searchList
(
$this
->
params
);
$offset
=
$this
->
params
[
'offset'
]
??
0
;
$limit
=
$this
->
params
[
'limit'
]
??
20
;
$res
=
TakePlaceService
::
searchList
(
$keywords
,
$offset
,
$limit
);
$this
->
success
([
'result'
=>
$res
]);
$this
->
success
([
'result'
=>
$res
]);
}
}
...
...
application/services/marketing/TakePlaceService.php
View file @
fc350e10
...
@@ -14,14 +14,12 @@ class TakePlaceService
...
@@ -14,14 +14,12 @@ class TakePlaceService
* 获取自提点列表(op 后台)
* 获取自提点列表(op 后台)
*
*
* 支持关键词(自提点名称/联系人)搜索
* 支持关键词(自提点名称/联系人)搜索
* @param string $keywords
* @param array $params
* @param int $offset
* @param int $limit
* @return \Api\PhpUtils\Mysql\MysqlBase
* @return \Api\PhpUtils\Mysql\MysqlBase
*/
*/
public
static
function
searchList
(
$
keywords
=
''
,
$offset
=
0
,
$limit
=
20
)
public
static
function
searchList
(
$
params
)
{
{
return
TakePlace
::
searchList
(
$
keywords
,
$offset
,
$limit
);
return
TakePlace
::
searchList
(
$
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