Commit f0ff9543 by xmy

Merge remote-tracking branch 'origin/master'

parents db7f86be cfe9c78b
......@@ -53,7 +53,7 @@ class Smscode
} else {
$count = 1;
}
$vcode = mt_rand(10000, 99999);
$vcode = mt_rand(1000, 9999);
$alisms = new Alisms(
$signName ?? Alisms::SN_01,
$templateCode ?? Alisms::TPL_01,
......
......@@ -68,7 +68,7 @@ class OrderPoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 5;
protected $timeout = 200;
/**
* the addresses of connection
......
......@@ -68,7 +68,7 @@ class ReservationPoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 5;
protected $timeout = 15;
/**
* the addresses of connection
......
......@@ -68,7 +68,7 @@ class SchedulePoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 5;
protected $timeout = 15;
/**
* the addresses of connection
......
......@@ -68,7 +68,7 @@ class StorePoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 5;
protected $timeout = 15;
/**
* the addresses of connection
......
......@@ -23,4 +23,14 @@ interface GroupBookingInterface{
public function hasActivity($storeId,$goodsId);
/**
* 关闭拼团
* @param $storeId
* @param $buyerId
* @param $orderId
* @return mixed
* @author Administrator
*/
public function closeRecord($storeId, $buyerId, $orderId);
}
\ No newline at end of file
......@@ -14,8 +14,4 @@ class LimitTimeBuyEnum
//订单状态
const STATUS_NORMAL = 10; //待支付
}
\ No newline at end of file
<?php
namespace Hdll\Services\LimitTimeBuy\Enum;
class LimitTimeOrderEnum
{
//订单状态
const STATUS_NORMAL = 1; //待支付 1未支付2已经支付3异常
const STATUS_HAVE_PAY =2;
const STATUS_PAY_EXCEPTION =3;
}
\ No newline at end of file
......@@ -10,6 +10,7 @@
namespace Hdll\Services\LimitTimeBuy\Lib;
use Hdll\Services\LimitTimeBuy\Enum\LimitTimeOrderEnum;
use Swoft\Core\ResultInterface;
/**
......@@ -66,16 +67,18 @@ interface LimitTimeBuyInterface
);
// /**
// * 支付 状态 回馈接口
// * @param string $store_id
// * @param int $limit_id
// * @param int $status // status :1 成功支付 2:未支付 (已经过期或者支付异常)
// * @return mixed
// */
// public function paystatus(
// string $store_id,
// int $limit_id,
// int $status,
// int $orderId);
/**
* 支付 状态 回馈接口
* @param string $store_id
* @param int $limit_id
* @param int $status // 2.LimitTimeOrderEnum::STATUS_HAVE_PAY 成功支付 3:LimitTimeOrderEnum::STATUS_PAY_EXCEPTION 未支付 (已经过期或者支付异常)
* @param int $orderId
* @return bool|mixed
* @throws ConException
*/
public function payStatus(
string $store_id,
int $limit_id,
int $status,
int $orderId);
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ class WxMiniNotice
$param = http_build_query($param);
return $page.$param;
return $page.'?'.$param;
}
}
\ No newline at end of file
......@@ -9,7 +9,8 @@ namespace Hdll\Services\Notice\Enum;
class FormIdEnum
{
const TYPE_FORM = 0;
const TYPE_FORM = 1;
const TYPE_PAY = 2;
const TYPE_PAY = 1;
}
\ No newline at end of file
......@@ -11,13 +11,13 @@ namespace Hdll\Services\Notice\Enum;
class NoticeEnum
{
//商家小程序发送
const TYPE_MINI_BACKEND_SEND= 1;
const TYPE_MINI_BACKEND_SEND= 100;
//腾讯sms发送
const TYPE_TENCENT_SMS = 2;
const TYPE_TENCENT_SMS = 150;
//买家小程序消息推送
const TYPE_MINI_FRONTEND_SEND= 3;
const TYPE_MINI_FRONTEND_SEND= 101;
const SEND_TYPES = [
......
......@@ -15,7 +15,7 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferSend(int $sendType, array $data, int $sendTime)
* @method ResultInterface deferSend(int $storeId, array $sendTypes, array $data, int $sendTime) :bool
*/
interface NoticeInterface
{
......@@ -25,6 +25,7 @@ interface NoticeInterface
* 微信发送消息数据结构
* $data[NoticeEnum::TYPE_MINI_BACKEND_SEND] = [
"uid" => 1, //用户的id
* "storeId" => 1, //店铺id
"template_id" => "1kZ_RkkWfRrpufXNdmJYBpIhgk7ccCtPrypeJQ9WRwM",//消息模板id
"page" => "index", //消息模板页面
"data" => [ //消息模板数据
......@@ -62,5 +63,5 @@ interface NoticeInterface
* @param int $sendTime //发送时间,立即返送填0
* @return mixed
*/
public function send(array $sendTypes, array $data, int $sendTime) : bool ;
public function send(array $sendTypes, array $data, int $sendTime) :bool;
}
\ No newline at end of file
......@@ -10,6 +10,5 @@ namespace Hdll\Services\Order\Enum;
class OrderCate
{
const TYPE_BUYER = 1;
const TYPE_SELLER = 2;
}
\ No newline at end of file
......@@ -15,13 +15,14 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferCreateOrder(int $buyerId,int $storeId,int $consigneeId,int $itemId,int $selectedNum,int $orderType,int $total,int $activityPrice,string $goodsName,string $goodsImage,string $activityName,int $goodsId,int $goodsPrice,string $reservation_time = '');
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn)
* @method ResultInterface deferCreateOrder(int $buyerId,int $storeId,int $consigneeId,int $itemId,int $selectedNum,int $orderType,int $total,int $activityPrice,string $goodsName,string $goodsImage,string $activityName,int $goodsId,int $goodsPrice,string $reservation_time = '',string $message = '');
* @method ResultInterface deferGetOrderInfoBySn(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = [])
* @method ResultInterface deferGetOrderInfo(int $storeId,int $orderId)
* @method ResultInterface deferUpdateInfoById(int $storeId,int $orderId, array $updateInfo)
* @method ResultInterface deferGetSimpleList($storeId, $condition, $fields = ['*'])
* @method ResultInterface deferUpdateInfoByIds(int $storeId,array $orderIds, array $updateInfo)
* @method ResultInterface deferCollectionClose(int $storeId, int $orderId);
* @method ResultInterface deferCollectionClose(int $storeId, int $orderId)
* @method ResultInterface deferGetOtherInfo(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = [])
*/
interface OrderInterface
{
......@@ -42,6 +43,7 @@ interface OrderInterface
* @param int $goodsId
* @param int $goodsPrice
* @param string $reservation_time
* @param string $message
* @return mixed
*/
public function createOrder(
......@@ -58,11 +60,13 @@ interface OrderInterface
string $activityName,
int $goodsId,
int $goodsPrice,
string $reservation_time = '');
string $reservation_time = '',
string $message = ''
);
public function getOrderInfo(int $storeId,int $orderId);
public function getOrderInfoBySn(int $storeId, string $orderSn);
public function getOrderInfoBySn(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = []);
public function updateInfoById(int $storeId,int $orderId, array $updateInfo);
......@@ -135,4 +139,15 @@ interface OrderInterface
*/
public function updateInfoByIds(int $storeId,array $orderIds, array $updateInfo);
/**
* 获取订单联系人信息,item信息用
*
* @param int $storeId
* @param string $orderSn
* @param array $consigneeFields
* @param array $itemFields
* @return mixed
*/
public function getOtherInfo(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = []);
}
\ No newline at end of file
......@@ -17,6 +17,7 @@ use Swoft\Core\ResultInterface;
* The interface of Reservation service
*
* @method ResultInterface deferGetReservById(int $storeId, int $id)
* @method ResultInterface deferIsReserved(int $storeId, int $cmanId, int $reservTime)
* @method ResultInterface deferGetReservListByOrderId(int $storeId, int $orderId, int $state = 0, int $type = 1)
* @method ResultInterface deferModifyReservById(int $storeId, int $id, array $data)
* @method ResultInterface deferAddReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type)
......@@ -35,6 +36,18 @@ interface ReservationInterface
public function getReservById(int $storeId, int $id);
/**
* 检查指定的时间是否已被预约过
*
* @param integer $storeId 店铺id
* @param integer $cmanId 手艺人id,查询某个手艺人下的预约情况,$cmanId == 0表示不指定手艺人,
* @param integer $reservTime 要检查的时间点,时间戳格式
* @Number(name="cmanId")
* @Number(name="reservTime")
* @return boolen true:已预约,false:未预约
*/
public function isReserved(int $storeId, int $cmanId, int $reservTime);
/**
* 根据订单id,获取商家某个订单包含的所有预约
*
* @param integer $storeId
......
......@@ -20,6 +20,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetStoreBySellerId(int $sellerId)
* @method ResultInterface deferUpdateStore(int $storeId, array $data)
* @method ResultInterface deferDeleteStore(int $storeId)
* @method ResultInterface deferGetWxacodeUrl(int $type, string $page, string $scene)
*/
interface StoreInterface
{
......@@ -77,4 +78,15 @@ interface StoreInterface
* @return int 成功返回删除条数
*/
public function deleteStore(int $storeId);
/**
* 生成店铺小程序码
*
* @param integer $type 指明哪小程序,1前台小程序,2后台小程序
* @param string $page 要跳转的小程序页面,如:pages/index/index
* @param string $scene 通过小程序码传递的参数
* @return string 成功返回小程序码的图片资源名(腾讯云存储的资源名,如:store_wxacode/9a414ff3b4c478a36c2ba7df563ee88b.png)
*/
public function getWxacodeUrl(int $type, string $page, string $scene);
}
\ 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\Store\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of weapp service
*
* @method ResultInterface deferGetWxAccessToken(string $appId, string $appSecret)
*/
interface WeappInterface
{
/**
* 根据appId获取对应的access_token
*
* @param string $appId
* @param string $appSecret
* @return string
*/
public function getWxAccessToken(string $appId, string $appSecret);
}
\ 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