Commit 821dd112 authored by 黄奎's avatar 黄奎

代码优化

parent 386643f5
...@@ -20,15 +20,15 @@ namespace Mall.Module.MarketingCenter ...@@ -20,15 +20,15 @@ namespace Mall.Module.MarketingCenter
{ {
public class CouponModule public class CouponModule
{ {
private RB_CouponRepository couponRepository = new RB_CouponRepository(); private readonly RB_CouponRepository couponRepository = new RB_CouponRepository();
private RB_DiscountCouponRepository discountCouponRepository = new RB_DiscountCouponRepository(); private readonly RB_DiscountCouponRepository discountCouponRepository = new RB_DiscountCouponRepository();
private RB_DiscountCoupon_ProductRepository productRepository = new RB_DiscountCoupon_ProductRepository(); private readonly RB_DiscountCoupon_ProductRepository productRepository = new RB_DiscountCoupon_ProductRepository();
private Repository.User.RB_Member_CouponRepository memberCouponRepository = new Repository.User.RB_Member_CouponRepository(); private readonly RB_Member_CouponRepository memberCouponRepository = new Repository.User.RB_Member_CouponRepository();
private RB_Coupon_SelfMotionMemberRepository selfMotionMemberRepository = new RB_Coupon_SelfMotionMemberRepository(); private readonly RB_Coupon_SelfMotionMemberRepository selfMotionMemberRepository = new RB_Coupon_SelfMotionMemberRepository();
private RB_Coupon_SelfMotionRepository selfMotionRepository = new RB_Coupon_SelfMotionRepository(); private readonly RB_Coupon_SelfMotionRepository selfMotionRepository = new RB_Coupon_SelfMotionRepository();
/// <summary> /// <summary>
/// 会员信息 /// 会员信息
...@@ -262,8 +262,8 @@ namespace Mall.Module.MarketingCenter ...@@ -262,8 +262,8 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool DelDiscountCoupon(int id, int uid, int mallBaseId) public bool DelDiscountCoupon(int id, int uid, int mallBaseId)
{ {
bool flag = false;
var trans = discountCouponRepository.DbTransaction; var trans = discountCouponRepository.DbTransaction;
bool flag;
try try
{ {
Dictionary<string, object> cols1 = new Dictionary<string, object>() Dictionary<string, object> cols1 = new Dictionary<string, object>()
...@@ -338,8 +338,7 @@ namespace Mall.Module.MarketingCenter ...@@ -338,8 +338,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool DelMemberCoupon(int id, int uid, int mallBaseId) public bool DelMemberCoupon(int id, int uid, int mallBaseId)
{ {
bool flag = false; bool flag;
try try
{ {
Dictionary<string, object> cols1 = new Dictionary<string, object>() Dictionary<string, object> cols1 = new Dictionary<string, object>()
...@@ -431,20 +430,14 @@ namespace Mall.Module.MarketingCenter ...@@ -431,20 +430,14 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool GrantCoupon(List<RB_Member_DiscountCoupon_Extend> list, RB_DiscountCoupon_Extend model) public bool GrantCoupon(List<RB_Member_DiscountCoupon_Extend> list, RB_DiscountCoupon_Extend model)
{ {
bool flag = false;
var trans = memberCouponRepository.DbTransaction; var trans = memberCouponRepository.DbTransaction;
bool flag;
try try
{ {
//foreach (var item in list)
//{
flag = memberCouponRepository.InsertBatch(list, trans); flag = memberCouponRepository.InsertBatch(list, trans);
// }
if (model != null && flag) if (model != null && flag)
{ {
Dictionary<string, object> cols1; Dictionary<string, object> cols1;
if (model.TotalNum != -1) if (model.TotalNum != -1)
{ {
cols1 = new Dictionary<string, object>() cols1 = new Dictionary<string, object>()
...@@ -665,8 +658,8 @@ namespace Mall.Module.MarketingCenter ...@@ -665,8 +658,8 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool DelDiscountSelfMotion(int id, int uid, int mallBaseId) public bool DelDiscountSelfMotion(int id, int uid, int mallBaseId)
{ {
bool flag = false;
var trans = selfMotionRepository.DbTransaction; var trans = selfMotionRepository.DbTransaction;
bool flag;
try try
{ {
Dictionary<string, object> cols1 = new Dictionary<string, object>() Dictionary<string, object> cols1 = new Dictionary<string, object>()
......
...@@ -12,9 +12,10 @@ namespace Mall.Module.MarketingCenter ...@@ -12,9 +12,10 @@ namespace Mall.Module.MarketingCenter
{ {
public class IntegralModule public class IntegralModule
{ {
private RB_Integral_SettingsRepository settingsRepository = new RB_Integral_SettingsRepository(); private readonly RB_Integral_SettingsRepository settingsRepository = new RB_Integral_SettingsRepository();
private readonly RB_Member_IntegralRepository recordRepository = new RB_Member_IntegralRepository();
private RB_Member_IntegralRepository recordRepository = new RB_Member_IntegralRepository();
#region 积分设置 #region 积分设置
/// <summary> /// <summary>
...@@ -46,8 +47,6 @@ namespace Mall.Module.MarketingCenter ...@@ -46,8 +47,6 @@ namespace Mall.Module.MarketingCenter
} }
#endregion #endregion
#region 积分记录 #region 积分记录
/// <summary> /// <summary>
......
...@@ -103,7 +103,7 @@ namespace Mall.Module.MarketingCenter ...@@ -103,7 +103,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetMiniprogramPageTemplModule(RB_Miniprogram_Page_Templ_Extend extModel) public bool SetMiniprogramPageTemplModule(RB_Miniprogram_Page_Templ_Extend extModel)
{ {
bool flag = false; bool flag;
if (extModel.Id > 0) if (extModel.Id > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
...@@ -147,12 +147,11 @@ namespace Mall.Module.MarketingCenter ...@@ -147,12 +147,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetMiniprogramPageTemplIsUseModule(object Id, int IsUse) public bool SetMiniprogramPageTemplIsUseModule(object Id, int IsUse)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Miniprogram_Page_Templ_Extend.IsUse),IsUse } {nameof(RB_Miniprogram_Page_Templ_Extend.IsUse),IsUse }
}; };
flag = pageRepository.Update(fileds, new WhereHelper(nameof(RB_Miniprogram_Page_Templ_Extend.Id), Id)); bool flag = pageRepository.Update(fileds, new WhereHelper(nameof(RB_Miniprogram_Page_Templ_Extend.Id), Id));
return flag; return flag;
} }
...@@ -165,8 +164,7 @@ namespace Mall.Module.MarketingCenter ...@@ -165,8 +164,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetMiniprogramPageTemplIsHomeModule(object Id, int IsHome,int MallBaseId) public bool SetMiniprogramPageTemplIsHomeModule(object Id, int IsHome,int MallBaseId)
{ {
bool flag = false; bool flag = pageRepository.UpdateIsHomeRepository(MallBaseId);
flag = pageRepository.UpdateIsHomeRepository(MallBaseId);
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Miniprogram_Page_Templ_Extend.IsHome),IsHome } {nameof(RB_Miniprogram_Page_Templ_Extend.IsHome),IsHome }
...@@ -183,12 +181,11 @@ namespace Mall.Module.MarketingCenter ...@@ -183,12 +181,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool RemoveMiniprogramPageTemplModule(object Id, int Status) public bool RemoveMiniprogramPageTemplModule(object Id, int Status)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Miniprogram_Page_Templ_Extend.Status),Status } {nameof(RB_Miniprogram_Page_Templ_Extend.Status),Status }
}; };
flag = pageRepository.Update(fileds, new WhereHelper(nameof(RB_Miniprogram_Page_Templ_Extend.Id), Id)); bool flag = pageRepository.Update(fileds, new WhereHelper(nameof(RB_Miniprogram_Page_Templ_Extend.Id), Id));
return flag; return flag;
} }
...@@ -199,8 +196,7 @@ namespace Mall.Module.MarketingCenter ...@@ -199,8 +196,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool RemoveMiniprogramPageTemplDetailsModule(object Id) public bool RemoveMiniprogramPageTemplDetailsModule(object Id)
{ {
bool flag = false; bool flag = detailsRepository.Delete(Id) > 0;
flag = detailsRepository.Delete(Id)>0;
return flag; return flag;
} }
} }
......
...@@ -77,7 +77,7 @@ namespace Mall.Module.MarketingCenter ...@@ -77,7 +77,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetMiniprogramTemplateModule(RB_Miniprogram_Template_Extend extModel) public bool SetMiniprogramTemplateModule(RB_Miniprogram_Template_Extend extModel)
{ {
bool flag = false; bool flag;
if (extModel.Id > 0) if (extModel.Id > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
...@@ -389,12 +389,11 @@ namespace Mall.Module.MarketingCenter ...@@ -389,12 +389,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool RemoveMiniprogramTemplateModule(object Id, int Status) public bool RemoveMiniprogramTemplateModule(object Id, int Status)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Miniprogram_Template_Extend.Status),Status } {nameof(RB_Miniprogram_Template_Extend.Status),Status }
}; };
flag = miniprogram_TemplateRepository.Update(fileds, new WhereHelper(nameof(RB_Miniprogram_Template_Extend.Id), Id)); bool flag = miniprogram_TemplateRepository.Update(fileds, new WhereHelper(nameof(RB_Miniprogram_Template_Extend.Id), Id));
return flag; return flag;
} }
} }
......
...@@ -170,7 +170,7 @@ namespace Mall.Module.MarketingCenter ...@@ -170,7 +170,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetShareCategoryModule(RB_Share_Category_Extend extModel) public bool SetShareCategoryModule(RB_Share_Category_Extend extModel)
{ {
bool flag = false; bool flag;
if (extModel.Id > 0) if (extModel.Id > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
...@@ -199,12 +199,11 @@ namespace Mall.Module.MarketingCenter ...@@ -199,12 +199,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool RemoveShareCategoryModule(object Id) public bool RemoveShareCategoryModule(object Id)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Share_Category_Extend.Status),(int) DateStateEnum.Delete}, {nameof(RB_Share_Category_Extend.Status),(int) DateStateEnum.Delete},
}; };
flag = share_CategoryRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Category_Extend.Id), Id)); bool flag = share_CategoryRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Category_Extend.Id), Id));
return flag; return flag;
} }
...@@ -237,8 +236,7 @@ namespace Mall.Module.MarketingCenter ...@@ -237,8 +236,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetShareFriendModule(RB_Share_Friend_Extend extModel) public bool SetShareFriendModule(RB_Share_Friend_Extend extModel)
{ {
bool flag = false; bool flag = share_FriendRepository.SetShareFrendRepository(extModel);
flag = share_FriendRepository.SetShareFrendRepository(extModel);
return flag; return flag;
} }
...@@ -272,12 +270,11 @@ namespace Mall.Module.MarketingCenter ...@@ -272,12 +270,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool RemoveShareFriendModule(object Id) public bool RemoveShareFriendModule(object Id)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Share_Friend_Extend.Status),(int) DateStateEnum.Delete}, {nameof(RB_Share_Friend_Extend.Status),(int) DateStateEnum.Delete},
}; };
flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id)); bool flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id));
return flag; return flag;
} }
...@@ -289,12 +286,11 @@ namespace Mall.Module.MarketingCenter ...@@ -289,12 +286,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetShareFriendIsTopModule(object Id, int IsTop) public bool SetShareFriendIsTopModule(object Id, int IsTop)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Share_Friend_Extend.IsTop),IsTop}, {nameof(RB_Share_Friend_Extend.IsTop),IsTop},
}; };
flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id)); bool flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id));
return flag; return flag;
} }
...@@ -306,12 +302,11 @@ namespace Mall.Module.MarketingCenter ...@@ -306,12 +302,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetShareFriendIsUseModule(object Id, int IsUse) public bool SetShareFriendIsUseModule(object Id, int IsUse)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Share_Friend_Extend.IsUse),IsUse}, {nameof(RB_Share_Friend_Extend.IsUse),IsUse},
}; };
flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id)); bool flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id));
return flag; return flag;
} }
...@@ -323,12 +318,11 @@ namespace Mall.Module.MarketingCenter ...@@ -323,12 +318,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetShareFriendSortNumModule(object Id, int SortNum) public bool SetShareFriendSortNumModule(object Id, int SortNum)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Share_Friend_Extend.SortNum),SortNum}, {nameof(RB_Share_Friend_Extend.SortNum),SortNum},
}; };
flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id)); bool flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id));
return flag; return flag;
} }
...@@ -340,12 +334,11 @@ namespace Mall.Module.MarketingCenter ...@@ -340,12 +334,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetShareFriendMaterialInfoModule(object Id, string MaterialInfo) public bool SetShareFriendMaterialInfoModule(object Id, string MaterialInfo)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Share_Friend_Extend.MaterialInfo),MaterialInfo}, {nameof(RB_Share_Friend_Extend.MaterialInfo),MaterialInfo},
}; };
flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id)); bool flag = share_FriendRepository.Update(fileds, new WhereHelper(nameof(RB_Share_Friend_Extend.Id), Id));
return flag; return flag;
} }
......
...@@ -13,7 +13,7 @@ namespace Mall.Module.MarketingCenter ...@@ -13,7 +13,7 @@ namespace Mall.Module.MarketingCenter
{ {
public class StatisticsModule public class StatisticsModule
{ {
private RB_Goods_OrderRepository orderRepository = new RB_Goods_OrderRepository(); private readonly RB_Goods_OrderRepository orderRepository = new RB_Goods_OrderRepository();
/// <summary> /// <summary>
/// 返佣 /// 返佣
/// </summary> /// </summary>
...@@ -294,12 +294,14 @@ namespace Mall.Module.MarketingCenter ...@@ -294,12 +294,14 @@ namespace Mall.Module.MarketingCenter
{ {
for (int i = 1; i < 24; i++) for (int i = 1; i < 24; i++)
{ {
OrderLine modelOrderLine = new OrderLine(); OrderLine modelOrderLine = new OrderLine
modelOrderLine.OrderPay = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).Count(); {
modelOrderLine.PayMoney = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).Sum(x => x.Income ?? 0); OrderPay = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).Count(),
modelOrderLine.PayMemerNum = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).GroupBy(x => x.UserId).Count(); PayMoney = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).Sum(x => x.Income ?? 0),
modelOrderLine.BuyNum = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).Sum(x => x.GoodsTotalNum); PayMemerNum = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).GroupBy(x => x.UserId).Count(),
modelOrderLine.DateStr = (i > 9) ? ("0" + i) : i.ToString(); BuyNum = List.Where(x => x.CreateDate.Value.ToString("dd") == ((i > 9) ? ("0" + i) : i.ToString())).Sum(x => x.GoodsTotalNum),
DateStr = (i > 9) ? ("0" + i) : i.ToString()
};
model.OrderLineList.Add(modelOrderLine); model.OrderLineList.Add(modelOrderLine);
} }
} }
...@@ -307,12 +309,14 @@ namespace Mall.Module.MarketingCenter ...@@ -307,12 +309,14 @@ namespace Mall.Module.MarketingCenter
{ {
for (int i = 0; i < 7; i++) for (int i = 0; i < 7; i++)
{ {
OrderLine modelOrderLine = new OrderLine(); OrderLine modelOrderLine = new OrderLine
modelOrderLine.OrderPay = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).Count(); {
modelOrderLine.PayMoney = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).Sum(x => x.Income ?? 0); OrderPay = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).Count(),
modelOrderLine.PayMemerNum = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).GroupBy(x => x.UserId).Count(); PayMoney = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).Sum(x => x.Income ?? 0),
modelOrderLine.BuyNum = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).Sum(x => x.GoodsTotalNum); PayMemerNum = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).GroupBy(x => x.UserId).Count(),
modelOrderLine.DateStr = System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd"); BuyNum = List.Where(x => x.CreateDate.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")).Sum(x => x.GoodsTotalNum),
DateStr = System.DateTime.Now.AddDays(i).ToString("yyyy-MM-dd")
};
model.OrderLineList.Add(modelOrderLine); model.OrderLineList.Add(modelOrderLine);
} }
} }
......
...@@ -55,7 +55,7 @@ namespace Mall.Module.MarketingCenter ...@@ -55,7 +55,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool SetTemplateMarketModule(RB_Template_Market_Extend extModel) public bool SetTemplateMarketModule(RB_Template_Market_Extend extModel)
{ {
bool flag = false; bool flag;
if (extModel.Id > 0) if (extModel.Id > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
...@@ -96,12 +96,11 @@ namespace Mall.Module.MarketingCenter ...@@ -96,12 +96,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool RemoveTemplateMarketModule(object Id) public bool RemoveTemplateMarketModule(object Id)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Template_Market_Extend.Status),1 }, {nameof(RB_Template_Market_Extend.Status),1 },
}; };
flag = template_MarketRepository.Update(fileds, new WhereHelper(nameof(RB_Template_Market_Extend.Id), Id)); bool flag = template_MarketRepository.Update(fileds, new WhereHelper(nameof(RB_Template_Market_Extend.Id), Id));
return flag; return flag;
} }
...@@ -113,12 +112,11 @@ namespace Mall.Module.MarketingCenter ...@@ -113,12 +112,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool UpdateTemplateMarketIsShowModule(object Id,int IsShow) public bool UpdateTemplateMarketIsShowModule(object Id,int IsShow)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Template_Market_Extend.IsShow),IsShow }, {nameof(RB_Template_Market_Extend.IsShow),IsShow },
}; };
flag = template_MarketRepository.Update(fileds, new WhereHelper(nameof(RB_Template_Market_Extend.Id), Id)); bool flag = template_MarketRepository.Update(fileds, new WhereHelper(nameof(RB_Template_Market_Extend.Id), Id));
return flag; return flag;
} }
...@@ -130,12 +128,11 @@ namespace Mall.Module.MarketingCenter ...@@ -130,12 +128,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns> /// <returns></returns>
public bool UpdateTemplateMarketIsUseModule(object Id, int IsUse) public bool UpdateTemplateMarketIsUseModule(object Id, int IsUse)
{ {
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Template_Market_Extend.IsUse),IsUse }, {nameof(RB_Template_Market_Extend.IsUse),IsUse },
}; };
flag = template_MarketRepository.Update(fileds, new WhereHelper(nameof(RB_Template_Market_Extend.Id), Id)); bool flag = template_MarketRepository.Update(fileds, new WhereHelper(nameof(RB_Template_Market_Extend.Id), Id));
return flag; return flag;
} }
......
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