Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
黄奎
Education
Commits
59679ba6
Commit
59679ba6
authored
1 year ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
823fefce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
296 additions
and
264 deletions
+296
-264
AssistModule.cs
Edu.Module.User/AssistModule.cs
+95
-85
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+104
-92
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+97
-87
No files found.
Edu.Module.User/AssistModule.cs
View file @
59679ba6
...
...
@@ -275,6 +275,9 @@ namespace Edu.Module.User
{
var
accountModel
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
AccountType
=
AccountTypeEnum
.
Assist
,
AccountId
=
model
.
AId
})?.
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
accountModel
.
WorkUserId
)
&&
IsLeave
==
false
)
{
IsInsert
=
true
;
}
//走新增方法
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
string
.
Format
(
"SetAssistModule:: AccountUserType {0} Name {1}"
,
model
.
AccountUserType
,
model
.
AssistName
));
if
(
model
.
AccountUserType
==
1
)
{
if
(
IsInsert
)
{
//成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。
...
...
@@ -306,11 +309,14 @@ namespace Edu.Module.User
if
(
cmodel
.
errcode
==
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
//更新账户表企业微信id
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
WorkUserId
),
userId
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Account_ViewModel
.
Id
),
FiledValue
=
accountModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -337,11 +343,14 @@ namespace Edu.Module.User
if
(
cmodel
.
errcode
==
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
//更新账户表企业微信id
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
WorkUserId
),
""
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Account_ViewModel
.
Id
),
FiledValue
=
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -376,6 +385,7 @@ namespace Edu.Module.User
}
}
}
}
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.User/ManagerModule.cs
View file @
59679ba6
...
...
@@ -235,11 +235,16 @@ namespace Edu.Module.User
DirectSupervisor
=
model
.
DirectSupervisor
});
if
(
flag
&&
!
string
.
IsNullOrEmpty
(
model
.
Token
)
&&
IsUpdate
)
{
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
{
//用户
var
accountModel
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
AccountType
=
AccountTypeEnum
.
Admin
,
AccountId
=
model
.
MId
})?.
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
accountModel
.
WorkUserId
)
&&
IsLeave
==
false
)
{
IsInsert
=
true
;
}
//走新增方法
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
string
.
Format
(
"SetManagerModule:: AccountUserType {0} Name {1}"
,
model
.
AccountUserType
,
model
.
MName
));
//甲鹤员工才同步企业微信
if
(
model
.
AccountUserType
==
1
)
{
if
(
IsInsert
)
{
//新增企业微信用户
...
...
@@ -273,11 +278,14 @@ namespace Edu.Module.User
if
(
cmodel
.
errcode
==
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
//更新账户表企业微信id
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
WorkUserId
),
userId
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Account_ViewModel
.
Id
),
FiledValue
=
accountModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -308,11 +316,14 @@ namespace Edu.Module.User
if
(
cmodel
.
errcode
==
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
//更新账户表企业微信id
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
WorkUserId
),
""
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Account_ViewModel
.
Id
),
FiledValue
=
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -353,6 +364,7 @@ namespace Edu.Module.User
}
}
}
}
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.User/TeacherModule.cs
View file @
59679ba6
...
...
@@ -317,6 +317,10 @@ namespace Edu.Module.User
{
var
accountModel
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
AccountType
=
AccountTypeEnum
.
Teacher
,
AccountId
=
model
.
TId
})?.
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
accountModel
.
WorkUserId
)
&&
IsLeave
==
false
)
{
IsInsert
=
true
;
}
//走新增方法
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
string
.
Format
(
"SetTeacherModule:: AccountUserType {0} Name {1}"
,
model
.
AccountUserType
,
model
.
TeacherName
));
//甲鹤员工才同步到企业微信
if
(
model
.
AccountUserType
==
1
)
{
if
(
IsInsert
)
{
//成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。
...
...
@@ -348,11 +352,14 @@ namespace Edu.Module.User
if
(
cmodel
.
errcode
==
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
//更新账户表企业微信id
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
WorkUserId
),
userId
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Account_ViewModel
.
Id
),
FiledValue
=
accountModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -379,11 +386,14 @@ namespace Edu.Module.User
if
(
cmodel
.
errcode
==
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
//更新账户表企业微信id
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
WorkUserId
),
""
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Account_ViewModel
.
Id
),
FiledValue
=
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -418,7 +428,7 @@ namespace Edu.Module.User
}
}
}
});
}
});
}
}
return
flag
;
...
...
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