Commit ee5bac3c by 王洁

frontMoney

parent 2abc040f
<?php
namespace Hdll\Services\FrontMoney\Enum;
class FrontCmqEnum
{
const TOPIC = 'timeLimitBuy';
const UP_ORDER_STATUS = 'upOrderStatus'; //更新订单状态
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: lwt
* Date: 2018/7/10
* Time: 13:15
*/
namespace Hdll\Services\FrontMoney\Enum;
class FrontMoneyEnum
{
//订单状态
const STATUS_NORMAL = 10; //待支付
}
\ No newline at end of file
<?php
namespace Hdll\Services\FrontMoney\Enum;
class FrontOrderEnum
{
//订单状态
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
<?php
<?php
/**
* Created by PhpStorm.
* User: lwt
* Date: 2018/7/10
* Time: 13:15
*/
namespace Hdll\Services\LimitTimeBuy\Enum;
class LimitTimeBuyEnum
{
//订单状态
const STATUS_NORMAL = 10; //待支付
}
\ No newline at end of file
<?php
<?php
namespace Hdll\Services\LimitTimeBuy\Enum;
class LimitTimeCmqEnum
{
const TOPIC = 'timeLimitBuy';
const UP_ORDER_STATUS = 'upOrderStatus'; //更新订单状态
}
\ No newline at end of file
<?php
<?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; // 支付异常或过期未付 //=关闭订单
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
<?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\LimitTimeBuy\Lib;
use Hdll\Services\LimitTimeBuy\Enum\LimitTimeOrderEnum;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferBackNum(string $token, int $consignee_id, int $limit_id, int $selected_num, int $order_type, int $goods_id, string $reservation_time = '')
* @method ResultInterface deferGetLimitGoods(int $storeId, int $limitId)
* @method ResultInterface deferGetLimitInfo(int $storeId, int $goodsId)
* @method ResultInterface deferPayStatus(string $store_id,int $limit_id, int $status, int $orderId)
* @method ResultInterface deferGetLimitCounts(int $storeId)
* @method ResultInterface deferGetNewOrderNum(int $storeId,int $lastTime)
*/
interface LimitTimeBuyInterface
{
/**
*
* 补回 未支付 限购活动 库存
* @param string $token
* @param int $consignee_id
* @param int $limit_id
* @param int $selected_num
* @param int $order_type
* @param int $goods_id
* @param string $reservation_time
* @return mixed
*/
public function backNum(
string $token,
int $consignee_id,
int $limit_id,
int $selected_num,
int $order_type,
int $goods_id,
string $reservation_time);
/**
* 获取限时购商品的 商品信息
* @param int $limit_id
* @return {
* "name" 名称
* "image" 图片
* "price" 价格
* "activityName" 活动名称
* }
*/
public function getLimitGoods(int $storeId, int $limitId);
/**
* 通过商品id 获取是否 有限时购活动
* @param int $storeId
* @param int $goodsId
* @return bool
*
*/
public function getLimitInfo(int $storeId, int $goodsId);
/**
* 支付 状态 回馈接口
* @param string $store_id
* @param int $limit_id
* @param int $status // 2.LimitTimeOrderEnum::STATUS_HAVE_PAY 成功支付 3:LimitTimeOrderEnum::STATUS_PAY_EXCEPTION 未支付 (已经过期或者支付异常)4 LimitTimeOrderEnum::STATUS_PAY_REFUND 退款
* @param int $orderId
* @return bool|mixed
* @throws ConException
*/
public function payStatus(string $store_id,int $limit_id,int $status, int $orderId);
/**
* 获取限时购活动总个数 和正在进行的个数
*
* @return mixed
*/
public function getLimitCounts(int $storeId);
/**
*获取自上次时间以来产生的新订单数
*
* @param [int] $storeId
* @param [int] $lastTime
* @return int
*/
public function getNewOrderNum(int $storeId,int $lastTime);
}
\ 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