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
2d88ee1c
Commit
2d88ee1c
authored
Jun 25, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:set
parent
2494e555
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
3 deletions
+58
-3
ApiResponse.php
application/library/Helpers/ApiResponse.php
+1
-1
Goods.php
application/modules/Goods/controllers/Goods.php
+8
-0
GoodsService.php
application/services/goods/GoodsService.php
+37
-0
ShopService.php
application/services/shop/ShopService.php
+12
-2
No files found.
application/library/Helpers/ApiResponse.php
View file @
2d88ee1c
...
@@ -28,7 +28,7 @@ trait ApiResponse
...
@@ -28,7 +28,7 @@ trait ApiResponse
* @return void
* @return void
* @throws \Exception
* @throws \Exception
*/
*/
public
function
failed
(
$code
,
$
status
=
"failed"
,
$reason
=
''
,
$headers
=
[])
public
function
failed
(
$code
,
$
reason
=
''
,
$status
=
"failed"
,
$headers
=
[])
{
{
$this
->
respond
(
$code
,
$status
,
$reason
,
[],
$headers
);
$this
->
respond
(
$code
,
$status
,
$reason
,
[],
$headers
);
}
}
...
...
application/modules/Goods/controllers/Goods.php
View file @
2d88ee1c
...
@@ -197,4 +197,12 @@ class GoodsController extends Base
...
@@ -197,4 +197,12 @@ class GoodsController extends Base
$this
->
success
([
"result"
=>
$data
]);
$this
->
success
([
"result"
=>
$data
]);
}
}
public
function
goods_sku_listAction
()
{
$params
=
$this
->
params
;
$data
=
GoodsService
::
getGoodsSkuList
(
$params
);
$this
->
success
([
"result"
=>
$data
]);
}
}
}
\ No newline at end of file
application/services/goods/GoodsService.php
View file @
2d88ee1c
...
@@ -1015,4 +1015,41 @@ class GoodsService
...
@@ -1015,4 +1015,41 @@ class GoodsService
return
$data
;
return
$data
;
}
}
/**
* 获取 GoodsSku 列表
* @param $params
* @return array
* @throws GoodsException
*/
public
static
function
getGoodsSkuList
(
$params
)
{
$where
=
[];
if
(
empty
(
$params
))
{
return
[];
}
if
(
!
empty
(
$params
[
'goods_sku_id'
]))
{
$where
[
'goods_sku_id'
]
=
$params
[
'goods_sku_id'
];
}
if
(
!
empty
(
$params
[
'goods_spu_id'
]))
{
$where
[
'goods_spu_id'
]
=
$params
[
'goods_spu_id'
];
}
if
(
!
empty
(
$params
[
'life_account_id'
]))
{
$where
[
'life_account_id'
]
=
$params
[
'life_account_id'
];
}
if
(
!
empty
(
$params
[
'shop_id'
]))
{
$where
[
'shop_id'
]
=
$params
[
'shop_id'
];
}
if
(
!
empty
(
$params
[
'goods_name'
]))
{
$where
[
'goods_name'
]
=
$params
[
'goods_name'
];
}
$list
=
GoodsSku
::
getRecordMaster
(
$where
);
return
$list
;
}
}
}
\ No newline at end of file
application/services/shop/ShopService.php
View file @
2d88ee1c
...
@@ -88,15 +88,25 @@ class ShopService
...
@@ -88,15 +88,25 @@ class ShopService
public
static
function
getShopList
(
$params
)
public
static
function
getShopList
(
$params
)
{
{
$lifeAccountId
=
!
empty
(
$params
[
'life_account_id'
])
?
$params
[
'life_account_id'
]
:
11
;
$lifeAccountId
=
!
empty
(
$params
[
'life_account_id'
])
?
$params
[
'life_account_id'
]
:
''
;
$phone
=
!
empty
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
''
;
$phone
=
!
empty
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
''
;
$shopId
=
!
empty
(
$params
[
'shop_id'
])
?
$params
[
'shop_id'
]
:
''
;
$shopId
=
!
empty
(
$params
[
'shop_id'
])
?
$params
[
'shop_id'
]
:
''
;
$shop_name
=
!
empty
(
$params
[
'shop_name'
])
?
$params
[
'shop_name'
]
:
''
;
$shop_name
=
!
empty
(
$params
[
'shop_name'
])
?
$params
[
'shop_name'
]
:
''
;
$longitude
=
!
empty
(
$params
[
'longitude'
])
?
$params
[
'longitude'
]
:
''
;
$longitude
=
!
empty
(
$params
[
'longitude'
])
?
$params
[
'longitude'
]
:
''
;
$latitude
=
!
empty
(
$params
[
'latitude'
])
?
$params
[
'latitude'
]
:
''
;
$latitude
=
!
empty
(
$params
[
'latitude'
])
?
$params
[
'latitude'
]
:
''
;
$address
=
!
empty
(
$params
[
'address'
])
?
$params
[
'address'
]
:
''
;
$address
=
!
empty
(
$params
[
'address'
])
?
$params
[
'address'
]
:
''
;
$subShopId
=
!
empty
(
$params
[
'sub_shop_id'
])
?
$params
[
'sub_shop_id'
]
:
''
;
$where
[
'life_account_id'
]
=
$lifeAccountId
;
if
(
!
empty
(
$subShopId
))
{
$where
[
'sub_shop_id'
]
=
$subShopId
;
}
if
(
!
empty
(
$lifeAccountId
))
{
$where
[
'life_account_id'
]
=
$lifeAccountId
;
}
$where
[
'ORDER'
]
=
[
"create_time"
=>
"DESC"
];
$where
[
'ORDER'
]
=
[
"create_time"
=>
"DESC"
];
$subShopList
=
SubShop
::
getRecords
(
$where
);
$subShopList
=
SubShop
::
getRecords
(
$where
);
return
$subShopList
;
return
$subShopList
;
...
...
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