/// <summary> /// 添加团购配置 /// </summary> /// <param name="a"></param> /// <returns></returns> public int AddGroupPurchase(Model.GroupPurchase gp) { try { string sql = $" insert into GroupPurchase values (null,{gp.IsGroup},'{gp.Notice}','{gp.CloseTime}','{gp.PosterOne}','{gp.PosterTwo}','{gp.PosterThree}','{gp.DespatchMode}','{gp.HeadName}',{gp.CoverageArea},{gp.ServiceCharge},{gp.WithdrawDeposit},{gp.Commission}) "; return(DapperHelper.Execute(sql)); } catch (Exception) { throw; } }
public int AddGroupPurchase([FromForm] Model.GroupPurchase gp) { int i = _groupPurchaseRepository.AddGroupPurchase(gp); if (i > 0) { logger.Debug($"添加团购配置成功,公告为{gp.Notice}"); } else { logger.Debug($"添加团购配置失败,公告为{gp.Notice}"); } return(i); }
public int AddGroupPurchase(Model.GroupPurchase gp) { int i = _groupPurchaseRepository.AddGroupPurchase(gp); return(i); }