Commit 87e4ffdd by 王洁

解决冲突

parents ddc8edb3 6279bcb8
# 2.0.14
- Cls记日志忽略‘验证器不存在’的日志
# 2.0.13
- ClsLog延迟时判断协程模式
# 2.0.12
- 配合前端改版后端大调整
# 2.0.11 # 2.0.11
- 砍价订单枚举状态加订单删除 - 砍价订单枚举状态加订单删除
- 关闭拼团活动状态 - 关闭拼团活动状态
......
<?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\Album\Lib;
use Swoft\Core\ResultInterface;
/**
* album servcie
* @method ResultInterface deferGetAlbumNumByCmid(int $storeId,int $cmId)
*/
interface AlbumInterface
{
/**
* 查询店员相册个数
*
* @param integer $storeId
* @param integer $cmId
* @return int
*/
public function getAlbumNumByCmid(int $storeId,int $cmId);
}
\ No newline at end of file
...@@ -12,7 +12,7 @@ namespace Hdll\Services\Buyer\Lib; ...@@ -12,7 +12,7 @@ namespace Hdll\Services\Buyer\Lib;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
* @method ResultInterface deferSaveBill(string $token,int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money) * @method ResultInterface deferSaveBill(int $order_id,int $buyer_id,int $store_id,string $order_sn,int $money,string $orderName,int $orderType)
* @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId) * @method ResultInterface deferGetListByOrderId(int $storeId, int $orderId)
* Interface AgencyInterface * Interface AgencyInterface
* @package App\Lib * @package App\Lib
...@@ -26,6 +26,8 @@ interface BillInterface{ ...@@ -26,6 +26,8 @@ interface BillInterface{
* @param int $storeId // 店铺id * @param int $storeId // 店铺id
* @param string $orderSn //订单号 * @param string $orderSn //订单号
* @param int $money //订单金额 * @param int $money //订单金额
* @param string $orderName //订单名称
* @param int $orderType //订单类型
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
...@@ -34,7 +36,9 @@ interface BillInterface{ ...@@ -34,7 +36,9 @@ interface BillInterface{
int $buyerId, int $buyerId,
int $storeId, int $storeId,
string $orderSn, string $orderSn,
int $money int $money,
string $orderName,
int $orderType
); );
public function getListByOrderId(int $storeId, int $orderId); public function getListByOrderId(int $storeId, int $orderId);
......
...@@ -63,7 +63,11 @@ class ClsLog ...@@ -63,7 +63,11 @@ class ClsLog
if($res->getResponse()->getStatusCode() == 200) { if($res->getResponse()->getStatusCode() == 200) {
return true; return true;
} }
Coroutine::sleep(1); if (App::isCoContext()) {
Coroutine::sleep(2);
} else {
sleep(2);
}
} }
$msg = '上传腾讯云日志服务失败:'.$res->getResult(); $msg = '上传腾讯云日志服务失败:'.$res->getResult();
self::writeClsErrors($msg); self::writeClsErrors($msg);
......
...@@ -38,8 +38,15 @@ class LogHandler extends AbstractProcessingHandler ...@@ -38,8 +38,15 @@ class LogHandler extends AbstractProcessingHandler
} }
$lines = array_column($records, 'formatted'); $lines = array_column($records, 'formatted');
foreach($lines as $k => $v) {
if(strpos($v, '验证器不存在') !== false) {
unset($lines[$k]);
}
}
if($lines) {
$this->write($lines); $this->write($lines);
} }
}
/** /**
* 输出到腾讯云CLS * 输出到腾讯云CLS
......
...@@ -7,7 +7,7 @@ class CfgCenter ...@@ -7,7 +7,7 @@ class CfgCenter
{ {
/** /**
* 读取指定的配置项 * 读取指定的配置项 - 返回对象格式
* (所有配置项,需预先添加到数据库中) * (所有配置项,需预先添加到数据库中)
* 方法一: * 方法一:
* $value = CfgCenter::get('qCloud>Weapp>Region'); * $value = CfgCenter::get('qCloud>Weapp>Region');
...@@ -17,9 +17,45 @@ class CfgCenter ...@@ -17,9 +17,45 @@ class CfgCenter
* var_dump($cfgdata->Weapp->Region); // 输出:ap-shanghai * var_dump($cfgdata->Weapp->Region); // 输出:ap-shanghai
* *
* @param string $keyStr * @param string $keyStr
* @param string $default 默认返回值
* @return mixed * @return mixed
*/ */
public static function get($keyStr) public static function get($keyStr, $default='')
{
$data = self::_get($keyStr);
if($data == '') {
return $default;
}
return $data;
}
/**
* 读取指定的配置项 - 返回数组格式
* (所有配置项,需预先添加到数据库中)
* 方法一:
* $value = CfgCenter::get('qCloud>Weapp>Region');
* var_dump($value); // 输出:ap-shanghai
* 方法二:
* $cfgdata = CfgCenter::get('qCloud');
* var_dump($cfgdata['Weapp']['Region']); // 输出:ap-shanghai
*
* @param string $keyStr
* @param string $default 默认返回值
* @return mixed
*/
public static function getArray($keyStr, $default='')
{
$data = self::_get($keyStr);
if($data == '') {
return $default;
}
if(is_object($data)) {
return json_decode(json_encode($data), true);
}
return $data;
}
private static function _get($keyStr)
{ {
$keyArr = self::parseKeyStr($keyStr); $keyArr = self::parseKeyStr($keyStr);
$rkey = implode(":", $keyArr); $rkey = implode(":", $keyArr);
...@@ -50,7 +86,6 @@ class CfgCenter ...@@ -50,7 +86,6 @@ class CfgCenter
$name = array_shift($keyArr); $name = array_shift($keyArr);
$dbConn = self::dbConnect(); $dbConn = self::dbConnect();
$result = $dbConn->select("config", ['name','value'], ['name'=>$name]); $result = $dbConn->select("config", ['name','value'], ['name'=>$name]);
// $dbConn->action(function($dbConn){});
if(!isset($result[0]['value'])) { if(!isset($result[0]['value'])) {
return; return;
} }
......
<?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\Pool\PoolProperties;
/**
* the config of service album
*
* @Bean()
*/
class AlbumPoolConfig extends PoolProperties
{
public function __construct()
{
$this->uri=explode(',',env('RPC_ALBUM_URI','album:8099'));
}
protected $name = 'album';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 300;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 400;
/**
* Maximum waiting time
*
* @var int
*/
protected $maxWaitTime = 3;
/**
* Maximum idle time
*
* @var int
*/
protected $maxIdleTime = 60;
/**
* the time of connect timeout
*
* @var int
*/
protected $timeout = 200;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
* @var array
*/
protected $uri = [];
/**
* whether to user provider(consul/etcd/zookeeper)
*
* @var bool
*/
protected $useProvider = false;
/**
* the default balancer is random balancer
*
* @var string
*/
protected $balancer = '';
/**
* the default provider is consul provider
*
* @var string
*/
protected $provider = '';
}
...@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface; ...@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetCraftsmenByUnionId(string $unionId) * @method ResultInterface deferGetCraftsmenByUnionId(string $unionId)
* @method ResultInterface deferGetCraftsmenById(int $storeId, int $cmanId) * @method ResultInterface deferGetCraftsmenById(int $storeId, int $cmanId)
* @method ResultInterface deferGetCraftsmenByIds(int $storeId, array $cmanIds) * @method ResultInterface deferGetCraftsmenByIds(int $storeId, array $cmanIds)
* @method ResultInterface deferSyncItems(int $storeId, array $itemIds, int $mode)
*/ */
interface CraftsmanInterface interface CraftsmanInterface
{ {
...@@ -74,4 +75,14 @@ interface CraftsmanInterface ...@@ -74,4 +75,14 @@ interface CraftsmanInterface
*/ */
public function getCraftsmenByIds(int $storeId, array $cmanIds); public function getCraftsmenByIds(int $storeId, array $cmanIds);
/**
* 提供给商品服务,用来同步店员所属的商品
*
* @param integer $storeId
* @param array $itemIds
* @param integer $mode 取值:1 表示新增,2 表示去除
* @return boolen
*/
public function syncItems(int $storeId, array $itemIds, int $mode);
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
namespace Hdll\Services\Goods\Lib; namespace Hdll\Services\Goods\Lib;
use App\Exception\ServiceException;
use Swoft\Core\ResultInterface; use Swoft\Core\ResultInterface;
/** /**
...@@ -25,6 +26,8 @@ use Swoft\Core\ResultInterface; ...@@ -25,6 +26,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferAdminCountActivity($storeId) * @method ResultInterface deferAdminCountActivity($storeId)
* @method ResultInterface deferGetTopThreeSales($storeId) * @method ResultInterface deferGetTopThreeSales($storeId)
* @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds) * @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds)
* @method ResultInterface deferCountEvaluate($storeId, $time)
* @method ResultInterface deferFind($storeId, $id)
* Interface GoodsInterface * Interface GoodsInterface
* @package Hdll\Services\Goods\Lib * @package Hdll\Services\Goods\Lib
*/ */
...@@ -34,6 +37,7 @@ interface GoodsInterface ...@@ -34,6 +37,7 @@ interface GoodsInterface
/** /**
* 获取商品 * 获取商品
* @param $storeId * @param $storeId
* @param $id
* @return [ * @return [
* 'gcId' 商品类ID * 'gcId' 商品类ID
* 'asId' 服务ID * 'asId' 服务ID
...@@ -46,7 +50,6 @@ interface GoodsInterface ...@@ -46,7 +50,6 @@ interface GoodsInterface
* 'originalPrice' 原价 * 'originalPrice' 原价
* 'sales' 销量 * 'sales' 销量
* ] * ]
* @param $id
* @return mixed * @return mixed
* @author Administrator * @author Administrator
*/ */
...@@ -175,4 +178,12 @@ interface GoodsInterface ...@@ -175,4 +178,12 @@ interface GoodsInterface
* @author work * @author work
*/ */
public function getReturnVisitByGoodsIds($storeId, $goodsIds); public function getReturnVisitByGoodsIds($storeId, $goodsIds);
/**
* 获取商品(包括已删除)
* @param $storeId
* @param $id
* @return array|mixed
*/
public function find($storeId, $id);
} }
...@@ -28,9 +28,10 @@ class OrderEnum ...@@ -28,9 +28,10 @@ class OrderEnum
const TYPE_GOODS = 0; //商品订单 const TYPE_GOODS = 0; //商品订单
const TYPE_CUT_PRICE = 1; //砍价订单 const TYPE_CUT_PRICE = 1; //砍价订单
const TYPE_LIMIT = 2; //限时购订单 const TYPE_LIMIT = 2; //限时购订单
const TYPE_COLLECTION = 3; //拼团 const TYPE_COLLECTION = 3; //拼团订单
const TYPE_CARD = 4; //储值卡购买订单 const TYPE_CARD = 4; //储值卡订单
const TYPE_TIMESCARD = 5; //次卡 const TYPE_TIMESCARD = 5; //次卡订单
const TYPE_DEPOSIT = 6;//定金订单
......
...@@ -30,6 +30,8 @@ use Swoft\Core\ResultInterface; ...@@ -30,6 +30,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetShopStatistic(int $storeId) * @method ResultInterface deferGetShopStatistic(int $storeId)
* @method ResultInterface deferGetShopDailyStatistic(int $storeId,int $startDate,int $endDate) * @method ResultInterface deferGetShopDailyStatistic(int $storeId,int $startDate,int $endDate)
* @method ResultInterface deferGetShopNewOrderNum(int $storeId) * @method ResultInterface deferGetShopNewOrderNum(int $storeId)
* @method ResultInterface deferOrderCountByCondition(int $storeId,array $condition)
* @method ResultInterface deferBuyerSpendAmount(int $storeId,int $buyerId)
*/ */
interface OrderInterface interface OrderInterface
{ {
...@@ -205,4 +207,22 @@ interface OrderInterface ...@@ -205,4 +207,22 @@ interface OrderInterface
* @return int * @return int
*/ */
public function getShopNewOrderNum(int $storeId); public function getShopNewOrderNum(int $storeId);
/**
* 根据条件查询店铺订单数量(子订单数量)
*
* @param integer $storeId
* @param array $condition
* @return int
*/
public function orderCountByCondition(int $storeId,array $condition);
/**
* 获取用户微信总消费金额
*
* @param integer $storeId
* @param integer $buyerId
* @return int
*/
public function buyerSpendAmount(int $storeId,int $buyerId);
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: mac
* Date: 2019-01-10
* Time: 09:58
*/
namespace Hdll\Services\Recharge\Enum;
class RechargeCmq{
const TOPIC = 'recharge';
const PAY_STATUS = 'payStatus'; // 购买储值卡状态修改回调
}
\ No newline at end of file
...@@ -24,6 +24,7 @@ use Swoft\Core\ResultInterface; ...@@ -24,6 +24,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface defermarkReservFinished(int $storeId, int $orderId) * @method ResultInterface defermarkReservFinished(int $storeId, int $orderId)
* @method ResultInterface deferAddReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type) * @method ResultInterface deferAddReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type)
* @method ResultInterface deferCancelReservByOrderId(int $storeId, int $orderId, string $memo) * @method ResultInterface deferCancelReservByOrderId(int $storeId, int $orderId, string $memo)
* @method ResultInterface deferGetReservListByCmanId(int $storeId, int $cmanId, $state = null)
*/ */
interface ReservationInterface interface ReservationInterface
{ {
...@@ -117,4 +118,15 @@ interface ReservationInterface ...@@ -117,4 +118,15 @@ interface ReservationInterface
*/ */
public function cancelReservByOrderId(int $storeId, int $orderId, string $memo = ''); public function cancelReservByOrderId(int $storeId, int $orderId, string $memo = '');
/**
* 根据店员id,获取对应的预约列表
*
* @param integer $storeId
* @param integer $cmanId
* @param integer $state 0:预约未标记完成,1:预约已确定完成
* @Number(name="state")
* @return array
*/
public function getReservListByCmanId(int $storeId, int $cmanId, $state = null);
} }
\ No newline at end of file
...@@ -11,5 +11,5 @@ namespace Hdll\Services\SellerDistribution\Enum; ...@@ -11,5 +11,5 @@ namespace Hdll\Services\SellerDistribution\Enum;
class SellerDistributionEnum class SellerDistributionEnum
{ {
const SETTING = [1 => 0.4, 2 => 0.25]; const SETTING = [1 => 0.2, 2 => 0.1];
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: mac
* Date: 2019-01-10
* Time: 09:58
*/
namespace Hdll\Services\TimesCard\Enum;
class TimesCardCmq{
const TOPIC = 'timescard';
const PAY_STATUS = 'payStatus'; // 购买次卡状态修改回调
}
\ 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