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
9da2c37a
Commit
9da2c37a
authored
Jul 07, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://git.yidian-inc.com:8021/bp/goods
into develop
parents
3e86ffc0
14147acc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
Goods.php
application/modules/Goods/controllers/Goods.php
+7
-0
GoodsService.php
application/services/goods/GoodsService.php
+22
-0
No files found.
application/modules/Goods/controllers/Goods.php
View file @
9da2c37a
...
...
@@ -208,6 +208,13 @@ class GoodsController extends Base
$this
->
success
([
"result"
=>
$data
]);
}
public
function
get_goods_skuAction
()
{
$params
=
$this
->
params
;
$data
=
GoodsService
::
getGoodsBySkuId
(
$params
);
$this
->
success
([
"result"
=>
$data
]);
}
public
function
goods_sku_listAction
()
{
...
...
application/services/goods/GoodsService.php
View file @
9da2c37a
...
...
@@ -1155,6 +1155,28 @@ class GoodsService
return
$data
;
}
/**
* 获取 GoodsSku 数据
* @param $params
* @return array
* @throws GoodsException
*/
public
static
function
getGoodsBySkuId
(
$params
)
{
$where
=
[];
if
(
empty
(
$params
))
{
return
[];
}
if
(
!
empty
(
$params
[
'goods_sku_id'
]))
{
$where
[
'goods_sku_id'
]
=
$params
[
'goods_sku_id'
];
}
$info
=
GoodsSku
::
getRecord
(
$where
);
$info
[
'desc_pic_url'
]
=
self
::
getUrlList
(
$info
[
'desc_pic_url'
]);
$info
[
'introduce_pic_url'
]
=
self
::
getUrlList
(
$info
[
'introduce_pic_url'
]);
return
$info
;
}
/**
* 获取 GoodsSku 列表
* @param $params
...
...
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