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
d6efdb68
Commit
d6efdb68
authored
Jan 13, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cb34455d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
74 deletions
+12
-74
RB_Activity_ConfigRepository.cs
Edu.Repository/Activity/RB_Activity_ConfigRepository.cs
+2
-7
RB_Activity_PeriodsDetailRepository.cs
...epository/Activity/RB_Activity_PeriodsDetailRepository.cs
+1
-15
RB_Activity_PeriodsRepository.cs
Edu.Repository/Activity/RB_Activity_PeriodsRepository.cs
+2
-10
Rb_AdvertisingRepository.cs
Edu.Repository/Advertising/Rb_AdvertisingRepository.cs
+2
-7
Rb_Advertising_MakeRepository.cs
Edu.Repository/Advertising/Rb_Advertising_MakeRepository.cs
+2
-30
RB_HomePage_BannerRepository.cs
Edu.Repository/App/RB_HomePage_BannerRepository.cs
+2
-3
RB_Student_SystemMsgRepository.cs
Edu.Repository/App/RB_Student_SystemMsgRepository.cs
+1
-2
No files found.
Edu.Repository/Activity/RB_Activity_ConfigRepository.cs
View file @
d6efdb68
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
...
...
@@ -30,13 +27,11 @@ namespace Edu.Repository.Course
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_Config
.
Type
)}
=
{
demodel
.
Type
}
"
;
}
string
sql
=
$@"
SELECT * From RB_Activity_Config r
WHERE
{
where
}
ORDER BY r.Id DESC "
;
return
Get
<
RB_Activity_Config_ViewModel
>(
sql
).
ToList
();
}
}
}
}
\ No newline at end of file
Edu.Repository/Activity/RB_Activity_PeriodsDetailRepository.cs
View file @
d6efdb68
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
...
...
@@ -22,7 +19,6 @@ namespace Edu.Repository.Course
public
List
<
RB_Activity_PeriodsDetail_ViewModel
>
GetList
(
RB_Activity_PeriodsDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
...
...
@@ -55,8 +51,6 @@ namespace Edu.Repository.Course
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
ActivityName
)}
like '%
{
demodel
.
ActivityName
}
%'"
;
}
string
sql
=
$@" select r.* from RB_Activity_PeriodsDetail r where
{
where
}
order by r.Id asc"
;
return
Get
<
RB_Activity_PeriodsDetail_ViewModel
>(
sql
).
ToList
();
}
...
...
@@ -69,7 +63,6 @@ namespace Edu.Repository.Course
public
List
<
RB_Activity_PeriodsDetail_ViewModel
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Activity_PeriodsDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
...
...
@@ -110,7 +103,6 @@ namespace Edu.Repository.Course
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
DSUserName
)}
like '%
{
demodel
.
DSUserName
}
%'"
;
}
string
sql
=
$@" select r.* from RB_Activity_PeriodsDetail r where
{
where
}
order by r.Id asc"
;
return
GetPage
<
RB_Activity_PeriodsDetail_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
@@ -123,7 +115,6 @@ namespace Edu.Repository.Course
public
List
<
RB_Activity_PeriodsDetail_ViewModel
>
GetActivityCommissionUserList
(
RB_Activity_PeriodsDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
...
...
@@ -152,8 +143,6 @@ namespace Edu.Repository.Course
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
string
sql
=
$@" select r.UserId,r.Depart_Id,r.School_Id,sum(r.CommissionMoney) as CommissionMoney
from RB_Activity_PeriodsDetail r where
{
where
}
group by r.UserId,r.Depart_Id,r.School_Id"
;
return
Get
<
RB_Activity_PeriodsDetail_ViewModel
>(
sql
).
ToList
();
...
...
@@ -167,7 +156,6 @@ from RB_Activity_PeriodsDetail r where {where} group by r.UserId,r.Depart_Id,r.S
public
decimal
GetSellCommissionStatistics
(
RB_Activity_PeriodsDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
...
...
@@ -208,11 +196,9 @@ from RB_Activity_PeriodsDetail r where {where} group by r.UserId,r.Depart_Id,r.S
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_PeriodsDetail_ViewModel
.
DSUserName
)}
like '%
{
demodel
.
DSUserName
}
%'"
;
}
string
sql
=
$@" select sum(r.CommissionMoney) from RB_Activity_PeriodsDetail r where
{
where
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
0
:
Convert
.
ToDecimal
(
obj
);
}
}
}
Edu.Repository/Activity/RB_Activity_PeriodsRepository.cs
View file @
d6efdb68
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
...
...
@@ -21,7 +18,6 @@ namespace Edu.Repository.Course
public
List
<
RB_Activity_Periods_ViewModel
>
GetList
(
RB_Activity_Periods_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_Periods_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
...
...
@@ -34,7 +30,6 @@ namespace Edu.Repository.Course
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_Periods_ViewModel
.
Periods
)}
='
{
demodel
.
Periods
}
'"
;
}
string
sql
=
$@" select r.* from RB_Activity_Periods r where
{
where
}
order by r.Id desc"
;
return
Get
<
RB_Activity_Periods_ViewModel
>(
sql
).
ToList
();
}
...
...
@@ -50,7 +45,6 @@ namespace Edu.Repository.Course
public
List
<
RB_Activity_Periods_ViewModel
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Activity_Periods_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_Periods_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
...
...
@@ -59,10 +53,8 @@ namespace Edu.Repository.Course
{
where
+=
$@" and r.
{
nameof
(
RB_Activity_Periods_ViewModel
.
Name
)}
like '%
{
demodel
.
Name
}
%'"
;
}
string
sql
=
$@" select r.* from RB_Activity_Periods r where
{
where
}
order by r.Id desc"
;
return
GetPage
<
RB_Activity_Periods_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
}
\ No newline at end of file
Edu.Repository/Advertising/Rb_AdvertisingRepository.cs
View file @
d6efdb68
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Model.Entity.Advertising
;
using
Edu.Model.ViewModel.Advertising
;
...
...
@@ -28,8 +26,6 @@ namespace Edu.Repository.Advertising
public
List
<
Rb_Advertising_Extend
>
GetAdvertisingList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
string
advName
,
int
IsFee
,
int
RB_Group_id
)
{
string
where
=
$@" where 1=1 and A.
{
nameof
(
Rb_Advertising
.
Group_Id
)}
=
{
RB_Group_id
}
and A.
{
nameof
(
Rb_Advertising
.
Status
)}
=0"
;
if
(
IsFee
>
0
)
{
where
+=
$@" and A.
{
nameof
(
Rb_Advertising
.
IsFee
)}
=
{
IsFee
}
"
;
...
...
@@ -54,7 +50,6 @@ namespace Edu.Repository.Advertising
public
List
<
Rb_Advertising_Extend
>
GetAdvertsingListForComboBox
(
string
advName
,
int
RB_Group_id
)
{
string
where
=
$@" where 1=1 and
{
nameof
(
Rb_Advertising
.
Group_Id
)}
=
{
RB_Group_id
}
and
{
nameof
(
Rb_Advertising
.
Status
)}
=0"
;
if
(!
string
.
IsNullOrWhiteSpace
(
advName
))
{
where
+=
$@" and
{
nameof
(
Rb_Advertising
.
Title
)}
like '%
{
advName
}
%'"
;
...
...
@@ -62,4 +57,4 @@ namespace Edu.Repository.Advertising
return
Get
<
Rb_Advertising_Extend
>(
$@"select * from
{
nameof
(
Rb_Advertising
)}
{
where
}
order by
{
nameof
(
Rb_Advertising
.
CreateDate
)}
desc"
).
ToList
();
}
}
}
}
\ No newline at end of file
Edu.Repository/Advertising/Rb_Advertising_MakeRepository.cs
View file @
d6efdb68
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Model.Entity.Advertising
;
using
Edu.Model.ViewModel.Advertising
;
...
...
@@ -14,7 +12,6 @@ namespace Edu.Repository.Advertising
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
Rb_Advertising_Make
);
}
}
/// <summary>
/// 获取创建的广告信息
/// </summary>
...
...
@@ -25,24 +22,19 @@ namespace Edu.Repository.Advertising
/// <returns></returns>
public
List
<
Rb_Advertising_Make_Extend
>
GetPage
(
int
pageIndex
,
int
pageSize
,
Rb_Advertising_Make_Extend
model
,
out
long
count
)
{
string
where
=
$@" where 1=1 and
{
nameof
(
Rb_Advertising_Make
.
Status
)}
=
{(
int
)
Common
.
Enum
.
DateStateEnum
.
Normal
}
"
;
if
(
model
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
Rb_Advertising_Make
.
School_Id
)}
=
{
model
.
School_Id
}
"
;
}
if
(
model
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
Rb_Advertising_Make
.
Group_Id
)}
=
{
model
.
Group_Id
}
"
;
}
if
(
model
.
UpdateBy
>
0
)
{
where
+=
$@" and
{
nameof
(
Rb_Advertising_Make
.
UpdateBy
)}
=
{
model
.
UpdateBy
}
"
;
}
string
sql
=
$@" select * from
{
TableName
}
{
where
}
"
;
return
GetPage
<
Rb_Advertising_Make_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
@@ -55,15 +47,12 @@ namespace Edu.Repository.Advertising
public
List
<
Rb_Advertising_Make_Extend
>
Get
(
Rb_Advertising_Make_Extend
model
)
{
string
where
=
$@" where 1=1 and A.
{
nameof
(
Rb_Advertising_Make
.
Status
)}
=
{(
int
)
Common
.
Enum
.
DateStateEnum
.
Normal
}
"
;
if
(
model
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
Rb_Advertising_Make
.
School_Id
)}
=
{
model
.
School_Id
}
"
;
}
if
(
model
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
Rb_Advertising_Make
.
Group_Id
)}
=
{
model
.
Group_Id
}
"
;
}
if
(
model
.
UpdateBy
>
0
)
...
...
@@ -78,22 +67,5 @@ namespace Edu.Repository.Advertising
ON A.AdvertisingID = B.ID
{
where
}
"
;
return
Get
<
Rb_Advertising_Make_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取广告信息
/// </summary>
/// <param name="ids">广告id</param>
/// <returns></returns>
public
List
<
Rb_Advertising_Make_Extend
>
GetListByIds
(
List
<
int
>
ids
)
{
List
<
Rb_Advertising_Make_Extend
>
sellAdvertisingList
=
new
List
<
Rb_Advertising_Make_Extend
>();
if
(
ids
.
Count
>
0
)
{
string
sql
=
$@" SELECT * from Rb_Advertising_Make a where a.ID in (
{
string
.
Join
(
","
,
ids
)}
) and a.`Status` = 0"
;
sellAdvertisingList
=
Get
<
Rb_Advertising_Make_Extend
>(
sql
).
ToList
();
}
return
sellAdvertisingList
;
}
}
}
}
\ No newline at end of file
Edu.Repository/App/RB_HomePage_BannerRepository.cs
View file @
d6efdb68
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Common.Enum
;
...
...
@@ -36,4 +35,4 @@ namespace Edu.Repository.App
return
Get
<
RB_HomePage_Banner
>(
builder
.
ToString
()).
ToList
();
}
}
}
}
\ No newline at end of file
Edu.Repository/App/RB_Student_SystemMsgRepository.cs
View file @
d6efdb68
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Common.Enum
;
...
...
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