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
e2711753
Commit
e2711753
authored
Jul 06, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改
parent
78edeb9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
DistributorService.php
application/services/marketing/DistributorService.php
+3
-1
MarketingGoodsService.php
application/services/marketing/MarketingGoodsService.php
+6
-6
No files found.
application/services/marketing/DistributorService.php
View file @
e2711753
...
@@ -139,6 +139,8 @@ class DistributorService
...
@@ -139,6 +139,8 @@ class DistributorService
$mobile
=
!
empty
(
$params
[
'mobile'
])
?
$params
[
'mobile'
]
:
''
;
$mobile
=
!
empty
(
$params
[
'mobile'
])
?
$params
[
'mobile'
]
:
''
;
$distributorCode
=
!
empty
(
$params
[
'distributor_code'
])
?
$params
[
'distributor_code'
]
:
''
;
$distributorCode
=
!
empty
(
$params
[
'distributor_code'
])
?
$params
[
'distributor_code'
]
:
''
;
$smsCode
=
!
empty
(
$params
[
'sms_code'
])
?
$params
[
'sms_code'
]
:
''
;
$smsCode
=
!
empty
(
$params
[
'sms_code'
])
?
$params
[
'sms_code'
]
:
''
;
$shareUserId
=
!
empty
(
$params
[
'share_user_id'
])
?
$params
[
'share_user_id'
]
:
''
;
if
(
empty
(
$smsCode
))
{
if
(
empty
(
$smsCode
))
{
throw
new
DistributorException
([
'cus'
=>
11
]);
throw
new
DistributorException
([
'cus'
=>
11
]);
}
}
...
@@ -147,7 +149,7 @@ class DistributorService
...
@@ -147,7 +149,7 @@ class DistributorService
if
(
empty
(
$distributorCode
))
{
if
(
empty
(
$distributorCode
))
{
throw
new
DistributorException
([
'cus'
=>
9
]);
throw
new
DistributorException
([
'cus'
=>
9
]);
}
}
$info
=
Distributor
::
getRecord
([
'
distributor_code'
=>
$distributorCode
]);
$info
=
Distributor
::
getRecord
([
'
user_id'
=>
$shareUserId
]);
if
(
empty
(
$info
))
{
if
(
empty
(
$info
))
{
throw
new
DistributorException
([
'cus'
=>
10
]);
throw
new
DistributorException
([
'cus'
=>
10
]);
...
...
application/services/marketing/MarketingGoodsService.php
View file @
e2711753
...
@@ -166,6 +166,7 @@ class MarketingGoodsService
...
@@ -166,6 +166,7 @@ class MarketingGoodsService
/**
/**
* 获取图片地址,这里因为bucket可能不同,不保证图片顺序
* 获取图片地址,这里因为bucket可能不同,不保证图片顺序
* @param $picUrlStr
* @param $picUrlStr
...
@@ -175,7 +176,7 @@ class MarketingGoodsService
...
@@ -175,7 +176,7 @@ class MarketingGoodsService
{
{
$data
=
$ksyunParams
=
[];
$data
=
$ksyunParams
=
[];
$strList
=
explode
(
","
,
$picUrlStr
);
$strList
=
explode
(
","
,
$picUrlStr
);
foreach
(
$strList
as
$str
)
{
foreach
(
$strList
as
$
key
=>
$
str
)
{
$arr
=
explode
(
"/"
,
$str
);
$arr
=
explode
(
"/"
,
$str
);
if
(
count
(
$arr
)
!=
2
)
{
if
(
count
(
$arr
)
!=
2
)
{
continue
;
continue
;
...
@@ -183,12 +184,11 @@ class MarketingGoodsService
...
@@ -183,12 +184,11 @@ class MarketingGoodsService
$bucket
=
$arr
[
0
];
$bucket
=
$arr
[
0
];
$objectId
=
$arr
[
1
];
$objectId
=
$arr
[
1
];
$ksyunParams
[
$bucket
][]
=
$objectId
;
}
$url
=
Ksyun
::
getPicUrl
(
"merchant-b"
,
'goods_temp'
,
$bucket
.
'/'
.
$objectId
,
200
,
200
,
'jpeg'
);
foreach
(
$ksyunParams
as
$bucket
=>
$objectIds
)
{
$data
[]
=
$url
;
$ksyun
=
Ksyun
::
getDownUrl
(
$objectIds
,
'merchant-b'
,
$bucket
,
60
);
$data
=
array_merge
(
$data
,
array_values
(
$ksyun
));
}
}
return
$data
;
return
$data
;
}
}
}
}
...
...
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