|
@@ -39,6 +39,7 @@ namespace GxPress.Repository.Implement.Group
|
|
|
/// <returns></returns>
|
|
|
public async Task<int> InsertAsync(Entity.tede2.Group.GroupCategroy groupCategroy)
|
|
|
{
|
|
|
+ groupCategroy.ImageUrls = StringUtils.RemoveDomain(groupCategroy.ImageUrls);
|
|
|
return await _repository.InsertAsync(groupCategroy);
|
|
|
}
|
|
|
|
|
@@ -51,6 +52,8 @@ namespace GxPress.Repository.Implement.Group
|
|
|
model.PiazzaName = groupCategroy.PiazzaName;
|
|
|
if (groupCategroy.ParentId > 0)
|
|
|
model.ParentId = groupCategroy.ParentId;
|
|
|
+ if (string.IsNullOrEmpty(groupCategroy.ImageUrls))
|
|
|
+ model.ImageUrls = StringUtils.RemoveDomain(groupCategroy.ImageUrls);
|
|
|
return await _repository.UpdateAsync(groupCategroy);
|
|
|
}
|
|
|
return false;
|
|
@@ -87,6 +90,10 @@ namespace GxPress.Repository.Implement.Group
|
|
|
var result = await _repository.GetAllAsync<GroupCategoryResult>(Q.Where(nameof(Entity.tede2.Group.GroupCategroy.ParentId), parentId));
|
|
|
foreach (var item in result)
|
|
|
item.IsChildren = await _repository.ExistsAsync(Q.Where(nameof(Entity.tede2.Group.GroupCategroy.ParentId), item.Id));
|
|
|
+ foreach (var item in result)
|
|
|
+ {
|
|
|
+ item.ImageUrls = StringUtils.AddDomain(item.ImageUrls);
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
}
|