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
04888c9e
Commit
04888c9e
authored
Feb 07, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
19d6016f
75792329
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
208 additions
and
10 deletions
+208
-10
RB_Order_ViewModel.cs
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
+11
-0
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+10
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+6
-3
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+2
-2
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+83
-3
B2BAppController.cs
Edu.WebApi/Controllers/B2BApp/B2BAppController.cs
+3
-0
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+1
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+8
-2
SchoolGardenController.cs
...bApi/Controllers/LearningGarden/SchoolGardenController.cs
+84
-0
No files found.
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
View file @
04888c9e
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.User
;
using
Edu.Common.Plugin
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.ViewModel.Contract
;
...
...
@@ -324,5 +325,15 @@ namespace Edu.Model.ViewModel.Sell
/// 业绩应发提成
/// </summary>
public
decimal
YFCommission
{
get
;
set
;
}
/// 客户来源见枚举(学生)
/// </summary>
public
StuCreateTypeEnum
CreateType
{
get
;
set
;
}
/// <summary>
/// 来源名称
/// </summary>
public
string
StuSourceIdName
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
04888c9e
...
...
@@ -364,5 +364,15 @@ namespace Edu.Model.ViewModel.User
/// 查询时间类型(1-本周,2-上周,3-本月,4-上月)
/// </summary>
public
int
QTimeType
{
get
;
set
;
}
/// <summary>
///查询订单编号【查询使用】
/// </summary>
public
string
QOrderIds
{
get
;
set
;
}
/// <summary>
/// 订单编号
/// </summary>
public
int
OrderId
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/OrderModule.cs
View file @
04888c9e
using
Edu.AOP.CustomerAttribute
;
using
Edu.Cache.User
;
using
Edu.Common
;
using
Edu.Common.API
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Sale
;
...
...
@@ -10,7 +9,6 @@ using Edu.Common.Enum.User;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.Entity.Contract
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.ViewModel.Contract
;
using
Edu.Model.ViewModel.Course
;
...
...
@@ -26,7 +24,6 @@ using Edu.Model.ViewModel.User;
using
Edu.Repository.Contract
;
using
Edu.Repository.Course
;
using
Edu.Repository.Customer
;
using
Edu.Repository.EduTask
;
using
Edu.Repository.Finance
;
using
Edu.Repository.Grade
;
using
Edu.Repository.Log
;
...
...
@@ -3243,6 +3240,9 @@ namespace Edu.Module.Course
if
(
orderList
.
Any
())
{
string
orderIds
=
string
.
Join
(
","
,
orderList
.
Select
(
x
=>
x
.
OrderId
));
//学员信息
List
<
RB_Student_ViewModel
>
stuList
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
QOrderIds
=
orderIds
},
isQueryCreateType
:
true
);
List
<
int
>
idList
=
new
List
<
int
>();
List
<
RB_Order_ViewModel
>
sourceTargetList
=
new
List
<
RB_Order_ViewModel
>();
var
sourceOrderIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
orderList
.
Select
(
x
=>
x
.
SourceOrderId
)));
...
...
@@ -3337,6 +3337,9 @@ namespace Edu.Module.Course
item
.
CommissionMoney
=
achievementList
.
Sum
(
x
=>
x
.
GiveOutMoney
);
item
.
YFCommission
=
achievementList
.
Sum
(
x
=>
x
.
PushMoney
);
}
var
tempStu
=
stuList
?.
FirstOrDefault
(
qitem
=>
qitem
.
OrderId
==
item
.
OrderId
);
item
.
CreateType
=
tempStu
?.
CreateType
??
StuCreateTypeEnum
.
EmployeeInput
;
item
.
StuSourceIdName
=
tempStu
?.
StuSourceIdName
??
""
;
}
}
return
orderList
;
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
04888c9e
...
...
@@ -285,13 +285,13 @@ ORDER BY {orderBy}
SELECT o.*,c.ClassName,c.ClassNo,c.School_Id as ClassSchoolId,t.TeacherName,t.TeacherIcon,IFNULL(course.CourseName,'') AS CourseName
,C.OpenTime,course.CourseSubject,IFNULL(csubject.SubjectName,'') AS CourseSubjectName,IFNULL(school.SName,'') AS SchoolName
,IFNULL(c.ClassStatus,0) AS ClassStatus,IFNULL(course.CoverImg,'') AS CourseImg,IFNULL(course.B2BBackground,'') AS B2BBackground
,IFNULL(course.B2BIcon,'') AS B2BIcon,cu.CustomerName,cu.ContactNumber as CustomerTel,c.ClassScrollType
,IFNULL(course.B2BIcon,'') AS B2BIcon,cu.CustomerName,cu.ContactNumber as CustomerTel,c.ClassScrollType
FROM RB_Order o LEFT JOIN rb_class c on o.ClassId = c.ClassId
LEFT JOIN rb_teacher t on c.Teacher_Id = t.TId
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
LEFT JOIN rb_course_subject AS csubject ON course.CourseSubject=csubject.Id
LEFT JOIN rb_school AS school ON c.School_Id=school.SId
left join
rb_customer cu on cu.CustomerId = o.CustomerId
LEFT JOIN
rb_customer cu on cu.CustomerId = o.CustomerId
WHERE
{
where
}
ORDER BY
{
orderBy
}
"
;
return
GetPage
<
RB_Order_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sql
).
ToList
();
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
04888c9e
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/B2BApp/B2BAppController.cs
View file @
04888c9e
...
...
@@ -108,6 +108,9 @@ namespace Edu.WebApi.Controllers.B2BApp
item
.
OrderId
,
TotalHours
=
gModel
?.
TotalHours
??
0
,
CompleteHours
=
gModel
?.
CompleteHours
??
0
,
item
.
CreateType
,
CreateTypeName
=
item
.
CreateType
.
ToName
(),
item
.
StuSourceIdName
,
});
}
pageModel
.
PageData
=
result
;
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
04888c9e
...
...
@@ -351,6 +351,7 @@ namespace Edu.WebApi.Controllers.Course
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
,
0
),
CourseSubject
=
base
.
ParmJObj
.
GetInt
(
"CourseSubject"
),
};
query
.
Saleplat
=
"1,2,3,4"
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
courseModule
.
GetCourseListModule
(
query
);
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
04888c9e
...
...
@@ -1510,7 +1510,10 @@ namespace Edu.WebApi.Controllers.Course
z
.
ContractNo
,
z
.
GuestId
,
z
.
Status
})
}),
x
.
CreateType
,
CreateTypeName
=
x
.
CreateType
.
ToName
(),
x
.
StuSourceIdName
,
})
};
pageModel
.
PageData
=
obj
;
...
...
@@ -1704,7 +1707,10 @@ namespace Edu.WebApi.Controllers.Course
z
.
ContractNo
,
z
.
GuestId
,
z
.
Status
,
})
}),
x
.
CreateType
,
CreateTypeName
=
x
.
CreateType
.
ToName
(),
x
.
StuSourceIdName
,
})
};
pageModel
.
PageData
=
obj
;
...
...
Edu.WebApi/Controllers/LearningGarden/SchoolGardenController.cs
View file @
04888c9e
...
...
@@ -340,6 +340,90 @@ namespace Edu.WebApi.Controllers.LearningGarden
}
return
list
;
}
/// <summary>
/// 获取成功发布列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
static
List
<
WeChatLearningGardenItem
>
GetFreePublishList
(
int
pageIndex
,
int
pageSize
)
{
string
tokenKey
=
Cache
.
CacheKey
.
DATA_WeChatAccountToken
+
Common
.
Config
.
WeChatAccountAppId
;
string
token
=
Cache
.
WeChat
.
WeChatReidsCache2
.
GetToken
(
tokenKey
);
if
(
Common
.
Config
.
IsLocal
==
1
)
{
token
=
"53_yZLlrwCr1CVh5TjyS1FkarF5M15NfYEmMFvtJKVA0C_R5tzOE20CZlFvWOWQRoezFQDweQPwkcenlISyEXoFkOpljNvyt-0_uXvtqQW41T7HfJnFGUWBGNIDkUQuFkKQWTpdXvdZhbWWeE_kMTTcAEAPWW"
;
}
if
(
string
.
IsNullOrEmpty
(
token
))
{
token
=
Common
.
Plugin
.
WeChatHelper
.
GetAccessToken
(
Common
.
Config
.
WeChatAccountAppId
,
Common
.
Config
.
WeChatAccountAppSecret
);
Cache
.
WeChat
.
WeChatReidsCache2
.
Set
(
tokenKey
,
token
);
}
string
newImaApi
=
"https://api.weixin.qq.com/cgi-bin/freepublish/batchget?access_token="
+
token
;
List
<
WeChatLearningGardenItem
>
list
=
new
List
<
WeChatLearningGardenItem
>();
var
resultInfo
=
new
{
count
=
pageSize
,
offset
=
(
pageIndex
-
1
)
*
pageSize
,
no_content
=
pageSize
};
string
jsonData
=
HttpHelper
.
HttpPost
(
newImaApi
,
JsonHelper
.
Serialize
(
resultInfo
),
""
);
if
(
jsonData
!=
null
&&
!
string
.
IsNullOrEmpty
(
jsonData
))
{
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
"GetVoiceData: "
+
jsonData
);
JObject
jObj
=
JObject
.
Parse
(
jsonData
);
var
item
=
jObj
.
GetStringValue
(
"item"
);
if
(!
string
.
IsNullOrEmpty
(
item
))
{
JArray
jArray
=
JArray
.
Parse
(
item
);
if
(
jArray
!=
null
&&
jArray
.
Count
>
0
)
{
foreach
(
var
jItem
in
jArray
)
{
JObject
sObj
=
JObject
.
Parse
(
jItem
.
ToString
());
JObject
dObj
=
JObject
.
Parse
(
sObj
.
GetStringValue
(
"content"
));
var
newsItem
=
new
List
<
WeChatLearningGardenNewsItem
>();
JArray
subArray
=
JArray
.
Parse
(
dObj
.
GetStringValue
(
"news_item"
));
if
(
subArray
!=
null
&&
subArray
.
Count
>
0
)
{
foreach
(
var
sItem
in
subArray
)
{
var
contentObj
=
JObject
.
Parse
(
sItem
.
ToString
());
newsItem
.
Add
(
new
WeChatLearningGardenNewsItem
()
{
title
=
contentObj
.
GetStringValue
(
"title"
),
author
=
contentObj
.
GetStringValue
(
"author"
),
digest
=
contentObj
.
GetStringValue
(
"digest"
),
content
=
contentObj
.
GetStringValue
(
"content"
),
show_cover_pic
=
contentObj
.
GetInt
(
"show_cover_pic"
),
url
=
contentObj
.
GetStringValue
(
"url"
),
thumb_url
=
contentObj
.
GetStringValue
(
"thumb_url"
),
});
}
}
var
content
=
new
WeChatLearningGardenContent
()
{
news_item
=
newsItem
,
create_time
=
dObj
.
GetLong
(
"create_time"
),
update_time
=
dObj
.
GetLong
(
"update_time"
),
};
WeChatLearningGardenItem
model
=
new
WeChatLearningGardenItem
()
{
media_id
=
sObj
.
GetStringValue
(
"article_id"
),
update_time
=
sObj
.
GetStringValue
(
"update_time"
),
content
=
content
};
list
.
Add
(
model
);
}
}
}
}
return
list
;
}
#
endregion
}
}
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