ModelVoAdapt.cs 467 B

123456789101112131415161718
  1. using Mapster;
  2. using Model;
  3. using Vo.Admin;
  4. namespace Util
  5. {
  6. public class ModelVoAdapt
  7. {
  8. public static void Map()
  9. {
  10. TypeAdapterConfig<AppModule, GetAppModuleListVo>.NewConfig()
  11. .Map(dest => dest.systemSupport, src => string.IsNullOrEmpty(src.systemSupport)
  12. ? Array.Empty<string>()
  13. : src.systemSupport.Split(',', StringSplitOptions.RemoveEmptyEntries));
  14. }
  15. }
  16. }