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
dc5356dd
Commit
dc5356dd
authored
Sep 04, 2024
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
e8cf9963
876eeda4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
121 additions
and
95 deletions
+121
-95
VisitorReserveModule.cs
Edu.Module.Duty/VisitorReserveModule.cs
+116
-93
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+4
-1
appsettings.json
Edu.WebApi/appsettings.json
+1
-1
No files found.
Edu.Module.Duty/VisitorReserveModule.cs
View file @
dc5356dd
...
...
@@ -31,6 +31,7 @@ using Edu.Model.Public;
using
Edu.Module.User
;
using
Senparc.Weixin.MP.AdvancedAPIs
;
using
Edu.Model.ViewModel.Sell
;
using
Senparc.CO2NET.Extensions
;
namespace
Edu.Module.Duty
{
...
...
@@ -221,11 +222,11 @@ namespace Edu.Module.Duty
message
=
""
;
bool
flag
;
if
(
visitor_ReserveRepository
.
ExistsVisitorReserveRepository
(
model
))
{
message
=
string
.
Format
(
"已存在此访客的预约试听课信息,请重新选择!"
);
return
false
;
}
//
if (visitor_ReserveRepository.ExistsVisitorReserveRepository(model))
//
{
//
message = string.Format("已存在此访客的预约试听课信息,请重新选择!");
//
return false;
//
}
//获取学员信息
var
guestModel
=
studentRepository
.
GetEntity
(
model
.
Visitor_Id
);
if
(
model
.
Id
>
0
)
...
...
@@ -316,12 +317,15 @@ namespace Edu.Module.Duty
{
queryNotifyManager
.
ForEach
(
x
=>
{
var
path
=
$"/h5page/TrialClass?Id=
{
model
.
Id
}
"
;
//这个地址是欠费的通知地址,后续有H5需要改
path
=
HttpUtility
.
UrlEncode
(
path
);
string
newUrl
=
$"
{
Config
.
ErpUrl
}
/login?loginId=
{
x
.
Id
}
&target=
{
path
}
"
;
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
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"学员试听课通知"
);
if
(!
string
.
IsNullOrWhiteSpace
(
x
.
WorkUserId
))
{
var
path
=
$"/h5page/TrialClass?Id=
{
model
.
Id
}
"
;
//这个地址是欠费的通知地址,后续有H5需要改
path
=
HttpUtility
.
UrlEncode
(
path
);
string
newUrl
=
$"
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
path
}
"
;
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
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"学员试听课通知"
);
}
});
}
#
endregion
...
...
@@ -382,21 +386,24 @@ namespace Edu.Module.Duty
string
markdownContent
=
$@"`留学需求通知` 学员留学需求通知\n>**概要信息** \n>学员名称:
{
studentModel
.
StuName
}
(
{
studentModel
.
StuRealMobile
}
)\n>
留学需求:<font color='warning'>
{
model
.
Remark
}
\n>
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
path
}
)"
;
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
(
)
if
(!
string
.
IsNullOrWhiteSpace
(
x
.
WorkUserId
)
)
{
CategoryId
=
PushMessageCategoryEnum
.
SalePeople
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
userInfo
.
AccountName
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员留学需求通知"
,
Platform
=
5
,
ReceiveId
=
x
.
WorkUserId
??
""
};
pushList
.
Add
(
modelWork
);
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
SalePeople
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
userInfo
.
AccountName
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员留学需求通知"
,
Platform
=
5
,
ReceiveId
=
x
.
WorkUserId
??
""
};
pushList
.
Add
(
modelWork
);
}
});
if
(
pushList
!=
null
&&
pushList
.
Any
())
{
...
...
@@ -455,21 +462,24 @@ namespace Edu.Module.Duty
{
queryNotifyManager
.
ForEach
(
x
=>
{
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
(
)
if
(!
string
.
IsNullOrWhiteSpace
(
x
.
WorkUserId
)
)
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContents
+
$"/autologin?loginId=
{
x
.
Id
}
&target=
{
paths
}
)"
,
CoverImg
=
""
,
CreateByName
=
"系统"
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员试听课通知"
,
Platform
=
5
,
ReceiveId
=
x
.
WorkUserId
};
pushList
.
Add
(
modelWork
);
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContents
+
$"/autologin?loginId=
{
x
.
Id
}
&target=
{
paths
}
)"
,
CoverImg
=
""
,
CreateByName
=
"系统"
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员试听课通知"
,
Platform
=
5
,
ReceiveId
=
x
.
WorkUserId
};
pushList
.
Add
(
modelWork
);
}
});
}
...
...
@@ -482,20 +492,24 @@ namespace Edu.Module.Duty
});
foreach
(
var
item
in
teacherList
)
{
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
(
)
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
WorkUserId
)
)
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContents
+
$"/autologin?loginId=
{
item
.
Id
}
&target=
{
paths
}
)"
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
""
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"试听课"
,
Platform
=
2
,
ReceiveId
=
(
item
?.
WorkUserId
).
ToString
(),
};
pushList
.
Add
(
pushModels
);
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContents
+
$"/autologin?loginId=
{
item
.
Id
}
&target=
{
paths
}
)"
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
""
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"试听课"
,
Platform
=
2
,
ReceiveId
=
(
item
?.
WorkUserId
).
ToString
(),
};
pushList
.
Add
(
pushModels
);
}
}
if
(
pushList
!=
null
&&
pushList
.
Any
())
{
...
...
@@ -1066,20 +1080,23 @@ namespace Edu.Module.Duty
#
region
老师消息推送
if
(
model
.
TeacherId
!=
oldTeacherId
&&
oldTeacherId
>
0
)
{
Common
.
Message
.
PushMessageModel
pushModel2
=
new
Common
.
Message
.
PushMessageModel
(
)
if
(!
string
.
IsNullOrWhiteSpace
((
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
oldTeacherId
)?.
FirstOrDefault
()?.
WorkUserId
))
)
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
"您有试听课被取消!请查收"
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
$"/course/classPlan?ClassType=2"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"试听课"
,
Platform
=
2
,
ReceiveId
=
(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
oldTeacherId
)?.
FirstOrDefault
()?.
WorkUserId
).
ToString
(),
};
pushList
.
Add
(
pushModel2
);
Common
.
Message
.
PushMessageModel
pushModel2
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
"您有试听课被取消!请查收"
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
$"/course/classPlan?ClassType=2"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"试听课"
,
Platform
=
2
,
ReceiveId
=
(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
oldTeacherId
)?.
FirstOrDefault
()?.
WorkUserId
).
ToString
(),
};
pushList
.
Add
(
pushModel2
);
}
}
var
path
=
$"/course/classPlan?ClassType=2"
;
//
path
=
HttpUtility
.
UrlEncode
(
path
);
...
...
@@ -1090,21 +1107,24 @@ namespace Edu.Module.Duty
课程名称:<font color='warning'>
{
model
.
LessonName
}
\n>
教室:<font color='warning'>
{
model
.
RoomName
}
\n>
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
Id
??
0
)}
&target=
{
path
}
)"
;
Common
.
Message
.
PushMessageModel
pushModel
=
new
Common
.
Message
.
PushMessageModel
(
)
if
(!
string
.
IsNullOrWhiteSpace
((
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
WorkUserId
??
""
))
)
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员试听课通知"
,
Platform
=
2
,
ReceiveId
=
(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
WorkUserId
??
""
).
ToString
(),
};
pushList
.
Add
(
pushModel
);
Common
.
Message
.
PushMessageModel
pushModel
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员试听课通知"
,
Platform
=
2
,
ReceiveId
=
(
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
==
model
.
TeacherId
)?.
FirstOrDefault
()?.
WorkUserId
??
""
).
ToString
(),
};
pushList
.
Add
(
pushModel
);
}
#
endregion
#
region
销售消息推送
...
...
@@ -1123,21 +1143,24 @@ namespace Edu.Module.Duty
课程名称:<font color='warning'>
{
model
.
LessonName
}
\n>
教室:<font color='warning'>
{
model
.
RoomName
}
\n>
请点击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
modelReserve
.
CreateBy
}
&target=
{
paths
}
)"
;
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
(
)
if
(!
string
.
IsNullOrWhiteSpace
(
saleModel
.
WorkUserId
)
)
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContents
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员试听课通知"
,
Platform
=
2
,
ReceiveId
=
(
saleModel
?.
WorkUserId
??
""
).
ToString
(),
};
pushList
.
Add
(
pushModels
);
Common
.
Message
.
PushMessageModel
pushModels
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
ReserveClass
,
Content
=
markdownContents
,
CoverImg
=
""
,
CreateByName
=
UserInfo
.
AccountName
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"学员试听课通知"
,
Platform
=
2
,
ReceiveId
=
(
saleModel
?.
WorkUserId
??
""
).
ToString
(),
};
pushList
.
Add
(
pushModels
);
}
#
endregion
LogHelper
.
WriteInfo
(
"这是设置老师等发送消息:"
+
JsonHelper
.
Serialize
(
pushList
));
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
dc5356dd
...
...
@@ -439,7 +439,10 @@ FROM
{
where2
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
Employee_ViewModel
.
AccountType
),
query
.
AccountTypeStr
);
}
if
(
query
.
AccountType
>
0
)
{
where2
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
Employee_ViewModel
.
AccountType
),
(
int
)
query
.
AccountType
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartEntryTime
))
{
where
.
AppendFormat
(
" AND b.{0}>='{1}' "
,
nameof
(
Employee_ViewModel
.
EntryTime
),
query
.
StartEntryTime
);
...
...
Edu.WebApi/appsettings.json
View file @
dc5356dd
...
...
@@ -29,7 +29,7 @@
"UploadSiteUrl"
:
"http://192.168.5.128:8120"
,
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ErpViewFileSiteUrl"
:
"http://imgfile.oytour.com"
,
"ErpUrl"
:
"http://localhost:8181
/#
"
,
"ErpUrl"
:
"http://localhost:8181"
,
"EducationUrl"
:
"http://localhost:8181/"
,
"WorkAPPDomain"
:
"http://m.kookaku.com/pages"
,
"Mongo"
:
"mongodb://47.96.23.199:27017"
,
...
...
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