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
8a200f38
Commit
8a200f38
authored
Aug 04, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:拼单商品详情
parent
00c0ace0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
GoodsService.php
application/services/goods/GoodsService.php
+16
-0
MarketingPindanGoodsService.php
application/services/goods/MarketingPindanGoodsService.php
+19
-0
No files found.
application/services/goods/GoodsService.php
View file @
8a200f38
...
@@ -860,6 +860,22 @@ class GoodsService
...
@@ -860,6 +860,22 @@ class GoodsService
* @throws GoodsException
* @throws GoodsException
*/
*/
public
static
function
getGoodsSkuInfo
(
$params
=
[])
public
static
function
getGoodsSkuInfo
(
$params
=
[])
{
$marketingType
=
!
empty
(
$params
[
'marketing_type'
])
?
$params
[
'marketing_type'
]
:
0
;
if
(
$marketingType
==
Marketing
::
MARKETING_TYPE_PINDAN
)
{
return
MarketingPindanGoodsService
::
pindanGoodsInfo
(
$params
);
}
else
{
return
self
::
generalGoodsInfo
(
$params
);
}
}
/**
* 普通商品详情,通过sku_id查询
* @param $params
* @return array
* @throws GoodsException
*/
private
static
function
generalGoodsInfo
(
$params
)
{
{
$data
=
[];
$data
=
[];
$sku
=
GoodsSku
::
get
([
"life_account_id"
,
"goods_sku_id"
,
"category_1_id"
,
"category_2_id"
,
"goods_name"
,
$sku
=
GoodsSku
::
get
([
"life_account_id"
,
"goods_sku_id"
,
"category_1_id"
,
"category_2_id"
,
"goods_name"
,
...
...
application/services/goods/MarketingPindanGoodsService.php
View file @
8a200f38
...
@@ -383,4 +383,23 @@ class MarketingPindanGoodsService
...
@@ -383,4 +383,23 @@ class MarketingPindanGoodsService
return
[
"list"
=>
$list
,
"count"
=>
$count
];
return
[
"list"
=>
$list
,
"count"
=>
$count
];
}
}
public
static
function
pindanGoodsInfo
(
$params
)
{
$data
=
[];
$sku
=
PindanGoodsSku
::
get
(
"*"
,
[
"goods_sku_id"
=>
$params
[
"goods_sku_id"
]]);
if
(
empty
(
$sku
))
{
throw
new
GoodsException
([
"cus"
=>
15
]);
}
$data
[
"goods_info"
]
=
$sku
;
$data
[
"goods_info"
][
"original_price"
]
=
empty
(
$sku
[
"original_price"
])
?
''
:
(
string
)(
$sku
[
"original_price"
]
/
100
);
$data
[
"goods_info"
][
"price"
]
=
$sku
[
"price"
]
/
100
;
$data
[
"goods_info"
][
"desc_pic_url_list"
]
=
[];
if
(
!
empty
(
$sku
[
"desc_pic_url"
]))
{
$ksyun
=
GoodsService
::
getUrlList
(
$sku
[
"desc_pic_url"
]);
$data
[
"goods_info"
][
"desc_pic_url_list"
]
=
$ksyun
;
}
return
$data
;
}
}
}
\ No newline at end of file
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