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
2f781d4d
Commit
2f781d4d
authored
Jun 24, 2019
by
zhangsong
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
f0f81363
c8f8803d
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
180 additions
and
32 deletions
+180
-32
UPGRADE_1.x.md
+0
-0
UPGRADE_2.x.md
+17
-0
src/Bargain/Enum/BargainCmqEnum.php
+12
-0
src/Bargain/Enum/BargainEnum.php
+2
-1
src/BuyerDistribution/Enum/DistributionEnum.php
+6
-2
src/Cmq/Topic.php
+12
-5
src/Common/Config/CfgCenter.php
+10
-0
src/Common/Pool/Config/Wx3rdPoolConfig.php
+1
-1
src/Goods/Lib/GoodsInterface.php
+20
-0
src/GroupBooking/Enum/GroupBookingCmqEnum.php
+3
-0
src/LimitTimeBuy/Enum/LimitTimeCmqEnum.php
+12
-0
src/LimitTimeBuy/Enum/LimitTimeOrderEnum.php
+14
-4
src/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
+3
-4
src/Order/Lib/OrderInterface.php
+18
-4
src/Reservation/Lib/ReservationInterface.php
+12
-0
src/Seller/Lib/SellerInterface.php
+9
-10
src/SellerDistribution/Lib/SellerDistributionInterface.php
+8
-1
src/Wx3rd/Lib/EntrustedInterface.php
+21
-0
No files found.
UPGRADE.md
→
UPGRADE
_1.x
.md
View file @
2f781d4d
File moved
UPGRADE_2.x.md
0 → 100644
View file @
2f781d4d
# 2.0.11
-
砍价订单枚举状态加订单删除
# 2.0.10
-
根据商户平台id获取对应的小程序托管配置
# 2.0.9
-
修改wx3rd服务常量名错误
# 2.0.8
-
添加获取托管小程序支付证书的接口
# 2.0.7
-
商品后续服务
# 2.0.6
-
砍价、限时购 加 消息队列 upOrderStatus
src/Bargain/Enum/BargainCmqEnum.php
0 → 100644
View file @
2f781d4d
<?php
namespace
Hdll\Services\Bargain\Enum
;
class
BargainCmqEnum
{
const
TOPIC
=
'bargain'
;
const
UP_ORDER_STATUS
=
'upOrderStatus'
;
//更新订单状态
}
\ No newline at end of file
src/Bargain/Enum/BargainEnum.php
View file @
2f781d4d
...
...
@@ -21,6 +21,6 @@ class BargainEnum
const
PAY_EXCEPTION
=
3
;
const
PAY_REFUND
=
4
;
// 退款
const
PAY_CLOSE
=
5
;
// 订单关闭
const
ORDER_DELETED
=
6
;
//订单删除
}
\ No newline at end of file
src/BuyerDistribution/Enum/DistributionEnum.php
View file @
2f781d4d
...
...
@@ -5,12 +5,15 @@
* Date: 2018/9/18
* Time: 13:58
*/
namespace
Hdll\Services\BuyerDistribution\Enum
;
class
DistributionEnum
{
const
STATE_BALANCE_FALSE
=
0
;
//未入账
const
STATE_BALANCE_FALSE
=
0
;
//未入账
const
STATE_BALANCE_TRUE
=
1
;
//已入账
const
STATE_BALANCE_TRUE
=
1
;
//已入账
const
STATE_REFUND
=
2
;
//已退款
}
\ No newline at end of file
src/Cmq/Topic.php
View file @
2f781d4d
...
...
@@ -259,25 +259,32 @@ class Topic
$tryTimes
=
0
;
do
{
$res
=
$this
->
publish_message
(
$cryptMessage
,
$vTagList
,
$routingKey
);
try
{
$res
=
$this
->
publish_message
(
$cryptMessage
,
$vTagList
,
$routingKey
);
if
(
$res
[
'code'
]
==
0
)
break
;
}
catch
(
\Throwable
$e
)
{
App
::
error
(
"[消息队列异常]:"
.
var_export
(
$e
,
true
));
}
$tryTimes
++
;
}
while
(
$
res
[
'code'
]
!=
0
&&
$
tryTimes
<
3
);
}
while
(
$tryTimes
<
3
);
$status
=
0
;
if
(
$tryTimes
>=
3
)
{
$status
=
1
;
App
::
error
(
"[消息队列失败]:
$message
"
);
}
$this
->
TopicLog
(
$message
,
$cryptMessage
,
$vTagList
,
$res
);
$this
->
TopicLog
(
$message
,
$cryptMessage
,
$vTagList
,
$res
,
$status
);
return
$res
;
}
protected
function
TopicLog
(
$message
,
$cryptMessage
,
$tagName
,
$response
)
protected
function
TopicLog
(
$message
,
$cryptMessage
,
$tagName
,
$response
,
$status
=
0
)
{
$data
=
[
'tagName'
=>
$tagName
,
'topName'
=>
$this
->
topic_name
,
'message'
=>
$message
,
'cryptMessage'
=>
$cryptMessage
,
'status'
=>
$status
,
'createTime'
=>
time
(),
'response'
=>
json_encode
(
$response
),
];
...
...
src/Common/Config/CfgCenter.php
View file @
2f781d4d
...
...
@@ -80,6 +80,16 @@ class CfgCenter
'password'
=>
'Cfgsu#2390f*_'
,
'charset'
=>
'utf8'
]);
}
elseif
(
\env
(
'ENVIRONMENT'
,
''
)
==
'pre'
)
{
// 返回测试数据库连接
return
new
\Medoo\Medoo
([
'database_type'
=>
'mysql'
,
'database_name'
=>
'config_center'
,
'server'
=>
'192.168.3.201'
,
'username'
=>
'hdller'
,
'password'
=>
'Hdlltest999'
,
'charset'
=>
'utf8'
]);
}
else
{
// 返回测试数据库连接
return
new
\Medoo\Medoo
([
...
...
src/Common/Pool/Config/Wx3rdPoolConfig.php
View file @
2f781d4d
...
...
@@ -23,7 +23,7 @@ class Wx3rdPoolConfig extends PoolProperties
public
function
__construct
()
{
// 区别本地和线上的RPC服务地址
$this
->
uri
=
explode
(
','
,
env
(
'RPC_
STORE
_URI'
,
'wx3rd:8099'
));
$this
->
uri
=
explode
(
','
,
env
(
'RPC_
WX3RD
_URI'
,
'wx3rd:8099'
));
}
protected
$name
=
'wx3rd'
;
...
...
src/Goods/Lib/GoodsInterface.php
View file @
2f781d4d
...
...
@@ -23,6 +23,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetSpecAttributeByGoodsId($goodsId, $storeId)
* @method ResultInterface deferAfterServiceTmp($storeId)
* @method ResultInterface deferAdminCountActivity($storeId)
* @method ResultInterface deferGetTopThreeSales($storeId)
* @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
...
...
@@ -155,4 +157,22 @@ interface GoodsInterface
* @author work
*/
public
function
adminCountGoods
(
$storeId
);
/**
* 销量前3的商品
* @param $storeId
* @return mixed
* @author work
*/
public
function
getTopThreeSales
(
$storeId
);
/**
* 批量获取后续服务 goodIds
* @param $storeId
* @param $goodsIds
* @return mixed
* @author work
*/
public
function
getReturnVisitByGoodsIds
(
$storeId
,
$goodsIds
);
}
src/GroupBooking/Enum/GroupBookingCmqEnum.php
View file @
2f781d4d
...
...
@@ -10,4 +10,6 @@ class GroupBookingCmqEnum
const
CLOSE_RECORD
=
'closeRecord'
;
//关闭拼团
const
GROUP_BOOKING
=
'groupBooking'
;
//拼团成功回调
const
STATE_DELETE_GROUP_BOOKING
=
'1'
;
//cmq关闭订单状态
}
\ No newline at end of file
src/LimitTimeBuy/Enum/LimitTimeCmqEnum.php
0 → 100644
View file @
2f781d4d
<?php
namespace
Hdll\Services\LimitTimeBuy\Enum
;
class
LimitTimeCmqEnum
{
const
TOPIC
=
'timeLimitBuy'
;
const
UP_ORDER_STATUS
=
'upOrderStatus'
;
//更新订单状态
}
\ No newline at end of file
src/LimitTimeBuy/Enum/LimitTimeOrderEnum.php
View file @
2f781d4d
...
...
@@ -7,9 +7,18 @@ class LimitTimeOrderEnum
//订单状态
const
STATUS_NORMAL
=
1
;
//待支付 1未支付2已经支付3异常
const
STATUS_HAVE_PAY
=
2
;
// 已经支付
const
STATUS_PAY_EXCEPTION
=
3
;
// 支付异常或过期未付
const
STATUS_PAY_REFUND
=
4
;
// 退款
const
STATUS_NORMAL
=
1
;
//待支付 1未支付2已经支付3异常 //=未付款
const
STATUS_HAVE_PAY
=
2
;
// 已经支付 //=已下单
const
STATUS_PAY_EXCEPTION
=
3
;
// 支付异常或过期未付 //=关闭订单
const
STATUS_PAY_REFUND
=
4
;
// 退款 //=已过期
const
ORDER_DELETED
=
5
;
//订单删除
//------------状态转换-----------------------
const
NOT_PAY
=
3
;
//未付款
const
HAVE_PAID_ORDER
=
4
;
//已下单
const
CLOSED
=
7
;
//关闭订单
const
OVERDUE
=
8
;
//已过期
}
\ No newline at end of file
src/LimitTimeBuy/Lib/LimitTimeBuyInterface.php
View file @
2f781d4d
...
...
@@ -83,10 +83,10 @@ interface LimitTimeBuyInterface
int
$status
,
int
$orderId
);
/**
* 获取
砍价
活动总个数 和正在进行的个数
/**
* 获取
限时购
活动总个数 和正在进行的个数
*
* @return mixed
*/
public
function
getLimitCounts
(
int
$storeId
);
}
\ No newline at end of file
}
src/Order/Lib/OrderInterface.php
View file @
2f781d4d
...
...
@@ -24,10 +24,11 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferUpdateInfoByPids(int $storeId,array $pIds,array $updateInfo)
* @method ResultInterface deferUpdateMainOrderByPid(int $storeId,int $pId,array $mainData,array $subData=[])
* @method ResultInterface deferUnconfirmedCount(int $storeId)
* @method ResultInterface deferGetSubOrderListBySubIds(int $storeId,array $
subIds
)
* @method ResultInterface deferGetSubOrderListBySubIds(int $storeId,array $
ids,int $arg=1
)
* @method ResultInterface deferOrderCount(int $storeId,int $orderType,array $itemIds)
* @method ResultInterface deferAddShopsDailyStatistic(int $storeId,int $pId)
* @method ResultInterface deferGetShopStatistic(int $storeId)
* @method ResultInterface deferGetShopDailyStatistic(int $storeId,int $startDate,int $endDate)
*/
interface
OrderInterface
{
...
...
@@ -151,12 +152,13 @@ interface OrderInterface
/**
* 批量查询子订单信息
*
*
* @param integer $storeId
* @param array $subIds
* @param array $ids
* @param integer $arg 1-$ids为子订单ID数组,2-$ids为主订单ID数组
* @return array
*/
public
function
getSubOrderListBySubIds
(
int
$storeId
,
array
$
subIds
);
public
function
getSubOrderListBySubIds
(
int
$storeId
,
array
$
ids
,
int
$arg
=
1
);
/**
* 商品、活动成交量统计
...
...
@@ -184,4 +186,15 @@ interface OrderInterface
* @return array
*/
public
function
getShopStatistic
(
int
$storeId
);
/**
* 指定时间(段)查询店铺交易统计
*
*
* @param integer $storeId
* @param integer $startDate
* @param integer $endDate
* @return array
*/
public
function
getShopDailyStatistic
(
int
$storeId
,
int
$startDate
,
int
$endDate
);
}
\ No newline at end of file
src/Reservation/Lib/ReservationInterface.php
View file @
2f781d4d
...
...
@@ -19,6 +19,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetReservById(int $storeId, int $id)
* @method ResultInterface deferIsReserved(int $storeId, int $cmanId, int $reservTime)
* @method ResultInterface deferGetReservListByOrderId(int $storeId, int $orderId, $state = null)
* @method ResultInterface deferGetReservListByOrderIds(int $storeId, array $orderIds, $state = null)
* @method ResultInterface deferModifyReservById(int $storeId, int $id, array $data)
* @method ResultInterface defermarkReservFinished(int $storeId, int $orderId)
* @method ResultInterface deferAddReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type)
...
...
@@ -58,6 +59,17 @@ interface ReservationInterface
public
function
getReservListByOrderId
(
int
$storeId
,
int
$orderId
,
$state
=
null
);
/**
* 根据订单id列表,获取对应的预约列表
*
* @param integer $storeId
* @param integer $orderIds
* @param integer $state
* @Number(name="state")
* @return array
*/
public
function
getReservListByOrderIds
(
int
$storeId
,
array
$orderIds
,
$state
=
null
);
/**
* 修改某个预约信息
*
* @param integer $storeId,
...
...
src/Seller/Lib/SellerInterface.php
View file @
2f781d4d
...
...
@@ -11,7 +11,7 @@ namespace Hdll\Services\Seller\Lib;
use
Swoft\Core\ResultInterface
;
/**
* @method ResultInterface deferSave($referId, $unionId, $openId, $nickName, $headImgUrl)
* @method ResultInterface deferSave($referId, $unionId, $openId, $nickName, $headImgUrl
, $gender = 2
)
* @method ResultInterface deferGet($id, $fields = ['*'])
* @method ResultInterface deferGetByUnionId($unionId, $fields = ['*'])
* @method ResultInterface deferGetByStoreId($storeId, $fields = ['*'])
...
...
@@ -31,17 +31,16 @@ interface SellerInterface
{
/**
* @param $referId
* @param $unionId
* @param $openId
* @param $nickName
* @param $headImgUrl
* @param string $realName
* @param string $phoneNumber
* @param $referId
* @param $unionId
* @param $openId
* @param $nickName
* @param $headImgUrl
* @param int $gender
* @return mixed
* @author
Administrator
* @author
work
*/
public
function
save
(
$referId
,
$unionId
,
$openId
,
$nickName
,
$headImgUrl
);
public
function
save
(
$referId
,
$unionId
,
$openId
,
$nickName
,
$headImgUrl
,
$gender
=
2
);
/**
* @param $id
...
...
src/SellerDistribution/Lib/SellerDistributionInterface.php
View file @
2f781d4d
...
...
@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferRefundAddBalance($sellerId, $money, $orderSn = '')
* @method ResultInterface deferCountVip($storeId, $sellerId)
* @method ResultInterface deferSumViewMoneyByStoreIds(array $storeIds)
* @method ResultInterface deferSumBillMoney()
* Interface SellerDistributionInterface
* @package App\Lib
*/
...
...
@@ -126,5 +127,10 @@ interface SellerDistributionInterface
*/
public
function
sumViewMoneyByStoreIds
(
array
$storeIds
);
/**
* vip分销佣金总金额
* @return mixed
* @author work
*/
public
function
sumBillMoney
();
}
\ No newline at end of file
src/Wx3rd/Lib/EntrustedInterface.php
View file @
2f781d4d
...
...
@@ -16,6 +16,8 @@ use Swoft\Core\ResultInterface;
* The interface of store service
*
* @method ResultInterface deferGetEntrustedData(int $storeId, array $fields = [])
* @method ResultInterface deferGetEntrustedDataByMchid(int $mchid, array $fields = [])
* @method ResultInterface deferGetWxpayCerts(int $storeId, $mchid)
*/
interface
EntrustedInterface
{
...
...
@@ -28,4 +30,22 @@ interface EntrustedInterface
*/
public
function
getEntrustedData
(
int
$storeId
,
array
$fields
=
[]);
/**
* 根据店铺id和商户平台id获取对应的支付证书
*
* @param int $storeId
* @param string $mchid
* @return array
*/
public
function
getWxpayCerts
(
int
$storeId
,
$mchid
);
/**
* 根据商户平台id获取对应的小程序托管配置
*
* @param int $storeId
* @param array $fields 字段列表
* @return bool
*/
public
function
getEntrustedDataByMchid
(
int
$mchid
,
array
$fields
=
[]);
}
\ 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