public async Task <string> GetSupplierInfoByID(string info) { if (string.IsNullOrWhiteSpace(info)) { return(JsonConvert.SerializeObject(new { status = "fail", message = "供应商ID不能为空", date = DateTime.Now })); } int ID = Convert.ToInt32(info); SupplierDal dal = new SupplierDal(); var result = await dal.GetSupplierInfoByID(ID); if (result.ResultCode != 0) { return(JsonConvert.SerializeObject(new { status = "fail", message = result.ResultMsg, date = DateTime.Now })); } return(JsonConvert.SerializeObject(new { status = "success", data = result.Data, date = DateTime.Now })); }