Commit 2f781d4d by zhangsong

解决冲突

parents f0f81363 c8f8803d
# 2.0.11
- 砍价订单枚举状态加订单删除
# 2.0.10
- 根据商户平台id获取对应的小程序托管配置
# 2.0.9
- 修改wx3rd服务常量名错误
# 2.0.8
- 添加获取托管小程序支付证书的接口
# 2.0.7
- 商品后续服务
# 2.0.6
- 砍价、限时购 加 消息队列 upOrderStatus
<?php
namespace Hdll\Services\Bargain\Enum;
class BargainCmqEnum
{
const TOPIC = 'bargain';
const UP_ORDER_STATUS = 'upOrderStatus'; //更新订单状态
}
\ No newline at end of file
......@@ -21,6 +21,6 @@ class BargainEnum
const PAY_EXCEPTION = 3;
const PAY_REFUND = 4; // 退款
const PAY_CLOSE = 5; // 订单关闭
const ORDER_DELETED = 6; //订单删除
}
\ No newline at end of file
......@@ -5,6 +5,7 @@
* Date: 2018/9/18
* Time: 13:58
*/
namespace Hdll\Services\BuyerDistribution\Enum;
class DistributionEnum
......@@ -13,4 +14,6 @@ class DistributionEnum
const STATE_BALANCE_TRUE = 1; //已入账
const STATE_REFUND = 2; //已退款
}
\ No newline at end of file
......@@ -259,25 +259,32 @@ class Topic
$tryTimes = 0;
do {
try {
$res = $this->publish_message($cryptMessage, $vTagList, $routingKey);
if($res['code'] == 0) break;
} catch(\Throwable $e) {
App::error("[消息队列异常]:".var_export($e, true));
}
$tryTimes++;
} while ($res['code'] != 0 && $tryTimes < 3);
} while ($tryTimes < 3);
$status = 0;
if ($tryTimes >= 3) {
$status = 1;
App::error("[消息队列失败]:$message");
}
$this->TopicLog($message, $cryptMessage, $vTagList, $res);
$this->TopicLog($message, $cryptMessage, $vTagList, $res, $status);
return $res;
}
protected function TopicLog($message, $cryptMessage, $tagName, $response)
protected function TopicLog($message, $cryptMessage, $tagName, $response, $status=0)
{
$data = [
'tagName' => $tagName,
'topName' => $this->topic_name,
'message' => $message,
'cryptMessage' => $cryptMessage,
'status' => $status,
'createTime' => time(),
'response' => json_encode($response),
];
......
......@@ -80,6 +80,16 @@ class CfgCenter
'password' => 'Cfgsu#2390f*_',
'charset' => 'utf8'
]);
} elseif(\env('ENVIRONMENT', '') == 'pre') {
// 返回测试数据库连接
return new \Medoo\Medoo([
'database_type' => 'mysql',
'database_name' => 'config_center',
'server' => '192.168.3.201',
'username' => 'hdller',
'password' => 'Hdlltest999',
'charset' => 'utf8'
]);
} else {
// 返回测试数据库连接
return new \Medoo\Medoo([
......
......@@ -23,7 +23,7 @@ class Wx3rdPoolConfig extends PoolProperties
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_STORE_URI', 'wx3rd:8099'));
$this->uri = explode(',', env('RPC_WX3RD_URI', 'wx3rd:8099'));
}
protected $name = 'wx3rd';
......
......@@ -23,6 +23,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetSpecAttributeByGoodsId($goodsId, $storeId)
* @method ResultInterface deferAfterServiceTmp($storeId)
* @method ResultInterface deferAdminCountActivity($storeId)
* @method ResultInterface deferGetTopThreeSales($storeId)
* @method ResultInterface deferGetReturnVisitByGoodsIds($storeId, $goodsIds)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
......@@ -155,4 +157,22 @@ interface GoodsInterface
* @author work
*/
public function adminCountGoods($storeId);
/**
* 销量前3的商品
* @param $storeId
* @return mixed
* @author work
*/
public function getTopThreeSales($storeId);
/**
* 批量获取后续服务 goodIds
* @param $storeId
* @param $goodsIds
* @return mixed
* @author work
*/
public function getReturnVisitByGoodsIds($storeId, $goodsIds);
}
......@@ -10,4 +10,6 @@ class GroupBookingCmqEnum
const CLOSE_RECORD = 'closeRecord';//关闭拼团
const GROUP_BOOKING = 'groupBooking';//拼团成功回调
const STATE_DELETE_GROUP_BOOKING = '1';//cmq关闭订单状态
}
\ No newline at end of file
<?php
namespace Hdll\Services\LimitTimeBuy\Enum;
class LimitTimeCmqEnum
{
const TOPIC = 'timeLimitBuy';
const UP_ORDER_STATUS = 'upOrderStatus'; //更新订单状态
}
\ No newline at end of file
......@@ -7,9 +7,18 @@ class LimitTimeOrderEnum
//订单状态
const STATUS_NORMAL = 1; //待支付 1未支付2已经支付3异常
const STATUS_HAVE_PAY =2; // 已经支付
const STATUS_PAY_EXCEPTION =3; // 支付异常或过期未付
const STATUS_PAY_REFUND =4 ; // 退款
const STATUS_NORMAL = 1; //待支付 1未支付2已经支付3异常 //=未付款
const STATUS_HAVE_PAY =2; // 已经支付 //=已下单
const STATUS_PAY_EXCEPTION =3; // 支付异常或过期未付 //=关闭订单
const STATUS_PAY_REFUND =4 ; // 退款 //=已过期
const ORDER_DELETED = 5; //订单删除
//------------状态转换-----------------------
const NOT_PAY = 3;//未付款
const HAVE_PAID_ORDER = 4;//已下单
const CLOSED = 7;//关闭订单
const OVERDUE =8;//已过期
}
\ No newline at end of file
......@@ -84,7 +84,7 @@ interface LimitTimeBuyInterface
int $orderId);
/**
* 获取砍价活动总个数 和正在进行的个数
* 获取限时购活动总个数 和正在进行的个数
*
* @return mixed
*/
......
......@@ -24,10 +24,11 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferUpdateInfoByPids(int $storeId,array $pIds,array $updateInfo)
* @method ResultInterface deferUpdateMainOrderByPid(int $storeId,int $pId,array $mainData,array $subData=[])
* @method ResultInterface deferUnconfirmedCount(int $storeId)
* @method ResultInterface deferGetSubOrderListBySubIds(int $storeId,array $subIds)
* @method ResultInterface deferGetSubOrderListBySubIds(int $storeId,array $ids,int $arg=1)
* @method ResultInterface deferOrderCount(int $storeId,int $orderType,array $itemIds)
* @method ResultInterface deferAddShopsDailyStatistic(int $storeId,int $pId)
* @method ResultInterface deferGetShopStatistic(int $storeId)
* @method ResultInterface deferGetShopDailyStatistic(int $storeId,int $startDate,int $endDate)
*/
interface OrderInterface
{
......@@ -153,10 +154,11 @@ interface OrderInterface
* 批量查询子订单信息
*
* @param integer $storeId
* @param array $subIds
* @param array $ids
* @param integer $arg 1-$ids为子订单ID数组,2-$ids为主订单ID数组
* @return array
*/
public function getSubOrderListBySubIds(int $storeId,array $subIds);
public function getSubOrderListBySubIds(int $storeId,array $ids,int $arg=1);
/**
* 商品、活动成交量统计
......@@ -184,4 +186,15 @@ interface OrderInterface
* @return array
*/
public function getShopStatistic(int $storeId);
/**
* 指定时间(段)查询店铺交易统计
*
*
* @param integer $storeId
* @param integer $startDate
* @param integer $endDate
* @return array
*/
public function getShopDailyStatistic(int $storeId,int $startDate,int $endDate);
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetReservById(int $storeId, int $id)
* @method ResultInterface deferIsReserved(int $storeId, int $cmanId, int $reservTime)
* @method ResultInterface deferGetReservListByOrderId(int $storeId, int $orderId, $state = null)
* @method ResultInterface deferGetReservListByOrderIds(int $storeId, array $orderIds, $state = null)
* @method ResultInterface deferModifyReservById(int $storeId, int $id, array $data)
* @method ResultInterface defermarkReservFinished(int $storeId, int $orderId)
* @method ResultInterface deferAddReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type)
......@@ -58,6 +59,17 @@ interface ReservationInterface
public function getReservListByOrderId(int $storeId, int $orderId, $state = null);
/**
* 根据订单id列表,获取对应的预约列表
*
* @param integer $storeId
* @param integer $orderIds
* @param integer $state
* @Number(name="state")
* @return array
*/
public function getReservListByOrderIds(int $storeId, array $orderIds, $state = null);
/**
* 修改某个预约信息
*
* @param integer $storeId,
......
......@@ -11,7 +11,7 @@ namespace Hdll\Services\Seller\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferSave($referId, $unionId, $openId, $nickName, $headImgUrl)
* @method ResultInterface deferSave($referId, $unionId, $openId, $nickName, $headImgUrl, $gender = 2)
* @method ResultInterface deferGet($id, $fields = ['*'])
* @method ResultInterface deferGetByUnionId($unionId, $fields = ['*'])
* @method ResultInterface deferGetByStoreId($storeId, $fields = ['*'])
......@@ -36,12 +36,11 @@ interface SellerInterface
* @param $openId
* @param $nickName
* @param $headImgUrl
* @param string $realName
* @param string $phoneNumber
* @param int $gender
* @return mixed
* @author Administrator
* @author work
*/
public function save($referId, $unionId, $openId, $nickName, $headImgUrl);
public function save($referId, $unionId, $openId, $nickName, $headImgUrl, $gender = 2);
/**
* @param $id
......
......@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferRefundAddBalance($sellerId, $money, $orderSn = '')
* @method ResultInterface deferCountVip($storeId, $sellerId)
* @method ResultInterface deferSumViewMoneyByStoreIds(array $storeIds)
* @method ResultInterface deferSumBillMoney()
* Interface SellerDistributionInterface
* @package App\Lib
*/
......@@ -126,5 +127,10 @@ interface SellerDistributionInterface
*/
public function sumViewMoneyByStoreIds(array $storeIds);
/**
* vip分销佣金总金额
* @return mixed
* @author work
*/
public function sumBillMoney();
}
\ No newline at end of file
......@@ -16,6 +16,8 @@ use Swoft\Core\ResultInterface;
* The interface of store service
*
* @method ResultInterface deferGetEntrustedData(int $storeId, array $fields = [])
* @method ResultInterface deferGetEntrustedDataByMchid(int $mchid, array $fields = [])
* @method ResultInterface deferGetWxpayCerts(int $storeId, $mchid)
*/
interface EntrustedInterface
{
......@@ -28,4 +30,22 @@ interface EntrustedInterface
*/
public function getEntrustedData(int $storeId, array $fields = []);
/**
* 根据店铺id和商户平台id获取对应的支付证书
*
* @param int $storeId
* @param string $mchid
* @return array
*/
public function getWxpayCerts(int $storeId, $mchid);
/**
* 根据商户平台id获取对应的小程序托管配置
*
* @param int $storeId
* @param array $fields 字段列表
* @return bool
*/
public function getEntrustedDataByMchid(int $mchid, array $fields = []);
}
\ 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