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
1b5bba32
Commit
1b5bba32
authored
Jun 17, 2020
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5f10ef73
bc6168f7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
6 deletions
+64
-6
src/Common/Entity/User.php
+10
-0
src/Common/Lib/Xcrypt.php
+6
-3
src/Order/Lib/OrderInterface.php
+31
-0
src/Recharge/Lib/RechargeInterface.php
+15
-1
src/V2/Common/Config/CfgCenter.php
+2
-2
No files found.
src/Common/Entity/User.php
View file @
1b5bba32
...
...
@@ -140,6 +140,11 @@ class User
$this
->
setValue
(
'subStoreId'
,
$value
);
}
public
function
setRgId
(
$value
)
{
return
$this
->
setValue
(
'rgId'
,
$value
);
}
public
function
getSubStoreId
()
{
return
$this
->
getValue
(
'subStoreId'
)
??
0
;
...
...
@@ -193,6 +198,11 @@ class User
return
$this
->
getValue
(
'scope'
);
}
public
function
getRgId
()
{
return
$this
->
getValue
(
'rgId'
);
}
/**
* 是否是通过托管的小程序授权
*
...
...
src/Common/Lib/Xcrypt.php
View file @
1b5bba32
...
...
@@ -2,8 +2,7 @@
namespace
Hdll\Services\Common\Lib
;
use
Hdll\Services\Common\Config\CfgCenter
;
use
Swoft\App
;
use
Swoft\Redis\Redis
;
use
Hdll\Services\V2\Common\Config\CfgCenter
as
CfgCenter2
;
class
Xcrypt
{
...
...
@@ -39,7 +38,11 @@ class Xcrypt
}
private
static
function
getKey
(){
$key
=
CfgCenter
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
if
(
class_exists
(
'\Swoft\App'
))
{
$key
=
CfgCenter
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
}
else
{
$key
=
CfgCenter2
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
}
if
(
empty
(
$key
)){
throw
new
\Exception
(
'加密密钥获取失败!'
);
}
...
...
src/Order/Lib/OrderInterface.php
View file @
1b5bba32
...
...
@@ -33,6 +33,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferOrderCountByCondition(int $storeId,array $condition)
* @method ResultInterface deferBuyerSpendAmount(int $storeId,int $buyerId)
* @method ResultInterface deferBanchGetShopStByDate(array $storeIds,int $date)
* @method ResultInterface deferGetReceiverLog($storeId, $tradeSn)
* @method ResultInterface deferPostagePaySuccess(int $storeId, array $payData)
*/
interface
OrderInterface
{
...
...
@@ -245,4 +247,32 @@ interface OrderInterface
* ]
*/
public
function
banchGetShopStByDate
(
array
$storeIds
,
int
$date
);
/**
* 查询订单收货人修改记录
* @param int $storeId
* @param string $tradeSn
* @return array
*/
public
function
getReceiverLog
(
$storeId
,
$tradeSn
);
/**
* 运费补差价支付成功回调
*
* @param int $storeId
* @param array $payData
* @return void
*/
public
function
postagePaySuccess
(
int
$storeId
,
array
$payData
);
/**
* 根据订单id获取概括汇总的标题
* 示例:时尚新品板鞋...等3件商品
* @param int $storeId
* @param array $subOrderIds
* @param array $mainOrderIds 可以不传
* @return array
*/
public
function
getSummaryTitles
(
int
$storeId
,
array
$subOrderIds
,
array
$mainOrderIds
=
[]);
}
\ No newline at end of file
src/Recharge/Lib/RechargeInterface.php
View file @
1b5bba32
...
...
@@ -54,9 +54,10 @@ interface RechargeInterface
* ],
* ]
* @param int $parentOrderId // 主订单id
* @param int $extraFee 额外的费用,比如运费等
* @return mixed
*/
public
function
spendCardMoney
(
int
$storeId
,
int
$buyerId
,
array
$subOrders
,
int
$parentOrderId
);
public
function
spendCardMoney
(
int
$storeId
,
int
$buyerId
,
array
$subOrders
,
int
$parentOrderId
,
int
$extraFee
=
0
);
/**
* 退回储值卡金额
...
...
@@ -71,6 +72,19 @@ interface RechargeInterface
public
function
ReturnCardMoney
(
int
$storeId
,
int
$buyerId
,
int
$itemOrderId
,
string
$itemTitle
,
int
$payMoney
,
int
$parentOrderId
);
/**
* 储值卡指定金额退款
* @param $storeId
* @param $buyerId
* @param $amount // 退还金额
* @param $refundTitle // 退款标题
* @param $parentOrderId // 主订单
* @param $subOrderId // 子订单
* @return bool
* @throws
*/
public
function
refundAmount
(
int
$storeId
,
int
$buyerId
,
int
$amount
,
$refundTitle
,
$parentOrderId
=
0
,
$subOrderId
=
0
);
/**
* 统计储值卡上架数/总数
* @param int $storeId
* @return mixed
...
...
src/V2/Common/Config/CfgCenter.php
View file @
1b5bba32
...
...
@@ -212,9 +212,9 @@ class CfgCenter
if
(
$valArr
)
{
//有内容时进行redis缓存
if
(
is_array
(
$valArr
))
{
$valArr
[
'oemId'
]
=
$oemId
;
//需要将oemId加入配置返回
Redis
::
set
(
$prefix
.
$keyName
,
json_encode
(
$valArr
),
360
0
);
Redis
::
set
(
$prefix
.
$keyName
,
json_encode
(
$valArr
),
6
0
);
}
else
{
Redis
::
set
(
$prefix
.
$keyName
,
$valArr
,
360
0
);
Redis
::
set
(
$prefix
.
$keyName
,
$valArr
,
6
0
);
}
}
return
$valArr
;
...
...
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