GetCheckinDataReq.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.usoftchina.qywx.sdk.dto;
  2. import java.util.HashMap;
  3. import java.util.List;
  4. import java.util.Map;
  5. /**
  6. * @author yingp
  7. */
  8. public class GetCheckinDataReq {
  9. private final CheckinType type;
  10. private final long startTime;
  11. private final long endTime;
  12. private final List<String> userList;
  13. public GetCheckinDataReq(CheckinType type, long startTime, long endTime, List<String> userList) {
  14. this.type = type;
  15. this.startTime = startTime;
  16. this.endTime = endTime;
  17. this.userList = userList;
  18. }
  19. public Map<String, Object> build() {
  20. Map<String, Object> data = new HashMap<>(4);
  21. data.put("opencheckindatatype", type.code);
  22. data.put("starttime", startTime);
  23. data.put("endtime", endTime);
  24. data.put("useridlist", userList);
  25. return data;
  26. }
  27. /**
  28. * 打卡类型
  29. */
  30. public enum CheckinType {
  31. /**
  32. * 上下班
  33. */
  34. COMMUTE(1),
  35. /**
  36. * 外出
  37. */
  38. OUT(2),
  39. /**
  40. * 全部
  41. */
  42. ALL(3);
  43. private final int code;
  44. CheckinType(int code) {
  45. this.code = code;
  46. }
  47. }
  48. }