diff --git a/ARW.Model/Dto/Business/EmotionManage/EmoticonDatas/EmoticonDataDto.cs b/ARW.Model/Dto/Business/EmotionManage/EmoticonDatas/EmoticonDataDto.cs
new file mode 100644
index 0000000..91ce6b3
--- /dev/null
+++ b/ARW.Model/Dto/Business/EmotionManage/EmoticonDatas/EmoticonDataDto.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using ARW.Model.Models.Business.EmotionManage.EmoticonDatas;
+
+namespace ARW.Model.Dto.Business.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包输入对象
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ public class EmoticonDataDto
+ {
+
+ public int EmoticonDataId { get; set; }
+
+ public long EmoticonDataGuid { get; set; }
+
+ [Required(ErrorMessage = "分类guid不能为空")]
+ public long EmoticonCategoryGuid { get; set; }
+
+ public string EmoticonDataName { get; set; }
+
+ [Required(ErrorMessage = "图片不能为空")]
+ public string EmoticonDataImg { get; set; }
+
+ [Required(ErrorMessage = "排序不能为空")]
+ public int EmoticonDataSort { get; set; }
+
+
+
+
+
+ }
+
+
+ ///
+ /// 表情包查询对象
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ public class EmoticonDataQueryDto : PagerInfo
+ {
+
+ public long? EmoticonCategoryGuid { get; set; }
+
+ public string EmoticonDataName { get; set; }
+
+ public string ids { get; set; }
+ }
+
+
+
+
+}
diff --git a/ARW.Model/Models/Business/EmotionManage/EmoticonDatas/EmoticonData.cs b/ARW.Model/Models/Business/EmotionManage/EmoticonDatas/EmoticonData.cs
new file mode 100644
index 0000000..ab5ffb9
--- /dev/null
+++ b/ARW.Model/Models/Business/EmotionManage/EmoticonDatas/EmoticonData.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using SqlSugar;
+using OfficeOpenXml.Attributes;
+using Newtonsoft.Json;
+
+namespace ARW.Model.Models.Business.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包,数据实体对象
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ [SugarTable("tb_emoticon_data")]
+ public class EmoticonData : BusinessBase
+ {
+
+ ///
+ /// 描述 :
+ /// 空值 : false
+ ///
+ [EpplusTableColumn(Header = "EmoticonDataId")]
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "emoticon_data_id")]
+ public int EmoticonDataId { get; set; }
+
+
+ ///
+ /// 描述 :
+ /// 空值 : false
+ ///
+ [EpplusTableColumn(Header = "EmoticonDataGuid")]
+ [JsonConverter(typeof(ValueToStringConverter))]
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "emoticon_data_guid")]
+ public long EmoticonDataGuid { get; set; }
+
+
+ ///
+ /// 描述 :分类guid
+ /// 空值 : false
+ ///
+ [EpplusTableColumn(Header = "分类guid")]
+ [JsonConverter(typeof(ValueToStringConverter))]
+ [SugarColumn(ColumnName = "emoticon_category_guid")]
+ public long EmoticonCategoryGuid { get; set; }
+
+
+ ///
+ /// 描述 :名称
+ /// 空值 : true
+ ///
+ [EpplusTableColumn(Header = "名称")]
+ [SugarColumn(ColumnName = "emoticon_data_name")]
+ public string EmoticonDataName { get; set; }
+
+
+ ///
+ /// 描述 :图片
+ /// 空值 : false
+ ///
+ [EpplusTableColumn(Header = "图片")]
+ [SugarColumn(ColumnName = "emoticon_data_img")]
+ public string EmoticonDataImg { get; set; }
+
+
+ ///
+ /// 描述 :排序
+ /// 空值 : false
+ ///
+ [EpplusTableColumn(Header = "排序")]
+ [SugarColumn(ColumnName = "emoticon_data_sort")]
+ public int EmoticonDataSort { get; set; }
+
+
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ARW.Model/Vo/Business/EmotionManage/EmoticonDatas/EmoticonDataVo.cs b/ARW.Model/Vo/Business/EmotionManage/EmoticonDatas/EmoticonDataVo.cs
new file mode 100644
index 0000000..069f3f4
--- /dev/null
+++ b/ARW.Model/Vo/Business/EmotionManage/EmoticonDatas/EmoticonDataVo.cs
@@ -0,0 +1,69 @@
+using Newtonsoft.Json;
+using OfficeOpenXml.Attributes;
+using SqlSugar;
+using System;
+
+namespace ARW.Model.Vo.Business.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包展示对象
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ public class EmoticonDataVo
+ {
+
+
+ ///
+ /// 描述 :
+ ///
+ [EpplusIgnore]
+ public int EmoticonDataId { get; set; }
+
+
+ ///
+ /// 描述 :
+ ///
+ [JsonConverter(typeof(ValueToStringConverter))]
+ [EpplusIgnore]
+ public long EmoticonDataGuid { get; set; }
+
+
+ ///
+ /// 描述 :分类guid
+ ///
+ [JsonConverter(typeof(ValueToStringConverter))]
+ [EpplusIgnore]
+ public long EmoticonCategoryGuid { get; set; }
+
+
+ ///
+ /// 描述 : 分类名称
+ ///
+ [EpplusTableColumn(Header = "表情包分类名称")]
+ public string EmoticonCategoryName { get; set; }
+
+
+ ///
+ /// 描述 :名称
+ ///
+ [EpplusTableColumn(Header = "表情包名称")]
+ public string EmoticonDataName { get; set; }
+
+
+ ///
+ /// 描述 :图片
+ ///
+ [EpplusTableColumn(Header = "表情包图片")]
+ public string EmoticonDataImg { get; set; }
+
+
+ ///
+ /// 描述 :排序
+ ///
+ [EpplusTableColumn(Header = "表情包排序")]
+ public int EmoticonDataSort { get; set; }
+
+ }
+}
diff --git a/ARW.Repository/Business/EmotionManage/EmoticonDatas/EmoticonDataRepository.cs b/ARW.Repository/Business/EmotionManage/EmoticonDatas/EmoticonDataRepository.cs
new file mode 100644
index 0000000..e44d12c
--- /dev/null
+++ b/ARW.Repository/Business/EmotionManage/EmoticonDatas/EmoticonDataRepository.cs
@@ -0,0 +1,20 @@
+using System;
+using Infrastructure.Attribute;
+using ARW.Repository.System;
+using ARW.Model.Models.Business.EmotionManage.EmoticonDatas;
+
+namespace ARW.Repository.Business.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包仓储
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ [AppService(ServiceLifetime = LifeTime.Transient)]
+ public class EmoticonDataRepository : BaseRepository
+ {
+ #region 业务逻辑代码
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/ARW.Service/Business/BusinessService/EmotionManage/EmoticonDatas/EmoticonDataService.cs b/ARW.Service/Business/BusinessService/EmotionManage/EmoticonDatas/EmoticonDataService.cs
new file mode 100644
index 0000000..15911a7
--- /dev/null
+++ b/ARW.Service/Business/BusinessService/EmotionManage/EmoticonDatas/EmoticonDataService.cs
@@ -0,0 +1,177 @@
+using Infrastructure.Attribute;
+using Microsoft.AspNetCore.Http;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Infrastructure;
+using ARW.Model;
+using ARW.Repository;
+using ARW.Repository.Business.EmotionManage.EmoticonDatas;
+using ARW.Service.Business.IBusinessService.EmotionManage.EmoticonDatas;
+using ARW.Model.Dto.Business.EmotionManage.EmoticonDatas;
+using ARW.Model.Models.Business.EmotionManage.EmoticonDatas;
+using ARW.Model.Vo.Business.EmotionManage.EmoticonDatas;
+using ARW.Model.Models.Business.EmotionManage.EmotionCategorys;
+
+namespace ARW.Service.Business.BusinessService.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包接口实现类
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ [AppService(ServiceType = typeof(IEmoticonDataService), ServiceLifetime = LifeTime.Transient)]
+ public class EmoticonDataServiceImpl : BaseService, IEmoticonDataService
+ {
+ private readonly EmoticonDataRepository _EmoticonDataRepository;
+
+ public EmoticonDataServiceImpl(EmoticonDataRepository EmoticonDataRepository)
+ {
+ this._EmoticonDataRepository = EmoticonDataRepository;
+ }
+
+ #region 业务逻辑代码
+
+
+ ///
+ /// 查询表情包分页列表
+ ///
+ public async Task> GetEmoticonDataList(EmoticonDataQueryDto parm)
+ {
+ //开始拼装查询条件d
+ var predicate = Expressionable.Create();
+
+ predicate = predicate.AndIF(parm.EmoticonCategoryGuid != null, s => s.EmoticonCategoryGuid == parm.EmoticonCategoryGuid);
+ predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.EmoticonDataName), s => s.EmoticonDataName.Contains(parm.EmoticonDataName));
+ var query = _EmoticonDataRepository
+ .Queryable()
+ .Where(predicate.ToExpression())
+ .LeftJoin((s, c) => s.EmoticonCategoryGuid == c.EmotionCategoryGuid)
+ .OrderBy(s => s.EmoticonDataSort, OrderByType.Asc)
+ .Select((s, c) => new EmoticonDataVo
+ {
+ EmoticonDataId = s.EmoticonDataId,
+ EmoticonDataGuid = s.EmoticonDataGuid,
+ EmoticonCategoryGuid = s.EmoticonCategoryGuid,
+ EmoticonCategoryName = c.EmotionCategoryName,
+ EmoticonDataName = s.EmoticonDataName,
+ EmoticonDataImg = s.EmoticonDataImg,
+ EmoticonDataSort = s.EmoticonDataSort,
+ });
+
+
+ return await query.ToPageAsync(parm);
+ }
+
+ ///
+ /// 添加或修改表情包
+ ///
+ public async Task AddOrUpdateEmoticonData(EmoticonData model)
+ {
+ if (model.EmoticonDataId != 0)
+ {
+ var response = await _EmoticonDataRepository.UpdateAsync(model);
+ return "修改成功!";
+ }
+ else
+ {
+
+ var response = await _EmoticonDataRepository.InsertReturnSnowflakeIdAsync(model);
+ return "添加成功!";
+ }
+ }
+
+ #region Excel处理
+ ///
+ /// 数据导入处理
+ ///
+ public async Task HandleImportData(EmoticonDataVo EmoticonData)
+ {
+ return EmoticonData;
+ }
+
+
+ ///
+ /// Excel导入
+ ///
+ public async Task ImportExcel(EmoticonData EmoticonData, int index, bool isUpdateSupport, string user)
+ {
+ try
+ {
+ // 空值判断
+ // if (EmoticonData.EmoticonDataId == null) throw new CustomException("表情包不能为空");
+
+ if (isUpdateSupport)
+ {
+ // 判断唯一值
+ var model = await GetFirstAsync(s => s.EmoticonDataId == EmoticonData.EmoticonDataId);
+
+ // 如果为空就新增数据
+ if (model == null)
+ {
+ // 开启事务
+ var res = await UseTranAsync(async () =>
+ {
+ var addRes = await AddOrUpdateEmoticonData(EmoticonData);
+ });
+ var addStr = $"第 {index} 行 => 表情包:【{EmoticonData.EmoticonDataId}】新增成功!
";
+ return addStr;
+ }
+ else
+ {
+ // 如果有数据就进行修改
+ // 开启事务
+ await UseTranAsync(async () =>
+ {
+ EmoticonData.EmoticonDataId = model.EmoticonDataId;
+ EmoticonData.EmoticonDataGuid = model.EmoticonDataGuid;
+ EmoticonData.Update_by = user;
+ EmoticonData.Update_time = DateTime.Now;
+ var editRes = await AddOrUpdateEmoticonData(EmoticonData);
+ });
+ var editStr = $"第 {index} 行 => 表情包:【{EmoticonData.EmoticonDataId}】更新成功!
";
+ return editStr;
+ }
+ }
+ else
+ {
+ // 开启事务
+ var res = await UseTranAsync(async () =>
+ {
+ var addRes = await AddOrUpdateEmoticonData(EmoticonData);
+ });
+ //Console.WriteLine(res.IsSuccess);
+ var addStr = $"第 {index} 行 => 表情包:【{EmoticonData.EmoticonDataId}】新增成功!
";
+ return addStr;
+ }
+ }
+ catch (Exception ex)
+ {
+ var errorRes = $"第 {index} 行 => 表情包:【{EmoticonData.EmoticonDataId}】导入失败!{ex.Message}
";
+ return errorRes;
+ throw;
+ }
+ }
+
+
+
+ ///
+ /// Excel数据导出处理
+ ///
+ public async Task> HandleExportData(List data)
+ {
+ return data;
+ }
+
+ #endregion
+
+
+
+ #endregion
+
+ }
+}
diff --git a/ARW.Service/Business/IBusinessService/EmotionManage/EmoticonDatas/IEmoticonDataService.cs b/ARW.Service/Business/IBusinessService/EmotionManage/EmoticonDatas/IEmoticonDataService.cs
new file mode 100644
index 0000000..cfe139b
--- /dev/null
+++ b/ARW.Service/Business/IBusinessService/EmotionManage/EmoticonDatas/IEmoticonDataService.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using ARW.Model;
+using ARW.Model.Dto.Business.EmotionManage.EmoticonDatas;
+using ARW.Model.Models.Business.EmotionManage.EmoticonDatas;
+using ARW.Model.Vo.Business.EmotionManage.EmoticonDatas;
+
+namespace ARW.Service.Business.IBusinessService.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包接口类
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ public interface IEmoticonDataService : IBaseService
+ {
+ ///
+ /// 获取表情包分页列表
+ ///
+ ///
+ ///
+ Task> GetEmoticonDataList(EmoticonDataQueryDto parm);
+
+
+ ///
+ /// 添加或修改表情包
+ ///
+ ///
+ ///
+ Task AddOrUpdateEmoticonData(EmoticonData parm);
+
+
+ ///
+ /// 数据导入处理
+ ///
+ ///
+ ///
+ Task HandleImportData(EmoticonDataVo EmoticonDataVo);
+
+
+ ///
+ /// Excel导入
+ ///
+ ///
+ ///
+ Task ImportExcel(EmoticonData EmoticonData,int index,bool isUpdateSupport,string user);
+
+ ///
+ /// Excel导出
+ ///
+ Task> HandleExportData(List data);
+
+
+ }
+}
diff --git a/ARW.Service/Business/IBusinessService/EmotionManage/EmotionCategorys/IEmotionCategoryService.cs b/ARW.Service/Business/IBusinessService/EmotionManage/EmotionCategorys/IEmotionCategoryService.cs
index 4b38b40..881583f 100644
--- a/ARW.Service/Business/IBusinessService/EmotionManage/EmotionCategorys/IEmotionCategoryService.cs
+++ b/ARW.Service/Business/IBusinessService/EmotionManage/EmotionCategorys/IEmotionCategoryService.cs
@@ -32,8 +32,8 @@ namespace ARW.Service.Business.IBusinessService.EmotionManage.EmotionCategorys
///
Task> GetEmotionCategoryList(EmotionCategoryQueryDto parm);
-
- ///
+
+ ///
/// 添加或修改表情包分类
///
///
@@ -54,7 +54,7 @@ namespace ARW.Service.Business.IBusinessService.EmotionManage.EmotionCategorys
///
///
///
- Task ImportExcel(EmotionCategory EmotionCategory,int index,bool isUpdateSupport,string user);
+ Task ImportExcel(EmotionCategory EmotionCategory, int index, bool isUpdateSupport, string user);
///
/// Excel导出
diff --git a/ARW.WebApi/Controllers/Business/EmotionManage/EmoticonDatas/EmoticonDataController.cs b/ARW.WebApi/Controllers/Business/EmotionManage/EmoticonDatas/EmoticonDataController.cs
new file mode 100644
index 0000000..5d543ab
--- /dev/null
+++ b/ARW.WebApi/Controllers/Business/EmotionManage/EmoticonDatas/EmoticonDataController.cs
@@ -0,0 +1,213 @@
+using Infrastructure;
+using Infrastructure.Attribute;
+using Infrastructure.Enums;
+using Infrastructure.Model;
+using Mapster;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using ARW.Admin.WebApi.Extensions;
+using ARW.Admin.WebApi.Filters;
+using ARW.Common;
+using ARW.Model.Dto.Business.EmotionManage.EmoticonDatas;
+using ARW.Service.Business.IBusinessService.EmotionManage.EmoticonDatas;
+using ARW.Admin.WebApi.Controllers;
+using ARW.Model.Models.Business.EmotionManage.EmoticonDatas;
+using ARW.Model.Vo.Business.EmotionManage.EmoticonDatas;
+using Microsoft.AspNetCore.Authorization;
+using ARW.Admin.WebApi.Framework;
+
+
+namespace ARW.WebApi.Controllers.Business.EmotionManage.EmoticonDatas
+{
+ ///
+ /// 表情包控制器
+ ///
+ /// @author lwh
+ /// @date 2023-10-28
+ ///
+ [Verify]
+ [Route("business/[controller]")]
+ public class EmoticonDataController : BaseController
+ {
+ private readonly IEmoticonDataService _EmoticonDataService;
+
+ ///
+ /// 依赖注入
+ ///
+ /// 表情包服务
+ public EmoticonDataController(IEmoticonDataService EmoticonDataService)
+ {
+ _EmoticonDataService = EmoticonDataService;
+ }
+
+
+ ///
+ /// 获取表情包列表
+ ///
+ /// 查询参数
+ ///
+ [HttpGet("getEmoticonDataList")]
+ [ActionPermissionFilter(Permission = "business:emoticondata:list")]
+ public async Task GetEmoticonDataList([FromQuery] EmoticonDataQueryDto parm)
+ {
+ var res = await _EmoticonDataService.GetEmoticonDataList(parm);
+ return SUCCESS(res);
+ }
+
+ ///
+ /// 添加或修改表情包
+ ///
+ ///
+ ///
+ [HttpPost("addOrUpdateEmoticonData")]
+ [ActionPermissionFilter(Permission = "business:emoticondata:addOrUpdate")]
+ [Log(Title = "添加或修改表情包", BusinessType = BusinessType.ADDORUPDATE)]
+ public async Task AddOrUpdateEmoticonData([FromBody] EmoticonDataDto parm)
+ {
+ if (parm == null) { throw new CustomException("请求参数错误"); }
+
+ var modal = new EmoticonData();
+ if (parm.EmoticonDataId != 0) modal = parm.Adapt().ToUpdate(HttpContext);
+ else modal = parm.Adapt().ToCreate(HttpContext);
+
+ var res = await _EmoticonDataService.AddOrUpdateEmoticonData(modal);
+ return SUCCESS(res);
+ }
+
+
+ ///
+ /// 批量添加添加表情包
+ ///
+ ///
+ ///
+ [HttpPost("batchAddEmoticonData")]
+ [ActionPermissionFilter(Permission = "business:emoticondata:import")]
+ [Log(Title = "批量添加添加表情包", BusinessType = BusinessType.ADDORUPDATE)]
+ public async Task BatchAddEmoticonData([FromBody] EmoticonDataDto parm)
+ {
+ if (parm == null) { throw new CustomException("请求参数错误"); }
+
+ var user = JwtUtil.GetLoginUser(HttpContext);
+ var imgList = parm.EmoticonDataImg.Split(",");
+ foreach (var item in imgList)
+ {
+ var data = new EmoticonData
+ {
+ EmoticonCategoryGuid = parm.EmoticonCategoryGuid,
+ EmoticonDataImg = item,
+ EmoticonDataSort = 100,
+ Create_by = user.UserName,
+ Create_time = DateTime.Now,
+ };
+ await _EmoticonDataService.AddOrUpdateEmoticonData(data);
+ }
+
+ return SUCCESS("批量添加成功");
+ }
+
+
+
+ ///
+ /// 删除表情包
+ ///
+ ///
+ [HttpDelete("{ids}")]
+ [ActionPermissionFilter(Permission = "business:emoticondata:delete")]
+ [Log(Title = "表情包删除", BusinessType = BusinessType.DELETE)]
+ public IActionResult Delete(string ids)
+ {
+ long[] idsArr = Tools.SpitLongArrary(ids);
+ if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
+ var response = _EmoticonDataService.Delete(idsArr);
+ return SUCCESS("删除成功!");
+ }
+
+ ///
+ /// 导入表情包
+ ///
+ /// 使用IFromFile必须使用name属性否则获取不到文件
+ /// 是否需要更新
+ ///
+ [HttpPost("importData")]
+ [Log(Title = "表情包导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = false)]
+ [ActionPermissionFilter(Permission = "business:emoticondata:import")]
+ public async Task ImportExcel([FromForm(Name = "file")] IFormFile formFile, bool updateSupport)
+ {
+ var isUpdateSupport = updateSupport;
+ IEnumerable parm = ExcelHelper.ImportData(formFile.OpenReadStream());
+
+ var i = 0;
+ var msgList = new List();
+ foreach (EmoticonDataVo item in parm)
+ {
+ i++;
+ var EmoticonData = await _EmoticonDataService.HandleImportData(item);
+ var modal = EmoticonData.Adapt().ToCreate(HttpContext);
+ var user = JwtUtil.GetLoginUser(App.HttpContext).UserName;
+ var msg = await _EmoticonDataService.ImportExcel(modal, i, isUpdateSupport, user);
+ msgList.Add(msg);
+ }
+
+ return SUCCESS(msgList.ToArray());
+ }
+
+
+ ///
+ /// 表情包导入模板下载
+ ///
+ ///
+ [HttpGet("importTemplate")]
+ [Log(Title = "表情包模板", BusinessType = BusinessType.EXPORT, IsSaveRequestData = false, IsSaveResponseData = false)]
+ [AllowAnonymous]
+ public IActionResult ImportTemplateExcel()
+ {
+ List EmoticonData = new List();
+ MemoryStream stream = new MemoryStream();
+
+ // 示例数据
+ var values = new List() { "111", "222", "333" };
+ string sFileName = DownloadImportTemplate(EmoticonData, stream, "表情包导入模板", values);
+
+ return File(stream.ToArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", $"{sFileName}");
+ }
+
+ ///
+ /// 导出表情包
+ ///
+ ///
+ [Log(Title = "表情包导出", BusinessType = BusinessType.EXPORT, IsSaveResponseData = false)]
+ [HttpGet("exportEmoticonData")]
+ [ActionPermissionFilter(Permission = "business:emoticondata:export")]
+ public async Task ExportExcel([FromQuery] EmoticonDataQueryDto parm)
+ {
+ parm.PageSize = 10000;
+ var list = await _EmoticonDataService.GetEmoticonDataList(parm);
+ var data = list.Result;
+
+ // 选中数据
+ if (!string.IsNullOrEmpty(parm.ids))
+ {
+ int[] idsArr = Tools.SpitIntArrary(parm.ids);
+ var selectDataList = new List();
+ foreach (var item in idsArr)
+ {
+ var select_data = data.Where(s => s.EmoticonDataId == item).First();
+ selectDataList.Add(select_data);
+ }
+ data = selectDataList;
+ }
+
+
+
+ // 导出数据处理
+ var handleData = await _EmoticonDataService.HandleExportData(data);
+
+ string sFileName = ExportExcel(handleData, "EmoticonData", "表情包列表");
+ return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName });
+ }
+
+
+
+
+ }
+}
diff --git a/ARW.WebApi/Controllers/Business/EmotionManage/EmotionCategorys/EmotionCategoryController.cs b/ARW.WebApi/Controllers/Business/EmotionManage/EmotionCategorys/EmotionCategoryController.cs
index f2bd063..62498bf 100644
--- a/ARW.WebApi/Controllers/Business/EmotionManage/EmotionCategorys/EmotionCategoryController.cs
+++ b/ARW.WebApi/Controllers/Business/EmotionManage/EmotionCategorys/EmotionCategoryController.cs
@@ -48,7 +48,7 @@ namespace ARW.WebApi.Controllers.Business.EmotionManage.EmotionCategorys
///
[HttpGet("getEmotionCategoryTreeList")]
[ActionPermissionFilter(Permission = "business:emotioncategory:treelist")]
- public async Task GetEmotionCategoryList([FromQuery] EmotionCategoryQueryDto parm)
+ public async Task GetEmotionCategoryTreeList([FromQuery] EmotionCategoryQueryDto parm)
{
var res = await _EmotionCategoryService.GetEmotionCategoryTreeList(parm);
res ??= new List();
@@ -56,6 +56,22 @@ namespace ARW.WebApi.Controllers.Business.EmotionManage.EmotionCategorys
return SUCCESS(res);
}
+
+ ///
+ /// 获取表情包分类列表
+ ///
+ /// 查询参数
+ ///
+ [HttpGet("getEmotionCategoryList")]
+ public async Task GetEmotionCategoryList([FromQuery] EmotionCategoryQueryDto parm)
+ {
+ var res = await _EmotionCategoryService.GetEmotionCategoryList(parm);
+ res ??= new List();
+
+ return SUCCESS(res);
+ }
+
+
///
/// 添加或修改表情包分类
///
diff --git a/ARW.WebApi/wwwroot/avatar/20231028/9AA6793AFCECE61E.jpg b/ARW.WebApi/wwwroot/avatar/20231028/9AA6793AFCECE61E.jpg
new file mode 100644
index 0000000..43ba154
Binary files /dev/null and b/ARW.WebApi/wwwroot/avatar/20231028/9AA6793AFCECE61E.jpg differ
diff --git a/ARW.WebApi/wwwroot/avatar/20231028/EF56FFD21D22A759.jpg b/ARW.WebApi/wwwroot/avatar/20231028/EF56FFD21D22A759.jpg
new file mode 100644
index 0000000..7452ca5
Binary files /dev/null and b/ARW.WebApi/wwwroot/avatar/20231028/EF56FFD21D22A759.jpg differ