333
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
using MyCode.Project.Domain.Message.Request.Activity;
|
||||
using MyCode.Project.Domain.Message.Request.Member;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Domain.Message.Response.CardCover;
|
||||
using MyCode.Project.Domain.Message.Response.CouponActivity;
|
||||
using MyCode.Project.Domain.Message.Response.Goods;
|
||||
using MyCode.Project.Domain.Message.Response.Member;
|
||||
using MyCode.Project.Domain.Message.Response.Wechat;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Member.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 优惠券相关
|
||||
/// </summary>
|
||||
public class CouponActivityController : BaseMemberController
|
||||
{
|
||||
private ICouponActivityService _couponActivityService;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化一个<see cref="CouponController"/>类型的实例
|
||||
/// </summary>
|
||||
/// <param name="couponActivityService"></param>
|
||||
public CouponActivityController(ICouponActivityService couponActivityService)
|
||||
{
|
||||
_couponActivityService = couponActivityService;
|
||||
}
|
||||
|
||||
//#region OpenMemberCouponList(会员手动点领取开优惠券)
|
||||
///// <summary>
|
||||
///// 会员手动点领取开优惠券
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[HttpGet]
|
||||
//public List<CouponList> OpenMemberCouponList(string scene)
|
||||
//{
|
||||
|
||||
// if (string.IsNullOrWhiteSpace(scene))
|
||||
// return _couponActivityService.OpenMemberCouponList(this.CurrentLogin.UserId);
|
||||
// else
|
||||
// return _couponActivityService.OpenMemberCouponList(this.CurrentLogin.UserId, scene);
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
#region GetGoodsString(获取优惠券的商品范围规则文本)
|
||||
/// <summary>
|
||||
/// 获取优惠券的商品范围规则文本
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public string GetGoodsString(Guid id)
|
||||
{
|
||||
|
||||
return _couponActivityService.GetGoodsString(id);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetCouponPic(获取事件优惠券的优惠券封面和列表)
|
||||
/// <summary>
|
||||
/// 获取事件优惠券的优惠券封面和列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public CouponPic GetCouponPic()
|
||||
{
|
||||
return _couponActivityService.GetCouponPic(this.CurrentLogin.UserId);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetCouponPicFromCode(获取海报的优惠券封面和列表)
|
||||
/// <summary>
|
||||
/// 获取海报的优惠券封面和列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public CouponPic GetCouponPicFromCode(string scene)
|
||||
{
|
||||
|
||||
return _couponActivityService.GetCouponPic(this.CurrentLogin.UserId, scene);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetCouponPic(获取单店的事件优惠券的优惠券封面和列表)
|
||||
/// <summary>
|
||||
/// 获取单店的事件优惠券的优惠券封面和列表530
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public CouponPic GetCouponPicForSingleShop(Guid shopId)
|
||||
{
|
||||
return _couponActivityService.GetCouponPic(this.CurrentLogin.UserId,shopId);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetCouponPicBy202409(获取扫码领取优惠券的优惠券内容)
|
||||
/// <summary>
|
||||
/// 获取扫码领取优惠券的优惠券内容
|
||||
/// </summary>
|
||||
/// <param name="scene">小程序进入的参数,比如id,小程序码产生传参为scene</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Coupon202409 GetCouponPic202409(string scene)
|
||||
{
|
||||
return _couponActivityService.GetCouponPicBy202409(this.CurrentLogin.UserId, scene);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OpenCoupon202409(领取优惠券(202409版本))
|
||||
/// <summary>
|
||||
/// 领取优惠券(202409版本)
|
||||
/// </summary>
|
||||
/// <param name="scene">小程序进入的参数,比如id,小程序码产生传参为scene</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public void OpenCoupon202409(string scene)
|
||||
{
|
||||
_couponActivityService.GetCoupon202409(this.CurrentLogin.UserId, scene);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
//[HttpGet]
|
||||
//[AllowAnonymous]
|
||||
//public void AutoJoinCouponActivity()
|
||||
//{
|
||||
// _couponActivityService.AutoJoinCouponActivity();
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user