Commit 1b5bba32 by xmy

Merge remote-tracking branch 'origin/master'

parents 5f10ef73 bc6168f7
......@@ -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');
}
/**
* 是否是通过托管的小程序授权
*
......
......@@ -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('加密密钥获取失败!');
}
......
......@@ -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
......@@ -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
......
......@@ -212,9 +212,9 @@ class CfgCenter
if ($valArr) { //有内容时进行redis缓存
if (is_array($valArr)) {
$valArr['oemId'] = $oemId; //需要将oemId加入配置返回
Redis::set($prefix . $keyName, json_encode($valArr), 3600);
Redis::set($prefix . $keyName, json_encode($valArr), 60);
} else {
Redis::set($prefix . $keyName, $valArr, 3600);
Redis::set($prefix . $keyName, $valArr, 60);
}
}
return $valArr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment