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
21208ac1
Commit
21208ac1
authored
Aug 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整字典数据
parent
bda0864e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
0 deletions
+44
-0
RB_Dictvalue.cs
Edu.Model/Entity/User/RB_Dictvalue.cs
+5
-0
AttendanceModule.cs
Edu.Module.User/AttendanceModule.cs
+18
-0
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+21
-0
No files found.
Edu.Model/Entity/User/RB_Dictvalue.cs
View file @
21208ac1
...
...
@@ -109,5 +109,10 @@ namespace Edu.Model.Entity.User
get
;
set
;
}
/// <summary>
/// 掩码
/// </summary>
public
string
Mask
{
get
;
set
;
}
}
}
Edu.Module.User/AttendanceModule.cs
View file @
21208ac1
...
...
@@ -66,6 +66,24 @@ namespace Edu.Module.User
return
dictvalueRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Dictvalue_Extend
.
DictKey
),
Edu
.
Common
.
Config
.
Notice_BaseKey
));
}
public
(
int
saveType
,
bool
result
,
int
id
)
SaveDictModule
(
RB_Dictvalue
model
)
{
if
(
model
.
ID
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Dictvalue_Extend
.
Content
),
model
.
Content
},
{
nameof
(
RB_Dictvalue_Extend
.
Mask
),
model
.
Mask
}
};
var
result
=
dictvalueRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Dictvalue_Extend
.
DictKey
),
model
.
DictKey
));
return
(
1
,
result
,
model
.
ID
);
}
else
{
int
newId
=
dictvalueRepository
.
Insert
(
model
);
return
(
0
,
newId
>
0
,
newId
);
}
}
#
endregion
/// <summary>
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
21208ac1
...
...
@@ -92,6 +92,8 @@ namespace Edu.WebApi.Controllers.User
Content
=
item
.
Content
??
""
,
Code
=
item
.
Code
??
""
,
RB_Group_id
=
item
.
RB_Group_id
??
0
,
item
.
Mask
,
item
.
DictKey
,
list
=
query
};
objlist
.
Add
(
obj
);
...
...
@@ -116,6 +118,25 @@ namespace Edu.WebApi.Controllers.User
return
result
?
ApiResult
.
Success
(
"请求成功!"
)
:
ApiResult
.
Failed
(
"请求失败!"
);
}
/// <summary>
/// 保存字典数据
/// </summary>
/// <returns></returns>
public
ApiResult
SaveDict
()
{
UserInfo
userInfo
=
base
.
UserInfo
;
var
model
=
JsonConvert
.
DeserializeObject
<
RB_Dictvalue_Extend
>(
RequestParm
.
Msg
.
ToString
());
model
.
RB_Group_id
=
userInfo
.
Group_Id
;
model
.
RB_Branch_id
=
userInfo
.
School_Id
;
model
.
UpdateBy
=
userInfo
.
Id
;
if
(
string
.
IsNullOrEmpty
(
model
.
Mask
))
{
model
.
Mask
=
model
.
Content
;
}
var
saveInfo
=
attendancemodule
.
SaveDictModule
(
model
);
return
saveInfo
.
result
?
ApiResult
.
Success
(
"请求成功!"
,
saveInfo
.
id
)
:
ApiResult
.
Failed
(
"请求失败!"
);
}
/// <summary>
/// 获取公告设置字典实体
/// </summary>
...
...
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