Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dex-basic-service-expand
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
INET-TWO
server
dex-basic-service-expand
Commits
b8335fc9
Commit
b8335fc9
authored
Sep 20, 2024
by
wangyangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新版本
parent
61e116c4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
239 additions
and
8 deletions
+239
-8
ExtProgramServiceImpl.java
...de/dex/basic/core/service/impl/ExtProgramServiceImpl.java
+24
-8
logback-spring.xml
...e-expand-server/src/main/resources/log/logback-spring.xml
+215
-0
No files found.
dex-basic-service-expand-core/src/main/java/com/yonde/dex/basic/core/service/impl/ExtProgramServiceImpl.java
View file @
b8335fc9
...
@@ -2,14 +2,19 @@ package com.yonde.dex.basic.core.service.impl;
...
@@ -2,14 +2,19 @@ package com.yonde.dex.basic.core.service.impl;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basic.common.vo.ExtProgramProjectLinkVO
;
import
com.yonde.dex.basic.common.vo.ExtProgramProjectLinkVO
;
import
com.yonde.dex.basic.core.service.ExtProgramProjectLinkService
;
import
com.yonde.dex.basic.core.service.ExtProgramProjectLinkService
;
import
com.yonde.dex.basic.core.service.expand.ExtDxContextService
;
import
com.yonde.dex.basic.core.service.expand.ExtDxContextService
;
import
com.yonde.dex.basic.core.util.SearchUtil
;
import
com.yonde.dex.basic.core.util.SearchUtil
;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.context.core.service.shadow.DxContextProjectServiceShadow
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
import
java.util.List
;
import
com.yonde.dex.basic.common.vo.ExtProgramVO
;
import
com.yonde.dex.basic.common.vo.ExtProgramVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -18,19 +23,21 @@ import org.springframework.web.bind.annotation.*;
...
@@ -18,19 +23,21 @@ import org.springframework.web.bind.annotation.*;
import
com.yonde.dex.basic.core.service.ExtProgramService
;
import
com.yonde.dex.basic.core.service.ExtProgramService
;
import
com.yonde.dex.basic.core.repository.ExtProgramRepository
;
import
com.yonde.dex.basic.core.repository.ExtProgramRepository
;
import
com.yonde.dex.basic.entity.po.ExtProgram
;
import
com.yonde.dex.basic.entity.po.ExtProgram
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
/**
/**
* @description: ExtProgram-ServiceImpl
* @description: ExtProgram-ServiceImpl
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-9-20 10:26:39
* @date: 2024-9-20 10:26:39
**/
**/
@Slf4j
@Slf4j
@Service
(
ExtProgramServiceImpl
.
BEAN_NAME
)
@Service
(
ExtProgramServiceImpl
.
BEAN_NAME
)
public
class
ExtProgramServiceImpl
<
V
extends
ExtProgramVO
>
implements
ExtProgramService
<
V
>{
public
class
ExtProgramServiceImpl
<
V
extends
ExtProgramVO
>
implements
ExtProgramService
<
V
>
{
public
static
final
String
BEAN_NAME
=
"extProgramServiceImpl"
;
public
static
final
String
BEAN_NAME
=
"extProgramServiceImpl"
;
...
@@ -45,18 +52,27 @@ public class ExtProgramServiceImpl<V extends ExtProgramVO> implements ExtProgram
...
@@ -45,18 +52,27 @@ public class ExtProgramServiceImpl<V extends ExtProgramVO> implements ExtProgram
@Autowired
@Autowired
ExtDxContextService
extDxContextService
;
ExtDxContextService
extDxContextService
;
@Autowired
DxContextProjectServiceShadow
contextProjectServiceShadow
;
@Override
@Override
public
Page
<
V
>
searchProps
(
SearchQueryCondition
searchQueryCondition
)
{
public
Page
<
V
>
searchProps
(
SearchQueryCondition
searchQueryCondition
)
{
Page
<
V
>
page
=
search
(
searchQueryCondition
);
Page
<
V
>
page
=
search
(
searchQueryCondition
);
if
(
page
.
hasContent
())
{
if
(
page
.
hasContent
())
{
for
(
V
v
:
page
.
getContent
())
{
for
(
V
v
:
page
.
getContent
())
{
//设置项目子级
//设置项目子级
展开target的时候并没有展开,后续重新查询展开
SearchQueryCondition
queryCondition
=
SearchUtil
.
buildQueryWithOpenAttr
(
"sourceId"
,
SearchItem
.
Operator
.
EQ
,
v
.
getId
(),
"target"
);
SearchQueryCondition
queryCondition
=
SearchUtil
.
buildQueryWithOpenAttr
(
"sourceId"
,
SearchItem
.
Operator
.
EQ
,
v
.
getId
(),
"target"
);
List
<
ExtProgramProjectLinkVO
>
content
=
extProgramProjectLinkService
.
findRecursion
(
queryCondition
).
getContent
();
List
<
ExtProgramProjectLinkVO
>
content
=
extProgramProjectLinkService
.
findRecursion
(
queryCondition
).
getContent
();
for
(
ExtProgramProjectLinkVO
linkVO
:
content
)
{
for
(
ExtProgramProjectLinkVO
linkVO
:
content
)
{
Long
targetId
=
linkVO
.
getTargetId
();
Long
targetId
=
linkVO
.
getTargetId
();
List
<
DxContextProjectVO
>
children
=
extDxContextService
.
getSingleChild
(
targetId
);
List
<
DxContextProjectVO
>
children
=
extDxContextService
.
getSingleChild
(
targetId
);
linkVO
.
getTarget
().
setChildren
(
children
);
//深度查询查不出来,以下方法查询也是有问题
// DxContextVO target = extDxContextService.getContextVoById(targetId);
DxContextVO
target
=
(
DxContextVO
)
extDxContextService
.
search
(
SearchUtil
.
buildQuery
(
"id"
,
SearchItem
.
Operator
.
EQ
,
targetId
)).
getContent
().
get
(
0
);
// DxContextVO target = (DxContextVO) contextProjectServiceShadow.get(targetId);
target
.
setChildren
(
children
);
linkVO
.
setTarget
(
target
);
// linkVO.getTarget().setChildren(children);
}
}
v
.
setExtProgramProjectLinks
(
content
);
v
.
setExtProgramProjectLinks
(
content
);
}
}
...
...
dex-basic-service-expand-server/src/main/resources/log/logback-spring.xml
0 → 100644
View file @
b8335fc9
This diff is collapsed.
Click to expand it.
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