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
c7c194ff
Commit
c7c194ff
authored
Feb 19, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增app接口
parent
ba552e51
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
205 additions
and
78 deletions
+205
-78
AppointmentServiceDTO.java
...o/hmit/modules/appointment/dto/AppointmentServiceDTO.java
+2
-2
AppointmentServiceEntity.java
.../modules/appointment/entity/AppointmentServiceEntity.java
+2
-2
AppointmentServiceExcel.java
...it/modules/appointment/excel/AppointmentServiceExcel.java
+2
-2
AppointmentOrderController.java
...es/appointment/controller/AppointmentOrderController.java
+29
-3
AppointmentServiceController.java
.../appointment/controller/AppointmentServiceController.java
+9
-0
AppointmentTimeManageController.java
...pointment/controller/AppointmentTimeManageController.java
+6
-51
AppointmentServiceDao.java
...o/hmit/modules/appointment/dao/AppointmentServiceDao.java
+6
-2
AppointmentOrderDTO.java
.../io/hmit/modules/appointment/dto/AppointmentOrderDTO.java
+32
-2
AppointmentOrderServiceDTO.java
...t/modules/appointment/dto/AppointmentOrderServiceDTO.java
+8
-2
AppointmentServiceDTO.java
...o/hmit/modules/appointment/dto/AppointmentServiceDTO.java
+4
-3
ReservationDTO.java
.../java/io/hmit/modules/appointment/dto/ReservationDTO.java
+55
-0
AppointmentServiceEntity.java
.../modules/appointment/entity/AppointmentServiceEntity.java
+2
-2
AppointmentServiceService.java
...odules/appointment/service/AppointmentServiceService.java
+9
-1
AppointmentTimeManageService.java
...les/appointment/service/AppointmentTimeManageService.java
+3
-1
AppointmentServiceServiceImpl.java
...pointment/service/impl/AppointmentServiceServiceImpl.java
+18
-1
AppointmentTimeManageServiceImpl.java
...ntment/service/impl/AppointmentTimeManageServiceImpl.java
+13
-1
AppointmentServiceDao.xml
...in/resources/mapper/appointment/AppointmentServiceDao.xml
+5
-3
No files found.
hmit-admin/src/main/java/io/hmit/modules/appointment/dto/AppointmentServiceDTO.java
View file @
c7c194ff
...
...
@@ -26,7 +26,7 @@ public class AppointmentServiceDTO implements Serializable {
private
String
serviceName
;
@ApiModelProperty
(
value
=
"服务事项父类id"
)
private
Long
serviceParentI
d
;
private
Long
pi
d
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
...
...
@@ -53,4 +53,4 @@ public class AppointmentServiceDTO implements Serializable {
private
Date
updateDate
;
}
\ No newline at end of file
}
hmit-admin/src/main/java/io/hmit/modules/appointment/entity/AppointmentServiceEntity.java
View file @
c7c194ff
...
...
@@ -26,7 +26,7 @@ public class AppointmentServiceEntity extends BaseEntity {
/**
* 服务事项父类id
*/
private
Long
serviceParentI
d
;
private
Long
pi
d
;
/**
* 排序
*/
...
...
@@ -51,4 +51,4 @@ public class AppointmentServiceEntity extends BaseEntity {
* 更新时间
*/
private
Date
updateDate
;
}
\ No newline at end of file
}
hmit-admin/src/main/java/io/hmit/modules/appointment/excel/AppointmentServiceExcel.java
View file @
c7c194ff
...
...
@@ -18,7 +18,7 @@ public class AppointmentServiceExcel {
@Excel
(
name
=
"服务事项名称"
)
private
String
serviceName
;
@Excel
(
name
=
"服务事项父类id"
)
private
Long
serviceParentI
d
;
private
Long
pi
d
;
@Excel
(
name
=
"排序"
)
private
Integer
sort
;
@Excel
(
name
=
"首页图标地址"
)
...
...
@@ -36,4 +36,4 @@ public class AppointmentServiceExcel {
@Excel
(
name
=
"更新时间"
)
private
Date
updateDate
;
}
\ No newline at end of file
}
hmit-api/src/main/java/io/hmit/modules/appointment/controller/AppointmentOrderController.java
View file @
c7c194ff
...
...
@@ -9,7 +9,10 @@ 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.AppointmentOrderDTO
;
import
io.hmit.modules.appointment.dto.AppointmentOrderServiceDTO
;
import
io.hmit.modules.appointment.dto.ReservationDTO
;
import
io.hmit.modules.appointment.service.AppointmentOrderService
;
import
io.hmit.modules.appointment.service.AppointmentOrderServiceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -18,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.Date
;
import
java.util.Map
;
...
...
@@ -34,6 +38,9 @@ public class AppointmentOrderController {
@Autowired
private
AppointmentOrderService
appointmentOrderService
;
@Autowired
private
AppointmentOrderServiceService
appointmentOrderServiceService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
...
...
@@ -57,12 +64,31 @@ public class AppointmentOrderController {
}
@PostMapping
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
AppointmentOrder
DTO
dto
){
@ApiOperation
(
"
预约
保存"
)
public
Result
save
(
@RequestBody
Reservation
DTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
appointmentOrderService
.
save
(
dto
);
AppointmentOrderDTO
appointmentOrderDTO
=
new
AppointmentOrderDTO
().
assembleAppointmentOrderDTO
(
dto
);
appointmentOrderService
.
save
(
appointmentOrderDTO
);
AppointmentOrderServiceDTO
orderServiceDTO
=
new
AppointmentOrderServiceDTO
().
assembleAppointmentOrderServiceDTO
(
appointmentOrderDTO
);
appointmentOrderServiceService
.
save
(
orderServiceDTO
);
return
new
Result
();
}
@GetMapping
(
"/cancel/{id}"
)
@ApiOperation
(
"预约取消"
)
public
Result
cancelReservation
(
@PathVariable
(
"id"
)
Long
id
){
AppointmentOrderDTO
data
=
appointmentOrderService
.
get
(
id
);
data
.
setStatus
(
3
);
data
.
setServiceName
(
"已取消"
);
data
.
setUpdateDate
(
new
Date
());
appointmentOrderService
.
update
(
data
);
return
new
Result
();
}
...
...
hmit-api/src/main/java/io/hmit/modules/appointment/controller/AppointmentServiceController.java
View file @
c7c194ff
...
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -49,6 +50,14 @@ public class AppointmentServiceController {
return
new
Result
<
PageData
<
AppointmentServiceDTO
>>().
ok
(
page
);
}
@GetMapping
(
"list"
)
@ApiOperation
(
"服务树形列表"
)
public
Result
<
List
<
AppointmentServiceDTO
>>
list
()
{
List
<
AppointmentServiceDTO
>
list
=
appointmentServiceService
.
getAllServicesList
();
return
new
Result
<
List
<
AppointmentServiceDTO
>>().
ok
(
list
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
...
...
hmit-api/src/main/java/io/hmit/modules/appointment/controller/AppointmentTimeManageController.java
View file @
c7c194ff
package
io
.
hmit
.
modules
.
appointment
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
...
...
@@ -9,6 +10,7 @@ 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.entity.AppointmentTimeManageEntity
;
import
io.hmit.modules.appointment.service.AppointmentTimeManageService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -36,58 +38,11 @@ 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
);
@GetMapping
(
"getTime"
)
@ApiOperation
(
"获取当前正使用的时间段"
)
public
Result
<
AppointmentTimeManageDTO
>
getTime
(
@PathVariable
(
"id"
)
Long
id
){
AppointmentTimeManageDTO
data
=
appointmentTimeManageService
.
getByUseState
();
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/AppointmentServiceDao.java
View file @
c7c194ff
...
...
@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
import
io.hmit.modules.appointment.entity.AppointmentServiceEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* 可供预约的服务事项种类(不确定是否数据落地)。
*
...
...
@@ -12,5 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public
interface
AppointmentServiceDao
extends
BaseDao
<
AppointmentServiceEntity
>
{
}
\ No newline at end of file
List
<
AppointmentServiceEntity
>
getAllServiceList
();
}
hmit-api/src/main/java/io/hmit/modules/appointment/dto/AppointmentOrderDTO.java
View file @
c7c194ff
...
...
@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.UUID
;
/**
...
...
@@ -85,5 +87,33 @@ public class AppointmentOrderDTO implements Serializable {
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateDate
;
}
\ No newline at end of file
public
AppointmentOrderDTO
assembleAppointmentOrderDTO
(
ReservationDTO
reservationDTO
){
AppointmentOrderDTO
dto
=
new
AppointmentOrderDTO
();
Date
dt
=
new
Date
();
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
strDate
=
sf
.
format
(
dt
);
UUID
uuid
=
UUID
.
randomUUID
();
String
[]
strSequence
=
uuid
.
toString
().
split
(
"-"
);
dto
.
setOrderNum
(
"YUYUE-"
+
strDate
+
"-"
+
strSequence
[
1
]);
dto
.
setAppointmentNum
(
reservationDTO
.
getAppointmentNum
());
dto
.
setStatus
(
1
);
dto
.
setStatusName
(
"已预约"
);
dto
.
setServiceId
(
reservationDTO
.
getServiceId
());
dto
.
setServiceName
(
reservationDTO
.
getServiceName
());
dto
.
setIsApp
(
reservationDTO
.
getIsApp
());
dto
.
setOrderQueueId
(
reservationDTO
.
getOrderQueueId
());
dto
.
setAppointmentPerson
(
reservationDTO
.
getAppointmentPerson
());
dto
.
setAppointmentPhone
(
reservationDTO
.
getAppointmentPhone
());
dto
.
setAppointmentIdCard
(
reservationDTO
.
getAppointmentIdCard
());
dto
.
setAppointmentTime
(
reservationDTO
.
getAppointmentTime
());
dto
.
setServiceWindow
(
reservationDTO
.
getServiceWindow
());
dto
.
setRemark
(
reservationDTO
.
getRemark
());
dto
.
setCreateDate
(
new
Date
());
dto
.
setUpdateDate
(
new
Date
());
return
dto
;
}
}
hmit-api/src/main/java/io/hmit/modules/appointment/dto/AppointmentOrderServiceDTO.java
View file @
c7c194ff
...
...
@@ -43,5 +43,11 @@ public class AppointmentOrderServiceDTO implements Serializable {
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateDate
;
}
\ No newline at end of file
public
AppointmentOrderServiceDTO
assembleAppointmentOrderServiceDTO
(
AppointmentOrderDTO
orderDTO
){
AppointmentOrderServiceDTO
dto
=
new
AppointmentOrderServiceDTO
();
dto
.
setOrderId
(
orderDTO
.
getId
());
dto
.
setServiceId
(
orderDTO
.
getServiceId
());
return
dto
;
}
}
hmit-api/src/main/java/io/hmit/modules/appointment/dto/AppointmentServiceDTO.java
View file @
c7c194ff
package
io
.
hmit
.
modules
.
appointment
.
dto
;
import
io.hmit.common.utils.TreeNode
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -16,7 +17,7 @@ import java.util.Date;
*/
@Data
@ApiModel
(
value
=
"可供预约的服务事项种类(不确定是否数据落地)。"
)
public
class
AppointmentServiceDTO
implements
Serializable
{
public
class
AppointmentServiceDTO
extends
TreeNode
<
AppointmentServiceDTO
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
...
...
@@ -26,7 +27,7 @@ public class AppointmentServiceDTO implements Serializable {
private
String
serviceName
;
@ApiModelProperty
(
value
=
"服务事项父类id"
)
private
Long
serviceParentI
d
;
private
Long
pi
d
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
...
...
@@ -53,4 +54,4 @@ public class AppointmentServiceDTO implements Serializable {
private
Date
updateDate
;
}
\ No newline at end of file
}
hmit-api/src/main/java/io/hmit/modules/appointment/dto/ReservationDTO.java
0 → 100644
View file @
c7c194ff
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-13
*/
@Data
@ApiModel
(
value
=
"预约信息表"
)
public
class
ReservationDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"预约取单号(取号系统生成)"
)
private
String
appointmentNum
;
@ApiModelProperty
(
value
=
"预约所属的服务事项id"
)
private
Long
serviceId
;
@ApiModelProperty
(
value
=
"预约所属的服务事项名称"
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"是否浙里办预约 0否,1是"
)
private
Integer
isApp
;
@ApiModelProperty
(
value
=
"预约订单所在队列id"
)
private
Long
orderQueueId
;
@ApiModelProperty
(
value
=
"预约人"
)
private
String
appointmentPerson
;
@ApiModelProperty
(
value
=
"预约人电话"
)
private
String
appointmentPhone
;
@ApiModelProperty
(
value
=
"预约人身份证号码"
)
private
String
appointmentIdCard
;
@ApiModelProperty
(
value
=
"预约时间"
)
private
Date
appointmentTime
;
@ApiModelProperty
(
value
=
"服务办事窗口"
)
private
String
serviceWindow
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
hmit-api/src/main/java/io/hmit/modules/appointment/entity/AppointmentServiceEntity.java
View file @
c7c194ff
...
...
@@ -26,7 +26,7 @@ public class AppointmentServiceEntity extends BaseEntity {
/**
* 服务事项父类id
*/
private
Long
serviceParentI
d
;
private
Long
pi
d
;
/**
* 排序
*/
...
...
@@ -51,4 +51,4 @@ public class AppointmentServiceEntity extends BaseEntity {
* 更新时间
*/
private
Date
updateDate
;
}
\ No newline at end of file
}
hmit-api/src/main/java/io/hmit/modules/appointment/service/AppointmentServiceService.java
View file @
c7c194ff
...
...
@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
import
io.hmit.modules.appointment.dto.AppointmentServiceDTO
;
import
io.hmit.modules.appointment.entity.AppointmentServiceEntity
;
import
java.util.List
;
/**
* 可供预约的服务事项种类(不确定是否数据落地)。
*
...
...
@@ -12,4 +14,10 @@ import io.hmit.modules.appointment.entity.AppointmentServiceEntity;
*/
public
interface
AppointmentServiceService
extends
CrudService
<
AppointmentServiceEntity
,
AppointmentServiceDTO
>
{
}
\ No newline at end of file
/**
* 菜单列表
*
*/
List
<
AppointmentServiceDTO
>
getAllServicesList
();
}
hmit-api/src/main/java/io/hmit/modules/appointment/service/AppointmentTimeManageService.java
View file @
c7c194ff
...
...
@@ -12,4 +12,6 @@ import io.hmit.modules.appointment.entity.AppointmentTimeManageEntity;
*/
public
interface
AppointmentTimeManageService
extends
CrudService
<
AppointmentTimeManageEntity
,
AppointmentTimeManageDTO
>
{
}
\ No newline at end of file
AppointmentTimeManageDTO
getByUseState
();
}
hmit-api/src/main/java/io/hmit/modules/appointment/service/impl/AppointmentServiceServiceImpl.java
View file @
c7c194ff
...
...
@@ -2,13 +2,18 @@ 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.common.utils.ConvertUtils
;
import
io.hmit.common.utils.HttpContextUtils
;
import
io.hmit.common.utils.TreeUtils
;
import
io.hmit.modules.appointment.dao.AppointmentServiceDao
;
import
io.hmit.modules.appointment.dto.AppointmentServiceDTO
;
import
io.hmit.modules.appointment.entity.AppointmentServiceEntity
;
import
io.hmit.modules.appointment.service.AppointmentServiceService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -20,6 +25,9 @@ import java.util.Map;
@Service
public
class
AppointmentServiceServiceImpl
extends
CrudServiceImpl
<
AppointmentServiceDao
,
AppointmentServiceEntity
,
AppointmentServiceDTO
>
implements
AppointmentServiceService
{
@Autowired
private
AppointmentServiceDao
appointmentServiceDao
;
@Override
public
QueryWrapper
<
AppointmentServiceEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
...
...
@@ -31,4 +39,13 @@ public class AppointmentServiceServiceImpl extends CrudServiceImpl<AppointmentSe
}
}
\ No newline at end of file
@Override
public
List
<
AppointmentServiceDTO
>
getAllServicesList
()
{
List
<
AppointmentServiceEntity
>
servicesList
=
appointmentServiceDao
.
getAllServiceList
();
List
<
AppointmentServiceDTO
>
dtoList
=
ConvertUtils
.
sourceToTarget
(
servicesList
,
AppointmentServiceDTO
.
class
);
return
TreeUtils
.
build
(
dtoList
);
}
}
hmit-api/src/main/java/io/hmit/modules/appointment/service/impl/AppointmentTimeManageServiceImpl.java
View file @
c7c194ff
...
...
@@ -2,10 +2,13 @@ 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.common.utils.ConvertUtils
;
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
net.sf.jsqlparser.statement.create.table.CreateTable
;
import
org.apache.commons.lang3.Conversion
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
...
...
@@ -23,12 +26,21 @@ public class AppointmentTimeManageServiceImpl extends CrudServiceImpl<Appointmen
@Override
public
QueryWrapper
<
AppointmentTimeManageEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
useState
=
(
String
)
params
.
get
(
"useState"
);
QueryWrapper
<
AppointmentTimeManageEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
useState
),
"use_state"
,
useState
);
return
wrapper
;
}
@Override
public
AppointmentTimeManageDTO
getByUseState
(){
AppointmentTimeManageEntity
entity
=
baseDao
.
selectOne
(
new
QueryWrapper
<
AppointmentTimeManageEntity
>()
.
lambda
().
eq
(
AppointmentTimeManageEntity:
:
getUseState
,
"1"
));
return
ConvertUtils
.
sourceToTarget
(
entity
,
AppointmentTimeManageDTO
.
class
);
}
}
\ No newline at end of file
}
hmit-api/src/main/resources/mapper/appointment/AppointmentServiceDao.xml
View file @
c7c194ff
...
...
@@ -6,7 +6,7 @@
<resultMap
type=
"io.hmit.modules.appointment.entity.AppointmentServiceEntity"
id=
"appointmentServiceMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"serviceName"
column=
"service_name"
/>
<result
property=
"
serviceParentId"
column=
"service_parent_
id"
/>
<result
property=
"
pid"
column=
"p
id"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"icon"
column=
"icon"
/>
<result
property=
"remark"
column=
"remark"
/>
...
...
@@ -17,5 +17,7 @@
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
</mapper>
\ No newline at end of file
<select
id=
"getAllServiceList"
resultType=
"io.hmit.modules.appointment.entity.AppointmentServiceEntity"
>
select * from appointment_service
</select>
</mapper>
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