|
@@ -29,7 +29,7 @@ public class InviteCodeController : BaseController
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpGet("basedata")]
|
|
[HttpGet("basedata")]
|
|
public async Task<Dictionary<string, object>> GetBasedataAsync()
|
|
public async Task<Dictionary<string, object>> GetBasedataAsync()
|
|
- {
|
|
|
|
|
|
+ {
|
|
return new Dictionary<string, object>
|
|
return new Dictionary<string, object>
|
|
{
|
|
{
|
|
{ "OrgName", await _inviteCodeApplication.GetInviteCodeItemsAsync().Where(m => m.ParentOrgId == null)
|
|
{ "OrgName", await _inviteCodeApplication.GetInviteCodeItemsAsync().Where(m => m.ParentOrgId == null)
|
|
@@ -42,9 +42,28 @@ public class InviteCodeController : BaseController
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HttpGet]
|
|
- public async Task<PagedDto<InviteCode>> GetInviteCodeItemsAsync([FromQuery]GetInviteCodeItemsInDto dto)
|
|
|
|
|
|
+ public async Task<PagedDto<InviteCode>> GetInviteCodeItemsAsync([FromQuery] GetInviteCodeItemsInDto dto)
|
|
=> (await _inviteCodeApplication.GetInviteCodeItemsAsync().ToPagedListAsync(dto)).ToPaged();
|
|
=> (await _inviteCodeApplication.GetInviteCodeItemsAsync().ToPagedListAsync(dto)).ToPaged();
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 邀请码详情
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="id"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+
|
|
|
|
+ [HttpGet("{id}")]
|
|
|
|
+ public async Task<InviteCode> GetInviteCodeDetailAsync( string id)
|
|
|
|
+ => await _inviteCodeApplication.GetInviteCodeItemsAsync().Where(m => m.Id == id).FirstAsync();
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 修改邀请码
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPut]
|
|
|
|
+ public async Task UpdateInviteCodeAsync([FromBody] UpdateInviteCodeInDto dto)
|
|
|
|
+ => await _inviteCodeApplication.UpdateInviteCodeAsync(dto);
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 添加部门邀请码
|
|
/// 添加部门邀请码
|
|
/// </summary>
|
|
/// </summary>
|