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
ec360a59
Commit
ec360a59
authored
Aug 06, 2021
by
suntengda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 拼单活动列表字段
parent
a4aacd6f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
Takeplace.php
application/modules/Marketing/controllers/Takeplace.php
+1
-6
MarketingService.php
application/services/marketing/MarketingService.php
+2
-1
TakePlaceService.php
application/services/marketing/TakePlaceService.php
+18
-7
No files found.
application/modules/Marketing/controllers/Takeplace.php
View file @
ec360a59
...
...
@@ -68,12 +68,7 @@ class TakeplaceController extends Base
{
(
new
takePlaceValidate
())
->
scene
(
'bindList'
)
->
validate
();
$marketingId
=
$this
->
params
[
'marketing_id'
];
$takePlaceName
=
$this
->
params
[
'take_place_name'
]
??
''
;
$page
=
$this
->
params
[
'page'
]
??
1
;
$limit
=
$this
->
params
[
'limit'
]
??
20
;
$data
=
TakePlaceService
::
getPindanTakePlaceList
(
$marketingId
,
$takePlaceName
,
$page
,
$limit
);
$data
=
TakePlaceService
::
getPindanTakePlaceList
(
$this
->
params
);
$this
->
success
([
'result'
=>
$data
]);
}
...
...
application/services/marketing/MarketingService.php
View file @
ec360a59
...
...
@@ -258,7 +258,7 @@ class MarketingService
$marketingIds
[]
=
$value
[
"marketing_id"
];
}
$marketingPindanData
=
MarketingPindan
::
select
([
"marketing_id"
,
"publish_life_account_id"
,
"min_price"
,
"max_price"
,
"pindan_desc"
]
$marketingPindanData
=
MarketingPindan
::
select
([
"marketing_id"
,
"publish_life_account_id"
,
"min_price"
,
"max_price"
,
"pindan_desc"
,
"participate_number"
]
,
[
"marketing_id"
=>
$marketingIds
]);
$priceData
=
[];
if
(
!
empty
(
$marketingPindanData
))
{
...
...
@@ -282,6 +282,7 @@ class MarketingService
$lists
[
$key
][
"min_price"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"min_price"
];
$lists
[
$key
][
"max_price"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"max_price"
];
$lists
[
$key
][
"pindan_desc"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"pindan_desc"
];
$lists
[
$key
][
"participate_number"
]
=
$priceData
[
$value
[
"marketing_id"
]][
"participate_number"
];
}
}
}
...
...
application/services/marketing/TakePlaceService.php
View file @
ec360a59
...
...
@@ -105,18 +105,29 @@ class TakePlaceService
/**
* 获取拼单活动绑定的自提点列表
* @param $marketingPindanId
* @param string $takePlaceName
* @param int $page
* @param int $limit
* @param $params
* @return array
*/
public
static
function
getPindanTakePlaceList
(
$
marketingPindanId
,
$takePlaceName
=
''
,
$page
=
1
,
$limit
=
20
)
public
static
function
getPindanTakePlaceList
(
$
params
)
{
$marketingId
=
$params
[
'marketing_id'
];
$keywords
=
$params
[
'keywords'
]
??
''
;
$page
=
$params
[
'page'
]
??
1
;
$limit
=
$params
[
'limit'
]
??
20
;
$offset
=
(
$page
-
1
)
*
$limit
;
$res
=
[
'list'
=>
[],
'total'
=>
0
];
$where
=
[
'marketing_id'
=>
$marketingPindanId
];
$takePlaceName
&&
$where
[
'take_place_name[~]'
]
=
$takePlaceName
;
$where
=
[
'marketing_id'
=>
$marketingId
];
if
(
$keywords
)
{
// $where['OR'] = [
// 'take_place_name[~]' => $keywords,
// 'address[~]' => $keywords,
// ];
$where
=
[
'take_place_name[~]'
=>
$keywords
,
];
}
$where
[
'ORDER'
]
=
[
'marketing_take_place_id'
=>
'DESC'
];
$where
[
'LIMIT'
]
=
[
$offset
,
$limit
];
...
...
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