App.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. package com.ruoyi.demo.entity;
  2. import com.alibaba.excel.annotation.ExcelIgnore;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import com.alibaba.excel.annotation.format.DateTimeFormat;
  5. import com.alibaba.excel.converters.date.DateStringConverter;
  6. import com.baomidou.mybatisplus.annotation.TableField;
  7. import com.baomidou.mybatisplus.annotation.TableId;
  8. import com.baomidou.mybatisplus.annotation.TableName;
  9. import com.ruoyi.common.annotation.ExcelDictFormat;
  10. import com.ruoyi.common.convert.ExcelDictConvert;
  11. import com.ruoyi.demo.entity.vo.AppVo;
  12. import lombok.Data;
  13. import lombok.NoArgsConstructor;
  14. import java.time.LocalDateTime;
  15. import java.util.Date;
  16. @Data
  17. @TableName("dl_app")
  18. @NoArgsConstructor
  19. public class App {
  20. @ExcelProperty(value = "应用ID")
  21. @TableId("appkey")
  22. private String appkey;
  23. @ExcelIgnore
  24. @TableField("app_logo")
  25. private String appLogo;
  26. @ExcelProperty(value = "小程序名称")
  27. @TableField("app_name")
  28. private String appName;
  29. @ExcelIgnore
  30. @TableField("app_introduce")
  31. private String appIntroduce;
  32. @ExcelIgnore
  33. @TableField("commercial_id")
  34. private String commercialId;
  35. @ExcelProperty(value = "所属商户")
  36. @TableField("commercial_name")
  37. private String commercialName;
  38. @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
  39. @ExcelDictFormat(readConverterExp = "0=已禁用,1=已启用")
  40. @TableField("state")
  41. private Integer state;
  42. @ExcelIgnore
  43. @TableField("call_back")
  44. private String callBack;
  45. @ExcelIgnore
  46. @TableField("appSecret")
  47. private String appSecret;
  48. @ExcelIgnore
  49. @TableField("prove_1")
  50. private String prove1;
  51. @ExcelIgnore
  52. @TableField("prove_2")
  53. private String prove2;
  54. @ExcelIgnore
  55. @TableField("prove_3")
  56. private String prove3;
  57. @ExcelIgnore
  58. @TableField("prove_4")
  59. private String prove4;
  60. @ExcelIgnore
  61. @TableField("prove_5")
  62. private String prove5;
  63. @ExcelProperty(value = "创建时间",converter = DateStringConverter.class)
  64. @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
  65. @TableField("create_time")
  66. private Date createTime;
  67. @ExcelIgnore
  68. @TableField("annotation")
  69. private String annotation;
  70. @ExcelIgnore
  71. @TableField("deleted")
  72. private Integer deleted;
  73. public App(AppVo appVo) {
  74. this.appLogo = appVo.getAppLogo();
  75. this.appName = appVo.getAppName();
  76. this.appIntroduce = appVo.getAppIntroduce();
  77. this.commercialId = appVo.getCommercialId();
  78. this.commercialName = appVo.getCommercialName();
  79. this.state = appVo.getState();
  80. this.callBack = appVo.getCallBack();
  81. this.prove1 = appVo.getProve1();
  82. this.prove2 = appVo.getProve2();
  83. this.prove3 = appVo.getProve3();
  84. this.prove4 = appVo.getProve4();
  85. this.prove5 = appVo.getProve5();
  86. this.annotation = appVo.getAnnotation();
  87. }
  88. }