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
42755e70
Commit
42755e70
authored
Dec 15, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改
parent
4916c6bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
0 deletions
+73
-0
AppHomePageModule.cs
Edu.Module.System/AppHomePageModule.cs
+29
-0
RB_StageRepository.cs
Edu.Repository/System/RB_StageRepository.cs
+19
-0
AppIndexController.cs
Edu.WebApi/Controllers/APP/AppIndexController.cs
+9
-0
B2BAppController.cs
Edu.WebApi/Controllers/B2BApp/B2BAppController.cs
+16
-0
No files found.
Edu.Module.System/AppHomePageModule.cs
View file @
42755e70
...
...
@@ -5,6 +5,7 @@ using System.Text;
using
Edu.AOP.CustomerAttribute
;
using
Edu.Model.Entity.App
;
using
Edu.Repository.App
;
using
Edu.Repository.System
;
namespace
Edu.Module.System
{
...
...
@@ -23,6 +24,8 @@ namespace Edu.Module.System
/// </summary>
private
readonly
RB_HomePage_LableRepository
homeLableRepository
=
new
RB_HomePage_LableRepository
();
private
readonly
RB_StageRepository
stageRepository
=
new
RB_StageRepository
();
#
region
首页
banner
图片列表
/// <summary>
/// 获取学生app首页banner列表
...
...
@@ -98,5 +101,31 @@ namespace Edu.Module.System
return
flag
;
}
#
endregion
#
region
客户阶段
/// <summary>
/// 获取客户阶段以及数量
/// </summary>
/// <param name="gid"></param>
/// <param name="id"></param>
/// <returns></returns>
public
Object
GetPeersCustomerStageCount
(
int
gid
,
int
id
)
{
var
list
=
stageRepository
.
GetPeersCustomerStageCount
(
gid
,
id
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
result
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
StageName
,
x
.
ChildCount
});
}
return
list
;
}
#
endregion
}
}
Edu.Repository/System/RB_StageRepository.cs
View file @
42755e70
using
Edu.Model.Entity.System
;
using
Edu.Model.ViewModel.System
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.System
{
public
class
RB_StageRepository
:
BaseRepository
<
RB_Stage
>
{
/// <summary>
/// 查找指定同业下,各阶段客户数量
/// </summary>
/// <param name="gid"></param>
/// <param name="id"></param>
/// <returns></returns>
public
List
<
RB_Stage_ViewModel
>
GetPeersCustomerStageCount
(
int
gid
,
int
id
)
{
string
sql
=
"select Id,StageName,`No`,(select Count(0) from rb_Student where CustomerId=@id and StuStage=a.Id) as ChildCount from rb_stage a where Group_Id=@gid order by `No`"
;
DynamicParameters
parameters
=
new
DynamicParameters
();
parameters
.
Add
(
"gid"
,
gid
);
parameters
.
Add
(
"id"
,
id
);
return
Get
<
RB_Stage_ViewModel
>(
sql
,
parameters
).
ToList
();
}
}
}
Edu.WebApi/Controllers/APP/AppIndexController.cs
View file @
42755e70
...
...
@@ -280,6 +280,15 @@ namespace Edu.WebApi.Controllers.APP
#
endregion
#
region
获取客户阶段
public
Object
GetPeersCustomerStageCount
()
{
return
appHomePageModule
.
GetPeersCustomerStageCount
(
base
.
AppUserInfo
.
Group_Id
,
base
.
AppUserInfo
.
Id
);
}
#
endregion
}
}
Edu.WebApi/Controllers/B2BApp/B2BAppController.cs
View file @
42755e70
...
...
@@ -5,6 +5,7 @@ using Edu.Model.ViewModel.Grade;
using
Edu.Model.ViewModel.Sell
;
using
Edu.Module.Course
;
using
Edu.Module.Customer
;
using
Edu.Module.System
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
...
...
@@ -35,11 +36,16 @@ namespace Edu.WebApi.Controllers.B2BApp
/// </summary>
private
readonly
ClassModule
classModule
=
new
ClassModule
();
/// <summary>
/// 客户返佣和幸福存折处理类对象
/// </summary>
private
readonly
CustomerBalanceDetailModule
customerBalanceDetailModule
=
new
CustomerBalanceDetailModule
();
private
readonly
AppHomePageModule
appHomePageModule
=
new
AppHomePageModule
();
/// <summary>
/// 同行获取学员订单分页列表
/// </summary>
...
...
@@ -119,5 +125,15 @@ namespace Edu.WebApi.Controllers.B2BApp
var
obj
=
classModule
.
AppCustomerGetClassPlan
(
StuId
);
return
ApiResult
.
Success
(
data
:
obj
);
}
#
region
获取客户阶段
public
Object
GetPeersCustomerStageCount
()
{
var
result
=
appHomePageModule
.
GetPeersCustomerStageCount
(
base
.
AppletCustomerInfo
.
GroupId
,
base
.
AppletCustomerInfo
.
CustomerId
);
return
ApiResult
.
Success
(
data
:
result
,
message
:
"OK"
);
}
#
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