Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
d88619db
Commit
d88619db
authored
Oct 19, 2018
by
feixiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
e4f784f6
cd4ab0c3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
236 additions
and
9 deletions
+236
-9
src/Common/Pool/Config/CraftsmanPoolConfig.php
+106
-0
src/Craftsman/Lib/CraftsmanInterface.php
+67
-0
src/Store/Lib/CommsettingInterface.php
+0
-2
src/Store/Lib/SettingsInterface.php
+0
-2
src/Store/Lib/StoreInterface.php
+0
-1
src/Store/Lib/SubStoreInterface.php
+63
-0
src/Store/Lib/TemplateInterface.php
+0
-4
No files found.
src/Common/Pool/Config/CraftsmanPoolConfig.php
0 → 100644
View file @
d88619db
<?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
=
''
;
}
src/Craftsman/Lib/CraftsmanInterface.php
0 → 100644
View file @
d88619db
<?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
src/Store/Lib/CommsettingInterface.php
View file @
d88619db
...
...
@@ -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 字段说明:
...
...
src/Store/Lib/SettingsInterface.php
View file @
d88619db
...
...
@@ -23,7 +23,6 @@ interface SettingsInterface
/**
* 获取店铺基础设置项
*
* @Number(name="storeId")
* @param int $storeId
* @return array
*/
...
...
@@ -32,7 +31,6 @@ interface SettingsInterface
/**
* 获取消息通知的开关设置项
*
* @Number(name="storeId")
* @param int $storeId
* @return array
* array(5) {
...
...
src/Store/Lib/StoreInterface.php
View file @
d88619db
...
...
@@ -37,7 +37,6 @@ interface StoreInterface
/**
* 查询店铺是否正常
*
* @Number(name="storeId")
* @param integer $storeId
* @return bool true:正常,false:冻结
*/
...
...
src/Store/Lib/SubStoreInterface.php
0 → 100644
View file @
d88619db
<?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 子店铺状态筛选,0表示正常,1表示关闭,10表示列出所有
* @return array
*/
public
function
getSubStoreList
(
int
$storeId
,
int
$state
=
0
);
/**
* 修改子店铺信息
*
* @param integer $storeId
* @param integer $subStoreId
* @param array $data
* $data字段说明:
* subStoreName // 门店名称
* mobile // 门店联系手机
* state // 0表示正常状态,1关闭状态
* storeAddr // 店铺地址
* lntLat // 店铺坐标
* storeHours // 营业时间
* reservSpan // 单次预约时长
* reservMax // 同一时间段最大预约次数
*
* @return int 成功更新的条数
*/
public
function
updateSubStore
(
int
$storeId
,
int
$subStoreId
,
array
$data
);
}
\ No newline at end of file
src/Store/Lib/TemplateInterface.php
View file @
d88619db
...
...
@@ -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 返回更新成功的条数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment