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
84b50e6f
Commit
84b50e6f
authored
Aug 01, 2018
by
王召彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日程管理模块
parent
bd11b2c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
0 deletions
+100
-0
src/Schedule/Enum/ScheduleError.php
+30
-0
src/Schedule/Lib/ScheduleInterface.php
+70
-0
No files found.
src/Schedule/Enum/ScheduleError.php
0 → 100644
View file @
84b50e6f
<?php
namespace
Hdll\Services\Schedule\Enum
;
class
ScheduleError
{
const
E5001
=
[
'code'
=>
400
,
'errCode'
=>
5001
,
'msg'
=>
'客户端传参错误'
];
const
E5002
=
[
'code'
=>
404
,
'errCode'
=>
5002
,
'msg'
=>
'查询不到用户数据'
];
const
E5003
=
[
'code'
=>
401
,
'errCode'
=>
5003
,
'msg'
=>
'无权限操作'
];
const
E5004
=
[
'code'
=>
404
,
'errCode'
=>
5004
,
'msg'
=>
'数据不存在'
];
const
E5102
=
[
'code'
=>
400
,
'errCode'
=>
5102
,
'msg'
=>
'手机号不正确'
];
const
E5201
=
[
'code'
=>
400
,
'errCode'
=>
5201
,
'msg'
=>
'店铺名称不能包含特殊符号'
];
const
E5202
=
[
'code'
=>
400
,
'errCode'
=>
5202
,
'msg'
=>
'短信发送失败:'
];
const
E5203
=
[
'code'
=>
400
,
'errCode'
=>
5203
,
'msg'
=>
'验证码不正确'
];
const
E5204
=
[
'code'
=>
400
,
'errCode'
=>
5204
,
'msg'
=>
'该手机号已注册过店铺'
];
const
E5205
=
[
'code'
=>
400
,
'errCode'
=>
5205
,
'msg'
=>
'查询不到该店铺的认证信息'
];
const
E5206
=
[
'code'
=>
400
,
'errCode'
=>
5206
,
'msg'
=>
'xxxx'
];
const
E5207
=
[
'code'
=>
400
,
'errCode'
=>
5207
,
'msg'
=>
'xxxx'
];
const
E5208
=
[
'code'
=>
400
,
'errCode'
=>
5208
,
'msg'
=>
'xxxx'
];
const
E5209
=
[
'code'
=>
400
,
'errCode'
=>
5209
,
'msg'
=>
'xxxx'
];
const
E5210
=
[
'code'
=>
400
,
'errCode'
=>
5210
,
'msg'
=>
'xxxx'
];
public
static
function
getError
(
$code
)
{
$reflect
=
new
\ReflectionClass
(
StoreError
::
class
);
return
$reflect
->
getConstant
(
'E'
.
$code
);
}
}
\ No newline at end of file
src/Schedule/Lib/ScheduleInterface.php
0 → 100644
View file @
84b50e6f
<?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\Schedule\Lib
;
use
Swoft\Core\ResultInterface
;
/**
* The interface of Schedule service
*
* @method ResultInterface deferGetScheduleList(int $storeId, int $month=null)
* @method ResultInterface deferGetScheduleByDateId(int $storeId, int $dateId)
* @method ResultInterface deferUpdateSchedule(int $storeId, int $dateId, array $data)
* @method ResultInterface deferAddSchedule(int $storeId, int $dateId, array $data)
*/
interface
ScheduleInterface
{
/**
* 获取店铺所有日程列表
*
* @param integer $storeId
* @param integer $month 可选参数 指定要查哪个月份的日程列表,格式如:201810
* @return array 空数组表示没有查询到记录
*/
public
function
getScheduleList
(
int
$storeId
,
int
$month
=
null
);
/**
* 获取某天的日程信息
*
* @param integer $storeId
* @param integer $dateId 要查询的日期id,格式要求如:20180803
* @return array 空数组表示没有查询到记录
*/
public
function
getScheduleByDateId
(
int
$storeId
,
int
$dateId
);
/**
* 根据dateId修改某个日程的信息
*
* @param integer $storeId
* @param integer $dateId 要修改的日期id,格式要求如:20180803
* @param array $data
* 参数 $data 字段说明:
* ['offday'] => 是否是休息日,0不是,1是
*
* @return int 成功更新的条数
*/
public
function
updateSchedule
(
int
$storeId
,
int
$dateId
,
array
$data
);
/**
* 添加一个日程安排
*
* @param integer $storeId
* @param integer $dateId 要添加的日期id,格式要求如:20180803
* @param array $data
* 参数 $data 字段说明:
* ['offday'] => 是否是休息日,0不是,1是
*
* @return int
*/
public
function
addSchedule
(
int
$storeId
,
int
$dateId
,
array
$data
);
}
\ No newline at end of file
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