Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
b4ae6736
Commit
b4ae6736
authored
Aug 13, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增统计
parent
48d9cabd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
0 deletions
+71
-0
MemberUserModule.cs
Mall.Module.User/MemberUserModule.cs
+35
-0
MemberUserController.cs
Mall.WebApi/Controllers/User/MemberUserController.cs
+36
-0
No files found.
Mall.Module.User/MemberUserModule.cs
0 → 100644
View file @
b4ae6736
using
Mall.Model.Extend.User
;
using
Mall.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Module.User
{
/// <summary>
/// 用户管理
/// </summary>
public
class
MemberUserModule
{
/// <summary>
/// 用户管理
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// 根据用户Id更新用户头像和名称
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetMemberUserNameAndPhoto
(
RB_Member_User_Extend
extModel
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
AliasName
),
extModel
.
AliasName
},
{
nameof
(
RB_Member_User_Extend
.
Photo
),
extModel
.
Photo
},
};
return
member_UserRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Member_User_Extend
.
Id
),
extModel
.
Id
));
}
}
}
Mall.WebApi/Controllers/User/MemberUserController.cs
0 → 100644
View file @
b4ae6736
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Mall.Common.API
;
using
Mall.Model.Extend.User
;
using
Mall.Module.User
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
namespace
Mall.WebApi.Controllers.User
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
MemberUserController
:
BaseController
{
private
MemberUserModule
MemberUserModule
=
new
MemberUserModule
();
[
AllowAnonymous
]
/// <summary>
/// 用户登录
/// </summary>
/// <returns></returns>
public
ApiResult
SetMemberPhoto
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Member_User_Extend
>(
RequestParm
.
msg
.
ToString
());
var
flag
=
MemberUserModule
.
SetMemberUserNameAndPhoto
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
}
\ No newline at end of file
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