Commit f4e88060 authored by 黄奎's avatar 黄奎

页面修改

parent 09343e4d
......@@ -663,76 +663,78 @@ namespace Mall.Module.Reserve
/// <param name="gradeId"></param>
/// <param name="uid"></param>
/// <returns></returns>
public bool DelDiscountCoupon(int id, int uid, int mallBaseId)
public virtual bool DelDiscountCoupon(int id, int uid, int mallBaseId)
{
var trans = discountCouponRepository.DbTransaction;
bool flag;
try
{
Dictionary<string, object> cols1 = new Dictionary<string, object>()
{
{ nameof(RB_Reserve_Coupon.Status),1},
{ nameof(RB_Reserve_Coupon.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>()
{
new WhereHelper()
{
{ nameof(RB_Reserve_Coupon.Status),1},
{ nameof(RB_Reserve_Coupon.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Reserve_Coupon.ID),
FiledValue=id,
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_Coupon.TenantId),
FiledValue=Convert.ToInt32(uid),
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_Coupon.MallBaseId),
FiledValue=Convert.ToInt32(mallBaseId),
OperatorEnum=OperatorEnum.Equal
}
}
};
flag = discountCouponRepository.Update(cols1, wheres1);
Dictionary<string, object> cols = new Dictionary<string, object>()
{
{ nameof(RB_Reserve_Coupon.Status),1},
{ nameof(RB_Reserve_Coupon.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper()
{
{ nameof(RB_Reserve_Coupon.Status),1},
{ nameof(RB_Reserve_Coupon.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Reserve_CouponProduct.CouponId),
FiledValue=id,
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_CouponProduct.TenantId),
FiledValue=Convert.ToInt32(uid),
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_CouponProduct.MallBaseId),
FiledValue=Convert.ToInt32(mallBaseId),
OperatorEnum=OperatorEnum.Equal
}
}
};
productRepository.Update(cols, wheres);
discountCouponRepository.DBSession.Commit();
if (flag)
{
flag=productRepository.Update(cols, wheres);
}
}
catch (Exception ex)
{
LogHelper.Write(ex, "DelDiscountCoupon");
discountCouponRepository.DBSession.Rollback("DelDiscountCoupon");
return false;
flag=false;
}
return flag;
}
/// <summary>
/// 删除会员套餐卡
/// </summary>
......@@ -1046,66 +1048,71 @@ namespace Mall.Module.Reserve
/// <returns></returns>
public bool DelDiscountSelfMotion(int id, int uid, int mallBaseId)
{
var trans = selfMotionRepository.DbTransaction;
bool flag;
try
{
Dictionary<string, object> cols1 = new Dictionary<string, object>()
{
{ nameof(RB_Reserve_CouponSelfMotion.Status),1},
{ nameof(RB_Reserve_CouponSelfMotion.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>()
{
new WhereHelper()
{
{ nameof(RB_Reserve_CouponSelfMotion.Status),1},
{ nameof(RB_Reserve_CouponSelfMotion.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Reserve_CouponSelfMotion.ID),
FiledValue=id,
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_CouponSelfMotion.TenantId),
FiledValue=Convert.ToInt32(uid),
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_CouponSelfMotion.MallBaseId),
FiledValue=Convert.ToInt32(mallBaseId),
OperatorEnum=OperatorEnum.Equal
}
}
};
flag = selfMotionRepository.Update(cols1, wheres1);
Dictionary<string, object> cols = new Dictionary<string, object>()
{
{ nameof(RB_Reserve_CouponSelfMotionMember.Status),1},
{ nameof(RB_Reserve_CouponSelfMotionMember.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper()
{
{ nameof(RB_Reserve_CouponSelfMotionMember.Status),1},
{ nameof(RB_Reserve_CouponSelfMotionMember.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Reserve_CouponSelfMotionMember.SelfMotionId),
FiledValue=id,
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_CouponSelfMotionMember.TenantId),
FiledValue=Convert.ToInt32(uid),
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
},
new WhereHelper()
{
FiledName=nameof(RB_Reserve_CouponSelfMotionMember.MallBaseId),
FiledValue=Convert.ToInt32(mallBaseId),
OperatorEnum=OperatorEnum.Equal
}
}
};
selfMotionMemberRepository.Update(cols, wheres);
selfMotionRepository.DBSession.Commit();
if (flag)
{
flag = selfMotionMemberRepository.Update(cols, wheres);
}
}
catch (Exception ex)
{
LogHelper.Write(ex, "DelDiscountSelfMotion");
selfMotionRepository.DBSession.Rollback("DelDiscountSelfMotion");
return false;
flag = false;
}
return flag;
}
......
......@@ -28,8 +28,8 @@ namespace Mall.WebApi.Controllers.Reserve
public class ReserveController : BaseController
{
private readonly ReserveModule reserveModule = new ReserveModule();
private Module.User.UserModule UserModule = new Module.User.UserModule();
private readonly ReserveModule reserveModule =AOPHelper.CreateAOPObject<ReserveModule>();
private readonly Module.User.UserModule UserModule = new Module.User.UserModule();
/// <summary>
/// 门店处理类对象
/// </summary>
......@@ -338,7 +338,6 @@ namespace Mall.WebApi.Controllers.Reserve
[HttpPost]
public ApiResult GetServiceTargetDateList()
{
var parms = RequestParm;
var query = JsonConvert.DeserializeObject<RB_Reserve_ServiceTargetDate_Extend>(RequestParm.msg.ToString());
var list = reserveModule.GetServiceTargetDateList(query);
List<string> result = new List<string>();
......@@ -464,10 +463,11 @@ namespace Mall.WebApi.Controllers.Reserve
var oldLogisticsModel = reserveModule.GetDiscountCouponList(query).FirstOrDefault();
if (oldLogisticsModel == null)
{
oldLogisticsModel = new RB_Reserve_Coupon_Extend();
oldLogisticsModel.IndateType = Common.Enum.MarketingCenter.IndateTypeEnum.DayHorizon;
oldLogisticsModel = new RB_Reserve_Coupon_Extend
{
IndateType = Common.Enum.MarketingCenter.IndateTypeEnum.DayHorizon
};
}
return ApiResult.Success("", oldLogisticsModel);
}
......@@ -643,19 +643,21 @@ namespace Mall.WebApi.Controllers.Reserve
{
if (!string.IsNullOrWhiteSpace(item))
{
RB_Reserve_MemberCoupon_Extend memberCoupon = new RB_Reserve_MemberCoupon_Extend();
memberCoupon.Id = 0;
memberCoupon.UserId = Convert.ToInt32(item);
memberCoupon.Description = oldLogisticsModel.Describe;
memberCoupon.CreateDate = System.DateTime.Now;
memberCoupon.TenantId = oldLogisticsModel.TenantId;
memberCoupon.MallBaseId = oldLogisticsModel.MallBaseId;
memberCoupon.Remarks = "";
memberCoupon.CouponId = oldLogisticsModel.ID;
memberCoupon.Name = oldLogisticsModel.Name;
memberCoupon.UseType = oldLogisticsModel.UseType;
memberCoupon.HeXiao = oldLogisticsModel.HeXiao;
memberCoupon.UseHeXiao = 0;
RB_Reserve_MemberCoupon_Extend memberCoupon = new RB_Reserve_MemberCoupon_Extend
{
Id = 0,
UserId = Convert.ToInt32(item),
Description = oldLogisticsModel.Describe,
CreateDate = System.DateTime.Now,
TenantId = oldLogisticsModel.TenantId,
MallBaseId = oldLogisticsModel.MallBaseId,
Remarks = "",
CouponId = oldLogisticsModel.ID,
Name = oldLogisticsModel.Name,
UseType = oldLogisticsModel.UseType,
HeXiao = oldLogisticsModel.HeXiao,
UseHeXiao = 0
};
if (oldLogisticsModel.IndateType == Common.Enum.MarketingCenter.IndateTypeEnum.DayHorizon)
{
memberCoupon.StartDate = System.DateTime.Now;
......@@ -1022,20 +1024,22 @@ namespace Mall.WebApi.Controllers.Reserve
var tempOrderList = orderList.Where(x => x.ServicepersonalId == item.Id && day <= Convert.ToDateTime(x.ServiceDate + " " + x.ServiceTime) && Convert.ToDateTime(x.ServiceDate + " " + x.ServiceTime) < day.AddMinutes(30));
foreach (var itemOrder in tempOrderList)
{
OrderKanBan orderModel = new OrderKanBan();
orderModel.Id = item.Id;
orderModel.Name = item.Name;
orderModel.GoodsName = itemOrder.GoodsName;
orderModel.ServiceTime = itemOrder.ServiceTime;
orderModel.SystemServiceTime = nowTimeInfo;
orderModel.GoodServiceTime = itemOrder.GoodServiceTime;
orderModel.UserName = itemOrder.UserName;
orderModel.UserPhoto = itemOrder.UserPhoto;
orderModel.OrderId = itemOrder.OrderId ?? 0;
orderModel.OrderDetailId = itemOrder.Id;
orderModel.Number = itemOrder.Number ?? 0;
orderModel.BuyerMessage = itemOrder.BuyerMessage;
orderModel.Mobile = itemOrder.Mobile;
OrderKanBan orderModel = new OrderKanBan
{
Id = item.Id,
Name = item.Name,
GoodsName = itemOrder.GoodsName,
ServiceTime = itemOrder.ServiceTime,
SystemServiceTime = nowTimeInfo,
GoodServiceTime = itemOrder.GoodServiceTime,
UserName = itemOrder.UserName,
UserPhoto = itemOrder.UserPhoto,
OrderId = itemOrder.OrderId ?? 0,
OrderDetailId = itemOrder.Id,
Number = itemOrder.Number ?? 0,
BuyerMessage = itemOrder.BuyerMessage,
Mobile = itemOrder.Mobile
};
item.OrderList.Add(orderModel);
}
}
......
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