Commit 9f06bc41 by liwotianname

Merge branch 'master' of http://139.199.22.180/tencent/services

parents 7a022c94 16429991
......@@ -11,11 +11,23 @@ class AuthEnum
{
const SCOPE_BUYER = 1; //买家
const SCOPE_CMAN = 2; //手艺人
const SCOPE_EMPLOYEE = 2; //手艺人
const SCOPE_SELLER = 3; //卖家
const SCOPE_ADMIN = 4;//管理员
const AUTH_BACKEND = 100;
const AUTH_FRONTEND = 101;
const AUTH_TYPE_SELLER = 200; //卖家授权
const AUTH_TYPE_EMPLOYEE = 201; //员工授权
const AUTH_TYPE_E_AND_S = 203; //选择授权(用户自己选择进行员工授权还是卖家授权)
const AUTH_TYPE_BUYER = 204; //买家授权
}
\ No newline at end of file
......@@ -13,6 +13,6 @@ class BuyerEnum
//state
const STATE_NORMAL = 0;
const STATE_FREEZE = 0;
const STATE_FREEZE = 1;
}
\ No newline at end of file
......@@ -12,10 +12,10 @@ use Hdll\Services\Common\Exception\CommonException;
/**
* @Bean()
* Class {className}
* Class {daoName}
* @package App\Models\Dao
*/
class {className}
class {daoName}
{
public function create(array $info) : {entityName}
......@@ -29,14 +29,14 @@ class {className}
return ${varEntityName};
}
public function selectInfoByCondition($condition, $field)
public function selectInfoByCondition(array $condition, array $option)
{
return {entityName}::findAll($condition, ['fields' => $field])->getResult();
return {entityName}::findAll($condition, $option)->getResult();
}
public function getInfoByCondition($condition, $field)
public function getInfoByCondition(array $condition, array $option)
{
return {entityName}::findOne($condition, ['fields' => $field])->getResult();
return {entityName}::findOne($condition, $option)->getResult();
}
/**
......@@ -45,7 +45,7 @@ class {className}
* @param $updateInfo
* @return mixed
*/
public function updateByCondition($condition, $updateInfo)
public function updateByCondition(array $condition, array $updateInfo)
{
return {entityName}::updateAll($updateInfo, $condition)->getResult();
}
......@@ -57,9 +57,19 @@ class {className}
* @param $updateInfo
* @return mixed
*/
public function updateOne($condition, $updateInfo)
public function updateOne(array $condition, array $updateInfo)
{
return {entityName}::updateOne($updateInfo, $condition)->getResult();
}
public function delOne(array $condition)
{
return {entityName}::deleteOne($condition)->getResult();
}
public function delAll(array $condition)
{
return {entityName}::deleteAll($condition)->getResult();
}
}
\ No newline at end of file
......@@ -30,7 +30,7 @@ class GenerateCommand
*
* @Options
* -n,--n the dao name
* -e,--e the entity name
* -en,--en the entity name
*
* @Example
* php swoft generate:dao -e entityName [-n daoName]
......@@ -83,9 +83,23 @@ class GenerateCommand
$dataPath = $appPath.'/Models/Data/'.$dataName.'.php';
$templatePath = $appPath.'/Commands/Common/ClassTemplate/Data/ClassTemplate';
$content = file_get_contents($templatePath);
$content = str_replace('{dataName}', $dataName, $content);
$content = str_replace("{daoName}", $daoName, $content);
$content = str_replace("{varDaoName}", lcfirst($daoName), $content);
preg_match_all('/(?<={)\w+(?=})/', $content, $vars);
$vars = isset($vars[0])?$vars[0]:[];
foreach ( $vars as $var ) {
if ( strpos($var, 'var') !== false ) {
$name = str_replace('var', '', $var);
$name = lcfirst($name);
$$var = lcfirst($$name);
var_dump($var, $$var);
}
$content = str_replace("{{$var}}", $$var,$content);
}
$dataPath = file_exists($dataPath)?$dataPath.'.gen':$dataPath;
file_put_contents($dataPath, $content);
......@@ -98,7 +112,7 @@ class GenerateCommand
private function generateDao($output,$daoName, $entityName)
{
if ( empty($entityName) ) {
$output->writeln("the en option is required", true, true);
$output->writeln("the entity name is required", true, true);
}
$daoName = empty($daoName)?$entityName.'Dao':$daoName;
......@@ -109,12 +123,50 @@ class GenerateCommand
$content = file_get_contents($templatePath);
$content = str_replace("{className}", $daoName,$content);
preg_match_all('/(?<={)\w+(?=})/', $content, $vars);
$vars = isset($vars[0])?$vars[0]:[];
foreach ( $vars as $var ) {
if ( strpos($var, 'var') !== false ) {
$name = str_replace('var', '', $var);
$name = lcfirst($name);
$$var = lcfirst($$name);
var_dump($var, $$var);
}
$content = str_replace("{entityName}", $entityName, $content);
$content = str_replace("{varEntityName}", lcfirst($entityName), $content);
$content = str_replace("{{$var}}", $$var,$content);
}
$daoPath = file_exists($daoPath)?$daoPath.'.gen':$daoPath;
file_put_contents($daoPath,$content);
}
/**
* 解析模板中变量
*
* @param string $content
* @return string
*/
private function parseVar(string $content):string
{
preg_match_all('/(?<={)\w+(?=})/', $content, $vars);
$vars = isset($vars[0])?$vars[0]:[];
foreach ( $vars as $var ) {
if ( strpos($var, 'var') !== false ) {
$name = str_replace('var', '', $var);
$name = lcfirst($name);
$$var = lcfirst($$name);
var_dump($var, $$var);
}
$content = str_replace("{{$var}}", $$var,$content);
}
return $content;
}
}
\ No newline at end of file
......@@ -45,10 +45,10 @@ class Split
} elseif ( isset($map[$tableName]) ) { //非实体且分表
$className = $map[$tableName];
$defaultTbleName = $tableName;
$defaultTableName = $tableName;
$tableName = $tableName.'_'.self::getDbNum($className);
//设置分表对应的className
EntityCollector::setCollector($tableName, $defaultTbleName);
EntityCollector::setCollector($tableName, $defaultTableName);
}
......@@ -63,7 +63,9 @@ class Split
$splitCollector = SplitCollector::getCollector();
$splitNum = $splitCollector[$className]['num'];
$data = RequestContext::getContextData();
$storeId = $data['userInfo']['storeId'];
if ( empty($storeId) ) {
throw new CommonException(["msg" => "参数异常,获取店铺信息失败。"]);
}
......
......@@ -120,6 +120,17 @@ class User
$this->setValue('token', $value);
}
public function setSubStoreId($value)
{
$this->setValue('subStoreId', $value);
}
public function getSubStoreId()
{
return $this->getValue('subStoreId')??0;
}
public function fill($arr)
{
......
......@@ -21,11 +21,15 @@ use Hdll\Services\Common\Entity\User;
class Smscode
{
protected $sellerId;
protected $number;
public function __construct()
public function __construct($number = null)
{
$this->sellerId = App::getBean(User::class)->getId();
if($number !== null) {
$this->number = $number;
} else {
$this->number = App::getBean(User::class)->getId();
}
}
/**
......@@ -93,7 +97,7 @@ class Smscode
private function getKey($mobile)
{
return 'smscode:' . md5($this->sellerId . '|' . $mobile);
return 'smscode:' . md5($this->number . '|' . $mobile);
}
}
\ 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\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties;
/**
* the config of service coupon
*
* @Bean()
*/
class CouponPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_COUPON_URI', 'coupon:8099'));
}
protected $name = 'coupon';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 50;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 100;
/**
* 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 = '';
}
<?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 craftsman
*
* @Bean()
*/
class CraftsmanPoolConfig extends PoolProperties
{
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_CRAFTSMAN_URI', 'craftsman:8099'));
}
protected $name = 'craftsman';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 50;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 100;
/**
* 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 = '';
}
<?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\ComoserProfiles\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferAddOrder($storeId, $ordirId,$goodsId,$goodsName,$orderPrice,$orderType)
*/
interface ProfileInterface
{
/**
* 档案和消费信息入库
* @param $storeId
* @param $orderId
* @param $goodsId
* @param $goodsName
* @param $orderPrice
* @param $orderType
* @return mixed
*/
public function AddOrder($storeId, $orderId,$goodsId,$goodsName,$orderPrice,$orderType);
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/8/24
* Time: 15:28
*/
namespace Hdll\Services\Coupon\Enum;
class CouponEnum
{
// 优惠券状态:
const STATE_NOT_USED = 1; // 表示优惠券还未使用
const STATE_ORDER_HOLD = 2; // 表示订单下单时已占用,但还未真正使用
const STATE_USED = 3; // 表示优惠券已被使用
}
\ 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\Coupon\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of coupon service
*
* @method ResultInterface deferCheckCoupon(int $buyerId, int $storeId, int $couponId, int $itemId)
* @method ResultInterface deferGetCouponRecvdList(int $buyerId, int $storeId, int $subStoreId = 0, int $itemId = 0)
* @method ResultInterface deferGetDataByCouponId(int $buyerId, int $storeId, int $couponId)
*/
interface CouponInterface
{
// 优惠券服务的字段说明:
// storeId
// subStoreId
// buyerId 买家ID
// state 状态,1未使用,2已下单还未付款,3已使用过
// couponId 当时领取的原始优惠券Id
// couponName 当时领取的原始优惠券名字
// parValue 优惠券面值
// allowItems 优惠券允许使用的商品列表
// addTime 领取时间
// usedTime 被使用的时间
/**
* 校验优惠券是否可用
*
* @param integer $buyerId
* @param integer $storeId
* @param integer $couponId
* @param integer $itemId
* @return int|boolen 如果可用返回优惠券的面值,不可用返回false
*/
public function checkCoupon(int $buyerId, int $storeId, int $couponId, int $itemId);
/**
* 更新优惠券状态
*
* @param integer $buyerId
* @param integer $storeId
* @param integer $couponId
* @param integer $state 优惠券的状态
* @return int 返回受影响的行数
*/
public function updateCouponState(int $buyerId, int $storeId, int $couponId, int $state);
/**
* 获取顾客领取的优惠券列表
*
* @param integer $buyerId
* @param integer $storeId
* @param integer $subStoreId
* @param integer $itemId
* @return array
*/
public function getCouponRecvdList(int $buyerId, int $storeId, int $subStoreId = 0, int $itemId = 0);
/**
* 根据优惠券ID获取信息
*
* @param integer $buyerId
* @param integer $storeId
* @param integer $couponId
* @return array
*/
public function getDataByCouponId(int $buyerId, int $storeId, int $couponId);
}
\ 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\Craftsman\Lib;
use Swoft\Core\ResultInterface;
/**
* The interface of craftsman service
*
* @method ResultInterface deferGetCraftsmenList(int $storeId, int $subStoreId = 0, int $itemId = 0)
* @method ResultInterface deferGetCraftsmenByUnionId(string $unionId)
* @method ResultInterface deferGetCraftsmenById(int $storeId, int $cmanId)
*/
interface CraftsmanInterface
{
// 店员服务的字段说明:
// name 店员名字
// sex 性别
// mobile 店员手机
// inReview 审核状态,1审核中,2审核通过
// headimg 店员头像
// items 服务项目id列表,逗号隔开
// subStores 子店铺id列表,逗号隔开
// motto 个人签名
// adept 个人擅长说明
// wechat 店员微信号
/**
* 获取店员列表
*
* @param integer $storeId
* @param integer $subStoreId 子店铺Id
* @param integer $itemId 服务项目(商品)id
*
* @return array
*/
public function getCraftsmenList(int $storeId, int $subStoreId = 0, int $itemId = 0);
/**
* 根据unionId获取店员信息
*
* @param string $unionId
* @return array
*/
public function getCraftsmenByUnionId(string $unionId);
/**
* 根据店铺Id和店员Id获取店员信息
*
* @param integer $storeId
* @param integer $cmanId
* @return array
*/
public function getCraftsmenById(int $storeId, int $cmanId);
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/10/22
* Time: 14:11
*/
namespace Hdll\Services\Notice\Enum;
class NoticeRecordEnum
{
const TYPE_TENCENT_SMS = 1;
const STATE_SUCCESS = 1;
const STATE_FAIL = 2;
}
\ No newline at end of file
......@@ -13,4 +13,9 @@ class RedisKeyEnum
const ORDER_RESERVATION = self::PREFIX."order_reservation_";
const ORDER_RESERVATION_NOTICE = self::PREFIX."order_reservation_notice_";
}
\ No newline at end of file
......@@ -64,7 +64,7 @@ class MiniBackendSender implements SenderInterface
*/
public function getData ()
{
return $this->data;
return $this->data === null?[]:$this->data;
}
/**
......
......@@ -90,7 +90,7 @@ class MiniFrontendSender implements SenderInterface
*/
public function getData ()
{
return $this->data;
return $this->data === null?[]:$this->data;
}
/**
......
......@@ -50,7 +50,7 @@ class MpSender implements SenderInterface
public function getData()
{
return $this->data;
return $this->data === null?[]:$this->data;
}
public function getSendType()
......
......@@ -21,20 +21,24 @@ class TencentSMS implements SenderInterface
private $param;
public function __construct(string $phone, string $template, array $param)
private $storeId;
public function __construct(string $phone, string $template, array $param, int $storeId)
{
$this->phone = $phone;
$this->template = $template;
$this->param = $param;
$this->storeId = $storeId;
}
public function format()
{
$this->data[$this->sendType] = [
[
'templateId' => $this->template,
'storeId' => $this->storeId,
'templateId' => $this->template,
'phoneNumber' => $this->phone,
'param' => $this->param,
'param' => $this->param,
]
];
......@@ -42,7 +46,7 @@ class TencentSMS implements SenderInterface
public function getData()
{
$this->data;
return $this->data === null?[]:$this->data;
}
public function getSendType()
......
......@@ -22,11 +22,11 @@ class NoticeExtension
/**
* 发送消息通知
*
* @param int $sendTime
* @param $sendTime
* @param mixed ...$senders
* @return bool|mixed
*/
public function send(int $sendTime, ... $senders)
public function send($sendTime, ... $senders)
{
$data = [];
......@@ -42,9 +42,7 @@ class NoticeExtension
$sender->format();
$data += $sender->getData();
$sendType += $sender->getSendType();
$sendType = array_merge($sender->getSendType(), $sendType);
}
......
......@@ -15,8 +15,8 @@ use Swoft\Core\ResultInterface;
/**
* The interface of demo service
*
* @method ResultInterface deferSend(int $storeId, array $sendTypes, array $data, int $sendTime, string $redisKey) :bool
* @method ResultInterface deferCancelSend(int $storeId, array $sendTypes, array $data, int $sendTime, string $redisKey) :bool
* @method ResultInterface deferSend(int $storeId, array $sendTypes, array $data, $sendTime, string $redisKey) :bool
* @method ResultInterface deferCancelSend(string $redisKey):bool
*/
interface NoticeInterface
{
......@@ -50,6 +50,7 @@ interface NoticeInterface
* 短信发送消息数据结构
$data[NoticeEnum::TYPE_TENCENT_SMS] = [
[
'storeId' => 198
"templateId" => "178822", //模板id
"phoneNumber" => "17558430002",
"param" => [ //模板变量名
......@@ -80,11 +81,11 @@ interface NoticeInterface
*
* @param array $sendTypes
* @param array $data
* @param int $sendTime //发送时间,立即返送填0
* @param $sendTime //如果需要多个时间段发送则填写时间戳数组例如:[15800000,1580000]
* @param string $redisKey //发送事件的redis key(如果定时发送消息,中途需要取消则需要传入此项)
* @return mixed
*/
public function send(array $sendTypes, array $data, int $sendTime, string $redisKey='') :bool;
public function send(array $sendTypes, array $data, $sendTime, string $redisKey='') :bool;
/**
......
......@@ -24,6 +24,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferCollectionClose(int $storeId, int $orderId)
* @method ResultInterface deferGetOtherInfo(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = [])
* @method ResultInterface deferGetList(int $storeId,array $ids)
* @method ResultInterface deferUnconfirmedCount(int $storeId)
*/
interface OrderInterface
{
......@@ -229,4 +230,18 @@ interface OrderInterface
*/
public function getList(int $storeId,array $ids);
/**
* 统计核销
*
* array(2) {
["money"]=>
string(1) "8"
["orders"]=>
string(1) "6"
}
* @param int $storeId
* @return mixed
*/
public function unconfirmedCount(int $storeId);
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ namespace Hdll\Services\Reservation\Enum;
class ReservEnum
{
const TYPE_ORDER = 1; // 表示从订单创建产生的预约
const TYPE_SELLER = 2; // 表示卖家自己后台添加的预约
const TYPE_SELLER = 2; // 表示卖家自己手动添加的预约
const TYPE_AFTER = 3; // 表示订购服务的后续服务的预约
const TYPE_BUYER = 4; // 表示买家自己手动添加的预约
}
\ No newline at end of file
......@@ -22,8 +22,7 @@ use Swoft\Core\ResultInterface;
* @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)
* @method ResultInterface deferCancelReservById(int $storeId, int $id)
* @method ResultInterface deferCancelReservByOrderId(int $storeId, int $orderId)
* @method ResultInterface deferCancelReservByOrderId(int $storeId, int $orderId, string $memo)
*/
interface ReservationInterface
{
......@@ -97,21 +96,13 @@ interface ReservationInterface
public function addReservation(int $storeId, int $orderId, int $buyerId, int $cmanId, int $reservTime, string $memo, int $type);
/**
* 取消某个预约
*
* @param integer $storeId
* @param integer $id
* @return boolean 返回取消结果
*/
public function cancelReservById(int $storeId, int $id);
/**
* 根据订单id取消该订单下的所有预约
*
* @param integer $storeId
* @param integer $orderId
* @param string $memo
* @return boolean 返回取消结果
*/
public function cancelReservByOrderId(int $storeId, int $orderId);
public function cancelReservByOrderId(int $storeId, int $orderId, string $memo = '');
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetByUnionId($unionId,$fields=['*'])
* @method ResultInterface deferGetByStoreId($storeId,$fields=['*'])
* @method ResultInterface deferUpdate($id,$data)
* @method ResultInterface deferCountDistributionNum($sellerId)
* Interface SellerInterface
* @package App\Lib
*/
......@@ -74,4 +75,6 @@ interface SellerInterface
*/
public function getByStoreId($storeId, $fields = ['*']);
public function countDistributionNum($sellerId);
}
\ No newline at end of file
......@@ -23,7 +23,6 @@ interface CommsettingInterface
/**
* 获取买家分销佣金规则
*
* @Number(name="storeId")
* @param int $storeId
* @return array
* 返回内容说明:
......@@ -37,7 +36,6 @@ interface CommsettingInterface
/**
* 根据店铺ID修改买家分销的佣金规则
*
* @Number(name="storeId")
* @param integer $storeId
* @param array $data
* 参数$data 字段说明:
......
......@@ -16,16 +16,42 @@ use Swoft\Core\ResultInterface;
* The interface of store-settings service
*
* @method ResultInterface deferGetSettings(int $storeId)
* @method ResultInterface deferGetNoticeSwitch(int $storeId)
*/
interface SettingsInterface
{
/**
* 获取店铺基础设置项
*
* @Number(name="storeId")
* @param int $storeId
* @return array
*/
public function getSettings(int $storeId);
/**
* 获取消息通知的开关设置项
*
* @param int $storeId
* @return array
* array(5) {
* ["pay_notice"]=> // 付款通知,1表示允许发送通知
* int(0)
* ["refund_notice"]=> // 退款通知,1表示允许发送通知
* int(1)
* ["reserv_notice"]=> // 预约通知,1表示允许发送通知
* int(0)
* ["cancel_reserv_notice"]=> // 取消预约通知,1表示允许发送通知
* int(0)
* ["delivered_notice"]=> // 核销通知,1表示允许发送通知
* int(1)
* ["cancel_order_notice"]=> // 订单取消的通知,1表示允许发送通知
* int(1)
* ["withdraw_notice"]=> // 提现申请的通知,1表示允许发送通知
* int(1)
* ["grant_comm_notice"]=> // 下级升级vip产生新的佣金的通知,1表示允许发送通知
* int(1)
* }
*/
public function getNoticeSwitch(int $storeId);
}
\ No newline at end of file
......@@ -37,7 +37,6 @@ interface StoreInterface
/**
* 查询店铺是否正常
*
* @Number(name="storeId")
* @param integer $storeId
* @return bool true:正常,false:冻结
*/
......
<?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 store service
*
* @method ResultInterface deferGetSubStore(int $storeId, int $subStoreId)
* @method ResultInterface deferGetSubStoreList(int $storeId, int $state = 0)
* @method ResultInterface deferUpdateSubStore(int $storeId, int $subStoreId, array $data)
*/
interface SubStoreInterface
{
/**
* 获取子店铺信息
*
* @param int $storeId
* @param int $subStoreId
* @return array
*/
public function getSubStore(int $storeId, int $subStoreId);
/**
* 获取storeId获取所有子店铺列表
*
* @param int $storeId
* @param int $state 子店铺状态筛选,1表示正常,2表示关闭,0表示列出所有
* @return array
*/
public function getSubStoreList(int $storeId, int $state = 1);
/**
* 修改子店铺信息
*
* @param integer $storeId
* @param integer $subStoreId
* @param array $data
* $data字段说明:
* subStoreName // 门店名称
* mobile // 门店联系手机
* state // 1表示正常状态,2关闭状态
* storeAddr // 店铺地址
* lntLat // 店铺坐标
* storeHours // 营业时间
* reservSpan // 单次预约时长
* reservMax // 同一时间段最大预约次数
*
* @return int 成功更新的条数
*/
public function updateSubStore(int $storeId, int $subStoreId, array $data);
}
\ No newline at end of file
......@@ -28,7 +28,6 @@ interface TemplateInterface
* onshelf=1表示查询已上架的模板
* onshelf=2表示查询已下架的模板
*
* @Number(name="onshelf")
* @param int $onshelf
* @return array
*/
......@@ -37,7 +36,6 @@ interface TemplateInterface
/**
* 根据模板ID获取单个模板信息
*
* @Number(name="tplId")
* @param integer $tplId
* @return array
*/
......@@ -46,7 +44,6 @@ interface TemplateInterface
/**
* 根据模板id删除一个模板
*
* @Number(name="tplId")
* @param integer $tplId
* @return int 返回删除成功的条数
*/
......@@ -61,7 +58,6 @@ interface TemplateInterface
* ['memo'] => 备注信息,此信息用户看不到
* ['orderby'] => 排序值,值越大,越靠前
*
* @Number(name="tplId")
* @param integer $tplId
* @param array $data
* @return int 返回更新成功的条数
......
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