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
5eb6359e
Commit
5eb6359e
authored
Aug 01, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:拼单商品编辑
parent
f2728bcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
Goods.php
application/modules/Goods/controllers/Goods.php
+12
-4
MarketingPindanGoodsService.php
application/services/goods/MarketingPindanGoodsService.php
+2
-7
No files found.
application/modules/Goods/controllers/Goods.php
View file @
5eb6359e
...
...
@@ -44,9 +44,13 @@ class GoodsController extends Base
*/
public
function
addAction
()
{
(
new
GoodsAddValidate
())
->
validate
();
$params
=
$this
->
params
;
if
(
!
empty
(
$params
[
"marketing_type"
])
&&
$params
[
"marketing_type"
]
==
\App\Models\marketing\mysql\Marketing
::
MARKETING_TYPE_PINDAN
)
{
}
else
{
(
new
GoodsAddValidate
())
->
validate
();
}
GoodsService
::
addGoods
(
$params
);
$this
->
success
();
}
...
...
@@ -56,9 +60,13 @@ class GoodsController extends Base
*/
public
function
editAction
()
{
(
new
GoodsEditValidate
())
->
validate
();
$params
=
$this
->
params
;
if
(
!
empty
(
$params
[
"marketing_type"
])
&&
$params
[
"marketing_type"
]
==
\App\Models\marketing\mysql\Marketing
::
MARKETING_TYPE_PINDAN
)
{
}
else
{
(
new
GoodsEditValidate
())
->
validate
();
}
GoodsService
::
editGoods
(
$params
);
$this
->
success
();
}
...
...
application/services/goods/MarketingPindanGoodsService.php
View file @
5eb6359e
...
...
@@ -104,13 +104,10 @@ class MarketingPindanGoodsService
"goods_name"
=>
$spuData
[
"marketing_name"
],
"desc_pic_url"
=>
$spuData
[
"desc_pic_url"
],
"desc"
=>
$spuData
[
"desc"
],
"goods_type"
=>
empty
(
$spuData
[
"goods_type"
])
?
GoodsSpu
::
TYPE_
VIRTUAL
:
$spuData
[
"goods_type"
],
"goods_sub_type"
=>
empty
(
$spuData
[
"goods_sub_type"
])
?
GoodsSpu
::
SUB_TYPE_
TO_SHOP
:
$spuData
[
"goods_sub_type"
],
"goods_type"
=>
empty
(
$spuData
[
"goods_type"
])
?
GoodsSpu
::
TYPE_
ENTITY
:
$spuData
[
"goods_type"
],
"goods_sub_type"
=>
empty
(
$spuData
[
"goods_sub_type"
])
?
GoodsSpu
::
SUB_TYPE_
INSTANT
:
$spuData
[
"goods_sub_type"
],
"belong_type"
=>
empty
(
$spuData
[
"belong_type"
])
?
GoodsSpu
::
BELONG_TYPE_DISANFANG
:
$spuData
[
"belong_type"
],
"goods_sale_type"
=>
empty
(
$spuData
[
"setmeal"
])
?
GoodsSpu
::
SALE_TYPE_NO_COMBINATION
:
GoodsSpu
::
SALE_TYPE_COMBINATION
,
"rule_limit"
=>
$spuData
[
"rule_limit"
],
"rule_desc"
=>
$spuData
[
"rule_desc"
],
"rule_refund"
=>
$spuData
[
"rule_refund"
],
];
GoodsSpu
::
save
(
$spuParams
);
return
$spuParams
;
...
...
@@ -267,8 +264,6 @@ class MarketingPindanGoodsService
$skuParams
=
[
"category_1_id"
=>
$params
[
"category_1_id"
],
"category_2_id"
=>
$params
[
"category_2_id"
],
"goods_name"
=>
$params
[
"goods_name"
],
"desc_pic_url"
=>
$params
[
"desc_pic_url"
],
"desc"
=>
$params
[
"desc"
],
...
...
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