Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
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
pension
Commits
c5c63e51
Commit
c5c63e51
authored
Feb 06, 2021
by
lings
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into lings
parents
0081eee7
d2594ab7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
11 deletions
+52
-11
PensionServiceController.java
...les/serviceOrder/controller/PensionServiceController.java
+12
-0
PensionServiceDTO.java
...a/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
+8
-2
PensionServiceEntity.java
...mit/modules/serviceOrder/entity/PensionServiceEntity.java
+6
-2
PensionServiceService.java
...t/modules/serviceOrder/service/PensionServiceService.java
+5
-1
PensionServiceServiceImpl.java
.../serviceOrder/service/impl/PensionServiceServiceImpl.java
+17
-3
PensionServiceDao.xml
.../main/resources/mapper/serviceOrder/PensionServiceDao.xml
+4
-3
No files found.
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/PensionServiceController.java
View file @
c5c63e51
...
...
@@ -72,6 +72,18 @@ public class PensionServiceController {
return
new
Result
<
List
<
PensionServiceDTO
>>().
ok
(
pensionServiceDTOList
);
}
@GetMapping
(
"getServiceTree"
)
@ApiOperation
(
"获取服务list不分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"keyword"
,
value
=
"查询字段,"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"serviceType"
,
value
=
"服务类型"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
List
<
PensionServiceDTO
>>
getServiceTree
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
List
<
PensionServiceDTO
>
pensionServiceDTOList
=
pensionServiceService
.
getServiceTree
(
params
);
return
new
Result
<
List
<
PensionServiceDTO
>>().
ok
(
pensionServiceDTOList
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@RequiresPermissions
(
"serviceOrder:pensionservice:info"
)
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
View file @
c5c63e51
package
io
.
hmit
.
modules
.
serviceOrder
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.hmit.common.utils.TreeNode
;
import
io.hmit.modules.sys.dto.SysMenuDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -19,14 +21,18 @@ import java.util.List;
*/
@Data
@ApiModel
(
value
=
"服务表"
)
public
class
PensionServiceDTO
implements
Serializable
{
public
class
PensionServiceDTO
extends
TreeNode
<
PensionServiceDTO
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"pid"
)
private
Long
pid
;
@ApiModelProperty
(
value
=
"服务名称"
)
private
String
n
ame
;
private
String
serviceN
ame
;
@ApiModelProperty
(
value
=
"服务内容介绍"
)
private
String
serviceContent
;
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/entity/PensionServiceEntity.java
View file @
c5c63e51
package
io
.
hmit
.
modules
.
serviceOrder
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
lombok.Data
;
...
...
@@ -23,7 +24,10 @@ public class PensionServiceEntity extends BaseEntity {
/**
* 服务名称
*/
private
String
name
;
private
String
serviceName
;
private
Long
pid
;
/**
* 服务类型
*/
...
...
@@ -77,4 +81,4 @@ public class PensionServiceEntity extends BaseEntity {
*/
private
String
serviceContent
;
}
\ No newline at end of file
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/PensionServiceService.java
View file @
c5c63e51
...
...
@@ -4,6 +4,9 @@ import io.hmit.common.service.CrudService;
import
io.hmit.modules.serviceOrder.dto.PensionServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionServiceEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务表
*
...
...
@@ -12,4 +15,5 @@ import io.hmit.modules.serviceOrder.entity.PensionServiceEntity;
*/
public
interface
PensionServiceService
extends
CrudService
<
PensionServiceEntity
,
PensionServiceDTO
>
{
}
\ No newline at end of file
List
<
PensionServiceDTO
>
getServiceTree
(
Map
<
String
,
Object
>
params
);
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionServiceServiceImpl.java
View file @
c5c63e51
...
...
@@ -2,13 +2,19 @@ package io.hmit.modules.serviceOrder.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.TreeUtils
;
import
io.hmit.modules.serviceOrder.dao.PensionServiceDao
;
import
io.hmit.modules.serviceOrder.dto.PensionServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionServiceEntity
;
import
io.hmit.modules.serviceOrder.service.PensionServiceService
;
import
io.hmit.modules.sys.dto.SysMenuDTO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -20,17 +26,18 @@ import java.util.Map;
@Service
public
class
PensionServiceServiceImpl
extends
CrudServiceImpl
<
PensionServiceDao
,
PensionServiceEntity
,
PensionServiceDTO
>
implements
PensionServiceService
{
@Autowired
private
PensionServiceService
pensionServiceService
;
@Override
public
QueryWrapper
<
PensionServiceEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
keyword
=
(
String
)
params
.
get
(
"keyword"
);
String
serviceType
=
(
String
)
params
.
get
(
"serviceType"
);
QueryWrapper
<
PensionServiceEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
serviceType
),
"service_type_id"
,
serviceType
);
wrapper
.
like
(
StringUtils
.
isNotBlank
(
keyword
),
"name"
,
keyword
);
wrapper
.
like
(
StringUtils
.
isNotBlank
(
keyword
),
"service_name"
,
keyword
);
...
...
@@ -38,4 +45,11 @@ public class PensionServiceServiceImpl extends CrudServiceImpl<PensionServiceDao
}
@Override
public
List
<
PensionServiceDTO
>
getServiceTree
(
Map
<
String
,
Object
>
params
)
{
List
<
PensionServiceEntity
>
list
=
baseDao
.
selectList
(
getWrapper
(
params
));
List
<
PensionServiceDTO
>
dtos
=
ConvertUtils
.
sourceToTarget
(
list
,
PensionServiceDTO
.
class
);
return
TreeUtils
.
build
(
dtos
);
}
}
hmit-admin/src/main/resources/mapper/serviceOrder/PensionServiceDao.xml
View file @
c5c63e51
...
...
@@ -5,8 +5,9 @@
<resultMap
type=
"io.hmit.modules.serviceOrder.entity.PensionServiceEntity"
id=
"pensionServiceMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"serviceTypeId"
column=
"service_type_id"
/>
<result
property=
"serviceName"
column=
"service_name"
/>
<result
property=
"serviceParentId"
column=
"service_parent_id"
/>
<result
property=
"pid"
column=
"pid"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"icon"
column=
"icon"
/>
<result
property=
"detailPicture"
column=
"detail_picture"
/>
...
...
@@ -23,4 +24,4 @@
</resultMap>
</mapper>
\ No newline at end of file
</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