DeviceAlgorithmChargingDto.java 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. package com.xy.dto;
  2. import com.fasterxml.jackson.annotation.JsonFormat;
  3. import com.xy.utils.PageBean;
  4. import io.swagger.annotations.ApiModelProperty;
  5. import lombok.Data;
  6. import lombok.experimental.Accessors;
  7. import javax.validation.constraints.NotBlank;
  8. import javax.validation.constraints.NotEmpty;
  9. import javax.validation.constraints.NotNull;
  10. import java.time.LocalDateTime;
  11. import java.util.List;
  12. /**
  13. * <p>
  14. * 设备算法计费表
  15. * </p>
  16. *
  17. * @author lijin
  18. * @since 2023-06-29
  19. */
  20. public class DeviceAlgorithmChargingDto {
  21. @Data
  22. @Accessors(chain = true)
  23. public static class Page extends Vo {
  24. @ApiModelProperty("分页对象")
  25. private PageBean page;
  26. }
  27. @Data
  28. @Accessors(chain = true)
  29. public static class Check {
  30. @NotEmpty(message = "设备id不能为空")
  31. @ApiModelProperty(value = "设备id")
  32. private Long deviceId;
  33. }
  34. @Data
  35. @Accessors(chain = true)
  36. public static class Pay {
  37. @NotBlank(message = "orderId不能为空")
  38. @ApiModelProperty("订单号")
  39. private String orderId;
  40. @NotNull(message = "payType不能为空")
  41. @ApiModelProperty(value = "支付类型 2=支付宝 3=微信 100=赠送")
  42. private Integer payType;
  43. @NotNull(message = "mercId不能为空")
  44. @ApiModelProperty(value = "商户id")
  45. private Long mercId;
  46. @NotEmpty(message = "deviceAlgorithmChargings不能为空")
  47. @ApiModelProperty("计费信息")
  48. private List<DeviceAlgorithmCharging> deviceAlgorithmChargings;
  49. @ApiModelProperty(value = "备注")
  50. private String note;
  51. @Data
  52. @Accessors(chain = true)
  53. public static class DeviceAlgorithmCharging {
  54. @ApiModelProperty("设备id")
  55. private Long deviceId;
  56. @ApiModelProperty("算法id")
  57. private Long algorithmId;
  58. @ApiModelProperty("名称")
  59. private String name;
  60. @ApiModelProperty("类型")
  61. private Integer type;
  62. @ApiModelProperty("充值数量")
  63. private Integer chargingSize;
  64. @ApiModelProperty("充值金额")
  65. private Integer money;
  66. }
  67. }
  68. @Data
  69. @Accessors(chain = true)
  70. public static class PayNotice {
  71. @NotBlank(message = "orderId不能为空")
  72. private String orderId;
  73. @ApiModelProperty("赠送过期时间")
  74. private Integer timeout;
  75. }
  76. @Data
  77. @Accessors(chain = true)
  78. public static class Charging {
  79. @ApiModelProperty(value = "商户设备算法计费id")
  80. private Long mercDeviceAlgorithmChargingId;
  81. @ApiModelProperty(value = "设备id")
  82. private Long deviceId;
  83. @ApiModelProperty(value = "算法id")
  84. private Long algorithmId;
  85. @ApiModelProperty(value = "商户id")
  86. private Long mercId;
  87. @ApiModelProperty(value = "扣除条数")
  88. private Integer size;
  89. @ApiModelProperty(value = "计费日期")
  90. private Integer algorithmDate;
  91. }
  92. @Data
  93. @Accessors(chain = true)
  94. public static class Vo {
  95. @ApiModelProperty(value = "id")
  96. private Long id;
  97. @ApiModelProperty(value = "商户编码")
  98. private String mercCode;
  99. @ApiModelProperty(value = "设备id")
  100. private Long deviceId;
  101. @ApiModelProperty(value = "算法id")
  102. private Long algorithmId;
  103. @ApiModelProperty(value = "名称")
  104. private String name;
  105. @ApiModelProperty(value = "已用条数")
  106. private Integer makeSize;
  107. @ApiModelProperty(value = "未用条数")
  108. private Integer unusedSize;
  109. @ApiModelProperty(value = "类型")
  110. private Integer type;
  111. @ApiModelProperty(value = "过期时间;yyyyMMdd")
  112. private Integer timeout;
  113. @ApiModelProperty(value = "生效时间;yyyyMMdd")
  114. private Integer beginTime;
  115. @ApiModelProperty(value = "创建时间")
  116. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  117. private LocalDateTime createTime;
  118. @ApiModelProperty(value = "更新时间")
  119. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  120. private LocalDateTime updateTime;
  121. }
  122. @Data
  123. @Accessors(chain = true)
  124. public static class AlgorithmMoonConfig {
  125. private Integer price;
  126. private Moon moon;
  127. private Inf inf;
  128. @Data
  129. @Accessors(chain = true)
  130. public static class Moon {
  131. private Long id;
  132. private Integer money;
  133. private Integer size;
  134. }
  135. @Data
  136. @Accessors(chain = true)
  137. public static class Inf {
  138. private Long id;
  139. private Integer money;
  140. private Integer size;
  141. }
  142. }
  143. }