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
28546ef6
Commit
28546ef6
authored
Apr 08, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增咨询实体类
parent
8b5e03eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
187 additions
and
8 deletions
+187
-8
RB_Web_Advisory.cs
Edu.Model/Entity/Web/RB_Web_Advisory.cs
+19
-4
RB_Web_Advisory_ViewModel.cs
Edu.Model/ViewModel/Web/RB_Web_Advisory_ViewModel.cs
+30
-1
WebAdvisoryModule.cs
Edu.Module.Web/WebAdvisoryModule.cs
+90
-0
RB_Web_AdvisoryRepository.cs
Edu.Repository/Web/RB_Web_AdvisoryRepository.cs
+17
-3
WebManagerController.cs
Edu.WebApi/Controllers/Web/WebManagerController.cs
+31
-0
No files found.
Edu.Model/Entity/Web/RB_Web_Advisory.cs
View file @
28546ef6
...
@@ -41,20 +41,35 @@ namespace Edu.Model.Entity.Web
...
@@ -41,20 +41,35 @@ namespace Edu.Model.Entity.Web
/// </summary>
/// </summary>
public
string
Remark
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 处理状态(0-待处理,1-已处理)
/// </summary>
public
int
DealStatus
{
get
;
set
;
}
/// <summary>
/// 处理内容
/// </summary>
public
string
DealContent
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 删除状态
/// 删除状态
/// </summary>
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// <summary>
///
创建时间
///
处理人
/// </summary>
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
public
int
DealBy
{
get
;
set
;
}
/// <summary>
/// 处理时间
/// </summary>
public
DateTime
DealTime
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 创建
人编号
/// 创建
时间
/// </summary>
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 集团编号
/// 集团编号
...
...
Edu.Model/ViewModel/Web/RB_Web_Advisory_ViewModel.cs
View file @
28546ef6
...
@@ -8,8 +8,37 @@ namespace Edu.Model.ViewModel.Web
...
@@ -8,8 +8,37 @@ namespace Edu.Model.ViewModel.Web
/// <summary>
/// <summary>
/// 咨询管理视图实体类
/// 咨询管理视图实体类
/// </summary>
/// </summary>
public
class
RB_Web_Advisory_ViewModel
:
RB_Web_Advisory
public
class
RB_Web_Advisory_ViewModel
:
RB_Web_Advisory
{
{
/// <summary>
/// 咨询类型对应的资源名称(1-课程名称,2-班级名称,3-留学就业产品名称)
/// </summary>
public
string
SourceName
{
get
;
set
;
}
/// <summary>
/// 处理状态字符串
/// </summary>
public
string
DealStatusStr
{
get
{
string
str
=
"待处理"
;
if
(
this
.
DealStatus
==
1
)
{
str
=
"已处理"
;
}
return
str
;
}
}
/// <summary>
/// 处理人姓名
/// </summary>
public
string
DealByName
{
get
;
set
;
}
/// <summary>
/// 处理时间字符串
/// </summary>
public
string
DealTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
DealTime
);
}
}
}
}
}
}
Edu.Module.Web/WebAdvisoryModule.cs
0 → 100644
View file @
28546ef6
using
Edu.Model.ViewModel.Web
;
using
Edu.Repository.Web
;
using
System.Collections.Generic
;
using
VT.FW.DB
;
namespace
Edu.Module.Web
{
/// <summary>
/// 咨询管理处理类
/// </summary>
public
class
WebAdvisoryModule
{
/// <summary>
/// 咨询管理仓储层对象
/// </summary>
private
readonly
RB_Web_AdvisoryRepository
web_AdvisoryRepository
=
new
RB_Web_AdvisoryRepository
();
/// <summary>
/// 获取咨询管理分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示调试</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Web_Advisory_ViewModel
>
GetWebAdvisoryPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Web_Advisory_ViewModel
query
)
{
return
web_AdvisoryRepository
.
GetWebAdvisoryPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增修改咨询管理
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetWebAdvisoryModule
(
RB_Web_Advisory_ViewModel
model
)
{
bool
flag
;
var
newId
=
web_AdvisoryRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
return
flag
;
}
/// <summary>
/// 修改咨询回复
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
UpdateWebAdvisoryModule
(
RB_Web_Advisory_ViewModel
model
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Web_Advisory_ViewModel
.
DealStatus
),
model
.
DealStatus
},
{
nameof
(
RB_Web_Advisory_ViewModel
.
DealContent
),
model
.
DealContent
},
{
nameof
(
RB_Web_Advisory_ViewModel
.
BgImg
),
model
.
BgImg
},
{
nameof
(
RB_Web_Advisory_ViewModel
.
LinkUrl
),
model
.
LinkUrl
},
{
nameof
(
RB_Web_Advisory_ViewModel
.
NavType
),
model
.
NavType
},
};
var
flag
=
web_AdvisoryRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Web_Advisory_ViewModel
.
Id
),
model
.
Id
));
return
flag
;
}
/// <summary>
/// 根据编号获取咨询管理详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Web_Advisory_ViewModel
GetWebAdvisoryModule
(
object
Id
)
{
return
web_AdvisoryRepository
.
GetEntity
<
RB_Web_Advisory_ViewModel
>(
Id
);
}
/// <summary>
/// 修改咨询管理状态
/// </summary>
/// <param name="Id"></param>
/// <param name="Status">0-正常,1-删除</param>
/// <returns></returns>
public
bool
RemoveWebAdvisoryStatusModule
(
int
Id
,
int
Status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Web_Advisory_ViewModel
.
Status
),
Status
},
};
var
flag
=
web_AdvisoryRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Web_Advisory_ViewModel
.
Id
),
Id
));
return
flag
;
}
}
}
Edu.Repository/Web/RB_Web_AdvisoryRepository.cs
View file @
28546ef6
...
@@ -14,7 +14,7 @@ namespace Edu.Repository.Web
...
@@ -14,7 +14,7 @@ namespace Edu.Repository.Web
public
class
RB_Web_AdvisoryRepository
:
BaseRepository
<
RB_Web_Advisory
>
public
class
RB_Web_AdvisoryRepository
:
BaseRepository
<
RB_Web_Advisory
>
{
{
/// <summary>
/// <summary>
/// 获取
网站咨询
分页列表
/// 获取
咨询管理
分页列表
/// </summary>
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示调试</param>
/// <param name="pageSize">每页显示调试</param>
...
@@ -27,8 +27,17 @@ namespace Edu.Repository.Web
...
@@ -27,8 +27,17 @@ namespace Edu.Repository.Web
var
parameters
=
new
DynamicParameters
();
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
builder
.
Append
(
@"
SELECT A.*
SELECT A.* FROM
FROM RB_Web_Advisory AS A
(
SELECT A.*,IFNULL(B.CourseName,'') AS SourceName
FROM rb_web_advisory AS A INNER JOIN rb_course AS B ON (A.SourceId=B.CourseId AND A.AdvType=1)
UNION ALL
SELECT A.*,IFNULL(B.ClassName,'') AS SourceName
FROM rb_web_advisory AS A INNER JOIN rb_class AS B ON (A.SourceId=B.ClassId AND A.AdvType=2)
UNION ALL
SELECT A.*,IFNULL(B.`Name`,'') AS SourceName
FROM rb_web_advisory AS A INNER JOIN rb_studyabroad AS B ON (A.SourceId=B.Id AND A.AdvType=3)
) AS A
WHERE 1=1
WHERE 1=1
"
);
"
);
if
(
query
==
null
)
if
(
query
==
null
)
...
@@ -50,8 +59,13 @@ WHERE 1=1
...
@@ -50,8 +59,13 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Advisory_ViewModel
.
Status
),
(
int
)
query
.
Status
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Advisory_ViewModel
.
Status
),
(
int
)
query
.
Status
);
}
}
if
(
query
.
DealStatus
>=
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Web_Advisory_ViewModel
.
DealStatus
),
query
.
DealStatus
);
}
}
}
return
GetPage
<
RB_Web_Advisory_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Web_Advisory_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Web/WebManagerController.cs
View file @
28546ef6
...
@@ -37,6 +37,11 @@ namespace Edu.WebApi.Controllers.Web
...
@@ -37,6 +37,11 @@ namespace Edu.WebApi.Controllers.Web
/// </summary>
/// </summary>
private
readonly
WebTeacherModule
teacherModule
=
new
WebTeacherModule
();
private
readonly
WebTeacherModule
teacherModule
=
new
WebTeacherModule
();
/// <summary>
/// 咨询管理处理类对象
/// </summary>
private
readonly
WebAdvisoryModule
advisoryModule
=
new
WebAdvisoryModule
();
#
region
网站导航管理
#
region
网站导航管理
/// <summary>
/// <summary>
/// 获取网站导航列表
/// 获取网站导航列表
...
@@ -497,6 +502,32 @@ namespace Edu.WebApi.Controllers.Web
...
@@ -497,6 +502,32 @@ namespace Edu.WebApi.Controllers.Web
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
#
endregion
#
region
咨询管理
/// <summary>
/// 获取咨询管理分页
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetWebAdvisoryPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Web_Advisory_ViewModel
()
{
LinkMan
=
base
.
ParmJObj
.
GetStringValue
(
"LinkMan"
),
DealStatus
=
base
.
ParmJObj
.
GetInt
(
"DealStatus"
),
Status
=
(
DateStateEnum
)
base
.
ParmJObj
.
GetInt
(
"Status"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
advisoryModule
.
GetWebAdvisoryPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
#
endregion
#
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