Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
ae3ec0d0
Commit
ae3ec0d0
authored
Apr 28, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
5d31b843
0d2febf1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
TodoItemDTO.java
...api/src/main/java/com/gic/enterprise/dto/TodoItemDTO.java
+10
-0
TodoItemApiServiceImpl.java
...enterprise/service/outer/impl/TodoItemApiServiceImpl.java
+16
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/TodoItemDTO.java
View file @
ae3ec0d0
...
...
@@ -77,6 +77,16 @@ public class TodoItemDTO implements Serializable {
@NotBlank
(
message
=
"url不能为空"
,
groups
=
SaveValidView
.
class
)
private
String
itemInfoUrl
;
private
String
itemTypeName
;
public
void
setItemTypeName
(
String
itemTypeName
)
{
this
.
itemTypeName
=
itemTypeName
;
}
public
String
getItemTypeName
()
{
return
itemTypeName
;
}
public
Integer
getTodoItemId
()
{
return
todoItemId
;
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/TodoItemApiServiceImpl.java
View file @
ae3ec0d0
...
...
@@ -4,17 +4,24 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.dto.DictDTO
;
import
com.gic.enterprise.dto.TodoItemDTO
;
import
com.gic.enterprise.entity.TabTodoItem
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.qo.TodoItemQO
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.service.DictApiService
;
import
com.gic.enterprise.service.TodoItemApiService
;
import
com.gic.enterprise.service.TodoItemService
;
import
com.gic.enterprise.utils.valid.ValidParamsUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
*
* @Description:
...
...
@@ -26,6 +33,8 @@ public class TodoItemApiServiceImpl implements TodoItemApiService {
@Autowired
private
TodoItemService
todoItemService
;
@Autowired
private
DictApiService
dictApiService
;
@Override
public
ServiceResponse
<
Void
>
saveTodoItem
(
TodoItemDTO
todoItemDTO
)
{
...
...
@@ -55,6 +64,13 @@ public class TodoItemApiServiceImpl implements TodoItemApiService {
public
ServiceResponse
<
Page
<
TodoItemDTO
>>
listTodoItem
(
TodoItemQO
todoItemQO
)
{
com
.
github
.
pagehelper
.
Page
<
TabTodoItem
>
page
=
this
.
todoItemService
.
listTodoItem
(
todoItemQO
);
Page
<
TodoItemDTO
>
result
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
page
,
TodoItemDTO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
page
))
{
List
<
DictDTO
>
list
=
dictApiService
.
listTodoItemType
().
getResult
();
Map
<
String
,
String
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
DictDTO:
:
getValue
,
DictDTO:
:
getKey
));
for
(
TodoItemDTO
e
:
result
.
getResult
())
{
e
.
setItemTypeName
(
map
.
get
(
e
.
getItemType
()));
}
}
return
EnterpriseServiceResponse
.
success
(
result
);
}
...
...
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