Exemplo n.º 1
0
 /// <summary>
 /// 编辑门店信息
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="apiCode">The API code.</param>
 /// <returns>true if XXXX, false otherwise.</returns>
 public bool EditShopInfo(ShopModel model, out ApiStatusCode apiCode)
 {
     apiCode = ApiStatusCode.OK;
     if (model.ShopID > 0)
     {
         if (dal.UpdateShopInfo(model))
         {
             apiCode = ApiStatusCode.OK;
             return(true);
         }
         else
         {
             apiCode = ApiStatusCode.更新失败;
         }
     }
     else
     {
         int flag = dal.AddShopInfo(model);
         if (flag > 0)
         {
             return(true);
         }
         else
         {
             apiCode = ApiStatusCode.添加失败;
         }
     }
     return(false);
 }