BroadcastItemVO.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.welampiot.vo;
  2. import com.welampiot.dto.BroadcastItemDTO;
  3. import lombok.Data;
  4. import org.jetbrains.annotations.Contract;
  5. import org.jetbrains.annotations.NotNull;
  6. import java.io.Serializable;
  7. import java.util.List;
  8. /**
  9. * ClassName: BroadcastItemVO
  10. * Package: com.welampiot.vo
  11. * Description:
  12. *
  13. * @Author: zhj_Start
  14. * @Create: 2023/4/17 - 15:50
  15. * @Version: v1.0
  16. */
  17. @Data
  18. public class BroadcastItemVO implements Serializable {
  19. private Integer page;
  20. private Integer count;
  21. private String keyword;
  22. private Integer version;
  23. private String username;
  24. private Integer userId;
  25. private Integer total;
  26. private List<BroadcastItemDTO> list;
  27. private static final long serialVersionUID = 1L;
  28. private String name;
  29. private String beginDate;
  30. private List<BroadcastItemDTO> proTimeList;
  31. @NotNull
  32. @Contract("_ -> param1")
  33. public static BroadcastItemVO getBroadcastItemVO(@NotNull BroadcastItemVO vo) {
  34. if (vo.getVersion() == null) {
  35. vo.setVersion(0);
  36. }
  37. if (vo.getUsername() == null) {
  38. vo.setUsername("");
  39. }
  40. if (vo.getPage() == null) {
  41. vo.setPage(1);
  42. }
  43. if (vo.getCount() == null) {
  44. vo.setCount(16);
  45. }
  46. if (vo.getKeyword() == null) {
  47. vo.setKeyword("");
  48. }
  49. return vo;
  50. }
  51. }