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
e22c25f5
Commit
e22c25f5
authored
Sep 05, 2018
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
309f600b
2075efd7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
155 additions
and
21 deletions
+155
-21
src/Bargain/Enum/BargainEnum.php
+7
-0
src/Bargain/Lib/BargainInterface.php
+24
-12
src/Goods/Lib/GoodsInterface.php
+24
-0
src/LimitTimeBuy/Enum/LimitTimeOrderEnum.php
+19
-0
src/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
+19
-4
src/Notice/Common/WxMiniNotice.php
+33
-0
src/Order/Enum/OrderCate.php
+0
-2
src/Order/Lib/OrderInterface.php
+16
-3
src/Store/Lib/StoreInterface.php
+13
-0
No files found.
src/Bargain/Enum/BargainEnum.php
View file @
e22c25f5
...
...
@@ -13,6 +13,12 @@ class BargainEnum
//订单状态
const
STATUS_NORMAL
=
10
;
//待支付
//paystatus
const
HAVE_PAY
=
2
;
const
PAY_EXCEPTION
=
3
;
}
\ No newline at end of file
src/Bargain/Lib/BargainInterface.php
View file @
e22c25f5
...
...
@@ -10,14 +10,14 @@
namespace
Hdll\Services\Bargain\Lib
;
use
Hdll\Services\Bargain\Enum\BargainEnum
;
use
Swoft\Core\ResultInterface
;
/**
* The interface of demo service
*
* @method ResultInterface deferGetgoodsinfo( int $limit_id)
* @method ResultInterface deferGetBargainInfo( int $limit_id)
* @method ResultInterface deferGetgoodsinfo(int $limit_id)
* @method ResultInterface deferGetBargainInfo(int $limit_id)
*/
interface
BargainInterface
{
...
...
@@ -25,19 +25,18 @@ interface BargainInterface
/**
* 获取砍价商品的 商品信息
* @param int $bargain_id
* @return {
"name" 名称
"image" 图片
"price" 价格
"activityName" 活动名称
* @return {
*
"name" 名称
*
"image" 图片
*
"price" 价格
*
"activityName" 活动名称
* }
*/
public
function
getGoodsInfo
(
int
$stordId
,
int
$bargain_id
int
$stordId
,
int
$bargain_id
);
/**
* 通过商品id 获取是否 有砍价活动
* @param int $storeId
...
...
@@ -45,10 +44,23 @@ interface BargainInterface
* @return bool
*
*/
public
function
getBargainInfo
(
int
$storeId
,
int
$goodsId
public
function
getBargainInfo
(
int
$storeId
,
int
$goodsId
);
/**
* 支付 状态 回馈接口
* @param string $storeId //
* @param int $bargainbranchId // 砍价活动id
* @param int $status // BargainEnum::HAVE_PAY 成功支付 BargainEnum::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @return mixed
*/
public
function
payStatus
(
string
$storeId
,
int
$bargainbranchId
,
int
$status
,
//
int
$orderId
);
}
...
...
src/Goods/Lib/GoodsInterface.php
View file @
e22c25f5
...
...
@@ -12,6 +12,8 @@ use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGet($storeId, $id)
* @method ResultInterface deferIncSales($storeId, $goodsId)
* @method ResultInterface deferDecSales($storeId, $goodsId)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
...
...
@@ -39,4 +41,25 @@ interface GoodsInterface
*/
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
);
}
\ No newline at end of file
src/LimitTimeBuy/Enum/LimitTimeOrderEnum.php
0 → 100644
View file @
e22c25f5
<?php
namespace
Hdll\Services\LimitTimeBuy\Enum
;
class
LimitTimeOrderEnum
{
//订单状态
const
STATUS_NORMAL
=
1
;
//待支付 1未支付2已经支付3异常
const
STATUS_HAVE_PAY
=
2
;
const
STATUS_PAY_EXCEPTION
=
3
;
}
\ No newline at end of file
src/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
View file @
e22c25f5
...
...
@@ -44,10 +44,10 @@ interface LimitTimeBuyInterface
* 获取限时购商品的 商品信息
* @param int $limit_id
* @return {
"name" 名称
"image" 图片
"price" 价格
"activityName" 活动名称
*
"name" 名称
*
"image" 图片
*
"price" 价格
*
"activityName" 活动名称
* }
*/
public
function
getLimitGoods
(
...
...
@@ -66,4 +66,18 @@ interface LimitTimeBuyInterface
);
/**
* 支付 状态 回馈接口
* @param string $store_id
* @param int $limit_id
* @param int $status // status :1 成功支付 2:未支付 (已经过期或者支付异常)
* @param int $orderId
* @return bool|mixed
* @throws ConException
*/
public
function
payStatus
(
string
$store_id
,
int
$limit_id
,
int
$status
,
int
$orderId
);
}
\ No newline at end of file
src/Notice/Common/WxMiniNotice.php
0 → 100644
View file @
e22c25f5
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/9/4
* Time: 10:46
*/
namespace
Hdll\Services\Notice\Common
;
class
WxMiniNotice
{
/**
* 微信小程序page生成
*
* 用法:
* WxMiniNotice::generatePage("pages/orderShow/orderShow",['orderId' => $orderInfo['id'], 'storeId' => $orderInfo['storeId']])
* 生成
* pages/orderShow/orderShow?orderId=1&storeId=7
* @param string $page
* @param array $param
* @return string
*/
public
static
function
generatePage
(
string
$page
,
array
$param
)
{
$param
[
'origin'
]
=
$param
[
'origin'
]
??
'notice'
;
$param
=
http_build_query
(
$param
);
return
$page
.
$param
;
}
}
\ No newline at end of file
src/Order/Enum/OrderCate.php
View file @
e22c25f5
...
...
@@ -10,6 +10,5 @@ namespace Hdll\Services\Order\Enum;
class
OrderCate
{
const
TYPE_BUYER
=
1
;
const
TYPE_SELLER
=
2
;
}
\ No newline at end of file
src/Order/Lib/OrderInterface.php
View file @
e22c25f5
...
...
@@ -16,12 +16,13 @@ use Swoft\Core\ResultInterface;
* The interface of demo service
*
* @method ResultInterface deferCreateOrder(int $buyerId,int $storeId,int $consigneeId,int $itemId,int $selectedNum,int $orderType,int $total,int $activityPrice,string $goodsName,string $goodsImage,string $activityName,int $goodsId,int $goodsPrice,string $reservation_time = '');
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn)
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn
, array $consigneeFields = [], array $itemFields = []
)
* @method ResultInterface deferGetOrderInfo(int $storeId,int $orderId)
* @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo)
* @method ResultInterface deferGetSimpleList($storeId, $condition, $fields = ['*'])
* @method ResultInterface deferUpdateInfoByIds(int $storeId,array $orderIds, array $updateInfo)
* @method ResultInterface deferCollectionClose(int $storeId, int $orderId);
* @method ResultInterface deferCollectionClose(int $storeId, int $orderId)
* @method ResultInterface deferGetOtherInfo(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = [])
*/
interface
OrderInterface
{
...
...
@@ -62,7 +63,7 @@ interface OrderInterface
public
function
getOrderInfo
(
int
$storeId
,
int
$orderId
);
public
function
getOrderInfoBySn
(
int
$storeId
,
string
$orderSn
);
public
function
getOrderInfoBySn
(
int
$storeId
,
string
$orderSn
,
array
$consigneeFields
=
[],
array
$itemFields
=
[]
);
public
function
updateInfoById
(
int
$storeId
,
int
$orderId
,
array
$updateInfo
);
...
...
@@ -135,4 +136,15 @@ interface OrderInterface
*/
public
function
updateInfoByIds
(
int
$storeId
,
array
$orderIds
,
array
$updateInfo
);
/**
* 获取订单联系人信息,item信息用
*
* @param int $storeId
* @param string $orderSn
* @param array $consigneeFields
* @param array $itemFields
* @return mixed
*/
public
function
getOtherInfo
(
int
$storeId
,
string
$orderSn
,
array
$consigneeFields
=
[],
array
$itemFields
=
[]);
}
\ No newline at end of file
src/Store/Lib/StoreInterface.php
View file @
e22c25f5
...
...
@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetStoreBySellerId(int $sellerId)
* @method ResultInterface deferUpdateStore(int $storeId, array $data)
* @method ResultInterface deferDeleteStore(int $storeId)
* @method ResultInterface deferGetWxacodeUrl(int $type, string $page, string $scene)
*/
interface
StoreInterface
{
...
...
@@ -77,4 +78,15 @@ interface StoreInterface
* @return int 成功返回删除条数
*/
public
function
deleteStore
(
int
$storeId
);
/**
* 生成店铺小程序码
*
* @param integer $type 指明哪小程序,1前台小程序,2后台小程序
* @param string $page 要跳转的小程序页面,如:pages/index/index
* @param string $scene 通过小程序码传递的参数
* @return string 成功返回小程序码的图片资源名(腾讯云存储的资源名,如:store_wxacode/9a414ff3b4c478a36c2ba7df563ee88b.png)
*/
public
function
getWxacodeUrl
(
int
$type
,
string
$page
,
string
$scene
);
}
\ 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