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
0688a647
Commit
0688a647
authored
Sep 22, 2021
by
suntengda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pindan_activity_list_optimize' into develop
parents
5dfd4aa7
4ebddeaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
MarketingService.php
application/services/marketing/MarketingService.php
+6
-17
No files found.
application/services/marketing/MarketingService.php
View file @
0688a647
...
...
@@ -483,11 +483,8 @@ class MarketingService
$params
[
'activity_status'
]
=
MarketingPindan
::
ACTIVITY_STATUS_START_TODAY
;
//1 未开始,2进行中,3已结束, 4当日上新(即将开始)
$list
[
'prepare'
]
=
self
::
marketingList
(
$params
)[
'result'
];
$list
[
'prepare'
]
=
$list
[
'prepare'
]
?
array_column
((
array
)
$list
[
'prepare'
],
null
,
'marketing_id'
)
:
[];
$marketingIdsPrepare
=
array_keys
(
$list
[
'prepare'
]);
$marketingIds
=
array_merge
(
$marketingIdsDoing
,
$marketingIdsPrepare
);
return
self
::
_fillSkuAndOrderInfo
(
$marketingIds
,
$list
);
return
self
::
_fillSkuAndOrderInfo
(
$marketingIdsDoing
,
$list
);
}
/**
...
...
@@ -542,14 +539,10 @@ class MarketingService
//获取活动的sku列表
$skuList
=
self
::
getGoodsSkuListByMarketingIds
(
$marketingIds
);
//获取活动支付用户列表
$orderUser
=
self
::
getMarketingOrderUser
([
'marketing_id'
=>
$marketingIds
]);
//获取活动支付用户数
$buyNum
=
self
::
getHaveBuyGoodsUserCount
([
'marketing_id'
=>
$marketingIds
]);
//并行调用order统计接口
//获取活动支付用户列表
$urls
[
'order_user'
]
=
config
(
'interface'
,
'order.marketing.marketing_user'
);
//获取活动支付用户数
$urls
[
'buy_num'
]
=
config
(
'interface'
,
'order.order.have_buy_goods_user_count'
);
$params
[
'order_user'
]
=
$params
[
'buy_num'
]
=
[
'marketing_id'
=>
$marketingIds
];
$encryptRes
=
HttpUtil
::
concurrencyPost
(
$urls
,
$params
);
...
...
@@ -1413,10 +1406,7 @@ class MarketingService
$picIds
=
[];
if
(
!
empty
(
$goodsSkuList
))
{
foreach
(
$goodsSkuList
as
$index
=>
$item
)
{
$item
[
'desc_pic_url'
]
=
explode
(
','
,
$item
[
'desc_pic_url'
])
?:
[];
$picIds
=
array_merge
(
$picIds
,
$item
[
'desc_pic_url'
]);
}
$picIds
=
array_column
(
$goodsSkuList
,
'desc_pic_url'
);
$picUrl
=
Ks3Api
::
concurrencyPicEncryptUrl
(
$picIds
);
}
}
...
...
@@ -1435,9 +1425,8 @@ class MarketingService
$item
=
$goodsSkuList
[
$value
[
"goods_sku_id"
]];
$list
[
$value
[
'marketing_id'
]][
$key
][
'goods_name'
]
=
$item
[
'goods_name'
];
foreach
(
$goodsSkuList
[
$value
[
"goods_sku_id"
]][
'desc_pic_url'
]
as
$picId
)
{
$list
[
$value
[
'marketing_id'
]][
$key
][
"desc_pic_url_list"
][]
=
$picUrl
[
$picId
];
}
$list
[
$value
[
'marketing_id'
]][
$key
][
"desc_pic_url_list"
][]
=
$picUrl
[
$goodsSkuList
[
$value
[
"goods_sku_id"
]][
'desc_pic_url'
]]
??
[];
$list
[
$value
[
'marketing_id'
]][
$key
][
"desc_pic_url"
]
=
$picUrl
[
$goodsSkuList
[
$value
[
"goods_sku_id"
]][
'desc_pic_url'
]]
??
''
;
$list
[
$value
[
'marketing_id'
]][
$key
][
"original_price"
]
=
empty
(
$item
[
"original_price"
])
?
''
:
sprintf
(
"%.2f"
,
(
int
)
$item
[
"original_price"
]
/
100
);
$list
[
$value
[
'marketing_id'
]][
$key
][
"price"
]
=
sprintf
(
"%.2f"
,
$item
[
"price"
]
/
100
);
$needSoldNum
&&
$list
[
$value
[
'marketing_id'
]][
$key
][
"all_have_buy_goods_count"
]
=
$soldNum
[
$value
[
"goods_sku_id"
]]
??
0
;
...
...
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