瀏覽代碼

增加公众号详情信息

xueyiming 9 月之前
父節點
當前提交
0341cbcbbb

+ 30 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/mapper/crawler/GhDetailMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.longarticle.recommend.server.mapper.crawler;
+
+import com.tzld.longarticle.recommend.server.repository.model.GhDetail;
+import com.tzld.longarticle.recommend.server.repository.model.GhDetailExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface GhDetailMapper {
+    long countByExample(GhDetailExample example);
+
+    int deleteByExample(GhDetailExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(GhDetail row);
+
+    int insertSelective(GhDetail row);
+
+    List<GhDetail> selectByExample(GhDetailExample example);
+
+    GhDetail selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("row") GhDetail row, @Param("example") GhDetailExample example);
+
+    int updateByExample(@Param("row") GhDetail row, @Param("example") GhDetailExample example);
+
+    int updateByPrimaryKeySelective(GhDetail row);
+
+    int updateByPrimaryKey(GhDetail row);
+}

+ 11 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/param/GhDetailParam.java

@@ -0,0 +1,11 @@
+package com.tzld.longarticle.recommend.server.model.param;
+
+import lombok.Data;
+
+@Data
+public class GhDetailParam {
+
+    private int pageNum;
+
+    private int pageSize;
+}

+ 95 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/repository/model/GhDetail.java

@@ -0,0 +1,95 @@
+package com.tzld.longarticle.recommend.server.repository.model;
+
+import java.util.Date;
+
+public class GhDetail {
+    private Long id;
+
+    private String ghId;
+
+    private String ghName;
+
+    private Integer type;
+
+    private String category1;
+
+    private String category2;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getGhId() {
+        return ghId;
+    }
+
+    public void setGhId(String ghId) {
+        this.ghId = ghId == null ? null : ghId.trim();
+    }
+
+    public String getGhName() {
+        return ghName;
+    }
+
+    public void setGhName(String ghName) {
+        this.ghName = ghName == null ? null : ghName.trim();
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getCategory1() {
+        return category1;
+    }
+
+    public void setCategory1(String category1) {
+        this.category1 = category1 == null ? null : category1.trim();
+    }
+
+    public String getCategory2() {
+        return category2;
+    }
+
+    public void setCategory2(String category2) {
+        this.category2 = category2 == null ? null : category2.trim();
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 791 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/repository/model/GhDetailExample.java

@@ -0,0 +1,791 @@
+package com.tzld.longarticle.recommend.server.repository.model;
+
+import com.tzld.longarticle.recommend.server.util.page.Page;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class GhDetailExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+    protected Page page;
+
+    public GhDetailExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNull() {
+            addCriterion("gh_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNotNull() {
+            addCriterion("gh_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdEqualTo(String value) {
+            addCriterion("gh_id =", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotEqualTo(String value) {
+            addCriterion("gh_id <>", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThan(String value) {
+            addCriterion("gh_id >", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_id >=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThan(String value) {
+            addCriterion("gh_id <", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThanOrEqualTo(String value) {
+            addCriterion("gh_id <=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLike(String value) {
+            addCriterion("gh_id like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotLike(String value) {
+            addCriterion("gh_id not like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIn(List<String> values) {
+            addCriterion("gh_id in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotIn(List<String> values) {
+            addCriterion("gh_id not in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdBetween(String value1, String value2) {
+            addCriterion("gh_id between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotBetween(String value1, String value2) {
+            addCriterion("gh_id not between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameIsNull() {
+            addCriterion("gh_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameIsNotNull() {
+            addCriterion("gh_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameEqualTo(String value) {
+            addCriterion("gh_name =", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotEqualTo(String value) {
+            addCriterion("gh_name <>", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameGreaterThan(String value) {
+            addCriterion("gh_name >", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_name >=", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameLessThan(String value) {
+            addCriterion("gh_name <", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameLessThanOrEqualTo(String value) {
+            addCriterion("gh_name <=", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameLike(String value) {
+            addCriterion("gh_name like", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotLike(String value) {
+            addCriterion("gh_name not like", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameIn(List<String> values) {
+            addCriterion("gh_name in", values, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotIn(List<String> values) {
+            addCriterion("gh_name not in", values, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameBetween(String value1, String value2) {
+            addCriterion("gh_name between", value1, value2, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotBetween(String value1, String value2) {
+            addCriterion("gh_name not between", value1, value2, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Integer value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1IsNull() {
+            addCriterion("category1 is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1IsNotNull() {
+            addCriterion("category1 is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1EqualTo(String value) {
+            addCriterion("category1 =", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotEqualTo(String value) {
+            addCriterion("category1 <>", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1GreaterThan(String value) {
+            addCriterion("category1 >", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1GreaterThanOrEqualTo(String value) {
+            addCriterion("category1 >=", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1LessThan(String value) {
+            addCriterion("category1 <", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1LessThanOrEqualTo(String value) {
+            addCriterion("category1 <=", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1Like(String value) {
+            addCriterion("category1 like", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotLike(String value) {
+            addCriterion("category1 not like", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1In(List<String> values) {
+            addCriterion("category1 in", values, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotIn(List<String> values) {
+            addCriterion("category1 not in", values, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1Between(String value1, String value2) {
+            addCriterion("category1 between", value1, value2, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotBetween(String value1, String value2) {
+            addCriterion("category1 not between", value1, value2, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2IsNull() {
+            addCriterion("category2 is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2IsNotNull() {
+            addCriterion("category2 is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2EqualTo(String value) {
+            addCriterion("category2 =", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotEqualTo(String value) {
+            addCriterion("category2 <>", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2GreaterThan(String value) {
+            addCriterion("category2 >", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2GreaterThanOrEqualTo(String value) {
+            addCriterion("category2 >=", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2LessThan(String value) {
+            addCriterion("category2 <", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2LessThanOrEqualTo(String value) {
+            addCriterion("category2 <=", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2Like(String value) {
+            addCriterion("category2 like", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotLike(String value) {
+            addCriterion("category2 not like", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2In(List<String> values) {
+            addCriterion("category2 in", values, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotIn(List<String> values) {
+            addCriterion("category2 not in", values, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2Between(String value1, String value2) {
+            addCriterion("category2 between", value1, value2, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotBetween(String value1, String value2) {
+            addCriterion("category2 not between", value1, value2, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 17 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/exterior/GhDetailService.java

@@ -0,0 +1,17 @@
+package com.tzld.longarticle.recommend.server.service.exterior;
+
+import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
+import com.tzld.longarticle.recommend.server.model.param.GhDetailParam;
+import com.tzld.longarticle.recommend.server.repository.model.GhDetail;
+import com.tzld.longarticle.recommend.server.util.page.Page;
+
+public interface GhDetailService {
+
+    CommonResponse<Page<GhDetail>> getGhDetailList(GhDetailParam param);
+
+    CommonResponse<Void> addGhDetail(GhDetail ghDetail);
+
+    CommonResponse<Void> updateDetail(GhDetail ghDetail);
+
+    CommonResponse<Void> refreshGhDetail();
+}

+ 81 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/exterior/impl/GhDetailServiceImpl.java

@@ -0,0 +1,81 @@
+package com.tzld.longarticle.recommend.server.service.exterior.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
+import com.tzld.longarticle.recommend.server.mapper.crawler.GhDetailMapper;
+import com.tzld.longarticle.recommend.server.model.param.GhDetailParam;
+import com.tzld.longarticle.recommend.server.repository.model.GhDetail;
+import com.tzld.longarticle.recommend.server.repository.model.GhDetailExample;
+import com.tzld.longarticle.recommend.server.service.exterior.GhDetailService;
+import com.tzld.longarticle.recommend.server.util.page.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.reactive.function.client.WebClient;
+import reactor.core.publisher.Mono;
+
+import java.util.List;
+
+@Service
+public class GhDetailServiceImpl implements GhDetailService {
+
+    @Autowired
+    private GhDetailMapper ghDetailMapper;
+
+    @Override
+    public CommonResponse<Page<GhDetail>> getGhDetailList(GhDetailParam param) {
+        Page<GhDetail> page = new Page<>();
+        page.setCurrentPage(param.getPageNum());
+        page.setPageSize(param.getPageSize());
+        GhDetailExample example = new GhDetailExample();
+        example.setPage(page);
+        long total = ghDetailMapper.countByExample(example);
+        int totalSize = (int) (total % param.getPageSize() == 0 ? (total / param.getPageSize()) : (total / param.getPageSize() + 1));
+        page.setTotalSize(totalSize);
+        List<GhDetail> ghDetails = ghDetailMapper.selectByExample(example);
+        page.setObjs(ghDetails);
+        return CommonResponse.success(page);
+    }
+
+    @Override
+    public CommonResponse<Void> addGhDetail(GhDetail ghDetail) {
+        ghDetailMapper.insert(ghDetail);
+        return CommonResponse.success();
+    }
+
+    @Override
+    public CommonResponse<Void> updateDetail(GhDetail ghDetail) {
+        ghDetailMapper.updateByPrimaryKeySelective(ghDetail);
+        return CommonResponse.success();
+    }
+
+    @Override
+    public CommonResponse<Void> refreshGhDetail() {
+        GhDetailExample example = new GhDetailExample();
+        example.createCriteria().andTypeEqualTo(1);
+        List<GhDetail> ghDetails = ghDetailMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(ghDetails)) {
+            return CommonResponse.success();
+        }
+        for (GhDetail ghDetail : ghDetails) {
+            getGhDetail(ghDetail);
+            ghDetailMapper.updateByPrimaryKeySelective(ghDetail);
+        }
+        return CommonResponse.success();
+    }
+
+    public void getGhDetail(GhDetail ghDetail) {
+        String baseUrl = String.format("http://aigc-api.cybertogether.net/aigc/publish/account/algorithm/wechat/list?gh_id=%s", ghDetail.getId());
+        WebClient webClient = WebClient.builder()
+                .baseUrl(baseUrl)
+                .build();
+        Mono<String> mono = webClient.get().retrieve().bodyToMono(String.class);
+        String block = mono.block();
+        JSONArray jsonArray = JSONArray.parseArray(block);
+        if (jsonArray != null && !jsonArray.isEmpty()) {
+            JSONObject jsonObject = jsonArray.getJSONObject(0);
+            ghDetail.setGhName(jsonObject.getString("name"));
+        }
+    }
+}

+ 108 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/util/page/Page.java

@@ -0,0 +1,108 @@
+package com.tzld.longarticle.recommend.server.util.page;
+
+import java.util.List;
+
+public class Page<T> {
+
+    public static final String DEFAULT_PAGE_SIZE = "20";
+    public static final String DEFAULT_CURRENT_PAGE = "1";
+
+    private int currentPage = Integer.valueOf(DEFAULT_CURRENT_PAGE);
+    private int totalSize;
+    private int pageSize = Integer.valueOf(DEFAULT_PAGE_SIZE);
+
+    private List<T> objs;
+
+    private T obj;
+
+    public Page() {
+    }
+
+    public Page(int currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public Page(int currentPage, int pageSize) {
+        setCurrentPage(currentPage);
+        setPageSize(pageSize);
+    }
+
+    public int getNextPage() {
+        return currentPage == getTotalPage() ? currentPage : currentPage + 1;
+    }
+
+    public int getPrePage() {
+        return currentPage > 1 ? currentPage - 1 : 1;
+    }
+
+    public int getOffset() {
+        return getCurPageFirstRecNum() - 1;
+    }
+
+    public int getCurPageFirstRecNum() {
+        return (getCurrentPage() - 1) * pageSize + 1;
+    }
+
+    public int getCurPageLastRecNum() {
+        return getCurrentPage() * pageSize;
+    }
+
+    public int getTotalPage() {
+        int t = totalSize % pageSize > 0 ? totalSize / pageSize + 1 : totalSize / pageSize;
+        if (t <= 0) {
+            t = 1;
+        }
+        return t;
+    }
+
+    public void setObjs(List<T> objs) {
+        this.objs = objs;
+    }
+
+    public List<T> getObjs() {
+        return objs;
+    }
+
+    public int getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(int currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public int getTotalSize() {
+        return totalSize;
+    }
+
+    public void setTotalSize(int totalSize) {
+        this.totalSize = totalSize;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        if (pageSize > 0) {
+            this.pageSize = pageSize;
+        }
+    }
+
+    public boolean containData() {
+        return getTotalSize() > 0;
+    }
+    @Override
+    public String toString() {
+        return "Page [currentPage=" + getCurrentPage() + ", totalSize=" + getTotalSize() + ", pageSize=" + getPageSize()
+                + "]";
+    }
+
+    public T getObj() {
+        return obj;
+    }
+
+    public void setObj(T obj) {
+        this.obj = obj;
+    }
+}

+ 41 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/web/GhDetailController.java

@@ -0,0 +1,41 @@
+package com.tzld.longarticle.recommend.server.web;
+
+
+import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
+import com.tzld.longarticle.recommend.server.model.param.GhDetailParam;
+import com.tzld.longarticle.recommend.server.repository.model.GhDetail;
+import com.tzld.longarticle.recommend.server.service.exterior.GhDetailService;
+import com.tzld.longarticle.recommend.server.util.page.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/gh")
+public class GhDetailController {
+
+    @Autowired
+    private GhDetailService ghDetailService;
+
+    @GetMapping("/getList")
+    public CommonResponse<Page<GhDetail>> getGhDetailList(@RequestParam GhDetailParam param) {
+        return ghDetailService.getGhDetailList(param);
+    }
+
+    @PostMapping("/add")
+    public CommonResponse<Void> addGhDetail(@RequestBody GhDetail detail) {
+        return ghDetailService.addGhDetail(detail);
+    }
+
+    @PostMapping("/update")
+    public CommonResponse<Void> updateGhDetail(@RequestBody GhDetail detail) {
+        return ghDetailService.updateDetail(detail);
+    }
+
+    @GetMapping("/refresh")
+    public CommonResponse<Void> refreshGhDetail() {
+        return ghDetailService.refreshGhDetail();
+    }
+
+}

+ 276 - 0
long-article-recommend-service/src/main/resources/mapper/crawler/GhDetailMapper.xml

@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.longarticle.recommend.server.mapper.crawler.GhDetailMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.longarticle.recommend.server.repository.model.GhDetail">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
+    <result column="gh_name" jdbcType="VARCHAR" property="ghName" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="category1" jdbcType="VARCHAR" property="category1" />
+    <result column="category2" jdbcType="VARCHAR" property="category2" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, gh_id, gh_name, type, category1, category2, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetailExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from gh_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from gh_detail
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from gh_detail
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetailExample">
+    delete from gh_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetail">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into gh_detail (gh_id, gh_name, `type`,
+      category1, category2,
+      create_time, update_time)
+    values (#{ghId,jdbcType=VARCHAR}, #{ghName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{category1,jdbcType=VARCHAR}, #{category2,jdbcType=VARCHAR},
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetail">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into gh_detail
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="ghId != null">
+        gh_id,
+      </if>
+      <if test="ghName != null">
+        gh_name,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="category1 != null">
+        category1,
+      </if>
+      <if test="category2 != null">
+        category2,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="ghId != null">
+        #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="ghName != null">
+        #{ghName,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="category1 != null">
+        #{category1,jdbcType=VARCHAR},
+      </if>
+      <if test="category2 != null">
+        #{category2,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetailExample" resultType="java.lang.Long">
+    select count(*) from gh_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update gh_detail
+    <set>
+      <if test="row.id != null">
+        id = #{row.id,jdbcType=BIGINT},
+      </if>
+      <if test="row.ghId != null">
+        gh_id = #{row.ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.ghName != null">
+        gh_name = #{row.ghName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.type != null">
+        type = #{row.type,jdbcType=INTEGER},
+      </if>
+      <if test="row.category1 != null">
+        category1 = #{row.category1,jdbcType=VARCHAR},
+      </if>
+      <if test="row.category2 != null">
+        category2 = #{row.category2,jdbcType=VARCHAR},
+      </if>
+      <if test="row.isDelete != null">
+        is_delete = #{row.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="row.createTime != null">
+        create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.updateTime != null">
+        update_time = #{row.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update gh_detail
+    set id = #{row.id,jdbcType=BIGINT},
+      gh_id = #{row.ghId,jdbcType=VARCHAR},
+      gh_name = #{row.ghName,jdbcType=VARCHAR},
+      type = #{row.type,jdbcType=INTEGER},
+      category1 = #{row.category1,jdbcType=VARCHAR},
+      category2 = #{row.category2,jdbcType=VARCHAR},
+      is_delete = #{row.isDelete,jdbcType=INTEGER},
+      create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      update_time = #{row.updateTime,jdbcType=TIMESTAMP}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetail">
+    update gh_detail
+    <set>
+      <if test="ghId != null">
+        gh_id = #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="ghName != null">
+        gh_name = #{ghName,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="category1 != null">
+        category1 = #{category1,jdbcType=VARCHAR},
+      </if>
+      <if test="category2 != null">
+        category2 = #{category2,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.longarticle.recommend.server.repository.model.GhDetail">
+    update gh_detail
+    set gh_id = #{ghId,jdbcType=VARCHAR},
+      gh_name = #{ghName,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
+      category1 = #{category1,jdbcType=VARCHAR},
+      category2 = #{category2,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>