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
f0ff9543
Commit
f0ff9543
authored
Sep 10, 2018
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
db7f86be
cfe9c78b
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
142 additions
and
38 deletions
+142
-38
src/Common/Lib/Smscode.php
+1
-1
src/Common/Pool/Config/OrderPoolConfig.php
+1
-1
src/Common/Pool/Config/ReservationPoolConfig.php
+1
-1
src/Common/Pool/Config/SchedulePoolConfig.php
+1
-1
src/Common/Pool/Config/StorePoolConfig.php
+1
-1
src/GroupBooking/Lib/GroupBookingInterface.php
+11
-0
src/LimitTimeBuy/Enum/LimitTimeBuyEnum.php
+0
-5
src/LimitTimeBuy/Enum/LimitTimeOrderEnum.php
+19
-0
src/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
+16
-12
src/Notice/Common/WxMiniNotice.php
+2
-1
src/Notice/Enum/FormIdEnum.php
+3
-3
src/Notice/Enum/NoticeEnum.php
+3
-3
src/Notice/Lib/NoticeInterface.php
+4
-2
src/Order/Enum/OrderCate.php
+0
-2
src/Order/Lib/OrderInterface.php
+21
-5
src/Reservation/Lib/ReservationInterface.php
+13
-0
src/Store/Lib/StoreInterface.php
+13
-0
src/Store/Lib/WeappInterface.php
+32
-0
No files found.
src/Common/Lib/Smscode.php
View file @
f0ff9543
...
...
@@ -53,7 +53,7 @@ class Smscode
}
else
{
$count
=
1
;
}
$vcode
=
mt_rand
(
1000
0
,
9
9999
);
$vcode
=
mt_rand
(
1000
,
9999
);
$alisms
=
new
Alisms
(
$signName
??
Alisms
::
SN_01
,
$templateCode
??
Alisms
::
TPL_01
,
...
...
src/Common/Pool/Config/OrderPoolConfig.php
View file @
f0ff9543
...
...
@@ -68,7 +68,7 @@ class OrderPoolConfig extends PoolProperties
*
* @var int
*/
protected
$timeout
=
5
;
protected
$timeout
=
200
;
/**
* the addresses of connection
...
...
src/Common/Pool/Config/ReservationPoolConfig.php
View file @
f0ff9543
...
...
@@ -68,7 +68,7 @@ class ReservationPoolConfig extends PoolProperties
*
* @var int
*/
protected
$timeout
=
5
;
protected
$timeout
=
1
5
;
/**
* the addresses of connection
...
...
src/Common/Pool/Config/SchedulePoolConfig.php
View file @
f0ff9543
...
...
@@ -68,7 +68,7 @@ class SchedulePoolConfig extends PoolProperties
*
* @var int
*/
protected
$timeout
=
5
;
protected
$timeout
=
1
5
;
/**
* the addresses of connection
...
...
src/Common/Pool/Config/StorePoolConfig.php
View file @
f0ff9543
...
...
@@ -68,7 +68,7 @@ class StorePoolConfig extends PoolProperties
*
* @var int
*/
protected
$timeout
=
5
;
protected
$timeout
=
1
5
;
/**
* the addresses of connection
...
...
src/GroupBooking/Lib/GroupBookingInterface.php
View file @
f0ff9543
...
...
@@ -23,4 +23,14 @@ interface GroupBookingInterface{
public
function
hasActivity
(
$storeId
,
$goodsId
);
/**
* 关闭拼团
* @param $storeId
* @param $buyerId
* @param $orderId
* @return mixed
* @author Administrator
*/
public
function
closeRecord
(
$storeId
,
$buyerId
,
$orderId
);
}
\ No newline at end of file
src/LimitTimeBuy/Enum/LimitTimeBuyEnum.php
View file @
f0ff9543
...
...
@@ -14,8 +14,4 @@ class LimitTimeBuyEnum
//订单状态
const
STATUS_NORMAL
=
10
;
//待支付
}
\ No newline at end of file
src/LimitTimeBuy/Enum/LimitTimeOrderEnum.php
0 → 100644
View file @
f0ff9543
<?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 @
f0ff9543
...
...
@@ -10,6 +10,7 @@
namespace
Hdll\Services\LimitTimeBuy\Lib
;
use
Hdll\Services\LimitTimeBuy\Enum\LimitTimeOrderEnum
;
use
Swoft\Core\ResultInterface
;
/**
...
...
@@ -66,16 +67,18 @@ interface LimitTimeBuyInterface
);
// /**
// * 支付 状态 回馈接口
// * @param string $store_id
// * @param int $limit_id
// * @param int $status // status :1 成功支付 2:未支付 (已经过期或者支付异常)
// * @return mixed
// */
// public function paystatus(
// string $store_id,
// int $limit_id,
// int $status,
// int $orderId);
/**
* 支付 状态 回馈接口
* @param string $store_id
* @param int $limit_id
* @param int $status // 2.LimitTimeOrderEnum::STATUS_HAVE_PAY 成功支付 3:LimitTimeOrderEnum::STATUS_PAY_EXCEPTION 未支付 (已经过期或者支付异常)
* @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
View file @
f0ff9543
...
...
@@ -26,7 +26,7 @@ class WxMiniNotice
$param
=
http_build_query
(
$param
);
return
$page
.
$param
;
return
$page
.
'?'
.
$param
;
}
}
\ No newline at end of file
src/Notice/Enum/FormIdEnum.php
View file @
f0ff9543
...
...
@@ -9,7 +9,8 @@ namespace Hdll\Services\Notice\Enum;
class
FormIdEnum
{
const
TYPE_FORM
=
0
;
const
TYPE_FORM
=
1
;
const
TYPE_PAY
=
2
;
const
TYPE_PAY
=
1
;
}
\ No newline at end of file
src/Notice/Enum/NoticeEnum.php
View file @
f0ff9543
...
...
@@ -11,13 +11,13 @@ namespace Hdll\Services\Notice\Enum;
class
NoticeEnum
{
//商家小程序发送
const
TYPE_MINI_BACKEND_SEND
=
1
;
const
TYPE_MINI_BACKEND_SEND
=
1
00
;
//腾讯sms发送
const
TYPE_TENCENT_SMS
=
2
;
const
TYPE_TENCENT_SMS
=
150
;
//买家小程序消息推送
const
TYPE_MINI_FRONTEND_SEND
=
3
;
const
TYPE_MINI_FRONTEND_SEND
=
101
;
const
SEND_TYPES
=
[
...
...
src/Notice/Lib/NoticeInterface.php
View file @
f0ff9543
...
...
@@ -15,7 +15,7 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferSend(int $s
endType, array $data, int $sendTime)
* @method ResultInterface deferSend(int $s
toreId, array $sendTypes, array $data, int $sendTime) :bool
*/
interface
NoticeInterface
{
...
...
@@ -25,6 +25,7 @@ interface NoticeInterface
* 微信发送消息数据结构
* $data[NoticeEnum::TYPE_MINI_BACKEND_SEND] = [
"uid" => 1, //用户的id
* "storeId" => 1, //店铺id
"template_id" => "1kZ_RkkWfRrpufXNdmJYBpIhgk7ccCtPrypeJQ9WRwM",//消息模板id
"page" => "index", //消息模板页面
"data" => [ //消息模板数据
...
...
@@ -62,5 +63,5 @@ interface NoticeInterface
* @param int $sendTime //发送时间,立即返送填0
* @return mixed
*/
public
function
send
(
array
$sendTypes
,
array
$data
,
int
$sendTime
)
:
bool
;
public
function
send
(
array
$sendTypes
,
array
$data
,
int
$sendTime
)
:
bool
;
}
\ No newline at end of file
src/Order/Enum/OrderCate.php
View file @
f0ff9543
...
...
@@ -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 @
f0ff9543
...
...
@@ -15,13 +15,14 @@ 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 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 = ''
,string $message = ''
);
* @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
{
...
...
@@ -42,6 +43,7 @@ interface OrderInterface
* @param int $goodsId
* @param int $goodsPrice
* @param string $reservation_time
* @param string $message
* @return mixed
*/
public
function
createOrder
(
...
...
@@ -58,11 +60,13 @@ interface OrderInterface
string
$activityName
,
int
$goodsId
,
int
$goodsPrice
,
string
$reservation_time
=
''
);
string
$reservation_time
=
''
,
string
$message
=
''
);
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 +139,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/Reservation/Lib/ReservationInterface.php
View file @
f0ff9543
...
...
@@ -17,6 +17,7 @@ use Swoft\Core\ResultInterface;
* The interface of Reservation service
*
* @method ResultInterface deferGetReservById(int $storeId, int $id)
* @method ResultInterface deferIsReserved(int $storeId, int $cmanId, int $reservTime)
* @method ResultInterface deferGetReservListByOrderId(int $storeId, int $orderId, int $state = 0, int $type = 1)
* @method ResultInterface deferModifyReservById(int $storeId, int $id, array $data)
* @method ResultInterface deferAddReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type)
...
...
@@ -35,6 +36,18 @@ interface ReservationInterface
public
function
getReservById
(
int
$storeId
,
int
$id
);
/**
* 检查指定的时间是否已被预约过
*
* @param integer $storeId 店铺id
* @param integer $cmanId 手艺人id,查询某个手艺人下的预约情况,$cmanId == 0表示不指定手艺人,
* @param integer $reservTime 要检查的时间点,时间戳格式
* @Number(name="cmanId")
* @Number(name="reservTime")
* @return boolen true:已预约,false:未预约
*/
public
function
isReserved
(
int
$storeId
,
int
$cmanId
,
int
$reservTime
);
/**
* 根据订单id,获取商家某个订单包含的所有预约
*
* @param integer $storeId
...
...
src/Store/Lib/StoreInterface.php
View file @
f0ff9543
...
...
@@ -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
src/Store/Lib/WeappInterface.php
0 → 100644
View file @
f0ff9543
<?php
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://doc.swoft.org
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace
Hdll\Services\Store\Lib
;
use
Swoft\Core\ResultInterface
;
/**
* The interface of weapp service
*
* @method ResultInterface deferGetWxAccessToken(string $appId, string $appSecret)
*/
interface
WeappInterface
{
/**
* 根据appId获取对应的access_token
*
* @param string $appId
* @param string $appSecret
* @return string
*/
public
function
getWxAccessToken
(
string
$appId
,
string
$appSecret
);
}
\ 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