Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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-store
Commits
30bbeeac
Commit
30bbeeac
authored
Oct 14, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改经营类目
parent
fe6fb3d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletions
+34
-1
StoreDictDTO.java
...ore-api/src/main/java/com/gic/store/dto/StoreDictDTO.java
+11
-0
StoreDictApiServiceImpl.java
...gic/store/service/outer/impl/StoreDictApiServiceImpl.java
+23
-1
No files found.
gic-store-api/src/main/java/com/gic/store/dto/StoreDictDTO.java
View file @
30bbeeac
...
...
@@ -2,6 +2,7 @@ package com.gic.store.dto;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* tab_store_dict
...
...
@@ -44,6 +45,7 @@ public class StoreDictDTO implements Serializable {
* 0:owner 1:other
*/
private
Integer
ownType
=
0
;
private
List
<
StoreDictDTO
>
storeDictList
;
public
Integer
getStoreDictId
()
{
return
storeDictId
;
...
...
@@ -116,4 +118,12 @@ public class StoreDictDTO implements Serializable {
public
void
setOwnType
(
Integer
ownType
)
{
this
.
ownType
=
ownType
;
}
public
void
setStoreDictList
(
List
<
StoreDictDTO
>
storeDictList
)
{
this
.
storeDictList
=
storeDictList
;
}
public
List
<
StoreDictDTO
>
getStoreDictList
()
{
return
storeDictList
;
}
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreDictApiServiceImpl.java
View file @
30bbeeac
...
...
@@ -37,7 +37,29 @@ public class StoreDictApiServiceImpl implements StoreDictApiService {
@Override
public
ServiceResponse
<
List
<
StoreDictDTO
>>
listAllBusinessCategory
(
Integer
enterpriseId
)
{
return
ServiceResponse
.
success
(
this
.
listAllStoreDict
(
enterpriseId
,
"businessCategory"
));
List
<
StoreDictDTO
>
result
=
new
ArrayList
<>();
List
<
BizdictDTO
>
list
=
this
.
bizdictService
.
treeByCategoryCode
(
"businessCategory"
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
result
=
changeListToTree
(
list
,
enterpriseId
);
}
return
ServiceResponse
.
success
(
result
);
}
private
List
<
StoreDictDTO
>
changeListToTree
(
List
<
BizdictDTO
>
list
,
Integer
enterpriseId
)
{
List
<
StoreDictDTO
>
result
=
new
ArrayList
<>();
for
(
BizdictDTO
bizdictDTO
:
list
){
StoreDictDTO
dictDTO
=
new
StoreDictDTO
();
dictDTO
.
setEnterpriseId
(
enterpriseId
);
dictDTO
.
setKey
(
bizdictDTO
.
getName
());
dictDTO
.
setValue
(
bizdictDTO
.
getValueContent
());
if
(
CollectionUtils
.
isNotEmpty
(
bizdictDTO
.
getNodeChildren
()))
{
List
nodeChildren
=
bizdictDTO
.
getNodeChildren
();
List
<
StoreDictDTO
>
dtoList
=
changeListToTree
((
List
<
BizdictDTO
>)
nodeChildren
,
enterpriseId
);
dictDTO
.
setStoreDictList
(
dtoList
);
}
result
.
add
(
dictDTO
);
}
return
result
;
}
@Override
...
...
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