231
This commit is contained in:
parent
6c558e7a17
commit
7d86f736d9
|
|
@ -158,11 +158,10 @@ public class WelfareController : ControllerBase
|
|||
/// <summary>
|
||||
/// 福利屋购买/参与
|
||||
/// POST /api/fuliwu_buy
|
||||
/// Requirements: 4.2
|
||||
/// </summary>
|
||||
[HttpPost("fuliwu_buy")]
|
||||
[Authorize]
|
||||
public async Task<ApiResponse<WelfareBuyResponse>> BuyWelfare([FromForm] WelfareBuyRequest request)
|
||||
public async Task<ApiResponse<WelfareBuyResponse>> BuyWelfare([FromBody] WelfareBuyRequest request)
|
||||
{
|
||||
var userId = GetCurrentUserId();
|
||||
if (userId == null)
|
||||
|
|
@ -170,6 +169,8 @@ public class WelfareController : ControllerBase
|
|||
return ApiResponse<WelfareBuyResponse>.Unauthorized();
|
||||
}
|
||||
|
||||
_logger.LogInformation("BuyWelfare: UserId={UserId}, GoodsId={GoodsId}", userId, request.GoodsId);
|
||||
|
||||
try
|
||||
{
|
||||
var result = await _welfareService.BuyWelfareAsync(userId.Value, request);
|
||||
|
|
|
|||
|
|
@ -549,31 +549,37 @@ public class WelfareBuyRequest
|
|||
/// <summary>
|
||||
/// 商品ID
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("goods_id")]
|
||||
public int GoodsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 购买数量/抽奖次数
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prize_num")]
|
||||
public int PrizeNum { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用余额抵扣 0=不抵扣 1=抵扣
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("use_money_is")]
|
||||
public int UseMoneyIs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用积分抵扣 0=不抵扣 1=抵扣
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("use_integral_is")]
|
||||
public int UseIntegralIs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用货币2抵扣 0=不抵扣 1=抵扣
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("use_money2_is")]
|
||||
public int UseMoney2Is { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 优惠券ID
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("coupon_id")]
|
||||
public int CouponId { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user