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
96923ecf
Commit
96923ecf
authored
Jul 19, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.yidian-inc.com/bp/goods
into develop
parents
2451479b
57af3f71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
GoodsException.php
application/exception/custom/GoodsException.php
+1
-0
GoodsService.php
application/services/goods/GoodsService.php
+14
-13
No files found.
application/exception/custom/GoodsException.php
View file @
96923ecf
...
...
@@ -41,5 +41,6 @@ class GoodsException extends BaseException
27
=>
'TCC调用失败'
,
28
=>
'上架状态不能编辑,需先下架,再做编辑操作'
,
29
=>
'发布商品的生活号不存在'
,
30
=>
'当前商品已过期'
,
];
}
\ No newline at end of file
application/services/goods/GoodsService.php
View file @
96923ecf
...
...
@@ -355,6 +355,9 @@ class GoodsService
if
(
$sku
[
"audit_status"
]
==
GoodsSku
::
STATUS_PASS
||
$sku
[
"audit_status"
]
==
GoodsSku
::
STATUS_REJECT
)
{
throw
new
GoodsException
([
"cus"
=>
10
]);
}
if
(
$status
==
GoodsSku
::
STATUS_PASS
&&
$sku
[
"expiration_time"
]
<
date
(
"Y-m-d H:i:s"
))
{
throw
new
GoodsException
([
"cus"
=>
30
]);
}
$goodsSkuId
=
$sku
[
"goods_sku_id"
];
$rejectedReason
=
strlen
(
trim
(
$params
[
"rejected_reason"
]))
==
0
?
""
:
$params
[
"rejected_reason"
];
...
...
@@ -1354,20 +1357,18 @@ class GoodsService
$strList
=
explode
(
","
,
$picUrlStr
);
foreach
(
$strList
as
$key
=>
$str
)
{
$arr
=
explode
(
"/"
,
$str
);
if
(
count
(
$arr
)
==
1
)
{
if
(
preg_match
(
"/^http[s]
{
0,1
}
:\/\/([\w.]+\/?)\S*/"
,
$str
))
{
$data
[]
=
$str
;
if
(
preg_match
(
"/^http[s]
{
0,1
}
:\/\/([\w.]+\/?)\S*/"
,
$str
))
{
$data
[]
=
$str
;
}
else
if
(
count
(
$arr
)
==
1
)
{
if
(
!
empty
(
$widthSize
)
&&
!
empty
(
$highSize
))
{
$urlRes
=
Ks3Api
::
picEncryptUrl
(
$str
,
$widthSize
,
$highSize
);
}
else
{
if
(
!
empty
(
$widthSize
)
&&
!
empty
(
$highSize
))
{
$urlRes
=
Ks3Api
::
picEncryptUrl
(
$str
,
$widthSize
,
$highSize
);
}
else
{
$urlRes
=
Ks3Api
::
picEncryptUrl
(
$str
);
}
if
(
!
empty
(
$urlRes
[
"response"
][
"data"
][
"url"
])
&&
$urlRes
[
"response"
][
"data"
][
"url"
])
{
$data
[]
=
$urlRes
[
"response"
][
"data"
][
"url"
];
}
else
{
continue
;
}
$urlRes
=
Ks3Api
::
picEncryptUrl
(
$str
);
}
if
(
!
empty
(
$urlRes
[
"response"
][
"data"
][
"url"
])
&&
$urlRes
[
"response"
][
"data"
][
"url"
])
{
$data
[]
=
$urlRes
[
"response"
][
"data"
][
"url"
];
}
else
{
continue
;
}
}
else
{
$bucket
=
$arr
[
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