Result.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace OASystem.Domain
  7. {
  8. public class Result
  9. {
  10. public int Code { get; set; } = -1;
  11. public string Msg { get; set; } = "未知错误";
  12. public dynamic? Data { get; set; } = new { };
  13. }
  14. /// <summary>
  15. /// 消息 Tips
  16. /// </summary>
  17. public static class MsgTips
  18. {
  19. /// <summary>
  20. /// 成功 消息提示
  21. /// </summary>
  22. public static string Succeed = "操作成功!";
  23. /// <summary>
  24. /// 失败 消息提示
  25. /// </summary>
  26. public static string Fail = "操作失败!";
  27. /// <summary>
  28. /// 添加成功
  29. /// </summary>
  30. public static string AddSucceed = "添加成功!";
  31. /// <summary>
  32. /// 添加成功
  33. /// </summary>
  34. public static string AddFail = "添加失败!";
  35. /// <summary>
  36. /// 修改成功
  37. /// </summary>
  38. public static string EditSucceed = "修改成功!";
  39. /// <summary>
  40. /// 修改成功
  41. /// </summary>
  42. public static string EditFail = "修改失败!";
  43. /// <summary>
  44. /// 端口错误消息提示
  45. /// </summary>
  46. public static string Port = "请检查端口值是否正确!“portType”:1:WEB;2:ANDROID;3:IOS;";
  47. /// <summary>
  48. /// PageIndex 错误消息提示
  49. /// </summary>
  50. public static string PageIndex = "请检查当前页面(pageIndex)是否正确!";
  51. /// <summary>
  52. /// PageSize 错误消息提示
  53. /// </summary>
  54. public static string PageSize = "请检查每页长度(pageSize)是否正确!";
  55. /// <summary>
  56. /// 团组Id错误消息提示
  57. /// </summary>
  58. public static string DiId = "请检查团组Id(diid)是否正确!";
  59. /// <summary>
  60. /// 数据Id错误消息提示
  61. /// </summary>
  62. public static string Id = "请检查数据Id(id)是否正确!";
  63. /// <summary>
  64. /// 数据Id错误消息提示
  65. /// </summary>
  66. public static string Status = "请检查状态Id(Status)是否正确!1 添加 2 修改";
  67. /// <summary>
  68. /// UserId错误消息提示
  69. /// </summary>
  70. public static string UserId = "请检查UserId是否正确!";
  71. /// <summary>
  72. /// OperateId错误消息提示
  73. /// </summary>
  74. public static string OperateId = "请传入有效的操作类型Id";
  75. /// <summary>
  76. /// PageId错误消息提示
  77. /// </summary>
  78. public static string PageId = "请检查PageId是否正确!";
  79. /// <summary>
  80. /// CheckAuth 错误消息提示
  81. /// </summary>
  82. public static string CheckAuth = "您没有查看权限!";
  83. }
  84. }