Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
e7dacf8c
Commit
e7dacf8c
authored
Oct 24, 2023
by
baochunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改人员更新没有在user表的情况
parent
c1696fe7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
smart-campus/src/main/java/yangtz/cs/liu/dingding/controller/DingJiaXiaoController.java
+12
-4
No files found.
smart-campus/src/main/java/yangtz/cs/liu/dingding/controller/DingJiaXiaoController.java
View file @
e7dacf8c
...
...
@@ -9,6 +9,8 @@ import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.system.service.ISysUserService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -47,6 +49,9 @@ import java.util.stream.Collectors;
@RequestMapping
(
"/dd/djtx"
)
public
class
DingJiaXiaoController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
DingJiaXiaoController
.
class
);
@Autowired
private
AccessTokenUtils
accessTokenUtils
;
...
...
@@ -255,7 +260,7 @@ public class DingJiaXiaoController {
}
}
return
""
;
return
"
1
"
;
}
...
...
@@ -282,13 +287,13 @@ public class DingJiaXiaoController {
if
(
type
.
equals
(
"teacher"
))
{
//同步家校通讯老师
teacherUserInfos
=
this
.
addUserList
(
token
,
type
,
date
.
getDdClassId
());
for
(
DingJiaXiaoVo
.
StudentUserInfo
teachDate
:
teacherUserInfos
){
// 关联老师跟班级信息
schoolTeacher
.
setTeacherName
(
teachDate
.
getName
());
List
<
SchoolTeacher
>
schoolTeacherCopies
=
schoolTeacherService
.
selectSchoolTeacherList
(
schoolTeacher
);
if
(
schoolTeacherCopies
.
isEmpty
()){
throw
new
RuntimeException
(
"钉钉老师未在系统中找到"
);
log
.
error
(
"钉钉老师未在系统中找到:"
+
teachDate
.
getName
());
continue
;
}
SchoolTeacher
classHeadTeacher
=
schoolTeacherCopies
.
get
(
0
);
//职工跟年级关系
...
...
@@ -354,7 +359,10 @@ public class DingJiaXiaoController {
SchoolStudentVO
schoolStudentVO
=
new
SchoolStudentVO
();
schoolStudentVO
.
setDdUserId
(
toUserId
);
List
<
SchoolStudentVO
>
schoolStudentVOS
=
schoolStudentService
.
queryList
(
schoolStudentVO
);
Long
studenId
=
schoolStudentVOS
.
get
(
0
).
getId
();
Long
studenId
=
null
;
if
(!
schoolStudentVOS
.
isEmpty
()){
studenId
=
schoolStudentVOS
.
get
(
0
).
getId
();
}
//创建用户user表
SysUser
jUser
=
new
SysUser
();
...
...
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