public IHttpActionResult PostBusinessAuth(BusinessAuth model) { if (model == null || string.IsNullOrWhiteSpace(model.UserId.ToString()) || string.IsNullOrWhiteSpace(model.Category) || string.IsNullOrWhiteSpace(model.FrontImgUrl) || string.IsNullOrWhiteSpace(model.BackImgUrl) || string.IsNullOrWhiteSpace(model.IDCardPer) || string.IsNullOrWhiteSpace(model.TaxRC) || string.IsNullOrWhiteSpace(model.OrganizationCode) || string.IsNullOrWhiteSpace(model.BusinessLicenseCopy) || string.IsNullOrWhiteSpace(model.CompanyName) || string.IsNullOrWhiteSpace(model.CompanyAddress) //|| string.IsNullOrWhiteSpace(model.Other) //|| string.IsNullOrWhiteSpace(model.Status.ToString()) //|| string.IsNullOrWhiteSpace(model.CreateTime.ToString()) //|| string.IsNullOrWhiteSpace(model.Remark) ) return Json(new { result = false, Status = HttpStatusCode.BadRequest, message = "参数异常" }); //未支付 model.Status = 3; model.CreateTime = DateTime.Now; model.Deposit = 0.0M; var result = bar.UpdateBusinessAuth(model); return Json(new { result = result, Status = HttpStatusCode.OK, message = "操作成功" }); }
/// <summary> /// 新增|修改商家认证信息 /// </summary> /// <param name="model">BusinessAuth</param> /// <returns>bool</returns ///<author>peng</author> public bool UpdateBusinessAuth(BusinessAuth model) { SqlParameter[] sp = { new SqlParameter("@ID",model.ID), new SqlParameter("@UserId",model.UserId), new SqlParameter("@CompanyName",model.CompanyName), new SqlParameter("@CompanyAddress",model.CompanyAddress), new SqlParameter("@Category",model.Category), new SqlParameter("@FrontImgUrl",model.FrontImgUrl), new SqlParameter("@BackImgUrl",model.BackImgUrl), new SqlParameter("@IDCardPer",model.IDCardPer), new SqlParameter("@TaxRC",model.TaxRC), new SqlParameter("@OrganizationCode",model.OrganizationCode), new SqlParameter("@BusinessLicenseCopy",model.BusinessLicenseCopy), new SqlParameter("@Other",model.Other), new SqlParameter("@Status",model.Status), new SqlParameter("@CreateTime",model.CreateTime), new SqlParameter("@Remark",model.Remark) }; return SqlHelper.ExecuteNonQuery(Conn, "usp_UpdateAddBusinessAuth", sp) > 0 ? true : false; }