|
@@ -0,0 +1,39 @@
|
|
|
+package com.winhc.phoenix.example.vo.legislation;
|
|
|
+
|
|
|
+import cn.hutool.crypto.SecureUtil;
|
|
|
+import lombok.Getter;
|
|
|
+import lombok.ToString;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author: XuJiakai
|
|
|
+ * 2022/10/10 09:42
|
|
|
+ */
|
|
|
+@Getter
|
|
|
+@ToString
|
|
|
+public class LegislationSearchVo {
|
|
|
+
|
|
|
+ private int from = 0;
|
|
|
+ private int size = 10;
|
|
|
+
|
|
|
+
|
|
|
+ private Map<String, LegislationSearchType> content;
|
|
|
+
|
|
|
+ public static LegislationSearchVo of(String content, int from, int size) {
|
|
|
+ LegislationSearchVo legislationSearchVo = new LegislationSearchVo();
|
|
|
+ legislationSearchVo.from = from;
|
|
|
+ legislationSearchVo.size = size;
|
|
|
+ Map<String, LegislationSearchType> map = new HashMap<>(1);
|
|
|
+ map.put(content, LegislationSearchType.ALL);
|
|
|
+ legislationSearchVo.content = map;
|
|
|
+ return legislationSearchVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPreference() {
|
|
|
+ return SecureUtil.md5(String.join("", content.keySet()));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|