Commit b4ae6736 authored by 黄奎's avatar 黄奎

新增统计

parent 48d9cabd
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));
}
}
}
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment