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
89e1b326
Commit
89e1b326
authored
Jul 13, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
fe788c9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
19 deletions
+57
-19
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+57
-19
No files found.
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
89e1b326
...
...
@@ -91,6 +91,40 @@ namespace Edu.WebApi.Controllers.User
}
return
ApiResult
.
Success
(
"请求成功!"
,
objlist
);
}
/// <summary>
/// 获取字典列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetContent
()
{
UserInfo
userInfo
=
base
.
UserInfo
;
;
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
string
Content
=
parm
.
GetStringValue
(
"Content"
);
bool
result
=
attendancemodule
.
SetContent
(
Content
);
return
result
?
ApiResult
.
Success
(
"请求成功!"
)
:
ApiResult
.
Failed
(
"请求失败!"
);
}
/// <summary>
/// 获取公告设置字典实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetNoticeBaseKeyDictValue
()
{
UserInfo
userInfo
=
base
.
UserInfo
;
var
model
=
attendancemodule
.
GetDictValueList
(
userInfo
.
Group_Id
,
Config
.
Notice_BaseKey
).
FirstOrDefault
();
var
result
=
new
{
model
.
DictKey
,
model
.
Content
};
return
ApiResult
.
Success
(
"请求成功!"
,
result
);
}
#
endregion
#
region
公告管理
...
...
@@ -115,6 +149,10 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
""
,
obj
);
}
/// <summary>
/// 新增修改公告基础
/// </summary>
...
...
@@ -124,11 +162,11 @@ namespace Edu.WebApi.Controllers.User
{
var
demodel
=
new
RB_Notice_Base_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Image
=
base
.
ParmJObj
.
GetStringValue
(
"Image"
),
From
=
base
.
ParmJObj
.
GetStringValue
(
"From"
),
NumberRule
=
(
NoticeRuleEnum
)
base
.
ParmJObj
.
GetInt
(
"NumberRule"
),
CopyPeople
=
base
.
ParmJObj
.
GetStringValue
(
"CopyPeople"
),
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Image
=
base
.
ParmJObj
.
GetStringValue
(
"Image"
),
From
=
base
.
ParmJObj
.
GetStringValue
(
"From"
),
NumberRule
=
(
NoticeRuleEnum
)
base
.
ParmJObj
.
GetInt
(
"NumberRule"
),
CopyPeople
=
base
.
ParmJObj
.
GetStringValue
(
"CopyPeople"
),
};
demodel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
demodel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
...
...
@@ -174,10 +212,10 @@ namespace Edu.WebApi.Controllers.User
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Notice_ViewModel
()
{
Is_Top
=
base
.
ParmJObj
.
GetInt
(
"Is_Top"
),
NoticeState
=
(
NoticeStateEnum
)
base
.
ParmJObj
.
GetInt
(
"NoticeState"
),
Number
=
base
.
ParmJObj
.
GetStringValue
(
"Number"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
Is_Top
=
base
.
ParmJObj
.
GetInt
(
"Is_Top"
),
NoticeState
=
(
NoticeStateEnum
)
base
.
ParmJObj
.
GetInt
(
"NoticeState"
),
Number
=
base
.
ParmJObj
.
GetStringValue
(
"Number"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
UpdateBy
=
base
.
ParmJObj
.
GetInt
(
"UpdateBy"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
...
...
@@ -226,14 +264,14 @@ namespace Edu.WebApi.Controllers.User
UserInfo
userInfo
=
base
.
UserInfo
;
RB_Notice_ViewModel
demodel
=
new
RB_Notice_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Content
=
base
.
ParmJObj
.
GetStringValue
(
"Content"
),
CopyPeople
=
base
.
ParmJObj
.
GetStringValue
(
"CopyPeople"
),
From
=
base
.
ParmJObj
.
GetStringValue
(
"From"
),
Is_Top
=
base
.
ParmJObj
.
GetInt
(
"Is_Top"
),
NoticeState
=
(
NoticeStateEnum
)
base
.
ParmJObj
.
GetInt
(
"NoticeState"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
To
=
base
.
ParmJObj
.
GetStringValue
(
"To"
)
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Content
=
base
.
ParmJObj
.
GetStringValue
(
"Content"
),
CopyPeople
=
base
.
ParmJObj
.
GetStringValue
(
"CopyPeople"
),
From
=
base
.
ParmJObj
.
GetStringValue
(
"From"
),
Is_Top
=
base
.
ParmJObj
.
GetInt
(
"Is_Top"
),
NoticeState
=
(
NoticeStateEnum
)
base
.
ParmJObj
.
GetInt
(
"NoticeState"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
To
=
base
.
ParmJObj
.
GetStringValue
(
"To"
)
};
if
(
demodel
.
To
==
"0"
)
{
...
...
@@ -336,7 +374,7 @@ namespace Edu.WebApi.Controllers.User
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
DeptId
=
base
.
UserInfo
.
DeptId
;
query
.
NoticeState
=
NoticeStateEnum
.
Publish
;
var
noticeBaseModel
=
noticeModule
.
GetNoticeBaseInfo
(
base
.
UserInfo
.
Group_Id
);
var
noticeBaseModel
=
noticeModule
.
GetNoticeBaseInfo
(
base
.
UserInfo
.
Group_Id
);
var
list
=
noticeModule
.
GetMyNoticePageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
List
<
object
>
result
=
new
List
<
object
>();
foreach
(
var
item
in
list
)
...
...
@@ -346,7 +384,7 @@ namespace Edu.WebApi.Controllers.User
{
try
{
fileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
FileModel
>>(
item
.
File
);
fileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
FileModel
>>(
item
.
File
);
}
catch
(
Exception
ex
)
{
...
...
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