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
9cf9fe54
Commit
9cf9fe54
authored
Dec 20, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
af7d8368
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
43 deletions
+51
-43
StudentModule.cs
Edu.Module.User/StudentModule.cs
+42
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+9
-43
No files found.
Edu.Module.User/StudentModule.cs
View file @
9cf9fe54
using
Edu.AOP.CustomerAttribute
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.System
;
using
Edu.Common.Enum.User
;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.Customer
;
...
...
@@ -529,6 +530,47 @@ namespace Edu.Module.User
return
studentRepository
.
GetStudentInfo
(
Student_Id
,
Group_Id
);
}
/// <summary>
/// 推送消息
/// </summary>
/// <param name="model"></param>
public
void
PushMessageModule
(
RB_Student_ViewModel
model
)
{
var
assistList
=
GetStuAssistListModule
(
model
.
StuId
);
var
customerModel
=
customerRepository
.
GetEntity
(
model
.
CustomerId
);
string
markdownContent
=
$"`同业查重通知` \n>**概要信息** \n>同业名称:
{
customerModel
?.
CustomerName
??
""
}
(
{
customerModel
?.
ContactNumber
??
""
}
)\n>学生名称:
{
model
.
StuName
}
\n>学生电话:
{
model
.
StuTel
}
\n>"
;
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
B2BCustomerStu
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
"系统"
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"同业查重通知"
,
Platform
=
5
,
};
if
(
model
.
CreateBy
>
0
)
{
var
queryTargetWorkId
=
accountModule
.
GetWorkUserIdModule
(
model
.
CreateBy
);
modelWork
.
ReceiveId
=
queryTargetWorkId
;
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
if
(
assistList
!=
null
&&
assistList
.
Count
>
0
)
{
foreach
(
var
item
in
assistList
)
{
var
queryTargetWorkId
=
accountModule
.
GetWorkUserIdModule
(
item
.
AssistId
);
modelWork
.
ReceiveId
=
queryTargetWorkId
;
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
}
}
#
region
小程序用户
/// <summary>
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
9cf9fe54
...
...
@@ -7,6 +7,7 @@ using Edu.Cache.WeChat;
using
Edu.Common.API
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.System
;
using
Edu.Common.Enum.User
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Customer
;
...
...
@@ -903,7 +904,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
{
message
=
"此学员手机号已绑定同行!请重新录入!"
;
PushMessag
e
(
model
);
studentModule
.
PushMessageModul
e
(
model
);
}
else
{
...
...
@@ -916,7 +917,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
{
message
=
"此学员手机号已绑定同行!请重新录入!"
;
PushMessag
e
(
model
);
studentModule
.
PushMessageModul
e
(
model
);
}
else
{
...
...
@@ -938,7 +939,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
{
message
=
"此学员QQ已绑定同行!请重新录入!"
;
PushMessag
e
(
model
);
studentModule
.
PushMessageModul
e
(
model
);
}
else
{
...
...
@@ -951,7 +952,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
{
message
=
"此学员QQ已绑定同行!请重新录入!"
;
PushMessag
e
(
model
);
studentModule
.
PushMessageModul
e
(
model
);
}
else
{
...
...
@@ -973,7 +974,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
{
message
=
"此学员微信号已绑定同行!请重新录入!"
;
PushMessag
e
(
model
);
studentModule
.
PushMessageModul
e
(
model
);
}
else
{
...
...
@@ -986,7 +987,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
{
message
=
"此学员微信号已绑定同行!请重新录入!"
;
PushMessag
e
(
model
);
studentModule
.
PushMessageModul
e
(
model
);
}
else
{
...
...
@@ -998,42 +999,7 @@ namespace Edu.WebApi.Controllers.User
return
!
string
.
IsNullOrEmpty
(
message
)
?
ApiResult
.
Failed
(
message
:
message
)
:
ApiResult
.
Success
();
}
/// <summary>
/// 推送消息
/// </summary>
/// <param name="model"></param>
public
void
PushMessage
(
RB_Student_ViewModel
model
)
{
var
assistList
=
studentModule
.
GetStuAssistListModule
(
model
.
StuId
);
var
customerModel
=
customerModule
.
GetCustomerModule
(
model
.
CustomerId
);
string
markdownContent
=
$"`同业添加学生查重通知` \n>**概要信息** \n>同业名称:
{
customerModel
?.
CustomerName
??
""
}
(
{
customerModel
?.
ContactNumber
??
""
}
)\n>学生名称:
{
model
.
StuName
}
\n>学生电话:
{
model
.
StuTel
}
\n>"
;
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
Common
.
Enum
.
System
.
PushMessageCategoryEnum
.
B2BCustomerStu
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
"系统"
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"同业查询学生通知"
,
Platform
=
5
,
};
if
(
model
.
CreateBy
>
0
)
{
modelWork
.
ReceiveId
=
model
.
CreateBy
.
ToString
();
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
if
(
assistList
!=
null
&&
assistList
.
Count
>
0
)
{
foreach
(
var
item
in
assistList
)
{
modelWork
.
ReceiveId
=
item
.
AssistId
.
ToString
();
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
}
}
/// <summary>
/// 获取收客平台列表
...
...
@@ -1269,7 +1235,7 @@ namespace Edu.WebApi.Controllers.User
if
(
customer
!=
null
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
"查重推送消息"
);
PushMessag
e
(
extModel
);
studentModule
.
PushMessageModul
e
(
extModel
);
}
}
return
ApiResult
.
Success
(
data
:
extModel
);
...
...
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