|
@@ -5,6 +5,7 @@ using Datory;
|
|
|
using GxPress.Common.AppOptions;
|
|
|
using GxPress.Common.Tools;
|
|
|
using GxPress.Repository.Interface.AppStartPage;
|
|
|
+using GxPress.Request.AppStartPage;
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
|
namespace GxPress.Repository.Implement.AppStartPage
|
|
@@ -64,8 +65,31 @@ namespace GxPress.Repository.Implement.AppStartPage
|
|
|
/// </summary>
|
|
|
/// <param name="model"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<bool> UpdateAsync(Entity.tede2.AppStartPage.AppStartPage model)
|
|
|
+ public async Task<bool> UpdateAsync(AppStartPageUpdateRequest request)
|
|
|
{
|
|
|
+ var model = await _repository.GetAsync(request.Id);
|
|
|
+ if (!string.IsNullOrEmpty(request.ImageUrl))
|
|
|
+ model.ImageUrl = StringUtils.RemoveDomain(request.ImageUrl);
|
|
|
+ if (request.IsDisable > 0)
|
|
|
+ model.IsDisable = request.IsDisable == 1;
|
|
|
+ if (request.Second > 0)
|
|
|
+ model.Second = request.Second;
|
|
|
+ if (!string.IsNullOrEmpty(request.Title))
|
|
|
+ model.Title = request.Title;
|
|
|
+ if (request.TypeId > 0)
|
|
|
+ model.TypeId = request.TypeId;
|
|
|
+ if (!string.IsNullOrEmpty(request.Url))
|
|
|
+ model.Url = request.Url;
|
|
|
+ if (request.AdminId > 0)
|
|
|
+ model.AdminId = request.AdminId;
|
|
|
+ if (request.AppTypeId > 0)
|
|
|
+ model.AppTypeId = request.AppTypeId;
|
|
|
+ if (!string.IsNullOrEmpty(request.Creator))
|
|
|
+ model.Creator = request.Creator;
|
|
|
+ if (request.DataId > 0)
|
|
|
+ model.DataId = request.DataId;
|
|
|
+ if (request.DataTypeId > 0)
|
|
|
+ model.DataTypeId = request.DataTypeId;
|
|
|
return await _repository.UpdateAsync(model);
|
|
|
}
|
|
|
/// <summary>
|