You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.3 KiB
83 lines
2.3 KiB
using EasyBL.WebApi.Filters;
|
|
using EasyBL.WEBAPP.SYS;
|
|
using Entity.ShowEasyDtos;
|
|
using Entity.Sugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
|
|
namespace WebApp.Controllers
|
|
{
|
|
public class MembersController : ApiController
|
|
{
|
|
|
|
/// <summary>
|
|
/// 查詢會員個人信息
|
|
/// </summary>
|
|
/// <param name="memberID"></param>
|
|
/// <returns></returns>
|
|
//[HttpGet]
|
|
//public HttpResponseMessage GetMemberInfo(string memberID)
|
|
//{
|
|
// return new MembersService().GetMemberInfo(memberID);
|
|
//}
|
|
|
|
/// <summary>
|
|
/// 修改會員個人信息
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public HttpResponseMessage SaveMember([FromBody] SETB_CMS_Member dto)
|
|
{
|
|
return new MembersService().Update(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上傳文件
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public HttpResponseMessage UploadAvatar()
|
|
{
|
|
return new MembersService().UploadAvatar();
|
|
}
|
|
|
|
//註銷帳號
|
|
[HttpGet]
|
|
[SEApiSecurityFilter]
|
|
public HttpResponseMessage DeactivateAccount(string OrgID, string MemberID)
|
|
{
|
|
|
|
return new MembersService().DeactivateAccount(OrgID, MemberID);
|
|
|
|
}
|
|
|
|
//會員個人訊息查詢
|
|
[HttpGet]
|
|
[SEApiSecurityFilter]
|
|
public HttpResponseMessage GetMemberInfo(string OrgID, string userId)
|
|
{
|
|
//根據參數取得Member的詳細信息,調用時需要在Header中添加token相關信息,包括orgId,userid,timestamp,token
|
|
//需要驗證的token相關信息的Api,添加上 [SEApiSecurityFilter]即可
|
|
return new MembersService().GetMemberInfo(OrgID, userId);
|
|
}
|
|
|
|
//重設密碼
|
|
[HttpPost]
|
|
[SEApiSecurityFilter]
|
|
public HttpResponseMessage ResetNewPassword(string OrgID, string MemberID, string Password)
|
|
{
|
|
|
|
return new MembersService().ResetNewPassword(OrgID, MemberID, Password);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|