This commit is contained in:
Abbh1 2023-11-14 16:53:40 +08:00
parent 862ff52b01
commit cd91a3301e
7 changed files with 23 additions and 5 deletions

View File

@ -15,8 +15,7 @@ namespace ARW.Model.Dto.Api.EmotionManage.EmoticonDatas
public class EmoticonDataQueryDtoApi : PagerInfo
{
public long EmoticonCategoryGuid { get; set; }
public string EmoticonDataName { get; set; }
public string Search { get; set; }
public bool IsLastUpdate { get; set; } = false;
}

View File

@ -25,6 +25,7 @@ namespace ARW.Model.Dto.Business.EmotionManage.EmoticonDatas
[Required(ErrorMessage = "图片不能为空")]
public string EmoticonDataImg { get; set; }
public string GetNum { get; set; }
[Required(ErrorMessage = "排序不能为空")]
public int EmoticonDataSort { get; set; }
@ -48,6 +49,7 @@ namespace ARW.Model.Dto.Business.EmotionManage.EmoticonDatas
public long? EmoticonCategoryGuid { get; set; }
public string EmoticonDataName { get; set; }
public string GetNum { get; set; }
public string ids { get; set; }
}

View File

@ -63,6 +63,15 @@ namespace ARW.Model.Models.Business.EmotionManage.EmoticonDatas
public string EmoticonDataImg { get; set; }
/// <summary>
/// 描述 :获取码
/// 空值 : false
/// </summary>
[EpplusTableColumn(Header = "获取码")]
[SugarColumn(ColumnName = "get_num")]
public string GetNum { get; set; }
/// <summary>
/// 描述 :排序
/// 空值 : false

View File

@ -58,6 +58,12 @@ namespace ARW.Model.Vo.Business.EmotionManage.EmoticonDatas
[EpplusTableColumn(Header = "表情包图片")]
public string EmoticonDataImg { get; set; }
/// <summary>
/// 描述 :获取码
/// </summary>
[EpplusTableColumn(Header = "表情包获取码")]
public string GetNum { get; set; }
/// <summary>
/// 描述 :排序

View File

@ -50,7 +50,7 @@ namespace ARW.Service.Api.BusinessService.EmotionManage.EmoticonDatas
var query = _EmoticonDataRepository
.Queryable()
.LeftJoin<EmotionCategory>((s, c) => s.EmoticonCategoryGuid == c.EmotionCategoryGuid)
.WhereIF(!string.IsNullOrEmpty(parm.EmoticonDataName), (s,c) => s.EmoticonDataName.Contains(parm.EmoticonDataName) || c.EmotionCategoryName.Contains(parm.EmoticonDataName))
.WhereIF(!string.IsNullOrEmpty(parm.Search), (s, c) => s.EmoticonDataName.Contains(parm.Search) || c.EmotionCategoryName.Contains(parm.Search) || s.GetNum == parm.Search)
.Where(predicate.ToExpression())
.OrderByIF(parm.IsLastUpdate == false, s => s.EmoticonDataSort, OrderByType.Asc)
.OrderByIF(parm.IsLastUpdate == true, s => s.Create_time, OrderByType.Desc)

View File

@ -61,6 +61,7 @@ namespace ARW.Service.Business.BusinessService.EmotionManage.EmoticonDatas
EmoticonDataName = s.EmoticonDataName,
EmoticonDataImg = s.EmoticonDataImg,
EmoticonDataSort = s.EmoticonDataSort,
GetNum = s.GetNum
});

View File

@ -96,6 +96,7 @@ namespace ARW.WebApi.Controllers.Business.EmotionManage.EmoticonDatas
EmoticonCategoryGuid = parm.EmoticonCategoryGuid,
EmoticonDataImg = item,
EmoticonDataSort = 100,
GetNum = parm.GetNum,
Create_by = user.UserName,
Create_time = DateTime.Now,
};