Example #1
0
 public async Task <IActionResult> AddRfChooseShop([FromBody] RfChooseShopEntity model)
 {
     if (model.OpenId.IsNullOrWhiteSpace())
     {
         return(OkResult(0));
     }
     return(OkResult(await _server.AddRfChooseShop(model)));
 }
Example #2
0
 /// <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));
 }
Example #3
0
 /// <summary>
 /// 修改随机选择的店铺
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public Task <int> ModifyRfChooseShop(RfChooseShopEntity model)
 {
     return(_rfChooseShopRepository.UpdateAsync(model));
 }
Example #4
0
 public async Task <IActionResult> ModifyRfChooseShop([FromBody] RfChooseShopEntity model)
 {
     return(OkResult(await _server.ModifyRfChooseShop(model)));
 }