Commit d18861f1 by xmy

Merge remote-tracking branch 'origin/master'

parents 21484a8c e52f8aa6
# 1.0.10
- 买家服务:增加获取上级信息接口
# 1.0.9
- 添加访客统计的RPC接口
# 1.0.8
- 分表逻辑判断处理
# 1.0.7
- 增加发送验证码服务
# 1.0.6
- 新增VIP服务 获取卖家下级VIP数量
# 1.0.5
- 新增版本更新日志文件
# 1.0.4
- 新加根据卖家ID列表 批量获取店铺列表的RPC接口
# 1.0.3
- 修改数据库公共实体,调整getTableName方法
...@@ -22,7 +22,7 @@ use Swoft\Core\ResultInterface; ...@@ -22,7 +22,7 @@ use Swoft\Core\ResultInterface;
interface AccountInterface interface AccountInterface
{ {
/** /**
* 流水增加 * 流水增加收入
* @param $storeId * @param $storeId
* @param $money * @param $money
* @param $ordirId * @param $ordirId
...@@ -30,8 +30,18 @@ interface AccountInterface ...@@ -30,8 +30,18 @@ interface AccountInterface
*/ */
public function Income($storeId, $money, $ordirId); public function Income($storeId, $money, $ordirId);
/**
* 流水收入退款
* @param $storeId
* @param $money
* @param $orderId
* @return mixed
*/
public function IncomeRefund($storeId, $money, $orderId);
/** /**
* 流水减少 * 流水支出
* @param $storeId * @param $storeId
* @param $money * @param $money
* @param $ordirId * @param $ordirId
......
...@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface; ...@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetUser(string $token) * @method ResultInterface deferGetUser(string $token)
* @method ResultInterface deferUpdateProfile(string $token, array $data) * @method ResultInterface deferUpdateProfile(string $token, array $data)
* @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*']) * @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*'])
* @method ResultInterface deferGetRefereeInfo($storeId,$buyerId)
* Interface BuyerInterface * Interface BuyerInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -80,4 +81,13 @@ interface BuyerInterface ...@@ -80,4 +81,13 @@ interface BuyerInterface
public function hasUser($storeId,$unionid); public function hasUser($storeId,$unionid);
public function selectUser(int $storeId, array $buyerIds, array $fields= ['*']); public function selectUser(int $storeId, array $buyerIds, array $fields= ['*']);
/**
* 根据买家id获取其上级信息
*
* @param $storeId
* @param $buyerId
* @return mixed
*/
public function getRefereeInfo($storeId,$buyerId);
} }
\ No newline at end of file
...@@ -103,13 +103,40 @@ class CommonEntity extends Model ...@@ -103,13 +103,40 @@ class CommonEntity extends Model
$dbNum = self::getDbNum(); $dbNum = self::getDbNum();
$tableName = self::getTableName($commentString).'_'.$dbNum; $tableName = self::getTableName($commentString).'_'.$dbNum;
//self::setTableName($tableName); //self::setTableName($tableName);
} else {
$tableName = self::getTableName($commentString);
}
$newTableName = self::newTableName();
if ( $tableName != $newTableName ) { //校验新的分表规则
App::error("[新分表异常][对比失败]oldFunction".$tableName.'new function'.$newTableName);
var_dump("[新分表异常][对比失败]oldFunction".$tableName.'new function'.$newTableName);
}
return $tableName; return $tableName;
} else {
return self::getTableName();
} }
private static function newTableName()
{
if ( empty(RequestContext::getContextData()) ) {//初始化不做处理
return;
}
$entityCollector = EntityCollector::getCollector();
$splitCollector = SplitCollector::getCollector();//分表搜集器
$className = static::class;
$tableName = $entityCollector[$className]['table']['name'];
if ( isset($splitCollector[$className]) ) { //分表
$dbNum = (new Split())->getDbNum($className);
$tableName = $tableName.'_'.$dbNum;
}
return $tableName;
} }
/** /**
......
...@@ -58,7 +58,7 @@ class Split ...@@ -58,7 +58,7 @@ class Split
return $tableName; return $tableName;
} }
private function getDbNum($className) public function getDbNum($className)
{ {
$splitCollector = SplitCollector::getCollector(); $splitCollector = SplitCollector::getCollector();
$splitNum = $splitCollector[$className]['num']; $splitNum = $splitCollector[$className]['num'];
......
...@@ -32,4 +32,6 @@ interface ProfileInterface ...@@ -32,4 +32,6 @@ interface ProfileInterface
*/ */
public function AddOrder($storeId, $orderId, $goodsId, $goodsName, $orderPrice, $orderType, $orderTime, $consigneeName, $consigneePhone, $buyerId,$activityName); public function AddOrder($storeId, $orderId, $goodsId, $goodsName, $orderPrice, $orderType, $orderTime, $consigneeName, $consigneePhone, $buyerId,$activityName);
} }
\ No newline at end of file
...@@ -17,4 +17,9 @@ class GroupBookingEnum ...@@ -17,4 +17,9 @@ class GroupBookingEnum
const ONLINE = 1;//上线 const ONLINE = 1;//上线
const DOWNLINE = 2;//下线 const DOWNLINE = 2;//下线
const QUEUE_ORDER_KEY = 'groupBooking:order';
const QUEUE_LOCK_KEY = 'groupBooking:lock:';
const QUEUE_LISTEN = 'groupBookingListener';
} }
\ No newline at end of file
...@@ -20,9 +20,10 @@ class WxMiniNotice ...@@ -20,9 +20,10 @@ class WxMiniNotice
* @param array $param * @param array $param
* @return string * @return string
*/ */
public static function generatePage(string $page, array $param) public static function generatePage(string $page, array $param = [])
{ {
$param['origin'] = $param['origin']??'notice'; $param['origin'] = $param['origin']??'notice';
$param['isShare'] = 1;
$param = http_build_query($param); $param = http_build_query($param);
......
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/11/5
* Time: 16:26
*/
namespace Hdll\Services\Notice\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSendCode(string $phone, int $template, int $storeId, $validity=5,$num = 4, $sendTime=[]);
* @method ResultInterface deferCheckCode(int $code, string $phone, int $template)
*
* Interface CaptchaInterface
* @package Hdll\Services\Notice\Lib
*/
interface CaptchaInterface
{
/**
* @param string $phone 手机号
* @param int $template 模板id
* @param int $storeId 发送短信的id
* @param int $validity 过期时间单位:分钟
* @param int $num 验证码位数
* @param array $sendTime 定时发送时间即时发送为[],定时发送格式为:[timestamp]
* @return int 验证码code
*
*/
public function sendCode(string $phone, int $template, int $storeId, $validity=5,$num = 4, $sendTime=[]);
/**
* 验证验证码
* @param int $code 验证码
* @param string $phone 手机号
* @param int $template 模板id
* @return bool
*/
public function checkCode(int $code, string $phone, int $template);
}
\ No newline at end of file
...@@ -7,6 +7,15 @@ ...@@ -7,6 +7,15 @@
*/ */
namespace Hdll\Services\Order\Lib; namespace Hdll\Services\Order\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSellerCreateOrder(int $sellerId,int $storeId,int $itemId,int $selectedNum,int $orderType,float $total,float $goodsPrice,string $goodsName)
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn)
* @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo)
* Interface SellerOrderInterface
* @package Hdll\Services\Order\Lib
*/
interface SellerOrderInterface interface SellerOrderInterface
{ {
public function sellerCreateOrder( public function sellerCreateOrder(
......
...@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface; ...@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferAddExpectFund($seller, $money) * @method ResultInterface deferAddExpectFund($seller, $money)
* @method ResultInterface deferReduceExpectFund($seller, $money) * @method ResultInterface deferReduceExpectFund($seller, $money)
* @method ResultInterface deferAddFund($seller, $money) * @method ResultInterface deferAddFund($seller, $money)
* @method ResultInterface deferAddActualCommissionFund($sellerId, $money)
* Interface SellerInterface * Interface SellerInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -103,4 +104,14 @@ interface SellerFundInterface ...@@ -103,4 +104,14 @@ interface SellerFundInterface
* @author Administrator * @author Administrator
*/ */
public function addFund($sellerId, $balanceFund, $commissionFund); public function addFund($sellerId, $balanceFund, $commissionFund);
/**
* 增加实付佣金
* @param $sellerId
* @param $money
* @return mixed
* @author Administrator
*/
public function addActualCommissionFund($sellerId, $money);
} }
\ No newline at end of file
...@@ -14,6 +14,9 @@ use Swoft\Core\ResultInterface; ...@@ -14,6 +14,9 @@ use Swoft\Core\ResultInterface;
* method ResultInterface deferAddBalance($sellerId, $money) * method ResultInterface deferAddBalance($sellerId, $money)
* method ResultInterface deferReduceBalance($sellerId, $money) * method ResultInterface deferReduceBalance($sellerId, $money)
* method ResultInterface deferListByOrderId($storeId, $orderId,$sellerId) * method ResultInterface deferListByOrderId($storeId, $orderId,$sellerId)
* method ResultInterface deferAddTotal($sellerId, $money)
* method ResultInterface deferRefundAddBalance($sellerId, $money)
* method ResultInterface deferCountVip($storeId, $sellerId)
* Interface SellerDistributionInterface * Interface SellerDistributionInterface
* @package App\Lib * @package App\Lib
*/ */
...@@ -81,4 +84,33 @@ interface SellerDistributionInterface{ ...@@ -81,4 +84,33 @@ interface SellerDistributionInterface{
* @author Administrator * @author Administrator
*/ */
public function updateBill($storeId,$id,$balanceState); public function updateBill($storeId,$id,$balanceState);
/**
* 增加累计提现
* @param $sellerId
* @param $money
* @return mixed
* @author Administrator
*/
public function addTotal($sellerId, $money);
/**
* 退款增加佣金(不增加累计金额)
* @param $sellerId
* @param $money
* @return mixed
* @author Administrator
*/
public function refundAddBalance($sellerId, $money);
/**
* 统计VIP数量
* @param $storeId
* @param $sellerId
* @return mixed
* @author Administrator
*/
public function countVip($storeId, $sellerId);
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ use Swoft\Core\ResultInterface; ...@@ -19,6 +19,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferIsNormal(int $storeId) * @method ResultInterface deferIsNormal(int $storeId)
* @method ResultInterface deferGetStoreByStoreId(int $storeId) * @method ResultInterface deferGetStoreByStoreId(int $storeId)
* @method ResultInterface deferGetStoreBySellerId(int $sellerId) * @method ResultInterface deferGetStoreBySellerId(int $sellerId)
* @method ResultInterface deferGetListBySellerIds(array $sellerIds)
* @method ResultInterface deferGetStoreByMobile(int $mobile, array $fields = []) * @method ResultInterface deferGetStoreByMobile(int $mobile, array $fields = [])
* @method ResultInterface deferUpdateStore(int $storeId, array $data) * @method ResultInterface deferUpdateStore(int $storeId, array $data)
* @method ResultInterface deferDeleteStore(int $storeId) * @method ResultInterface deferDeleteStore(int $storeId)
...@@ -59,6 +60,17 @@ interface StoreInterface ...@@ -59,6 +60,17 @@ interface StoreInterface
public function getStoreBySellerId(int $sellerId); public function getStoreBySellerId(int $sellerId);
/** /**
* 根据卖家ID列表获取店铺信息列表
*
* @param array $sellerIds
* @return array
* sellerName 卖家姓名
* mobile 注册手机号
* edition 是否VIP 2 表示是VIP
*/
public function getListBySellerIds(array $sellerIds);
/**
* 根据注册手机号获取店铺信息 * 根据注册手机号获取店铺信息
* *
* @param integer $mobile * @param integer $mobile
......
<?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 visitor-count service
*
* @method ResultInterface deferUpdateVisitorData(int $storeId, int $visitorId, array $data = [])
*/
interface VisitorCountInterface
{
/**
* 根据店铺id和访客id更新一条访客记录
* 如果已有记录,会替换更新,如果没有,会新建一条记录
*
* @param int $storeId
* @param int $visitorId
* @param array $data 此参数可选,不传表示只更新访问时间
* nickname 昵称
* headImgUrl 头像
* @return bool
*/
public function updateVisitorData(int $storeId, int $visitorId, array $data = []);
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/11/3
* Time: 15:36
*/
namespace Hdll\Services\Transfer\Enum;
class WxTransferEnum
{
const FRONTEND = 1;
const BACKEND = 2;
}
\ No newline at end of file
...@@ -13,10 +13,13 @@ use Swoft\Core\ResultInterface; ...@@ -13,10 +13,13 @@ use Swoft\Core\ResultInterface;
* 提现服务 * 提现服务
* *
* @method ResultInterface deferWithdraw($paySn, $openId, $realName, $amount, $type, $storeId, $withdrawId) * @method ResultInterface deferWithdraw($paySn, $openId, $realName, $amount, $type, $storeId, $withdrawId)
* @method ResultInterface deferStoreWithdraw($paySn, $openId, $realName, $amount, $type, $storeId, $withdrawId)
* Interface WithdrawInterface * Interface WithdrawInterface
* @package Hdll\Services\Transfor\Lib * @package Hdll\Services\Transfor\Lib
*/ */
interface WithdrawInterface interface WithdrawInterface
{ {
public function withdraw($paySn, $openId, $realName, $amount, $type, $storeId, $withdrawId); public function withdraw($paySn, $openId, $realName, $amount, $type, $storeId, $withdrawId);
public function storeWithdraw($paySn, $openId, $realName, $amount, $type, $storeId, $withdrawId);
} }
\ No newline at end of file
...@@ -18,4 +18,6 @@ class VipEnum{ ...@@ -18,4 +18,6 @@ class VipEnum{
const STATUS_UNPAID = 10;//未支付 const STATUS_UNPAID = 10;//未支付
const STATUS_PAID = 20;//已支付 const STATUS_PAID = 20;//已支付
const VIP_QUEUE_KEY = 'vip:queue';
} }
\ 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