小程序接口修改

This commit is contained in:
2023-07-11 16:32:16 +08:00
parent ca5c3fe9a7
commit 4449a7754f
68 changed files with 4634 additions and 2984 deletions
+29 -26
View File
@@ -122,35 +122,38 @@ namespace BLL
toDoItem.UrlStr = att.AttachUrl + "," + toDoItem.UrlStr;
}
}
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(toDoItem.UrlStr, 10, null), toDoItem.UrlStr, toDoItem.MenuId, toDoItem.DataId);
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(toDoItem.UrlStr, 10, null), toDoItem.UrlStr, toDoItem.MenuId, toDoItem.DataId);
}
else
{
CommonService.DeleteAttachFileById(toDoItem.DataId);
CommonService.DeleteAttachFileByIdForApi(toDoItem.DataId);
}
}
}
public static void SaveAttachUrl(string menuId, string dataId, string url, string isInsert)
{
////保存附件
if (!string.IsNullOrEmpty(url))
public static void SaveAttachUrl(string menuId, string dataId, string url, string isInsert)
{
if (isInsert == "1")
{
var att = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
if (att != null)
{
url = att.AttachUrl + "," + url;
}
}
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(url, 10, null), url, menuId, dataId);
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
////保存附件
if (!string.IsNullOrEmpty(url))
{
if (isInsert == "1")
{
var att = db.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId);
if (att != null)
{
url = att.AttachUrl + "," + url;
}
}
UploadFileService.SaveAttachUrlForApi(UploadFileService.GetSourceByAttachUrl(url, 10, null), url, menuId, dataId);
}
else
{
CommonService.DeleteAttachFileByIdForApi(dataId);
}
}
}
else
{
CommonService.DeleteAttachFileById(dataId);
}
}
/// <summary>
/// 获取附件路径
@@ -177,12 +180,12 @@ namespace BLL
}
return fileUrl;
}
/// <summary>
/// 获取附件路径
/// </summary>
/// <returns></returns>
public static string getFileUrl(string menuId, string tokeyId, string url)
/// <summary>
/// 获取附件路径
/// </summary>
/// <returns></returns>
public static string getFileUrl(string menuId, string tokeyId, string url)
{
string fileUrl = url;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))