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
ae768611
Commit
ae768611
authored
Apr 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
85ab49f4
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
607 additions
and
0 deletions
+607
-0
RB_Web_Cartoon.cs
Edu.Model/Entity/Web/RB_Web_Cartoon.cs
+54
-0
RB_Web_Monthly.cs
Edu.Model/Entity/Web/RB_Web_Monthly.cs
+59
-0
RB_Web_Cartoon_ViewModel.cs
Edu.Model/ViewModel/Web/RB_Web_Cartoon_ViewModel.cs
+14
-0
RB_Web_Monthly_ViewModel.cs
Edu.Model/ViewModel/Web/RB_Web_Monthly_ViewModel.cs
+15
-0
WebNewsModule.cs
Edu.Module.Web/WebNewsModule.cs
+148
-0
RB_Web_CartoonRepository.cs
Edu.Repository/Web/RB_Web_CartoonRepository.cs
+56
-0
RB_Web_MonthlyRepository.cs
Edu.Repository/Web/RB_Web_MonthlyRepository.cs
+55
-0
RB_Web_NavRepository.cs
Edu.Repository/Web/RB_Web_NavRepository.cs
+1
-0
RB_Web_NewsRepository.cs
Edu.Repository/Web/RB_Web_NewsRepository.cs
+1
-0
RB_Web_NewsTypeRepository.cs
Edu.Repository/Web/RB_Web_NewsTypeRepository.cs
+1
-0
RB_Web_TeacherRepository.cs
Edu.Repository/Web/RB_Web_TeacherRepository.cs
+1
-0
WebController.cs
Edu.WebApi/Controllers/Web/WebController.cs
+61
-0
WebManagerController.cs
Edu.WebApi/Controllers/Web/WebManagerController.cs
+141
-0
No files found.
Edu.Model/Entity/Web/RB_Web_Cartoon.cs
0 → 100644
View file @
ae768611
using
Edu.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Web
{
/// <summary>
/// 品牌漫画管理实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Web_Cartoon
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 漫画名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 漫画链接
/// </summary>
public
string
LinkUrl
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 创建人编号
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
}
}
Edu.Model/Entity/Web/RB_Web_Monthly.cs
0 → 100644
View file @
ae768611
using
Edu.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Web
{
/// <summary>
/// 品牌月刊管理实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Web_Monthly
{
/// <summary>
/// 月刊编号(主键)
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 漫画名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 漫画链接
/// </summary>
public
string
LinkUrl
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImg
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 创建人编号
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Web/RB_Web_Cartoon_ViewModel.cs
0 → 100644
View file @
ae768611
using
Edu.Model.Entity.Web
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Web
{
/// <summary>
/// 品牌漫画管理视图实体类
/// </summary>
public
class
RB_Web_Cartoon_ViewModel
:
RB_Web_Cartoon
{
}
}
Edu.Model/ViewModel/Web/RB_Web_Monthly_ViewModel.cs
0 → 100644
View file @
ae768611
using
Edu.Model.Entity.Web
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Web
{
/// <summary>
/// 品牌月刊管理视图实体类
/// </summary>
public
class
RB_Web_Monthly_ViewModel
:
RB_Web_Monthly
{
}
}
\ No newline at end of file
Edu.Module.Web/WebNewsModule.cs
View file @
ae768611
...
@@ -20,6 +20,16 @@ namespace Edu.Module.Web
...
@@ -20,6 +20,16 @@ namespace Edu.Module.Web
/// </summary>
/// </summary>
private
readonly
RB_Web_NewsTypeRepository
web_NewsTypeRepository
=
new
RB_Web_NewsTypeRepository
();
private
readonly
RB_Web_NewsTypeRepository
web_NewsTypeRepository
=
new
RB_Web_NewsTypeRepository
();
/// <summary>
/// 品牌月刊管理仓储层对象
/// </summary>
private
readonly
RB_Web_MonthlyRepository
web_MonthlyRepository
=
new
RB_Web_MonthlyRepository
();
/// <summary>
/// 品牌漫画管理仓储层对象
/// </summary>
private
readonly
RB_Web_CartoonRepository
web_CartoonRepository
=
new
RB_Web_CartoonRepository
();
#
region
新闻管理
#
region
新闻管理
/// <summary>
/// <summary>
/// 获取网站新闻分页列表
/// 获取网站新闻分页列表
...
@@ -178,5 +188,143 @@ namespace Edu.Module.Web
...
@@ -178,5 +188,143 @@ namespace Edu.Module.Web
return
flag
;
return
flag
;
}
}
#
endregion
#
endregion
#
region
品牌动漫管理
/// <summary>
/// 获取品牌卡通分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示调试</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Web_Cartoon_ViewModel
>
GetWebCartoonPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Web_Cartoon_ViewModel
query
)
{
return
web_CartoonRepository
.
GetWebCartoonPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增修改品牌动漫
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetWebCartoonModule
(
RB_Web_Cartoon_ViewModel
model
)
{
bool
flag
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Web_Cartoon_ViewModel
.
Name
),
model
.
Name
},
{
nameof
(
RB_Web_Cartoon_ViewModel
.
LinkUrl
),
model
.
LinkUrl
},
};
flag
=
web_CartoonRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Web_NewsType_ViewModel
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
web_CartoonRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 根据编号获取品牌卡通详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Web_Cartoon_ViewModel
GetWebCartoonModule
(
object
Id
)
{
return
web_CartoonRepository
.
GetEntity
<
RB_Web_Cartoon_ViewModel
>(
Id
);
}
/// <summary>
/// 修改品牌卡通状态
/// </summary>
/// <param name="Id"></param>
/// <param name="Status">0-正常,1-删除</param>
/// <returns></returns>
public
bool
RemoveWebCartoonStatusModule
(
int
Id
,
int
Status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Web_Cartoon_ViewModel
.
Status
),
Status
},
};
var
flag
=
web_CartoonRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Web_Cartoon_ViewModel
.
Id
),
Id
));
return
flag
;
}
#
endregion
#
region
品牌月刊管理
/// <summary>
/// 获取品牌月刊分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示调试</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Web_Monthly_ViewModel
>
GetWebMonthlyPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Web_Monthly_ViewModel
query
)
{
return
web_MonthlyRepository
.
GetWebMonthlyPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增修改品牌月刊
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetWebMonthlyModule
(
RB_Web_Monthly_ViewModel
model
)
{
bool
flag
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Web_Monthly_ViewModel
.
Name
),
model
.
Name
},
{
nameof
(
RB_Web_Monthly_ViewModel
.
LinkUrl
),
model
.
LinkUrl
},
{
nameof
(
RB_Web_Monthly_ViewModel
.
CoverImg
),
model
.
CoverImg
},
};
flag
=
web_MonthlyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Web_Monthly_ViewModel
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
web_MonthlyRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 根据编号获取品牌月刊详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Web_Monthly_ViewModel
GetWebMonthlyModule
(
object
Id
)
{
return
web_MonthlyRepository
.
GetEntity
<
RB_Web_Monthly_ViewModel
>(
Id
);
}
/// <summary>
/// 修改品牌月刊状态
/// </summary>
/// <param name="Id"></param>
/// <param name="Status">0-正常,1-删除</param>
/// <returns></returns>
public
bool
RemoveWebMonthlyStatusModule
(
int
Id
,
int
Status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Web_Monthly_ViewModel
.
Status
),
Status
},
};
var
flag
=
web_MonthlyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Web_Monthly_ViewModel
.
Id
),
Id
));
return
flag
;
}
#
endregion
}
}
}
}
Edu.Repository/Web/RB_Web_CartoonRepository.cs
0 → 100644
View file @
ae768611
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Web
;
using
Edu.Model.ViewModel.Web
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Web
{
/// <summary>
/// 品牌漫画管理仓储层
/// </summary>
public
class
RB_Web_CartoonRepository
:
BaseRepository
<
RB_Web_Cartoon
>
{
/// <summary>
/// 获取品牌卡通分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Web_Cartoon_ViewModel
>
GetWebCartoonPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Web_Cartoon_ViewModel
query
)
{
rowsCount
=
0
;
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT A.*
FROM RB_Web_Cartoon AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Cartoon_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Web_Cartoon_ViewModel
>();
}
else
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Cartoon_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Web_Cartoon_ViewModel
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Web_Cartoon_ViewModel
.
Id
));
return
GetPage
<
RB_Web_Cartoon_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/Web/RB_Web_MonthlyRepository.cs
0 → 100644
View file @
ae768611
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Web
;
using
Edu.Model.ViewModel.Web
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Web
{
/// <summary>
/// 品牌月刊管理仓储层
/// </summary>
public
class
RB_Web_MonthlyRepository
:
BaseRepository
<
RB_Web_Monthly
>
{
/// <summary>
/// 获取品牌月刊分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Web_Monthly_ViewModel
>
GetWebMonthlyPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Web_Monthly_ViewModel
query
)
{
rowsCount
=
0
;
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT A.*
FROM RB_Web_Monthly AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Monthly_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Web_Monthly_ViewModel
>();
}
else
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Monthly_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Web_Monthly_ViewModel
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Web_Monthly_ViewModel
.
Id
));
return
GetPage
<
RB_Web_Monthly_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/Web/RB_Web_NavRepository.cs
View file @
ae768611
...
@@ -61,6 +61,7 @@ WHERE 1=1
...
@@ -61,6 +61,7 @@ WHERE 1=1
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Nav_ViewModel
.
Status
),
(
int
)
query
.
Status
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Nav_ViewModel
.
Status
),
(
int
)
query
.
Status
);
}
}
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Web_Nav_ViewModel
.
Id
));
return
GetPage
<
RB_Web_Nav_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Web_Nav_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.Repository/Web/RB_Web_NewsRepository.cs
View file @
ae768611
...
@@ -57,6 +57,7 @@ WHERE 1=1
...
@@ -57,6 +57,7 @@ WHERE 1=1
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_News_ViewModel
.
TypeId
),
query
.
TypeId
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_News_ViewModel
.
TypeId
),
query
.
TypeId
);
}
}
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Web_News_ViewModel
.
Id
));
return
GetPage
<
RB_Web_News_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Web_News_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.Repository/Web/RB_Web_NewsTypeRepository.cs
View file @
ae768611
...
@@ -48,6 +48,7 @@ WHERE 1=1
...
@@ -48,6 +48,7 @@ WHERE 1=1
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_NewsType_ViewModel
.
Status
),
(
int
)
query
.
Status
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_NewsType_ViewModel
.
Status
),
(
int
)
query
.
Status
);
}
}
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Web_NewsType_ViewModel
.
Id
));
return
GetPage
<
RB_Web_NewsType_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Web_NewsType_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.Repository/Web/RB_Web_TeacherRepository.cs
View file @
ae768611
...
@@ -56,6 +56,7 @@ WHERE 1=1
...
@@ -56,6 +56,7 @@ WHERE 1=1
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Teacher_ViewModel
.
Type
),
query
.
Type
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Teacher_ViewModel
.
Type
),
query
.
Type
);
}
}
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Web_Teacher_ViewModel
.
Id
));
return
GetPage
<
RB_Web_Teacher_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Web_Teacher_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/Web/WebController.cs
View file @
ae768611
...
@@ -226,6 +226,67 @@ namespace Edu.WebApi.Controllers.Web
...
@@ -226,6 +226,67 @@ namespace Edu.WebApi.Controllers.Web
return
ApiResult
.
Success
(
data
:
obj
);
return
ApiResult
.
Success
(
data
:
obj
);
}
}
/// <summary>
/// 获取品牌卡通分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetWebCartoonPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Web_Cartoon_ViewModel
()
{
Group_Id
=
base
.
ParmJObj
.
GetInt
(
"Group_Id"
)
};
if
(
query
.
Group_Id
<=
0
)
{
string
Domain
=
base
.
ParmJObj
.
GetStringValue
(
"Domain"
);
int
groupId
=
groupModule
.
GetGroupIdByDomainModule
(
Domain
);
query
.
Group_Id
=
groupId
;
}
var
list
=
newsModule
.
GetWebCartoonPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
Name
,
qitem
.
LinkUrl
,
CreateDate
=
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateDate
)
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取品牌月刊分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetWebMonthlyPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Web_Monthly_ViewModel
()
{
Group_Id
=
base
.
ParmJObj
.
GetInt
(
"Group_Id"
)
};
if
(
query
.
Group_Id
<=
0
)
{
string
Domain
=
base
.
ParmJObj
.
GetStringValue
(
"Domain"
);
int
groupId
=
groupModule
.
GetGroupIdByDomainModule
(
Domain
);
query
.
Group_Id
=
groupId
;
}
var
list
=
newsModule
.
GetWebMonthlyPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
Name
,
qitem
.
LinkUrl
,
qitem
.
CoverImg
,
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
#
endregion
#
endregion
#
region
课程相关接口
#
region
课程相关接口
...
...
Edu.WebApi/Controllers/Web/WebManagerController.cs
View file @
ae768611
...
@@ -580,5 +580,146 @@ namespace Edu.WebApi.Controllers.Web
...
@@ -580,5 +580,146 @@ namespace Edu.WebApi.Controllers.Web
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
#
endregion
#
endregion
#
region
品牌动漫管理
/// <summary>
/// 获取品牌卡通分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetWebCartoonPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Web_Cartoon_ViewModel
()
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Status
=
(
DateStateEnum
)
base
.
ParmJObj
.
GetInt
(
"Status"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
newsModule
.
GetWebCartoonPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 新增修改品牌动漫
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetWebCartoon
()
{
var
extModel
=
new
RB_Web_Cartoon_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
};
extModel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
Status
=
DateStateEnum
.
Normal
;
bool
flag
=
newsModule
.
SetWebCartoonModule
(
extModel
);
return
flag
?
ApiResult
.
Success
(
data
:
extModel
)
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取品牌卡通详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetWebCartoon
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
extModel
=
newsModule
.
GetWebCartoonModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 修改品牌卡通状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveWebCartoonStatus
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
,
0
);
var
flag
=
newsModule
.
RemoveWebCartoonStatusModule
(
Id
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
品牌月刊管理
/// <summary>
/// 获取品牌月刊分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetWebMonthlyPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Web_Monthly_ViewModel
()
{
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Status
=
(
DateStateEnum
)
base
.
ParmJObj
.
GetInt
(
"Status"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
newsModule
.
GetWebMonthlyPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 新增修改品牌月刊
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetWebMonthly
()
{
var
extModel
=
new
RB_Web_Monthly_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
CoverImg
=
base
.
ParmJObj
.
GetStringValue
(
"CoverImg"
),
};
extModel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
Status
=
DateStateEnum
.
Normal
;
bool
flag
=
newsModule
.
SetWebMonthlyModule
(
extModel
);
return
flag
?
ApiResult
.
Success
(
data
:
extModel
)
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取品牌月刊详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetWebMonthly
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
extModel
=
newsModule
.
GetWebMonthlyModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 修改品牌月刊状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveWebMonthlyStatus
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
,
0
);
var
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
,
0
);
var
flag
=
newsModule
.
RemoveWebMonthlyStatusModule
(
Id
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
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