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
aeb14ba0
Commit
aeb14ba0
authored
Jul 13, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:处理参数没有的报错
parent
1a07dd56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
GoodsService.php
application/services/goods/GoodsService.php
+7
-4
No files found.
application/services/goods/GoodsService.php
View file @
aeb14ba0
...
@@ -181,10 +181,13 @@ class GoodsService
...
@@ -181,10 +181,13 @@ class GoodsService
if
(
$checkGoodsDesc
)
{
if
(
$checkGoodsDesc
)
{
throw
new
GoodsException
([
'cus'
=>
20
]);
throw
new
GoodsException
([
'cus'
=>
20
]);
}
}
if
(
!
empty
(
$skuData
[
"introduce"
]))
{
$checkGoodsIntroduce
=
self
::
isHaveSensitive
(
$skuData
[
"introduce"
],
3
);
$checkGoodsIntroduce
=
self
::
isHaveSensitive
(
$skuData
[
"introduce"
],
3
);
if
(
$checkGoodsIntroduce
)
{
if
(
$checkGoodsIntroduce
)
{
throw
new
GoodsException
([
'cus'
=>
21
]);
throw
new
GoodsException
([
'cus'
=>
21
]);
}
}
}
$checkGoodsRuleDesc
=
self
::
isHaveSensitive
(
$skuData
[
"rule_desc"
],
2
);
$checkGoodsRuleDesc
=
self
::
isHaveSensitive
(
$skuData
[
"rule_desc"
],
2
);
if
(
$checkGoodsRuleDesc
)
{
if
(
$checkGoodsRuleDesc
)
{
throw
new
GoodsException
([
'cus'
=>
22
]);
throw
new
GoodsException
([
'cus'
=>
22
]);
...
@@ -1203,7 +1206,7 @@ class GoodsService
...
@@ -1203,7 +1206,7 @@ class GoodsService
}
}
$info
=
GoodsSku
::
getRecord
(
$where
);
$info
=
GoodsSku
::
getRecord
(
$where
);
$info
[
'original_price'
]
=
$info
[
'original_price'
]
/
100
;
$info
[
'original_price'
]
=
empty
(
$info
[
'original_price'
])
?
0
:
$info
[
'original_price'
]
/
100
;
$info
[
'price'
]
=
$info
[
'price'
]
/
100
;
$info
[
'price'
]
=
$info
[
'price'
]
/
100
;
$info
[
'desc_pic_url'
]
=
self
::
getUrlList
(
$info
[
'desc_pic_url'
]);
$info
[
'desc_pic_url'
]
=
self
::
getUrlList
(
$info
[
'desc_pic_url'
]);
$info
[
'introduce_pic_url'
]
=
self
::
getUrlList
(
$info
[
'introduce_pic_url'
]);
$info
[
'introduce_pic_url'
]
=
self
::
getUrlList
(
$info
[
'introduce_pic_url'
]);
...
...
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