Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Q
queueForTicket_bl
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mengmeng
queueForTicket_bl
Commits
ba552e51
Commit
ba552e51
authored
Feb 15, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api add timeManage modules
parent
e71f7baa
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
257 additions
and
0 deletions
+257
-0
AppointmentTimeManageController.java
...pointment/controller/AppointmentTimeManageController.java
+93
-0
AppointmentTimeManageDao.java
...mit/modules/appointment/dao/AppointmentTimeManageDao.java
+16
-0
AppointmentTimeManageDTO.java
...mit/modules/appointment/dto/AppointmentTimeManageDTO.java
+41
-0
AppointmentTimeManageEntity.java
...dules/appointment/entity/AppointmentTimeManageEntity.java
+42
-0
AppointmentTimeManageService.java
...les/appointment/service/AppointmentTimeManageService.java
+15
-0
AppointmentTimeManageServiceImpl.java
...ntment/service/impl/AppointmentTimeManageServiceImpl.java
+34
-0
AppointmentTimeManageDao.xml
...resources/mapper/appointment/AppointmentTimeManageDao.xml
+16
-0
No files found.
hmit-api/src/main/java/io/hmit/modules/appointment/controller/AppointmentTimeManageController.java
0 → 100644
View file @
ba552e51
package
io
.
hmit
.
modules
.
appointment
.
controller
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.modules.appointment.dto.AppointmentTimeManageDTO
;
import
io.hmit.modules.appointment.service.AppointmentTimeManageService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 预约时间管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-15
*/
@RestController
@RequestMapping
(
"app/appointmenttimemanage"
)
@Api
(
tags
=
"预约时间管理"
)
public
class
AppointmentTimeManageController
{
@Autowired
private
AppointmentTimeManageService
appointmentTimeManageService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
AppointmentTimeManageDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
AppointmentTimeManageDTO
>
page
=
appointmentTimeManageService
.
page
(
params
);
return
new
Result
<
PageData
<
AppointmentTimeManageDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
public
Result
<
AppointmentTimeManageDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
AppointmentTimeManageDTO
data
=
appointmentTimeManageService
.
get
(
id
);
return
new
Result
<
AppointmentTimeManageDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
AppointmentTimeManageDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
appointmentTimeManageService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
AppointmentTimeManageDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
appointmentTimeManageService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//校验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
appointmentTimeManageService
.
delete
(
ids
);
return
new
Result
();
}
}
hmit-api/src/main/java/io/hmit/modules/appointment/dao/AppointmentTimeManageDao.java
0 → 100644
View file @
ba552e51
package
io
.
hmit
.
modules
.
appointment
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.appointment.entity.AppointmentTimeManageEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 预约时间管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-15
*/
@Mapper
public
interface
AppointmentTimeManageDao
extends
BaseDao
<
AppointmentTimeManageEntity
>
{
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/appointment/dto/AppointmentTimeManageDTO.java
0 → 100644
View file @
ba552e51
package
io
.
hmit
.
modules
.
appointment
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 预约时间管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-15
*/
@Data
@ApiModel
(
value
=
"预约时间管理"
)
public
class
AppointmentTimeManageDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键ID"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"开始时间"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endTime
;
@ApiModelProperty
(
value
=
"时间类型"
)
private
String
timeType
;
@ApiModelProperty
(
value
=
"时间间隔"
)
private
String
period
;
@ApiModelProperty
(
value
=
"使用状态 1 正在使用; 2 未使用"
)
private
String
useState
;
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/appointment/entity/AppointmentTimeManageEntity.java
0 → 100644
View file @
ba552e51
package
io
.
hmit
.
modules
.
appointment
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 预约时间管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-15
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"appointment_time_manage"
)
public
class
AppointmentTimeManageEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 开始时间
*/
private
Date
startTime
;
/**
* 结束时间
*/
private
Date
endTime
;
/**
* 时间类型
*/
private
String
timeType
;
/**
* 时间间隔
*/
private
String
period
;
/**
* 使用状态 1 正在使用; 2 未使用
*/
private
String
useState
;
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/appointment/service/AppointmentTimeManageService.java
0 → 100644
View file @
ba552e51
package
io
.
hmit
.
modules
.
appointment
.
service
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.appointment.dto.AppointmentTimeManageDTO
;
import
io.hmit.modules.appointment.entity.AppointmentTimeManageEntity
;
/**
* 预约时间管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-15
*/
public
interface
AppointmentTimeManageService
extends
CrudService
<
AppointmentTimeManageEntity
,
AppointmentTimeManageDTO
>
{
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/appointment/service/impl/AppointmentTimeManageServiceImpl.java
0 → 100644
View file @
ba552e51
package
io
.
hmit
.
modules
.
appointment
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.modules.appointment.dao.AppointmentTimeManageDao
;
import
io.hmit.modules.appointment.dto.AppointmentTimeManageDTO
;
import
io.hmit.modules.appointment.entity.AppointmentTimeManageEntity
;
import
io.hmit.modules.appointment.service.AppointmentTimeManageService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 预约时间管理
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-15
*/
@Service
public
class
AppointmentTimeManageServiceImpl
extends
CrudServiceImpl
<
AppointmentTimeManageDao
,
AppointmentTimeManageEntity
,
AppointmentTimeManageDTO
>
implements
AppointmentTimeManageService
{
@Override
public
QueryWrapper
<
AppointmentTimeManageEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
QueryWrapper
<
AppointmentTimeManageEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
return
wrapper
;
}
}
\ No newline at end of file
hmit-api/src/main/resources/mapper/appointment/AppointmentTimeManageDao.xml
0 → 100644
View file @
ba552e51
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.hmit.modules.appointment.dao.AppointmentTimeManageDao"
>
<resultMap
type=
"io.hmit.modules.appointment.entity.AppointmentTimeManageEntity"
id=
"appointmentTimeManageMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"timeType"
column=
"time_type"
/>
<result
property=
"period"
column=
"period"
/>
<result
property=
"useState"
column=
"use_state"
/>
</resultMap>
</mapper>
\ 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