public async Task <IActionResult> AddRfChooseShop([FromBody] RfChooseShopEntity model) { if (model.OpenId.IsNullOrWhiteSpace()) { return(OkResult(0)); } return(OkResult(await _server.AddRfChooseShop(model))); }
/// <summary> /// 添加随机选择的店铺 /// </summary> /// <param name="model"></param> /// <returns></returns> public Task <int> AddRfChooseShop(RfChooseShopEntity model) { if (model.OpenId.IsNullOrWhiteSpace() || !model.Category.Contains("美食")) { return(Task.FromResult(0)); } model.CreateTime = DateTime.Now.D2LSecond(); model.CateringShopId = ulong.Parse(model.CateringShopIdStr); return(_rfChooseShopRepository.InsertAsync(model)); }
/// <summary> /// 修改随机选择的店铺 /// </summary> /// <param name="model"></param> /// <returns></returns> public Task <int> ModifyRfChooseShop(RfChooseShopEntity model) { return(_rfChooseShopRepository.UpdateAsync(model)); }
public async Task <IActionResult> ModifyRfChooseShop([FromBody] RfChooseShopEntity model) { return(OkResult(await _server.ModifyRfChooseShop(model))); }