Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
6279371e
Commit
6279371e
authored
Aug 13, 2019
by
xmy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:获取商品(包括已删除)
parent
991bbca1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
124 additions
and
115 deletions
+124
-115
src/Goods/Lib/GoodsInterface.php
+124
-115
No files found.
src/Goods/Lib/GoodsInterface.php
View file @
6279371e
...
...
@@ -8,6 +8,7 @@
namespace
Hdll\Services\Goods\Lib
;
use
App\Exception\ServiceException
;
use
Swoft\Core\ResultInterface
;
/**
...
...
@@ -25,127 +26,128 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferAdminCountActivity($storeId)
* @method ResultInterface deferGetTopThreeSales($storeId)
* @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds)
* @method ResultInterface deferCountEvaluate($storeId,$time)
* @method ResultInterface deferCountEvaluate($storeId, $time)
* @method ResultInterface deferFind($storeId, $id)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
interface
GoodsInterface
{
/**
* 获取商品
* @param $storeId
* @return [
* 'gcId' 商品类ID
* 'asId' 服务
ID
* 'stock' 库存
* 'name' 名称
* 'image' 图片
* 'price' 价格
* 'state' 状态
* 'body' 描述
* 'originalPrice' 原价
* 'sales' 销量
* ]
* @param $id
* @return mixed
* @author Administrator
*/
public
function
get
(
$storeId
,
$id
);
/**
* 增加商品销量
* 减少商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public
function
incSales
(
$storeId
,
$goodsId
);
/**
* 减少商品销量
* 增加商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public
function
decSales
(
$storeId
,
$goodsId
);
/**
* 获取商品服务
* @param $storeId
* @param $goodsId
* @param $type 1 付款后 2 服务前 3 服务后
* @return mixed
* @author Administrator
*/
public
function
getServiceByGoodsId
(
$storeId
,
$goodsId
,
$type
=
3
);
/**
* 获取用户回访
* @param $storeId
* @param $goodsId
* @param $type 1 之前 2 之后
* @return mixed
* @author Administrator
*/
public
function
getReturnVisitByGoodsId
(
$storeId
,
$goodsId
,
$type
=
2
);
/**
* 获取商品列表 ids
* @param $ids
* @param $storeId
* @param $order
* @return mixed
* @author Administrator
*/
public
function
listByIds
(
array
$ids
,
$storeId
,
$order
=
[
'id'
,
'DESC'
]);
/**
* 获取sku信息
* @param $skuId
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public
function
getSkuInfo
(
$skuId
,
$goodsId
,
$storeId
);
/**
* 获取多个sku信息
* @param $goodsId
* @param $skuIds
* @return mixed
* @author work
*/
public
function
getSkuByIds
(
$goodsId
,
$skuIds
,
$storeId
);
public
function
getSkuByGoodsId
(
$goodsId
,
$storeId
);
/**
* 获取商品规格属性
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public
function
getSpecAttributeByGoodsId
(
$goodsId
,
$storeId
);
/**
* 添加后续服务模版
* @param $storeId
* @return mixed
* @author work
*/
public
function
afterServiceTmp
(
$storeId
);
/**
* 获取商品
* @param $storeId
* @param $id
* @return [
* 'gcId' 商品类
ID
* 'asId' 服务ID
* 'stock' 库存
* 'name' 名称
* 'image' 图片
* 'price' 价格
* 'state' 状态
* 'body' 描述
* 'originalPrice' 原价
* 'sales' 销量
* ]
* @return mixed
* @author Administrator
*/
public
function
get
(
$storeId
,
$id
);
/**
* 增加商品销量
* 减少商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public
function
incSales
(
$storeId
,
$goodsId
);
/**
* 减少商品销量
* 增加商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public
function
decSales
(
$storeId
,
$goodsId
);
/**
* 获取商品服务
* @param $storeId
* @param $goodsId
* @param $type 1 付款后 2 服务前 3 服务后
* @return mixed
* @author Administrator
*/
public
function
getServiceByGoodsId
(
$storeId
,
$goodsId
,
$type
=
3
);
/**
* 获取用户回访
* @param $storeId
* @param $goodsId
* @param $type 1 之前 2 之后
* @return mixed
* @author Administrator
*/
public
function
getReturnVisitByGoodsId
(
$storeId
,
$goodsId
,
$type
=
2
);
/**
* 获取商品列表 ids
* @param $ids
* @param $storeId
* @param $order
* @return mixed
* @author Administrator
*/
public
function
listByIds
(
array
$ids
,
$storeId
,
$order
=
[
'id'
,
'DESC'
]);
/**
* 获取sku信息
* @param $skuId
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public
function
getSkuInfo
(
$skuId
,
$goodsId
,
$storeId
);
/**
* 获取多个sku信息
* @param $goodsId
* @param $skuIds
* @return mixed
* @author work
*/
public
function
getSkuByIds
(
$goodsId
,
$skuIds
,
$storeId
);
public
function
getSkuByGoodsId
(
$goodsId
,
$storeId
);
/**
* 获取商品规格属性
* @param $goodsId
* @param $storeId
* @return mixed
* @author work
*/
public
function
getSpecAttributeByGoodsId
(
$goodsId
,
$storeId
);
/**
* 添加后续服务模版
* @param $storeId
* @return mixed
* @author work
*/
public
function
afterServiceTmp
(
$storeId
);
/**
* 获取商品数量
...
...
@@ -177,4 +179,11 @@ interface GoodsInterface
*/
public
function
getReturnVisitByGoodsIds
(
$storeId
,
$goodsIds
);
/**
* 获取商品(包括已删除)
* @param $storeId
* @param $id
* @return array|mixed
*/
public
function
find
(
$storeId
,
$id
);
}
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