Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9a39a37b
authored
Jul 11, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
a843b391
fe78a284
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamDao.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamDao.java
View file @
9a39a37
package
com
.
dituhui
.
pea
.
order
.
dao
;
package
com
.
dituhui
.
pea
.
order
.
dao
;
import
com.dituhui.pea.order.entity.OrgTeamEntity
;
import
com.dituhui.pea.order.entity.OrgTeamEntity
;
import
org.hibernate.annotations.Where
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
@@ -11,6 +12,7 @@ import org.springframework.stereotype.Repository;
...
@@ -11,6 +12,7 @@ import org.springframework.stereotype.Repository;
import
java.util.List
;
import
java.util.List
;
@Repository
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgTeamDao
extends
JpaRepository
<
OrgTeamEntity
,
Integer
>
{
public
interface
OrgTeamDao
extends
JpaRepository
<
OrgTeamEntity
,
Integer
>
{
List
<
OrgTeamEntity
>
findAllByClusterId
(
String
clusterId
);
List
<
OrgTeamEntity
>
findAllByClusterId
(
String
clusterId
);
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
9a39a37
...
@@ -204,9 +204,11 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -204,9 +204,11 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
String
engineerCode
=
relation
.
getEngineerCode
();
String
engineerCode
=
relation
.
getEngineerCode
();
if
(
newRelationsMap
.
containsKey
(
engineerCode
))
{
if
(
newRelationsMap
.
containsKey
(
engineerCode
))
{
OrgTeamEngineerEntity
newRelation
=
newRelationsMap
.
get
(
engineerCode
);
OrgTeamEngineerEntity
newRelation
=
newRelationsMap
.
get
(
engineerCode
);
newRelation
.
setId
(
relation
.
getId
());
newRelation
.
setUpdateTime
(
LocalDateTime
.
now
());
newRelation
.
setUpdateTime
(
LocalDateTime
.
now
());
newRelationsMap
.
put
(
engineerCode
,
newRelation
);
newRelationsMap
.
put
(
engineerCode
,
newRelation
);
}
else
{
}
else
{
// 新的关系不再,设置为0(删除)
relation
.
setStatus
(
0
);
relation
.
setStatus
(
0
);
orgTeamEngineerDao
.
save
(
relation
);
orgTeamEngineerDao
.
save
(
relation
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment