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
32b7b330
Commit
32b7b330
authored
Sep 14, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: temp
parent
2a75bfae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
37 deletions
+27
-37
TakePlace.php
application/models/marketing/mysql/TakePlace.php
+0
-36
TakePlaceService.php
application/services/marketing/TakePlaceService.php
+27
-1
No files found.
application/models/marketing/mysql/TakePlace.php
View file @
32b7b330
...
@@ -17,40 +17,4 @@ class TakePlace extends MysqlBase
...
@@ -17,40 +17,4 @@ class TakePlace extends MysqlBase
const
STATUS_NORMAL
=
0
;
// 正常
const
STATUS_NORMAL
=
0
;
// 正常
const
STATUS_DELETE
=
1
;
// 删除
const
STATUS_DELETE
=
1
;
// 删除
/**
* 获取
* @param $params
* @return mixed
*/
public
static
function
searchList
(
$params
)
{
$lifeAccountId
=
$params
[
'life_account_id'
]
??
0
;
$keywords
=
$params
[
'keywords'
]
??
''
;
$offset
=
$params
[
'offset'
]
??
0
;
$limit
=
$params
[
'limit'
]
??
20
;
$takePlaceIds
=
$params
[
'take_place_id'
]
??
[];
if
(
!
empty
(
$takePlaceIds
))
{
$where
[
'take_place_id'
]
=
$takePlaceIds
;
}
if
(
$lifeAccountId
)
{
$where
[
'life_account_id'
]
=
$lifeAccountId
;
}
if
(
$keywords
)
{
$where
[
'OR'
]
=
[
'take_place_name[~]'
=>
$keywords
,
'contact_name[~]'
=>
$keywords
,
];
}
$where
[
'is_delete'
]
=
TakePlace
::
STATUS_NORMAL
;
$where
[
'ORDER'
]
=
[
'take_place_id'
=>
'DESC'
];
$where
[
'LIMIT'
]
=
[
$offset
,
$limit
];
$res
[
'list'
]
=
self
::
select
(
'*'
,
$where
);
unset
(
$where
[
'ORDER'
],
$where
[
'LIMIT'
]);
$res
[
'total'
]
=
self
::
count
(
'*'
,
$where
);
return
$res
;
}
}
}
application/services/marketing/TakePlaceService.php
View file @
32b7b330
...
@@ -20,7 +20,33 @@ class TakePlaceService
...
@@ -20,7 +20,33 @@ class TakePlaceService
*/
*/
public
static
function
searchList
(
$params
)
public
static
function
searchList
(
$params
)
{
{
return
TakePlace
::
searchList
(
$params
);
$lifeAccountId
=
$params
[
'life_account_id'
]
??
0
;
$keywords
=
$params
[
'keywords'
]
??
''
;
$takePlaceIds
=
$params
[
'take_place_id'
]
??
[];
$offset
=
$params
[
'offset'
]
??
0
;
$limit
=
$params
[
'limit'
]
??
20
;
if
(
!
empty
(
$takePlaceIds
))
{
$where
[
'take_place_id'
]
=
$takePlaceIds
;
}
if
(
$lifeAccountId
)
{
$where
[
'life_account_id'
]
=
$lifeAccountId
;
}
if
(
$keywords
)
{
$where
[
'OR'
]
=
[
'take_place_name[~]'
=>
$keywords
,
'contact_name[~]'
=>
$keywords
,
];
}
$where
[
'is_delete'
]
=
TakePlace
::
STATUS_NORMAL
;
$where
[
'ORDER'
]
=
[
'take_place_id'
=>
'DESC'
];
$where
[
'LIMIT'
]
=
[
$offset
,
$limit
];
$res
[
'list'
]
=
TakePlace
::
select
(
'*'
,
$where
,
[]);
unset
(
$where
[
'ORDER'
],
$where
[
'LIMIT'
]);
$res
[
'total'
]
=
TakePlace
::
count
(
'*'
,
$where
);
return
$res
;
}
}
/**
/**
...
...
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