public JsonResult AsyncPic() { IEnumerable <Files> files = FilesService.instance().GetFilesByCompanyID(UserDateTicket.Company.ID); files = files.Where(m => m.RelationID == UserDateTicket.wx_config.ID); foreach (var item in files) { if (string.IsNullOrEmpty(item.media_id)) { string media_id = Utils.GetJsonValue(WXApi.Material_add_img(GetToken(), item.FilePath), "media_id"); item.media_id = media_id; FilesService.instance().Update(item); } } return(Json("ok", JsonRequestBehavior.AllowGet)); }