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
935043b5
Commit
935043b5
authored
Aug 05, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:写死的自营生活号
parent
27b2575e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
MarketingService.php
application/services/marketing/MarketingService.php
+17
-2
TakePlaceService.php
application/services/marketing/TakePlaceService.php
+2
-2
No files found.
application/services/marketing/MarketingService.php
View file @
935043b5
...
@@ -19,7 +19,22 @@ use Daemon\Goods;
...
@@ -19,7 +19,22 @@ use Daemon\Goods;
class
MarketingService
class
MarketingService
{
{
const
PUBLIC_LIFE_ACCOUNT_ID
=
"13076446786650120"
;
/**
* 写死的自营生活号
* @return string
*/
public
static
function
getPublicLifeAccountId
()
{
$env
=
\Yaf\Application
::
app
()
->
environ
();
if
(
in_array
(
$env
,
[
'dev'
]))
{
$lifeAccountId
=
"13076446786650120"
;
}
elseif
(
in_array
(
$env
,
[
'test'
]))
{
$lifeAccountId
=
"15559498695737346"
;
}
else
{
$lifeAccountId
=
""
;
}
return
$lifeAccountId
;
}
/**
/**
* op 后台获取活动需要参加的商品
* op 后台获取活动需要参加的商品
...
@@ -470,7 +485,7 @@ class MarketingService
...
@@ -470,7 +485,7 @@ class MarketingService
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$type
=
Marketing
::
MARKETING_TYPE_PINDAN
;
$type
=
Marketing
::
MARKETING_TYPE_PINDAN
;
$goodsSkuId
=
!
empty
(
$params
[
'goods_sku_id'
])
?
explode
(
","
,
$params
[
'goods_sku_id'
])
:
[];
$goodsSkuId
=
!
empty
(
$params
[
'goods_sku_id'
])
?
explode
(
","
,
$params
[
'goods_sku_id'
])
:
[];
$publicLifeAccountId
=
self
::
PUBLIC_LIFE_ACCOUNT_ID
;
$publicLifeAccountId
=
self
::
getPublicLifeAccountId
()
;
if
(
empty
(
$marketingName
))
{
if
(
empty
(
$marketingName
))
{
throw
new
MarketingException
([
'cus'
=>
0
]);
throw
new
MarketingException
([
'cus'
=>
0
]);
...
...
application/services/marketing/TakePlaceService.php
View file @
935043b5
...
@@ -10,7 +10,6 @@ use App\Exception\custom\MarketingException;
...
@@ -10,7 +10,6 @@ use App\Exception\custom\MarketingException;
class
TakePlaceService
class
TakePlaceService
{
{
const
SELF_LIFE_ACCOUNT_ID
=
123123
;
/**
/**
* 获取自提点列表(op 后台)
* 获取自提点列表(op 后台)
*
*
...
@@ -54,7 +53,8 @@ class TakePlaceService
...
@@ -54,7 +53,8 @@ class TakePlaceService
}
}
}
}
$data
[
'life_account_id'
]
=
$params
[
'life_account_id'
]
??
self
::
SELF_LIFE_ACCOUNT_ID
;
$lifeAccountId
=
MarketingService
::
getPublicLifeAccountId
();
$data
[
'life_account_id'
]
=
$params
[
'life_account_id'
]
??
$lifeAccountId
;
$data
[
'take_place_name'
]
=
$params
[
'name'
];
$data
[
'take_place_name'
]
=
$params
[
'name'
];
$data
[
'longitude'
]
=
$params
[
'longitude'
];
$data
[
'longitude'
]
=
$params
[
'longitude'
];
$data
[
'latitude'
]
=
$params
[
'latitude'
];
$data
[
'latitude'
]
=
$params
[
'latitude'
];
...
...
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