Commit ac6732cf by 王召彬

Merge branch 'master' of http://git.dev.2b3.cn/tencent/services into test

parents 9dcfba03 c94a6a7e
# 1.0.53
- vip试用类型
# 1.0.52
- 添加储值卡的回款接口
# 1.0.51
- 添加储值卡的接口
# 1.0.50
- 添加获取主门店信息的接口
# 1.0.49
- 添加配置读取类
# 1.0.48
......
<?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\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean;
use Swoft\Bean\Annotation\Value;
use Swoft\Pool\PoolProperties;
/**
* the config of service user
*
* @Bean()
*/
class RechargePoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_RECHARGE_URI', 'recharge:8099'));
}
/**
* the name of pool
*
*/
protected $name = 'recharge';
/**
* Minimum active number of connections
*
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
*/
protected $maxActive = 300;
/**
* the maximum number of wait connections
*
*/
protected $maxWait = 400;
/**
* Maximum waiting time
*
*/
protected $maxWaitTime = 3;
/**
* Maximum idle time
*
*/
protected $maxIdleTime = 60;
/**
* the time of connect timeout
*
*/
protected $timeout = 200;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
*/
protected $uri = [
"192.168.3.100:8102",
];
/**
* whether to user provider(consul/etcd/zookeeper)
*
*/
protected $useProvider = false;
/**
* the default balancer is random balancer
*
*/
protected $balancer = '';
/**
* the default provider is consul provider
*
*/
protected $provider = '';
}
......@@ -6,6 +6,7 @@ class PayOriginEnum
const BUYER_MINI_PROGRAM = 1;//买家小程序
const SELLER_MINI_PROGRAM = 2;//卖家小程序
const SELLER_MP = 3;//卖家公众号
const CARD = 4;//储值卡支付
}
\ No newline at end of file
......@@ -9,7 +9,8 @@ namespace Hdll\Services\Order\Enum;
class SellerOrderEnum
{
const TYPE_VALUE_ADDED_SERVICE = 1; //增值服务
const TYPE_VALUE_ADDED_SERVICE = 1; //vip
const TYPE_VALUE_TRY_VIP = 2; //使用vip
//订单状态
......
<?php
/**
* Created by PhpStorm.
* User: mac
* Date: 2019-01-10
* Time: 09:58
*/
namespace Hdll\Services\Recharge\Enum;
class BuyCardPayStatus{
//订单状态
const STATUS_NORMAL = 10; //待支付
//paystatus
const HAVE_PAY =2;
const PAY_EXCEPTION = 3;
const PAY_REFUND = 4; // 退款
}
\ No newline at end of file
<?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\Recharge\Lib;
use Hdll\Services\Recharge\Enum\BuyCardPayStatus;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferpayStatus(string $storeId,int $bargainbranchId,int $status,int $orderId)
* @method ResultInterface deferspendCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
* @method ResultInterface deferReturnCardMoney( int $storeId,int $buyerId,int $itemOrderId,string $itemTitle,int $payMoney)
*/
interface RechargeInterface
{
/**
* 微信支付 状态 回馈接口
* @param string $storeId //
* @param int $itemId // 项目ID $localorderId
* @param int $status // BuyCardPayStatus::HAVE_PAY 成功支付 BuyCardPayStatus::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @return mixed
*/
public function payStatus(
string $storeId,
int $itemId,
int $status , //
int $orderId);
/**
* 花费卡金额
* @param int $storeId
* @param int $buyerId
* @param int $goodOrderId
* @return mixed
*/
public function spendCardMoney(
int $storeId,
int $buyerId,
int $itemOrderId,
string $itemTitle,
int $payMoney
);
/**
* 退回储值卡金额
* @param int $storeId
* @param int $buyerId
* @param int $itemOrderId
* @param string $itemTitle
* @param int $payMoney
* @return mixed
*/
public function ReturnCardMoney(
int $storeId,
int $buyerId,
int $itemOrderId,
string $itemTitle,
int $payMoney
);
}
\ No newline at end of file
......@@ -27,6 +27,7 @@ interface CommsettingInterface
* @return array
* 返回内容说明:
* ['state'] => 分销佣金规则是否启用,0不启用,1启用
* ['rechargeState'] => 储值卡代理是否启用,0不启用,1启用
* ['rule'] => 分销佣金规则具体设置内容,json格式: {"1":35,"2":14.5}
* ['minWithdraw'] => 最小提现金额,单位分
* ['memo'] => 规则备注说明
......
......@@ -7,7 +7,8 @@
*/
namespace Hdll\Services\Vip\Enum;
class VipEnum{
class VipEnum
{
const VIP_TOTAL_FEE = 69800;//价格
......@@ -20,4 +21,8 @@ class VipEnum{
const STATUS_PAID = 20;//已支付
const VIP_QUEUE_KEY = 'vip:queue';
const VIP_TYPE_NORMAL = "1"; //普通
const VIP_TYPE_TRY = "2";//试用
}
\ No newline at end of file
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