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
1268abd5
Commit
1268abd5
authored
Sep 04, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e7f559c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
88 deletions
+111
-88
VisitorReserveModule.cs
Edu.Module.Duty/VisitorReserveModule.cs
+111
-88
No files found.
Edu.Module.Duty/VisitorReserveModule.cs
View file @
1268abd5
...
@@ -31,6 +31,7 @@ using Edu.Model.Public;
...
@@ -31,6 +31,7 @@ using Edu.Model.Public;
using
Edu.Module.User
;
using
Edu.Module.User
;
using
Senparc.Weixin.MP.AdvancedAPIs
;
using
Senparc.Weixin.MP.AdvancedAPIs
;
using
Edu.Model.ViewModel.Sell
;
using
Edu.Model.ViewModel.Sell
;
using
Senparc.CO2NET.Extensions
;
namespace
Edu.Module.Duty
namespace
Edu.Module.Duty
{
{
...
@@ -315,6 +316,8 @@ namespace Edu.Module.Duty
...
@@ -315,6 +316,8 @@ namespace Edu.Module.Duty
if
(
queryNotifyManager
!=
null
&&
queryNotifyManager
.
Count
>
0
)
if
(
queryNotifyManager
!=
null
&&
queryNotifyManager
.
Count
>
0
)
{
{
queryNotifyManager
.
ForEach
(
x
=>
queryNotifyManager
.
ForEach
(
x
=>
{
if
(!
string
.
IsNullOrWhiteSpace
(
x
.
WorkUserId
))
{
{
var
path
=
$"/h5page/TrialClass?Id=
{
model
.
Id
}
"
;
//这个地址是欠费的通知地址,后续有H5需要改
var
path
=
$"/h5page/TrialClass?Id=
{
model
.
Id
}
"
;
//这个地址是欠费的通知地址,后续有H5需要改
path
=
HttpUtility
.
UrlEncode
(
path
);
path
=
HttpUtility
.
UrlEncode
(
path
);
...
@@ -322,6 +325,7 @@ namespace Edu.Module.Duty
...
@@ -322,6 +325,7 @@ namespace Edu.Module.Duty
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
"试听推送::"
+
newUrl
);
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
"试听推送::"
+
newUrl
);
var
content
=
$"<font color='info'>学员试听课通知</font>\n>**概要信息** \n>学员名称:<font color='warning'>
{
guestModel
.
StuName
}
(
{
guestModel
.
StuRealMobile
}
)</font>\n>预约时间:<font color='warning'>
{
Common
.
ConvertHelper
.
FormatDate
(
model
.
ReservationDate
)}
</font>\n>试听需求:<font color='warning'>
{
Common
.
Plugin
.
StringHelper
.
FilterHtml
(
model
.
Demand
)}
</font>\n>请 点 击:[查看详情](
{
newUrl
}
)"
;
var
content
=
$"<font color='info'>学员试听课通知</font>\n>**概要信息** \n>学员名称:<font color='warning'>
{
guestModel
.
StuName
}
(
{
guestModel
.
StuRealMobile
}
)</font>\n>预约时间:<font color='warning'>
{
Common
.
ConvertHelper
.
FormatDate
(
model
.
ReservationDate
)}
</font>\n>试听需求:<font color='warning'>
{
Common
.
Plugin
.
StringHelper
.
FilterHtml
(
model
.
Demand
)}
</font>\n>请 点 击:[查看详情](
{
newUrl
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"学员试听课通知"
);
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"学员试听课通知"
);
}
});
});
}
}
#
endregion
#
endregion
...
@@ -382,6 +386,8 @@ namespace Edu.Module.Duty
...
@@ -382,6 +386,8 @@ namespace Edu.Module.Duty
string
markdownContent
=
$@"`留学需求通知` 学员留学需求通知\n>**概要信息** \n>学员名称:
{
studentModel
.
StuName
}
(
{
studentModel
.
StuRealMobile
}
)\n>
string
markdownContent
=
$@"`留学需求通知` 学员留学需求通知\n>**概要信息** \n>学员名称:
{
studentModel
.
StuName
}
(
{
studentModel
.
StuRealMobile
}
)\n>
留学需求:<font color='warning'>
{
model
.
Remark
}
\n>
留学需求:<font color='warning'>
{
model
.
Remark
}
\n>
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
path
}
)"
;
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
path
}
)"
;
if
(!
string
.
IsNullOrWhiteSpace
(
x
.
WorkUserId
))
{
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
{
CategoryId
=
PushMessageCategoryEnum
.
SalePeople
,
CategoryId
=
PushMessageCategoryEnum
.
SalePeople
,
...
@@ -394,9 +400,10 @@ namespace Edu.Module.Duty
...
@@ -394,9 +400,10 @@ namespace Edu.Module.Duty
SendType
=
0
,
SendType
=
0
,
Title
=
"学员留学需求通知"
,
Title
=
"学员留学需求通知"
,
Platform
=
5
,
Platform
=
5
,
ReceiveId
=
x
.
WorkUserId
??
""
ReceiveId
=
x
.
WorkUserId
??
""
};
};
pushList
.
Add
(
modelWork
);
pushList
.
Add
(
modelWork
);
}
});
});
if
(
pushList
!=
null
&&
pushList
.
Any
())
if
(
pushList
!=
null
&&
pushList
.
Any
())
{
{
...
@@ -454,6 +461,8 @@ namespace Edu.Module.Duty
...
@@ -454,6 +461,8 @@ namespace Edu.Module.Duty
if
(
queryNotifyManager
!=
null
&&
queryNotifyManager
.
Count
>
0
)
if
(
queryNotifyManager
!=
null
&&
queryNotifyManager
.
Count
>
0
)
{
{
queryNotifyManager
.
ForEach
(
x
=>
queryNotifyManager
.
ForEach
(
x
=>
{
if
(!
string
.
IsNullOrWhiteSpace
(
x
.
WorkUserId
))
{
{
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
{
...
@@ -470,6 +479,7 @@ namespace Edu.Module.Duty
...
@@ -470,6 +479,7 @@ namespace Edu.Module.Duty
ReceiveId
=
x
.
WorkUserId
ReceiveId
=
x
.
WorkUserId
};
};
pushList
.
Add
(
modelWork
);
pushList
.
Add
(
modelWork
);
}
});
});
}
}
...
@@ -481,6 +491,8 @@ namespace Edu.Module.Duty
...
@@ -481,6 +491,8 @@ namespace Edu.Module.Duty
AccountType
=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
AccountType
=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
});
});
foreach
(
var
item
in
teacherList
)
foreach
(
var
item
in
teacherList
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
WorkUserId
))
{
{
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
()
{
{
...
@@ -497,6 +509,8 @@ namespace Edu.Module.Duty
...
@@ -497,6 +509,8 @@ namespace Edu.Module.Duty
};
};
pushList
.
Add
(
pushModels
);
pushList
.
Add
(
pushModels
);
}
}
}
if
(
pushList
!=
null
&&
pushList
.
Any
())
if
(
pushList
!=
null
&&
pushList
.
Any
())
{
{
new
Common
.
Message
.
MessageHelper
().
SendMessage
(
pushList
);
new
Common
.
Message
.
MessageHelper
().
SendMessage
(
pushList
);
...
@@ -1065,6 +1079,8 @@ namespace Edu.Module.Duty
...
@@ -1065,6 +1079,8 @@ namespace Edu.Module.Duty
List
<
Common
.
Message
.
PushMessageModel
>
pushList
=
new
List
<
Common
.
Message
.
PushMessageModel
>();
List
<
Common
.
Message
.
PushMessageModel
>
pushList
=
new
List
<
Common
.
Message
.
PushMessageModel
>();
#
region
老师消息推送
#
region
老师消息推送
if
(
model
.
TeacherId
!=
oldTeacherId
&&
oldTeacherId
>
0
)
if
(
model
.
TeacherId
!=
oldTeacherId
&&
oldTeacherId
>
0
)
{
if
(!
string
.
IsNullOrWhiteSpace
((
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
oldTeacherId
)?.
FirstOrDefault
()?.
WorkUserId
)))
{
{
Common
.
Message
.
PushMessageModel
pushModel2
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
pushModel2
=
new
Common
.
Message
.
PushMessageModel
()
{
{
...
@@ -1081,6 +1097,7 @@ namespace Edu.Module.Duty
...
@@ -1081,6 +1097,7 @@ namespace Edu.Module.Duty
};
};
pushList
.
Add
(
pushModel2
);
pushList
.
Add
(
pushModel2
);
}
}
}
var
path
=
$"/course/classPlan?ClassType=2"
;
//
var
path
=
$"/course/classPlan?ClassType=2"
;
//
path
=
HttpUtility
.
UrlEncode
(
path
);
path
=
HttpUtility
.
UrlEncode
(
path
);
string
markdownContent
=
$@"`您有新的试听课信息!请查收`\n>**概要信息** \n>学员名称:
{
guestModel
.
StuName
}
(
{
guestModel
.
StuRealMobile
}
)\n>
string
markdownContent
=
$@"`您有新的试听课信息!请查收`\n>**概要信息** \n>学员名称:
{
guestModel
.
StuName
}
(
{
guestModel
.
StuRealMobile
}
)\n>
...
@@ -1090,6 +1107,8 @@ namespace Edu.Module.Duty
...
@@ -1090,6 +1107,8 @@ namespace Edu.Module.Duty
课程名称:<font color='warning'>
{
model
.
LessonName
}
\n>
课程名称:<font color='warning'>
{
model
.
LessonName
}
\n>
教室:<font color='warning'>
{
model
.
RoomName
}
\n>
教室:<font color='warning'>
{
model
.
RoomName
}
\n>
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
Id
??
0
)}
&target=
{
path
}
)"
;
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
Id
??
0
)}
&target=
{
path
}
)"
;
if
(!
string
.
IsNullOrWhiteSpace
((
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
WorkUserId
??
""
)))
{
Common
.
Message
.
PushMessageModel
pushModel
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
pushModel
=
new
Common
.
Message
.
PushMessageModel
()
{
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
...
@@ -1105,6 +1124,7 @@ namespace Edu.Module.Duty
...
@@ -1105,6 +1124,7 @@ namespace Edu.Module.Duty
ReceiveId
=
(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
WorkUserId
??
""
).
ToString
(),
ReceiveId
=
(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
WorkUserId
??
""
).
ToString
(),
};
};
pushList
.
Add
(
pushModel
);
pushList
.
Add
(
pushModel
);
}
#
endregion
#
endregion
#
region
销售消息推送
#
region
销售消息推送
...
@@ -1123,6 +1143,8 @@ namespace Edu.Module.Duty
...
@@ -1123,6 +1143,8 @@ namespace Edu.Module.Duty
课程名称:<font color='warning'>
{
model
.
LessonName
}
\n>
课程名称:<font color='warning'>
{
model
.
LessonName
}
\n>
教室:<font color='warning'>
{
model
.
RoomName
}
\n>
教室:<font color='warning'>
{
model
.
RoomName
}
\n>
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
modelReserve
.
CreateBy
}
&target=
{
paths
}
)"
;
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
modelReserve
.
CreateBy
}
&target=
{
paths
}
)"
;
if
(!
string
.
IsNullOrWhiteSpace
(
saleModel
.
WorkUserId
))
{
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
()
{
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
...
@@ -1138,6 +1160,7 @@ namespace Edu.Module.Duty
...
@@ -1138,6 +1160,7 @@ namespace Edu.Module.Duty
ReceiveId
=
(
saleModel
?.
WorkUserId
??
""
).
ToString
(),
ReceiveId
=
(
saleModel
?.
WorkUserId
??
""
).
ToString
(),
};
};
pushList
.
Add
(
pushModels
);
pushList
.
Add
(
pushModels
);
}
#
endregion
#
endregion
LogHelper
.
WriteInfo
(
"这是设置老师等发送消息:"
+
JsonHelper
.
Serialize
(
pushList
));
LogHelper
.
WriteInfo
(
"这是设置老师等发送消息:"
+
JsonHelper
.
Serialize
(
pushList
));
...
...
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