Commit e22c25f5 by xmy

Merge remote-tracking branch 'origin/master'

parents 309f600b 2075efd7
......@@ -13,6 +13,12 @@ class BargainEnum
//订单状态
const STATUS_NORMAL = 10; //待支付
//paystatus
const HAVE_PAY =2;
const PAY_EXCEPTION = 3;
}
\ No newline at end of file
......@@ -10,14 +10,14 @@
namespace Hdll\Services\Bargain\Lib;
use Hdll\Services\Bargain\Enum\BargainEnum;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferGetgoodsinfo( int $limit_id)
* @method ResultInterface deferGetBargainInfo( int $limit_id)
* @method ResultInterface deferGetgoodsinfo(int $limit_id)
* @method ResultInterface deferGetBargainInfo(int $limit_id)
*/
interface BargainInterface
{
......@@ -25,19 +25,18 @@ interface BargainInterface
/**
* 获取砍价商品的 商品信息
* @param int $bargain_id
* @return {
"name" 名称
"image" 图片
"price" 价格
"activityName" 活动名称
* @return {
* "name" 名称
* "image" 图片
* "price" 价格
* "activityName" 活动名称
* }
*/
public function getGoodsInfo(
int $stordId,int $bargain_id
int $stordId, int $bargain_id
);
/**
* 通过商品id 获取是否 有砍价活动
* @param int $storeId
......@@ -45,10 +44,23 @@ interface BargainInterface
* @return bool
*
*/
public function getBargainInfo(
int $storeId,int $goodsId
public function getBargainInfo(
int $storeId, int $goodsId
);
/**
* 支付 状态 回馈接口
* @param string $storeId //
* @param int $bargainbranchId // 砍价活动id
* @param int $status // BargainEnum::HAVE_PAY 成功支付 BargainEnum::PAY_EXCEPTION:未支付 (已经过期或者支付异常)
* @return mixed
*/
public function payStatus(
string $storeId,
int $bargainbranchId,
int $status , //
int $orderId);
}
......
......@@ -12,6 +12,8 @@ use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGet($storeId, $id)
* @method ResultInterface deferIncSales($storeId, $goodsId)
* @method ResultInterface deferDecSales($storeId, $goodsId)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
......@@ -39,4 +41,25 @@ interface GoodsInterface
*/
public function get($storeId, $id);
/**
* 增加商品销量
* 减少商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public function incSales($storeId, $goodsId);
/**
* 减少商品销量
* 增加商品库存
* @param $storeId
* @param $goodsId
* @return mixed
* @author Administrator
*/
public function decSales($storeId, $goodsId);
}
\ 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
......@@ -44,10 +44,10 @@ interface LimitTimeBuyInterface
* 获取限时购商品的 商品信息
* @param int $limit_id
* @return {
"name" 名称
"image" 图片
"price" 价格
"activityName" 活动名称
* "name" 名称
* "image" 图片
* "price" 价格
* "activityName" 活动名称
* }
*/
public function getLimitGoods(
......@@ -66,4 +66,18 @@ interface LimitTimeBuyInterface
);
/**
* 支付 状态 回馈接口
* @param string $store_id
* @param int $limit_id
* @param int $status // status :1 成功支付 2:未支付 (已经过期或者支付异常)
* @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
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/9/4
* Time: 10:46
*/
namespace Hdll\Services\Notice\Common;
class WxMiniNotice
{
/**
* 微信小程序page生成
*
* 用法:
* WxMiniNotice::generatePage("pages/orderShow/orderShow",['orderId' => $orderInfo['id'], 'storeId' => $orderInfo['storeId']])
* 生成
* pages/orderShow/orderShow?orderId=1&storeId=7
* @param string $page
* @param array $param
* @return string
*/
public static function generatePage(string $page, array $param)
{
$param['origin'] = $param['origin']??'notice';
$param = http_build_query($param);
return $page.$param;
}
}
\ 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
......@@ -16,12 +16,13 @@ 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 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
{
......@@ -62,7 +63,7 @@ interface OrderInterface
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 +136,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
......@@ -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
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