Commit f76c7972 authored by 吴春's avatar 吴春

提交代码

parent 53234f58
......@@ -11,7 +11,7 @@ namespace Mall.Model.Entity.MarketingCenter
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_DiscountCoupon
public class RB_DiscountCoupon
{
public int ID { get; set; }
......@@ -106,8 +106,18 @@ namespace Mall.Model.Entity.MarketingCenter
/// <summary>
/// 领取方式设置1-会员专享2-领劵中心
/// 领取方式设置2-领劵中心
/// </summary>
public PickupTypeEnum PickupType { get; set; }
public int PickupCenter { get; set; }
/// <summary>
/// 1-会员专享
/// </summary>
public int OnlyMember { get; set; }
/// <summary>
/// 会员专享
/// </summary>
public string MemberLevel { get; set; }
}
}
......@@ -27,5 +27,10 @@ namespace Mall.Model.Extend.MarketingCenter
/// 发放数量
/// </summary>
public int GrantNum { get; set; }
/// <summary>
/// 会员等级
/// </summary>
public int[] MemberLevelList { get; set; }
}
}
......@@ -301,7 +301,7 @@ namespace Mall.Module.MarketingCenter
Dictionary<string, object> cols1 = new Dictionary<string, object>()
{
{ nameof(RB_DiscountCoupon.PickupType),model.PickupType==Common.Enum.MarketingCenter.PickupTypeEnum.CouponCenter?Common.Enum.MarketingCenter.PickupTypeEnum.OnlyMember:Common.Enum.MarketingCenter.PickupTypeEnum.CouponCenter},
{ nameof(RB_DiscountCoupon.PickupCenter),model.PickupCenter==0?1:0},
{ nameof(RB_DiscountCoupon.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
......@@ -444,7 +444,7 @@ namespace Mall.Module.MarketingCenter
{
id = model.ID;
flag = selfMotionRepository.Update(model, trans);
var listProduct = selfMotionMemberRepository.GetListRepository(new RB_Coupon_SelfMotionMember_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, SelfMotionId = id });
var listProduct = selfMotionMemberRepository.GetListRepository(new RB_Coupon_SelfMotionMember_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, SelfMotionId = id });
if (listProduct != null && listProduct.Any())
{
foreach (var item in model.UserList)
......
......@@ -194,7 +194,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
x.Name,
x.MinConsumePrice,
x.DiscountsPrice,
UseTypeStr= Mall.Common.Plugin.EnumHelper.GetEnumName(x.UseType),
UseTypeStr = Mall.Common.Plugin.EnumHelper.GetEnumName(x.UseType),
x.CouponType,
x.StartDate,
x.IndateType,
......@@ -202,7 +202,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
x.EndDate,
x.TotalNum,
ResidueNum = x.TotalNum - x.ReceiveNum,
x.PickupType
x.PickupCenter
});
return ApiResult.Success("", pagelist);
}
......@@ -225,6 +225,10 @@ namespace Mall.WebApi.Controllers.MarketingCenter
oldLogisticsModel = new RB_DiscountCoupon_Extend();
oldLogisticsModel.IndateType = Common.Enum.MarketingCenter.IndateTypeEnum.DayHorizon;
}
if (!string.IsNullOrWhiteSpace(oldLogisticsModel.MemberLevel))
{
oldLogisticsModel.MemberLevelList =JsonConvert.DeserializeObject<List<int>>(oldLogisticsModel.MemberLevel).ToArray();
}
return ApiResult.Success("", oldLogisticsModel);
}
......@@ -290,6 +294,10 @@ namespace Mall.WebApi.Controllers.MarketingCenter
{
query.CreateDate = System.DateTime.Now;
}
if (query.MemberLevelList != null && query.MemberLevelList.Length > 0)
{
query.MemberLevel = JsonConvert.SerializeObject(query.MemberLevelList);
}
query.UpdateDate = System.DateTime.Now;
bool result = IntegralModule.AddOrUpdateDiscountCoupon(query);
if (result)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment