Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
syncData
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
chenzy
syncData
Commits
629e1bfb
Commit
629e1bfb
authored
Apr 02, 2025
by
chenzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】用户,组织相关
parent
23882f88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
DataSyncActor.java
...main/java/com/keymobile/syncdata/actor/DataSyncActor.java
+2
-0
SyncDataController.java
...n/java/com/keymobile/syncdata/api/SyncDataController.java
+8
-2
No files found.
src/main/java/com/keymobile/syncdata/actor/DataSyncActor.java
View file @
629e1bfb
...
@@ -113,8 +113,10 @@ public class DataSyncActor extends AbstractActor {
...
@@ -113,8 +113,10 @@ public class DataSyncActor extends AbstractActor {
try
{
try
{
map
=
objectMapper
.
readValue
(
rows
.
toString
(),
Map
.
class
);
map
=
objectMapper
.
readValue
(
rows
.
toString
(),
Map
.
class
);
String
deptid
=
(
String
)
map
.
get
(
"DEPTID"
);
String
deptid
=
(
String
)
map
.
get
(
"DEPTID"
);
String
username
=
(
String
)
map
.
get
(
"NAME"
);
String
deptName
=
orgMapIdAndName
.
get
(
deptid
);
String
deptName
=
orgMapIdAndName
.
get
(
deptid
);
map
.
put
(
"DEPT_NAME"
,
deptName
);
map
.
put
(
"DEPT_NAME"
,
deptName
);
map
.
put
(
"search"
,
username
+
":"
+
":"
+
deptName
);
urlList
.
add
(
map
);
urlList
.
add
(
map
);
}
catch
(
JsonProcessingException
e
)
{
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
src/main/java/com/keymobile/syncdata/api/SyncDataController.java
View file @
629e1bfb
...
@@ -123,10 +123,16 @@ public class SyncDataController {
...
@@ -123,10 +123,16 @@ public class SyncDataController {
}
}
@GetMapping
(
"/getAllSyncUser"
)
@GetMapping
(
"/getAllSyncUser"
)
public
List
<
Document
>
getAllSyncUser
(
)
{
public
Page
<
Document
>
getAllSyncUser
(
@RequestParam
(
required
=
false
)
String
search
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
pageNumber
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
)
{
Query
query
=
new
Query
();
Query
query
=
new
Query
();
query
.
fields
().
exclude
(
"_id"
);
query
.
fields
().
exclude
(
"_id"
);
if
(
search
!=
null
&&
!
search
.
isEmpty
())
{
query
.
addCriteria
(
Criteria
.
where
(
"search"
).
regex
(
search
));
}
Long
total
=
mongoTemplate
.
count
(
query
,
Document
.
class
,
"sync_user_data"
);
Pageable
pageable
=
PageRequest
.
of
(
pageNumber
,
pageSize
);
query
.
with
(
pageable
);
List
<
Document
>
documents
=
mongoTemplate
.
find
(
query
,
Document
.
class
,
"sync_user_data"
);
List
<
Document
>
documents
=
mongoTemplate
.
find
(
query
,
Document
.
class
,
"sync_user_data"
);
return
documents
;
return
PageableExecutionUtils
.
getPage
(
documents
,
pageable
,
()
->
total
)
;
}
}
}
}
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