feat: 新增期刊二维码批量生成功能及相关配套
1. 新增UserJournalQrCodeGenerateConsumer消费者处理二维码生成队列任务 2. 新增用户期刊状态枚举的生成中、失败状态 3. 新增批量生成二维码服务方法和相关DTO 4. 优化SqlSugar自动填充创建/更新人字段逻辑 5. 调整接口参数从操作人ID改为操作人名称 6. 新增获取未绑定二维码的API接口和服务方法
This commit is contained in:
@ -19,10 +19,22 @@ public class UserJournalQrCodeController(IUserJournalService userJournalService)
|
||||
/// <param name="input">生成输入</param>
|
||||
/// <returns>二维码记录</returns>
|
||||
[HttpPost("add")]
|
||||
public async Task<BaseResponse<UserJournalQrCodeOutput>> AddAsync([FromBody] CreateUserJournalQrCodeInput input)
|
||||
public async Task<BaseResponse<CreateUserJournalQrCodeOutput>> AddAsync([FromBody] CreateUserJournalQrCodeInput input)
|
||||
{
|
||||
var result = await userJournalService.CreateQrCodeAsync(input, GetCurrentUserId() ?? 0);
|
||||
return BaseResponse<UserJournalQrCodeOutput>.Success(result);
|
||||
var result = await userJournalService.CreateQrCodesAsync(input, GetCurrentUserName() ?? "System");
|
||||
return BaseResponse<CreateUserJournalQrCodeOutput>.Success(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据期刊Id获取未绑定用户的二维码地址
|
||||
/// </summary>
|
||||
/// <param name="journalId">期刊Id</param>
|
||||
/// <returns>未绑定二维码列表</returns>
|
||||
[HttpGet("unbound/{journalId:long}")]
|
||||
public async Task<BaseResponse<List<UserJournalQrCodeOutput>>> GetUnboundByJournalIdAsync(long journalId)
|
||||
{
|
||||
var result = await userJournalService.GetUnboundQrCodesByJournalIdAsync(journalId);
|
||||
return BaseResponse<List<UserJournalQrCodeOutput>>.Success(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -57,7 +69,7 @@ public class UserJournalQrCodeController(IUserJournalService userJournalService)
|
||||
[HttpPost("delete")]
|
||||
public async Task<BaseResponse<bool>> DeleteAsync([FromBody] DeleteUserJournalQrCodeInput input)
|
||||
{
|
||||
var result = await userJournalService.DeleteQrCodeAsync(input, GetCurrentUserId() ?? 0);
|
||||
var result = await userJournalService.DeleteQrCodeAsync(input, GetCurrentUserName() ?? "System");
|
||||
return BaseResponse<bool>.Success(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user