Sfoglia il codice sorgente

专题管理,走马灯

qiubo 4 anni fa
parent
commit
ecfee1a957
57 ha cambiato i file con 4353 aggiunte e 66 eliminazioni
  1. 30 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsRollBuyMapper.java
  2. 34 1
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubject.java
  3. 12 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectCategory.java
  4. 60 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectCategoryExample.java
  5. 1 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectComment.java
  6. 120 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectExample.java
  7. 1 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectProductRelation.java
  8. 129 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsRollBuy.java
  9. 772 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsRollBuyExample.java
  10. 22 5
      forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/CmsSubjectCategoryMapper.xml
  11. 42 7
      forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/CmsSubjectMapper.xml
  12. 274 0
      forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/UmsRollBuyMapper.xml
  13. 2 2
      forest-admin/admin-mbg/src/main/resources/generatorConfig.xml
  14. 94 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/CmsSubjectCategoryController.java
  15. 70 1
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/CmsSubjectController.java
  16. 0 1
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/SmsHomeRecommendProductController.java
  17. 175 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsRollBuyController.java
  18. 3 1
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/PmsProductDao.java
  19. 33 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/UmsRollBuyDao.java
  20. 34 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/excelEntity/UmsRollBuyParam.java
  21. 52 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/CmsSubjectCategoryService.java
  22. 65 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/CmsSubjectService.java
  23. 3 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/SmsHomeRecommendSubjectService.java
  24. 20 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/UmsRollBuyService.java
  25. 87 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/CmsSubjectCategoryServiceImpl.java
  26. 148 7
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/CmsSubjectServiceImpl.java
  27. 8 7
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/PmsProductServiceImpl.java
  28. 11 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/SmsHomeRecommendSubjectServiceImpl.java
  29. 75 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/UmsRollBuyServiceImpl.java
  30. 2 1
      forest-admin/admin-server/src/main/resources/dao/PmsProductDao.xml
  31. 290 0
      forest-admin/admin-server/src/main/resources/dao/UmsRollBuyDao.xml
  32. BIN
      forest-admin/admin-server/src/main/resources/excel/model/zoumaModel.xlsx
  33. 30 0
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/mapper/UmsRollBuyMapper.java
  34. 34 1
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubject.java
  35. 12 0
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubjectCategory.java
  36. 60 0
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubjectCategoryExample.java
  37. 120 0
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubjectExample.java
  38. 129 0
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/UmsRollBuy.java
  39. 772 0
      forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/UmsRollBuyExample.java
  40. 22 5
      forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/CmsSubjectCategoryMapper.xml
  41. 42 7
      forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/CmsSubjectMapper.xml
  42. 274 0
      forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/UmsRollBuyMapper.xml
  43. 2 2
      forest-portal/portal-mbg/src/main/resources/generatorConfig.xml
  44. 5 0
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/config/Swagger2Config.java
  45. 37 0
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/controller/HomeController.java
  46. 3 0
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/dao/PmsProductDao.java
  47. 20 0
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/CmsSubjectService.java
  48. 18 0
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/HomeService.java
  49. 1 3
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/SubjectService.java
  50. 43 0
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/impl/CmsSubjectServiceImpl.java
  51. 31 3
      forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/impl/HomeServiceImpl.java
  52. 10 1
      forest-portal/portal-server/src/main/resources/dao/PmsProductDao.xml
  53. 1 2
      forest-portal/portal-server/src/main/resources/dao/SubjectDao.xml
  54. 0 1
      nacos/data/config-data/DEFAULT_GROUP/forest-common.yml
  55. 4 8
      nacos/data/config-data/DEFAULT_GROUP/forest-portal.yml
  56. 12 0
      sql/表结构变化语句/qbsql.sql
  57. 2 0
      sql/表结构变化语句/更新sql.sql

+ 30 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsRollBuyMapper.java

@@ -0,0 +1,30 @@
+package com.hwrj.cloud.admin.mapper;
+
+import com.hwrj.cloud.admin.model.UmsRollBuy;
+import com.hwrj.cloud.admin.model.UmsRollBuyExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface UmsRollBuyMapper {
+    long countByExample(UmsRollBuyExample example);
+
+    int deleteByExample(UmsRollBuyExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(UmsRollBuy record);
+
+    int insertSelective(UmsRollBuy record);
+
+    List<UmsRollBuy> selectByExample(UmsRollBuyExample example);
+
+    UmsRollBuy selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") UmsRollBuy record, @Param("example") UmsRollBuyExample example);
+
+    int updateByExample(@Param("record") UmsRollBuy record, @Param("example") UmsRollBuyExample example);
+
+    int updateByPrimaryKeySelective(UmsRollBuy record);
+
+    int updateByPrimaryKey(UmsRollBuy record);
+}

+ 34 - 1
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubject.java

@@ -7,29 +7,37 @@ import java.util.Date;
 public class CmsSubject implements Serializable {
     private Long id;
 
+    @ApiModelProperty(value = "专题分类id")
     private Long categoryId;
 
+    @ApiModelProperty(value = "标题")
     private String title;
 
-    @ApiModelProperty(value = "专题主图")
+    @ApiModelProperty(value = "主图")
     private String pic;
 
     @ApiModelProperty(value = "关联产品数量")
     private Integer productCount;
 
+    @ApiModelProperty(value = "专题状态")
     private Integer recommendStatus;
 
+    @ApiModelProperty(value = "创建时间")
     private Date createTime;
 
+    @ApiModelProperty(value = "关联产品数量")
     private Integer collectCount;
 
+    @ApiModelProperty(value = "专题阅读数量")
     private Integer readCount;
 
+    @ApiModelProperty(value = "专题数量")
     private Integer commentCount;
 
     @ApiModelProperty(value = "画册图片用逗号分割")
     private String albumPics;
 
+    @ApiModelProperty(value = "专题描述")
     private String description;
 
     @ApiModelProperty(value = "显示状态:0->不显示;1->显示")
@@ -41,6 +49,13 @@ public class CmsSubject implements Serializable {
     @ApiModelProperty(value = "专题分类名称")
     private String categoryName;
 
+    @ApiModelProperty(value = "专题排序")
+    private Integer sort;
+
+    @ApiModelProperty(value = "删除标志:0-未删除,1-删除")
+    private Integer delFlag;
+
+    @ApiModelProperty(value = "专题内容")
     private String content;
 
     private static final long serialVersionUID = 1L;
@@ -165,6 +180,22 @@ public class CmsSubject implements Serializable {
         this.categoryName = categoryName;
     }
 
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
     public String getContent() {
         return content;
     }
@@ -194,6 +225,8 @@ public class CmsSubject implements Serializable {
         sb.append(", showStatus=").append(showStatus);
         sb.append(", forwardCount=").append(forwardCount);
         sb.append(", categoryName=").append(categoryName);
+        sb.append(", sort=").append(sort);
+        sb.append(", delFlag=").append(delFlag);
         sb.append(", content=").append(content);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");

+ 12 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectCategory.java

@@ -18,6 +18,9 @@ public class CmsSubjectCategory implements Serializable {
 
     private Integer sort;
 
+    @ApiModelProperty(value = "删除标志0-未删除,1-已删除")
+    private Integer delFlag;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -68,6 +71,14 @@ public class CmsSubjectCategory implements Serializable {
         this.sort = sort;
     }
 
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -80,6 +91,7 @@ public class CmsSubjectCategory implements Serializable {
         sb.append(", subjectCount=").append(subjectCount);
         sb.append(", showStatus=").append(showStatus);
         sb.append(", sort=").append(sort);
+        sb.append(", delFlag=").append(delFlag);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 60 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectCategoryExample.java

@@ -483,6 +483,66 @@ public class CmsSubjectCategoryExample {
             addCriterion("sort not between", value1, value2, "sort");
             return (Criteria) this;
         }
+
+        public Criteria andDelFlagIsNull() {
+            addCriterion("del_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNotNull() {
+            addCriterion("del_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagEqualTo(Integer value) {
+            addCriterion("del_flag =", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotEqualTo(Integer value) {
+            addCriterion("del_flag <>", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThan(Integer value) {
+            addCriterion("del_flag >", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("del_flag >=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThan(Integer value) {
+            addCriterion("del_flag <", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("del_flag <=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIn(List<Integer> values) {
+            addCriterion("del_flag in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotIn(List<Integer> values) {
+            addCriterion("del_flag not in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag not between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 1 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectComment.java

@@ -1,5 +1,6 @@
 package com.hwrj.cloud.admin.model;
 
+import io.swagger.annotations.ApiModelProperty;
 import java.io.Serializable;
 import java.util.Date;
 

+ 120 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectExample.java

@@ -1054,6 +1054,126 @@ public class CmsSubjectExample {
             addCriterion("category_name not between", value1, value2, "categoryName");
             return (Criteria) this;
         }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNull() {
+            addCriterion("del_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNotNull() {
+            addCriterion("del_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagEqualTo(Integer value) {
+            addCriterion("del_flag =", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotEqualTo(Integer value) {
+            addCriterion("del_flag <>", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThan(Integer value) {
+            addCriterion("del_flag >", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("del_flag >=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThan(Integer value) {
+            addCriterion("del_flag <", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("del_flag <=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIn(List<Integer> values) {
+            addCriterion("del_flag in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotIn(List<Integer> values) {
+            addCriterion("del_flag not in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag not between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 1 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/CmsSubjectProductRelation.java

@@ -1,5 +1,6 @@
 package com.hwrj.cloud.admin.model;
 
+import io.swagger.annotations.ApiModelProperty;
 import java.io.Serializable;
 
 public class CmsSubjectProductRelation implements Serializable {

+ 129 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsRollBuy.java

@@ -0,0 +1,129 @@
+package com.hwrj.cloud.admin.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class UmsRollBuy implements Serializable {
+    @ApiModelProperty(value = "序列号")
+    private Long id;
+
+    @ApiModelProperty(value = "成员id")
+    private Long memberId;
+
+    @ApiModelProperty(value = "成员名称")
+    private String memberName;
+
+    @ApiModelProperty(value = "花费")
+    private BigDecimal money;
+
+    @ApiModelProperty(value = "产品id")
+    private Long productId;
+
+    @ApiModelProperty(value = "产品名称")
+    private String productName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "供应商名称")
+    private String compName;
+
+    @ApiModelProperty(value = "供应商id")
+    private Long compId;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getMemberId() {
+        return memberId;
+    }
+
+    public void setMemberId(Long memberId) {
+        this.memberId = memberId;
+    }
+
+    public String getMemberName() {
+        return memberName;
+    }
+
+    public void setMemberName(String memberName) {
+        this.memberName = memberName;
+    }
+
+    public BigDecimal getMoney() {
+        return money;
+    }
+
+    public void setMoney(BigDecimal money) {
+        this.money = money;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getCompName() {
+        return compName;
+    }
+
+    public void setCompName(String compName) {
+        this.compName = compName;
+    }
+
+    public Long getCompId() {
+        return compId;
+    }
+
+    public void setCompId(Long compId) {
+        this.compId = compId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", memberId=").append(memberId);
+        sb.append(", memberName=").append(memberName);
+        sb.append(", money=").append(money);
+        sb.append(", productId=").append(productId);
+        sb.append(", productName=").append(productName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", compName=").append(compName);
+        sb.append(", compId=").append(compId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 772 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsRollBuyExample.java

@@ -0,0 +1,772 @@
+package com.hwrj.cloud.admin.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class UmsRollBuyExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public UmsRollBuyExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    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;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        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 andMemberIdIsNull() {
+            addCriterion("member_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdIsNotNull() {
+            addCriterion("member_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdEqualTo(Long value) {
+            addCriterion("member_id =", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdNotEqualTo(Long value) {
+            addCriterion("member_id <>", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdGreaterThan(Long value) {
+            addCriterion("member_id >", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("member_id >=", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdLessThan(Long value) {
+            addCriterion("member_id <", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdLessThanOrEqualTo(Long value) {
+            addCriterion("member_id <=", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdIn(List<Long> values) {
+            addCriterion("member_id in", values, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdNotIn(List<Long> values) {
+            addCriterion("member_id not in", values, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdBetween(Long value1, Long value2) {
+            addCriterion("member_id between", value1, value2, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdNotBetween(Long value1, Long value2) {
+            addCriterion("member_id not between", value1, value2, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameIsNull() {
+            addCriterion("member_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameIsNotNull() {
+            addCriterion("member_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameEqualTo(String value) {
+            addCriterion("member_name =", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotEqualTo(String value) {
+            addCriterion("member_name <>", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameGreaterThan(String value) {
+            addCriterion("member_name >", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameGreaterThanOrEqualTo(String value) {
+            addCriterion("member_name >=", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameLessThan(String value) {
+            addCriterion("member_name <", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameLessThanOrEqualTo(String value) {
+            addCriterion("member_name <=", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameLike(String value) {
+            addCriterion("member_name like", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotLike(String value) {
+            addCriterion("member_name not like", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameIn(List<String> values) {
+            addCriterion("member_name in", values, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotIn(List<String> values) {
+            addCriterion("member_name not in", values, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameBetween(String value1, String value2) {
+            addCriterion("member_name between", value1, value2, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotBetween(String value1, String value2) {
+            addCriterion("member_name not between", value1, value2, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyIsNull() {
+            addCriterion("money is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyIsNotNull() {
+            addCriterion("money is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyEqualTo(BigDecimal value) {
+            addCriterion("money =", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyNotEqualTo(BigDecimal value) {
+            addCriterion("money <>", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyGreaterThan(BigDecimal value) {
+            addCriterion("money >", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("money >=", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyLessThan(BigDecimal value) {
+            addCriterion("money <", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("money <=", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyIn(List<BigDecimal> values) {
+            addCriterion("money in", values, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyNotIn(List<BigDecimal> values) {
+            addCriterion("money not in", values, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("money between", value1, value2, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("money not between", value1, value2, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNull() {
+            addCriterion("product_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNotNull() {
+            addCriterion("product_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdEqualTo(Long value) {
+            addCriterion("product_id =", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotEqualTo(Long value) {
+            addCriterion("product_id <>", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThan(Long value) {
+            addCriterion("product_id >", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("product_id >=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThan(Long value) {
+            addCriterion("product_id <", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThanOrEqualTo(Long value) {
+            addCriterion("product_id <=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIn(List<Long> values) {
+            addCriterion("product_id in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotIn(List<Long> values) {
+            addCriterion("product_id not in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdBetween(Long value1, Long value2) {
+            addCriterion("product_id between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotBetween(Long value1, Long value2) {
+            addCriterion("product_id not between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameIsNull() {
+            addCriterion("product_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameIsNotNull() {
+            addCriterion("product_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameEqualTo(String value) {
+            addCriterion("product_name =", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotEqualTo(String value) {
+            addCriterion("product_name <>", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameGreaterThan(String value) {
+            addCriterion("product_name >", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameGreaterThanOrEqualTo(String value) {
+            addCriterion("product_name >=", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameLessThan(String value) {
+            addCriterion("product_name <", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameLessThanOrEqualTo(String value) {
+            addCriterion("product_name <=", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameLike(String value) {
+            addCriterion("product_name like", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotLike(String value) {
+            addCriterion("product_name not like", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameIn(List<String> values) {
+            addCriterion("product_name in", values, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotIn(List<String> values) {
+            addCriterion("product_name not in", values, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameBetween(String value1, String value2) {
+            addCriterion("product_name between", value1, value2, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotBetween(String value1, String value2) {
+            addCriterion("product_name not between", value1, value2, "productName");
+            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 andCompNameIsNull() {
+            addCriterion("comp_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameIsNotNull() {
+            addCriterion("comp_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameEqualTo(String value) {
+            addCriterion("comp_name =", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotEqualTo(String value) {
+            addCriterion("comp_name <>", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameGreaterThan(String value) {
+            addCriterion("comp_name >", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameGreaterThanOrEqualTo(String value) {
+            addCriterion("comp_name >=", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameLessThan(String value) {
+            addCriterion("comp_name <", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameLessThanOrEqualTo(String value) {
+            addCriterion("comp_name <=", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameLike(String value) {
+            addCriterion("comp_name like", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotLike(String value) {
+            addCriterion("comp_name not like", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameIn(List<String> values) {
+            addCriterion("comp_name in", values, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotIn(List<String> values) {
+            addCriterion("comp_name not in", values, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameBetween(String value1, String value2) {
+            addCriterion("comp_name between", value1, value2, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotBetween(String value1, String value2) {
+            addCriterion("comp_name not between", value1, value2, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdIsNull() {
+            addCriterion("comp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdIsNotNull() {
+            addCriterion("comp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdEqualTo(Long value) {
+            addCriterion("comp_id =", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdNotEqualTo(Long value) {
+            addCriterion("comp_id <>", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdGreaterThan(Long value) {
+            addCriterion("comp_id >", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("comp_id >=", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdLessThan(Long value) {
+            addCriterion("comp_id <", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdLessThanOrEqualTo(Long value) {
+            addCriterion("comp_id <=", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdIn(List<Long> values) {
+            addCriterion("comp_id in", values, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdNotIn(List<Long> values) {
+            addCriterion("comp_id not in", values, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdBetween(Long value1, Long value2) {
+            addCriterion("comp_id between", value1, value2, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdNotBetween(Long value1, Long value2) {
+            addCriterion("comp_id not between", value1, value2, "compId");
+            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);
+        }
+    }
+}

+ 22 - 5
forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/CmsSubjectCategoryMapper.xml

@@ -8,6 +8,7 @@
     <result column="subject_count" jdbcType="INTEGER" property="subjectCount" />
     <result column="show_status" jdbcType="INTEGER" property="showStatus" />
     <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -68,7 +69,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, name, icon, subject_count, show_status, sort
+    id, name, icon, subject_count, show_status, sort, del_flag
   </sql>
   <select id="selectByExample" parameterType="com.hwrj.cloud.admin.model.CmsSubjectCategoryExample" resultMap="BaseResultMap">
     select
@@ -105,9 +106,11 @@
       SELECT LAST_INSERT_ID()
     </selectKey>
     insert into cms_subject_category (name, icon, subject_count, 
-      show_status, sort)
+      show_status, sort, del_flag
+      )
     values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER}, 
-      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
+      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.hwrj.cloud.admin.model.CmsSubjectCategory">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -130,6 +133,9 @@
       <if test="sort != null">
         sort,
       </if>
+      <if test="delFlag != null">
+        del_flag,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="name != null">
@@ -147,6 +153,9 @@
       <if test="sort != null">
         #{sort,jdbcType=INTEGER},
       </if>
+      <if test="delFlag != null">
+        #{delFlag,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.hwrj.cloud.admin.model.CmsSubjectCategoryExample" resultType="java.lang.Long">
@@ -176,6 +185,9 @@
       <if test="record.sort != null">
         sort = #{record.sort,jdbcType=INTEGER},
       </if>
+      <if test="record.delFlag != null">
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -188,7 +200,8 @@
       icon = #{record.icon,jdbcType=VARCHAR},
       subject_count = #{record.subjectCount,jdbcType=INTEGER},
       show_status = #{record.showStatus,jdbcType=INTEGER},
-      sort = #{record.sort,jdbcType=INTEGER}
+      sort = #{record.sort,jdbcType=INTEGER},
+      del_flag = #{record.delFlag,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -211,6 +224,9 @@
       <if test="sort != null">
         sort = #{sort,jdbcType=INTEGER},
       </if>
+      <if test="delFlag != null">
+        del_flag = #{delFlag,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -220,7 +236,8 @@
       icon = #{icon,jdbcType=VARCHAR},
       subject_count = #{subjectCount,jdbcType=INTEGER},
       show_status = #{showStatus,jdbcType=INTEGER},
-      sort = #{sort,jdbcType=INTEGER}
+      sort = #{sort,jdbcType=INTEGER},
+      del_flag = #{delFlag,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 42 - 7
forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/CmsSubjectMapper.xml

@@ -17,6 +17,8 @@
     <result column="show_status" jdbcType="INTEGER" property="showStatus" />
     <result column="forward_count" jdbcType="INTEGER" property="forwardCount" />
     <result column="category_name" jdbcType="VARCHAR" property="categoryName" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwrj.cloud.admin.model.CmsSubject">
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
@@ -81,7 +83,8 @@
   </sql>
   <sql id="Base_Column_List">
     id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, 
-    read_count, comment_count, album_pics, description, show_status, forward_count, category_name
+    read_count, comment_count, album_pics, description, show_status, forward_count, category_name, 
+    sort, del_flag
   </sql>
   <sql id="Blob_Column_List">
     content
@@ -142,14 +145,14 @@
       product_count, recommend_status, create_time, 
       collect_count, read_count, comment_count, 
       album_pics, description, show_status, 
-      forward_count, category_name, content
-      )
+      forward_count, category_name, sort, 
+      del_flag, content)
     values (#{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, 
       #{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER}, 
       #{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, 
-      #{forwardCount,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{forwardCount,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
+      #{delFlag,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.hwrj.cloud.admin.model.CmsSubject">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -199,6 +202,12 @@
       <if test="categoryName != null">
         category_name,
       </if>
+      <if test="sort != null">
+        sort,
+      </if>
+      <if test="delFlag != null">
+        del_flag,
+      </if>
       <if test="content != null">
         content,
       </if>
@@ -246,6 +255,12 @@
       <if test="categoryName != null">
         #{categoryName,jdbcType=VARCHAR},
       </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="delFlag != null">
+        #{delFlag,jdbcType=INTEGER},
+      </if>
       <if test="content != null">
         #{content,jdbcType=LONGVARCHAR},
       </if>
@@ -305,6 +320,12 @@
       <if test="record.categoryName != null">
         category_name = #{record.categoryName,jdbcType=VARCHAR},
       </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+      <if test="record.delFlag != null">
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
+      </if>
       <if test="record.content != null">
         content = #{record.content,jdbcType=LONGVARCHAR},
       </if>
@@ -330,6 +351,8 @@
       show_status = #{record.showStatus,jdbcType=INTEGER},
       forward_count = #{record.forwardCount,jdbcType=INTEGER},
       category_name = #{record.categoryName,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      del_flag = #{record.delFlag,jdbcType=INTEGER},
       content = #{record.content,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -351,7 +374,9 @@
       description = #{record.description,jdbcType=VARCHAR},
       show_status = #{record.showStatus,jdbcType=INTEGER},
       forward_count = #{record.forwardCount,jdbcType=INTEGER},
-      category_name = #{record.categoryName,jdbcType=VARCHAR}
+      category_name = #{record.categoryName,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      del_flag = #{record.delFlag,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -401,6 +426,12 @@
       <if test="categoryName != null">
         category_name = #{categoryName,jdbcType=VARCHAR},
       </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="delFlag != null">
+        del_flag = #{delFlag,jdbcType=INTEGER},
+      </if>
       <if test="content != null">
         content = #{content,jdbcType=LONGVARCHAR},
       </if>
@@ -423,6 +454,8 @@
       show_status = #{showStatus,jdbcType=INTEGER},
       forward_count = #{forwardCount,jdbcType=INTEGER},
       category_name = #{categoryName,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      del_flag = #{delFlag,jdbcType=INTEGER},
       content = #{content,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -441,7 +474,9 @@
       description = #{description,jdbcType=VARCHAR},
       show_status = #{showStatus,jdbcType=INTEGER},
       forward_count = #{forwardCount,jdbcType=INTEGER},
-      category_name = #{categoryName,jdbcType=VARCHAR}
+      category_name = #{categoryName,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      del_flag = #{delFlag,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 274 - 0
forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/UmsRollBuyMapper.xml

@@ -0,0 +1,274 @@
+<?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.hwrj.cloud.admin.mapper.UmsRollBuyMapper">
+  <resultMap id="BaseResultMap" type="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="member_id" jdbcType="BIGINT" property="memberId" />
+    <result column="member_name" jdbcType="VARCHAR" property="memberName" />
+    <result column="money" jdbcType="DECIMAL" property="money" />
+    <result column="product_id" jdbcType="BIGINT" property="productId" />
+    <result column="product_name" jdbcType="VARCHAR" property="productName" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="comp_name" jdbcType="VARCHAR" property="compName" />
+    <result column="comp_id" jdbcType="BIGINT" property="compId" />
+  </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, member_id, member_name, money, product_id, product_name, create_time, comp_name, 
+    comp_id
+  </sql>
+  <select id="selectByExample" parameterType="com.hwrj.cloud.admin.model.UmsRollBuyExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ums_roll_buy
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ums_roll_buy
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hwrj.cloud.admin.model.UmsRollBuyExample">
+    delete from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy (member_id, member_name, money, 
+      product_id, product_name, create_time, 
+      comp_name, comp_id)
+    values (#{memberId,jdbcType=BIGINT}, #{memberName,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL}, 
+      #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{compName,jdbcType=VARCHAR}, #{compId,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="memberId != null">
+        member_id,
+      </if>
+      <if test="memberName != null">
+        member_name,
+      </if>
+      <if test="money != null">
+        money,
+      </if>
+      <if test="productId != null">
+        product_id,
+      </if>
+      <if test="productName != null">
+        product_name,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="compName != null">
+        comp_name,
+      </if>
+      <if test="compId != null">
+        comp_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="memberId != null">
+        #{memberId,jdbcType=BIGINT},
+      </if>
+      <if test="memberName != null">
+        #{memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="money != null">
+        #{money,jdbcType=DECIMAL},
+      </if>
+      <if test="productId != null">
+        #{productId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="compName != null">
+        #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="compId != null">
+        #{compId,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hwrj.cloud.admin.model.UmsRollBuyExample" resultType="java.lang.Long">
+    select count(*) from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ums_roll_buy
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberId != null">
+        member_id = #{record.memberId,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberName != null">
+        member_name = #{record.memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.money != null">
+        money = #{record.money,jdbcType=DECIMAL},
+      </if>
+      <if test="record.productId != null">
+        product_id = #{record.productId,jdbcType=BIGINT},
+      </if>
+      <if test="record.productName != null">
+        product_name = #{record.productName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.compName != null">
+        comp_name = #{record.compName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.compId != null">
+        comp_id = #{record.compId,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ums_roll_buy
+    set id = #{record.id,jdbcType=BIGINT},
+      member_id = #{record.memberId,jdbcType=BIGINT},
+      member_name = #{record.memberName,jdbcType=VARCHAR},
+      money = #{record.money,jdbcType=DECIMAL},
+      product_id = #{record.productId,jdbcType=BIGINT},
+      product_name = #{record.productName,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      comp_name = #{record.compName,jdbcType=VARCHAR},
+      comp_id = #{record.compId,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    update ums_roll_buy
+    <set>
+      <if test="memberId != null">
+        member_id = #{memberId,jdbcType=BIGINT},
+      </if>
+      <if test="memberName != null">
+        member_name = #{memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="money != null">
+        money = #{money,jdbcType=DECIMAL},
+      </if>
+      <if test="productId != null">
+        product_id = #{productId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        product_name = #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="compName != null">
+        comp_name = #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="compId != null">
+        comp_id = #{compId,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    update ums_roll_buy
+    set member_id = #{memberId,jdbcType=BIGINT},
+      member_name = #{memberName,jdbcType=VARCHAR},
+      money = #{money,jdbcType=DECIMAL},
+      product_id = #{productId,jdbcType=BIGINT},
+      product_name = #{productName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      comp_name = #{compName,jdbcType=VARCHAR},
+      comp_id = #{compId,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 2 - 2
forest-admin/admin-mbg/src/main/resources/generatorConfig.xml

@@ -37,8 +37,8 @@
         <javaClientGenerator type="XMLMAPPER" targetPackage="com.hwrj.cloud.admin.mapper"
                              targetProject="forest-admin\admin-mbg\src\main\java"/>
         <!--生成全部表tableName设为%-->
-        <table tableName="pms_product">
+        <table tableName="ums_roll%">
             <generatedKey column="id" sqlStatement="MySql" identity="true"/>
         </table>
     </context>
-</generatorConfiguration>
+</generatorConfiguration>

+ 94 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/CmsSubjectCategoryController.java

@@ -0,0 +1,94 @@
+package com.hwrj.cloud.admin.controller;
+
+
+import com.hwrj.cloud.admin.common.CmsSubjectProductRelationInput;
+import com.hwrj.cloud.admin.model.CmsSubject;
+import com.hwrj.cloud.admin.model.CmsSubjectCategory;
+import com.hwrj.cloud.admin.service.CmsSubjectCategoryService;
+import com.hwrj.cloud.admin.service.CmsSubjectService;
+import com.hwrj.cloud.common.api.CommonPage;
+import com.hwrj.cloud.common.api.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品专题Controller
+ */
+@Controller
+@Api(tags = "CmsSubjectCategoryController", description = "专题类型管理")
+@RequestMapping("/subject/category")
+public class CmsSubjectCategoryController {
+    @Autowired
+    private CmsSubjectCategoryService subjectCategoryService;
+
+    @ApiOperation("获取全部")
+    @RequestMapping(value = "/listAll", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<CmsSubjectCategory>> listAll(@RequestParam(value = "keyword",required = false)String keyword) {
+        List<CmsSubjectCategory> listAll = subjectCategoryService.listAll(keyword);
+        return CommonResult.success(listAll);
+    }
+
+
+
+    @ApiOperation("添加")
+    @PostMapping("/add")
+    @ResponseBody
+    public CommonResult add(@RequestBody CmsSubjectCategory subject){
+        int i = subjectCategoryService.add(subject);
+        if (i==0){
+           return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+    @ApiOperation("修改")
+    @PostMapping("/update")
+    @ResponseBody
+    public CommonResult update(@RequestBody CmsSubjectCategory subject){
+        int i = subjectCategoryService.update(subject);
+        if (i==0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+
+    @ApiOperation("删除")
+    @PostMapping("/del")
+    @ResponseBody
+    public CommonResult delete(@RequestParam(value = "id")Long id){
+        int i = subjectCategoryService.delete(id);
+        if (i==0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+    @ApiOperation("详细信息")
+    @PostMapping("/get")
+    @ResponseBody
+    public CommonResult<CmsSubjectCategory> get(@RequestParam(value = "id")Long id){
+        CmsSubjectCategory i = subjectCategoryService.info(id);
+        if (i==null){
+            return CommonResult.failed();
+        }
+        return CommonResult.success(i);
+    }
+
+    @ApiOperation("分页获取")
+    @PostMapping("/page")
+    @ResponseBody
+    public CommonResult<CommonPage<CmsSubjectCategory>> get(@RequestParam(value = "keyword",required = false)String keyword
+            ,@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum
+            ,@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize){
+        List<CmsSubjectCategory> categories = subjectCategoryService.pageInfo(keyword, pageNum, pageSize);
+
+        return CommonResult.success(CommonPage.restPage(categories));
+    }
+}

+ 70 - 1
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/CmsSubjectController.java

@@ -8,6 +8,7 @@ import com.hwrj.cloud.admin.model.CmsSubject;
 import com.hwrj.cloud.admin.service.CmsSubjectService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
@@ -16,7 +17,6 @@ import java.util.List;
 
 /**
  * 商品专题Controller
- * Created by macro on 2018/6/1.
  */
 @Controller
 @Api(tags = "CmsSubjectController", description = "商品专题管理")
@@ -68,4 +68,73 @@ public class CmsSubjectController {
         List<CmsSubjectProductRelationInput> productRelationList = subjectService.relationByProductId(productId);
         return CommonResult.success(productRelationList);
     }
+
+
+    @ApiOperation("添加专题")
+    @PostMapping("/add")
+    @ResponseBody
+    public CommonResult add(@RequestBody CmsSubject subject){
+        int i = subjectService.add(subject);
+        if (i==0){
+           return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+    @ApiOperation("修改")
+    @PostMapping("/update")
+    @ResponseBody
+    public CommonResult update(@RequestBody CmsSubject subject){
+        int i = subjectService.update(subject);
+        if (i==0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+
+    @ApiOperation("删除专题")
+    @PostMapping("/del")
+    @ResponseBody
+    public CommonResult delete(@RequestParam(value = "id")Long id){
+        int i = subjectService.delete(id);
+        if (i==0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+    @ApiOperation("获取专题详细信息")
+    @PostMapping("/get")
+    @ResponseBody
+    public CommonResult<CmsSubject> get(@RequestParam(value = "id")Long id){
+        CmsSubject i = subjectService.info(id);
+        if (i==null){
+            return CommonResult.failed();
+        }
+        return CommonResult.success(i);
+    }
+
+
+    @ApiOperation("是否展示专题")
+    @PostMapping("/is-show")
+    @ResponseBody
+    public CommonResult isShow(@RequestParam(value = "id")Long id,@ApiParam(name = "0-不显示,1-展示") @RequestParam(value = "showStatus",required = true)Integer showStatus){
+        int i = subjectService.show(id,showStatus);
+        if (i<0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success(i);
+    }
+
+    @ApiOperation("获取所有专题")
+    @PostMapping("/all")
+    @ResponseBody
+    public CommonResult<List<CmsSubject>> get(@RequestParam(value = "keyword",required = false)String keyword){
+        List<CmsSubject> i = subjectService.all(keyword);
+        if (i==null){
+            return CommonResult.failed();
+        }
+        return CommonResult.success(i);
+    }
 }

+ 0 - 1
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/SmsHomeRecommendProductController.java

@@ -14,7 +14,6 @@ import java.util.List;
 
 /**
  * 首页人气推荐管理Controller
- * Created by macro on 2018/11/6.
  */
 @Controller
 @Api(tags = "SmsHomeRecommendProductController", description = "首页人气推荐管理")

+ 175 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsRollBuyController.java

@@ -0,0 +1,175 @@
+package com.hwrj.cloud.admin.controller;
+
+
+
+import com.hwrj.cloud.admin.excelEntity.UmsRollBuyParam;
+import com.hwrj.cloud.admin.model.UmsRollBuy;
+import com.hwrj.cloud.admin.service.UmsRollBuyService;
+import com.hwrj.cloud.admin.util.EasyExcelUtil;
+import com.hwrj.cloud.common.api.CommonPage;
+import com.hwrj.cloud.common.api.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 走马灯Controller
+ */
+@Controller
+@Api(tags = "UmsRollBuyController", description = "走马灯")
+@RequestMapping("/rollbuy")
+public class UmsRollBuyController {
+    @Autowired
+    private UmsRollBuyService umsRollBuyService;
+
+
+
+
+    @ApiOperation("添加")
+    @PostMapping("/add")
+    @ResponseBody
+    public CommonResult add(@RequestBody UmsRollBuy subject){
+        int i = umsRollBuyService.add(subject);
+        if (i==0){
+           return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+    @ApiOperation("修改")
+    @PostMapping("/update")
+    @ResponseBody
+    public CommonResult update(@RequestBody UmsRollBuy subject){
+        int i = umsRollBuyService.update(subject);
+        if (i==0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+
+    @ApiOperation("删除")
+    @GetMapping("/del")
+    @ResponseBody
+    public CommonResult delete(@RequestParam(value = "id")Long id){
+        int i = umsRollBuyService.delete(id);
+        if (i==0){
+            return CommonResult.failed();
+        }
+        return CommonResult.success();
+    }
+
+    @ApiOperation("详细信息")
+    @GetMapping("/get")
+    @ResponseBody
+    public CommonResult<UmsRollBuy> get(@RequestParam(value = "id")Long id){
+        UmsRollBuy i = umsRollBuyService.info(id);
+        if (i==null){
+            return CommonResult.failed();
+        }
+        return CommonResult.success(i);
+    }
+
+    @ApiOperation("分页获取")
+    @GetMapping("/page")
+    @ResponseBody
+    public CommonResult<CommonPage<UmsRollBuy>> get(@RequestParam(value = "keyword",required = false)String keyword
+            ,@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum
+            ,@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize){
+        List<UmsRollBuy> categories = umsRollBuyService.page(keyword, pageNum, pageSize);
+
+        return CommonResult.success(CommonPage.restPage(categories));
+    }
+
+    /**
+     * 导入excel
+     * @param files
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation(value = "导入")
+    @RequestMapping(value = "excelImport", method = RequestMethod.POST)
+    @ResponseBody
+    public CommonResult excelImport( @RequestParam("uploadFile") MultipartFile[] files,@RequestParam(value = "type",required = false)Integer type) throws Exception {
+        List<UmsRollBuy> listAll = new ArrayList<>();
+        if(files != null && files.length > 0){
+            MultipartFile file = files[0];
+            List<Object> list = EasyExcelUtil.readExcel(file, new UmsRollBuyParam(),1,2);
+            if(list != null && list.size() > 0){
+                for(Object o : list){
+                    UmsRollBuyParam umsRollBuyParam = (UmsRollBuyParam) o;
+                    UmsRollBuy umsRollBuy = new UmsRollBuy();
+                    BeanUtils.copyProperties(umsRollBuyParam,umsRollBuy);
+                    listAll.add(umsRollBuy);
+                }
+            }
+        }
+        int i = umsRollBuyService.importExcel(listAll);
+        if (i<1){
+            return CommonResult.failed();
+        }
+
+        return CommonResult.success();
+    }
+    @ApiOperation("导出模板")
+    @PostMapping(value = "/out")
+    public void out(HttpServletResponse response) throws IOException {
+
+        //定义文件名和文件地址
+        String downloadUrl = "excel/model/zoumaModel.xlsx";
+        Resource resource = null;
+        try {
+            //获取资源文件
+            resource = new ClassPathResource(downloadUrl);
+        } catch (Exception e) {
+            //自定义业务异常
+            throw new RuntimeException("导出模板失败!");
+        }
+        byte[] buff = new byte[1024];
+        BufferedInputStream bis = null;
+        OutputStream os = null;
+        try {
+            // 配置文件下载
+            response.setHeader("content-type", "application/octet-stream");
+            response.setContentType("application/octet-stream");
+            // 下载文件能正常显示中文
+            response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("商品导入模板.xlsx", "UTF-8"));
+
+            os = response.getOutputStream();
+            bis = new BufferedInputStream(resource.getInputStream());
+            int i = bis.read(buff);
+            while (i != -1) {
+                os.write(buff, 0, buff.length);
+                os.flush();
+                i = bis.read(buff);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("文件下载出错!");
+        } finally {
+            if (bis != null) {
+                try {
+                    bis.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+
+
+    }
+}

+ 3 - 1
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/PmsProductDao.java

@@ -1,6 +1,7 @@
 package com.hwrj.cloud.admin.dao;
 
 import com.hwrj.cloud.admin.dto.PmsProductResult;
+import com.hwrj.cloud.admin.model.PmsProduct;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -8,7 +9,6 @@ import java.util.List;
 
 /**
  * 自定义商品管理Dao
- * Created by macro on 2018/4/26.
  */
 public interface PmsProductDao {
     /**
@@ -18,4 +18,6 @@ public interface PmsProductDao {
 
 
     long check(@Param("ids") List<Long> ids);
+
+
 }

+ 33 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/UmsRollBuyDao.java

@@ -0,0 +1,33 @@
+package com.hwrj.cloud.admin.dao;
+
+import com.hwrj.cloud.admin.model.UmsRollBuy;
+import com.hwrj.cloud.admin.model.UmsRollBuyExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface UmsRollBuyDao {
+    long countByExample(UmsRollBuyExample example);
+
+    int deleteByExample(UmsRollBuyExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(UmsRollBuy record);
+
+    int insertSelective(UmsRollBuy record);
+
+    List<UmsRollBuy> selectByExample(UmsRollBuyExample example);
+
+    UmsRollBuy selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") UmsRollBuy record, @Param("example") UmsRollBuyExample example);
+
+    int updateByExample(@Param("record") UmsRollBuy record, @Param("example") UmsRollBuyExample example);
+
+    int updateByPrimaryKeySelective(UmsRollBuy record);
+
+    int updateByPrimaryKey(UmsRollBuy record);
+
+    int insertList(List<UmsRollBuy> list);
+}

+ 34 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/excelEntity/UmsRollBuyParam.java

@@ -0,0 +1,34 @@
+package com.hwrj.cloud.admin.excelEntity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.format.NumberFormat;
+import com.alibaba.excel.metadata.BaseRowModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class UmsRollBuyParam extends BaseRowModel {
+
+
+    @ApiModelProperty(value = "用户名称")
+    @ExcelProperty(value = "用户名称")
+    private String memberName;
+
+    @ApiModelProperty(value = "消费")
+    @ExcelProperty(value = "消费")
+    @NumberFormat("###.#")
+    private BigDecimal money;
+
+
+    @ApiModelProperty(value = "产品名称")
+    @ExcelProperty(value = "产品名称")
+    private String productName;
+
+
+    @ApiModelProperty(value = "供应商名称")
+    @ExcelProperty(value = "供应商名称")
+    private String compName;
+
+}

+ 52 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/CmsSubjectCategoryService.java

@@ -0,0 +1,52 @@
+package com.hwrj.cloud.admin.service;
+
+import com.hwrj.cloud.admin.model.CmsSubjectCategory;
+
+import java.util.List;
+
+public interface CmsSubjectCategoryService {
+    /**
+     * 添加专题分类
+     * @param category
+     * @return
+     */
+    public int add(CmsSubjectCategory category);
+
+    /**
+     * 修改专题分类
+     * @param category
+     * @return
+     */
+    public int update(CmsSubjectCategory category);
+
+    /**
+     * 删除专题分类
+     * @param id
+     * @return
+     */
+    public int delete(Long id);
+
+    /**
+     * 获取专题分类详细信息
+     * @param id
+     * @return
+     */
+    public CmsSubjectCategory info(Long id);
+
+    /**
+     * 分页获取专题分类
+     * @param keyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    public List<CmsSubjectCategory> pageInfo(String keyword, Integer pageNum, Integer pageSize);
+
+
+
+    /**
+     *获取所有的专题分类
+     * @return
+     */
+    public List<CmsSubjectCategory> listAll(String keyword);
+}

+ 65 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/CmsSubjectService.java

@@ -2,6 +2,7 @@ package com.hwrj.cloud.admin.service;
 
 import com.hwrj.cloud.admin.common.CmsSubjectProductRelationInput;
 import com.hwrj.cloud.admin.model.CmsSubject;
+import com.hwrj.cloud.admin.model.CmsSubjectProductRelation;
 
 import java.util.List;
 
@@ -34,10 +35,74 @@ public interface CmsSubjectService {
      */
     void relateAndUpdateList(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId);
 
+    /**
+     * 批量删除商品主题关联信息
+     * @param ids
+     */
+     void relateAndDeleteByProductId(List<Long> ids);
+
     /**
      * 通过id查询关联优选
      * @param productId
      * @return
      */
     List<CmsSubjectProductRelationInput> relationByProductId(Long productId);
+
+    /**
+     * 通过分类id查询专题
+     * @param id
+     * @return
+     */
+    List<CmsSubject> subjectByCategory(Long id);
+
+    /**
+     * 通过产品关系查询主题
+     * @param id
+     * @return
+     */
+    List<CmsSubjectProductRelation> subjectRelationProduct(Long id);
+
+    /**
+     * 添加专题
+     * @param cmsSubject
+     * @return
+     */
+    int add(CmsSubject cmsSubject);
+
+    /**
+     * 修改专题
+     * @param cmsSubject
+     * @return
+     */
+    int update(CmsSubject cmsSubject);
+
+    /**
+     * 删除专题
+     * @param id
+     * @return
+     */
+    int delete(Long id);
+
+    /**
+     * 专题信息
+     * @param id
+     * @return
+     */
+    CmsSubject info(Long id);
+
+
+    /**
+     * 是否展示
+     * @param id
+     * @return
+     */
+    int show(Long id,Integer showStatus);
+
+
+    /**
+     * 获取专题所有信息
+     * @param keyword
+     * @return
+     */
+    List<CmsSubject> all(String keyword);
 }

+ 3 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/SmsHomeRecommendSubjectService.java

@@ -35,4 +35,7 @@ public interface SmsHomeRecommendSubjectService {
      * 分页查询推荐
      */
     List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum);
+
+
+    List<SmsHomeRecommendSubject> homeSubjectByCmsSubject(Long id);
 }

+ 20 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/UmsRollBuyService.java

@@ -0,0 +1,20 @@
+package com.hwrj.cloud.admin.service;
+
+import com.hwrj.cloud.admin.model.UmsRollBuy;
+
+import java.util.List;
+
+public interface UmsRollBuyService {
+
+    public int add(UmsRollBuy buy);
+
+    public int update(UmsRollBuy buy);
+
+    public int delete(Long id);
+
+    public List<UmsRollBuy> page(String keyword,Integer pageNum,Integer pageSize);
+
+    public UmsRollBuy info(Long id);
+
+    public int importExcel(List<UmsRollBuy> list);
+}

+ 87 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/CmsSubjectCategoryServiceImpl.java

@@ -0,0 +1,87 @@
+package com.hwrj.cloud.admin.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.hwrj.cloud.admin.mapper.CmsSubjectCategoryMapper;
+import com.hwrj.cloud.admin.model.CmsSubject;
+import com.hwrj.cloud.admin.model.CmsSubjectCategory;
+import com.hwrj.cloud.admin.model.CmsSubjectCategoryExample;
+import com.hwrj.cloud.admin.service.CmsSubjectCategoryService;
+import com.hwrj.cloud.admin.service.CmsSubjectService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CmsSubjectCategoryServiceImpl implements CmsSubjectCategoryService {
+    @Autowired
+    private CmsSubjectCategoryMapper cmsSubjectCategoryMapper;
+
+    @Autowired
+    private CmsSubjectService cmsSubjectService;
+
+    @Override
+    public int add(CmsSubjectCategory category) {
+        if (category != null){
+            category.setDelFlag(0);
+            return cmsSubjectCategoryMapper.insertSelective(category);
+
+        }
+
+        return 0;
+    }
+
+    @Override
+    public int update(CmsSubjectCategory category) {
+        if (category != null){
+            category.setDelFlag(0);
+            return cmsSubjectCategoryMapper.updateByPrimaryKeySelective(category);
+
+        }
+        return 0;
+    }
+
+    @Override
+    public int delete(Long id) {
+        if (id != null){
+            List<CmsSubject> subjects = cmsSubjectService.subjectByCategory(id);
+            if (subjects == null||subjects.size()<0){
+                CmsSubjectCategory cmsSubjectCategory = new CmsSubjectCategory();
+                cmsSubjectCategory.setId(id);
+                cmsSubjectCategory.setDelFlag(1);
+                return cmsSubjectCategoryMapper.updateByPrimaryKeySelective(cmsSubjectCategory);
+            }
+        }
+        return 0;
+    }
+
+    @Override
+    public CmsSubjectCategory info(Long id) {
+        if (id != null){
+            return cmsSubjectCategoryMapper.selectByPrimaryKey(id);
+        }
+        return null;
+    }
+
+    @Override
+    public List<CmsSubjectCategory> pageInfo(String keyword, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum,pageSize);
+        CmsSubjectCategoryExample example = new CmsSubjectCategoryExample();
+        CmsSubjectCategoryExample.Criteria criteria = example.createCriteria();
+        if (!StringUtils.isEmpty(keyword)){
+            criteria.andNameLike("%"+keyword+"%");
+        }
+        return cmsSubjectCategoryMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<CmsSubjectCategory> listAll(String keyword) {
+        CmsSubjectCategoryExample example = new CmsSubjectCategoryExample();
+        CmsSubjectCategoryExample.Criteria criteria = example.createCriteria();
+        if (!StringUtils.isEmpty(keyword)){
+            criteria.andNameLike("%"+keyword+"%");
+        }
+        return cmsSubjectCategoryMapper.selectByExample(example);
+    }
+}

+ 148 - 7
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/CmsSubjectServiceImpl.java

@@ -6,22 +6,22 @@ import com.hwrj.cloud.admin.dao.CmsSubjectProductRelationDao;
 
 import com.hwrj.cloud.admin.mapper.CmsSubjectMapper;
 import com.hwrj.cloud.admin.mapper.CmsSubjectProductRelationMapper;
-import com.hwrj.cloud.admin.model.CmsSubject;
-import com.hwrj.cloud.admin.model.CmsSubjectExample;
-import com.hwrj.cloud.admin.model.CmsSubjectProductRelation;
-import com.hwrj.cloud.admin.model.CmsSubjectProductRelationExample;
+import com.hwrj.cloud.admin.model.*;
 import com.hwrj.cloud.admin.service.CmsSubjectService;
+import com.hwrj.cloud.admin.service.SmsHomeRecommendSubjectService;
+import com.hwrj.cloud.common.exception.ApiException;
+import org.checkerframework.checker.units.qual.C;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
 /**
  * 商品专题Service实现类
- * Created by macro on 2018/6/1.
  */
 @Service
 public class CmsSubjectServiceImpl implements CmsSubjectService {
@@ -34,10 +34,18 @@ public class CmsSubjectServiceImpl implements CmsSubjectService {
     @Autowired
     private CmsSubjectProductRelationMapper subjectProductRelationMapper;
 
+    @Autowired
+    private SmsHomeRecommendSubjectService smsHomeRecommendSubjectService;
+
 
     @Override
     public List<CmsSubject> listAll() {
-        return subjectMapper.selectByExample(new CmsSubjectExample());
+        CmsSubjectExample example = new CmsSubjectExample();
+        CmsSubjectExample.Criteria criteria = example.createCriteria();
+        criteria.andDelFlagEqualTo(0);
+        criteria.andShowStatusEqualTo(1);
+        example.setOrderByClause("sort asc");
+        return subjectMapper.selectByExample(example);
     }
 
     @Override
@@ -48,6 +56,9 @@ public class CmsSubjectServiceImpl implements CmsSubjectService {
         if (!StringUtils.isEmpty(keyword)) {
             criteria.andTitleLike("%" + keyword + "%");
         }
+
+        criteria.andDelFlagEqualTo(0);
+        example.setOrderByClause("sort asc");
         return subjectMapper.selectByExample(example);
     }
 
@@ -70,6 +81,16 @@ public class CmsSubjectServiceImpl implements CmsSubjectService {
         subjectProductRelationDao.insertList(productRelationList);
     }
 
+    @Override
+    public void relateAndDeleteByProductId(List<Long> ids) {
+        if (ids ==null || ids.size()<1){
+            return;
+        }
+        CmsSubjectProductRelationExample subjectProductRelationExample = new CmsSubjectProductRelationExample();
+        subjectProductRelationExample.createCriteria().andProductIdIn(ids);
+        subjectProductRelationMapper.deleteByExample(subjectProductRelationExample);
+    }
+
     @Override
     public List<CmsSubjectProductRelationInput> relationByProductId(Long productId) {
         List<CmsSubjectProductRelation> productRelationList = subjectProductRelationDao.selectSubjectProductRelationByProductId(productId);
@@ -81,8 +102,128 @@ public class CmsSubjectServiceImpl implements CmsSubjectService {
         return productRelationInputs;
     }
 
+    @Override
+    public List<CmsSubject> subjectByCategory(Long id) {
+        if (id == null){
+            return null;
+        }
+        CmsSubjectExample example = new CmsSubjectExample();
+        CmsSubjectExample.Criteria criteria = example.createCriteria();
+        criteria.andCategoryIdEqualTo(id);
+        criteria.andDelFlagEqualTo(0);
+        return subjectMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<CmsSubjectProductRelation> subjectRelationProduct(Long id) {
+        if (id== null){
+            return null;
+        }
+        CmsSubjectProductRelationExample example = new CmsSubjectProductRelationExample();
+        CmsSubjectProductRelationExample.Criteria criteria = example.createCriteria();
+        criteria.andSubjectIdEqualTo(id);
+        List<CmsSubjectProductRelation> relations = subjectProductRelationMapper.selectByExample(example);
+        return relations;
+    }
+
+    @Override
+    public int add(CmsSubject cmsSubject) {
+        if (cmsSubject != null){
+            cmsSubject.setCreateTime(new Date());
+            cmsSubject.setDelFlag(0);
+            /*
+             * 设置关联数量
+             */
+            cmsSubject.setCollectCount(0);
+            /*
+            评论数量
+             */
+            cmsSubject.setCommentCount(0);
+            /*
+            设置产品数量
+             */
+            cmsSubject.setProductCount(0);
+            /*
+            设置阅读数量
+             */
+            cmsSubject.setReadCount(0);
+            return subjectMapper.insert(cmsSubject);
+        }
+        return 0;
+    }
+
+    @Override
+    public int update(CmsSubject cmsSubject) {
+        if (cmsSubject != null&&cmsSubject.getId() != null){
+           return subjectMapper.updateByPrimaryKeyWithBLOBs(cmsSubject);
+        }
+        return 0;
+    }
+
+    @Override
+    public int delete(Long id) {
+        if (id != null){
+            /*
+             判断这条主题是否首页在用
+            */
+            List<SmsHomeRecommendSubject> recommendSubjects = smsHomeRecommendSubjectService.homeSubjectByCmsSubject(id);
+            if (recommendSubjects != null&&recommendSubjects.size()>0){
+                throw  new ApiException("主题已经关联了主题推介");
+            }
+            /*
+            判断是否有关联的商品
+             */
+
+            List<CmsSubjectProductRelation> relations = subjectRelationProduct(id);
+
+            if (relations != null&&relations.size()>0){
+                throw  new ApiException("主题关联了商品");
+            }
+
+            CmsSubject subject = new CmsSubject();
+            subject.setDelFlag(1);
+            subject.setId(id);
+            return subjectMapper.updateByPrimaryKeyWithBLOBs(subject);
+
+        }
+
+        return 0;
+    }
+
+    @Override
+    public CmsSubject info(Long id) {
+        if (id != null){
+            return subjectMapper.selectByPrimaryKey(id);
+        }
+        return null;
+    }
+
+    @Override
+    public int show(Long id, Integer showStatus) {
+        if (id==null||showStatus == null||showStatus<0||showStatus>1){
+            throw new ApiException("错误操作");
+        }
+        CmsSubject subject = new CmsSubject();
+        subject.setId(id);
+        subject.setShowStatus(showStatus);
+        return subjectMapper.updateByPrimaryKeyWithBLOBs(subject);
+    }
+
+
+    @Override
+    public List<CmsSubject> all(String keyword) {
+        CmsSubjectExample example = new CmsSubjectExample();
+        CmsSubjectExample.Criteria criteria = example.createCriteria();
+        criteria.andDelFlagEqualTo(0);
+        if (!StringUtils.isEmpty(keyword)){
+            criteria.andTitleLike("%"+keyword+"%");
+        }
+        example.setOrderByClause("sort asc");
+        return subjectMapper.selectByExample(example);
+    }
+
 
-    private List<CmsSubjectProductRelation> relationConvert(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId) {
+    public List<CmsSubjectProductRelation> relationConvert(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId) {
         return productRelationInputs.stream().map(p -> {
             CmsSubjectProductRelation cmsSubjectProductRelation = new CmsSubjectProductRelation();
             BeanUtils.copyProperties(p, cmsSubjectProductRelation);

+ 8 - 7
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/PmsProductServiceImpl.java

@@ -119,8 +119,8 @@ public class PmsProductServiceImpl implements PmsProductService {
         relateAndInsertList(skuStockDao, productParam.getSkuStockList(), productId);
         //添加商品参数,添加自定义商品规格
         relateAndInsertList(productAttributeValueDao, productParam.getProductAttributeValueList(), productId);
-//        //关联专题
-//        subjectService.relateAndInsertList(productParam.getSubjectProductRelationList(), productId);
+        //关联专题
+        subjectService.relateAndInsertList(productParam.getSubjectProductRelationList(), productId);
 //        //关联优选
 //        prefrenceAreaService.relateAndInsertList(productParam.getPrefrenceAreaProductRelationList(), productId);
         count = 1;
@@ -149,9 +149,7 @@ public class PmsProductServiceImpl implements PmsProductService {
     public PmsProductResult getUpdateInfo(Long id) {
         PmsProductResult updateInfo = productDao.getUpdateInfo(id);
 
-//        CommonResult<List<CmsSubjectProductRelationInput>> listCommonResult = cmsSubjectProductRelationClient.relationByProductId(id);
         List<CmsSubjectProductRelationInput> relationInputList = subjectService.relationByProductId(id);
-        Gson gson = new Gson();
         // 关联主题
 //        if (listCommonResult.getCode() == ResultCode.SUCCESS.getCode()) {
 //            List<CmsSubjectProductRelationInput> relationInputList = gson.fromJson(JSON.toJSONString(listCommonResult.getData()) ,
@@ -159,7 +157,9 @@ public class PmsProductServiceImpl implements PmsProductService {
 //                    }.getType());
 //            updateInfo.setSubjectProductRelationList(relationInputList);
 //        }
-        updateInfo.setSubjectProductRelationList(relationInputList);
+        if (relationInputList!= null&&relationInputList.size()>0) {
+            updateInfo.setSubjectProductRelationList(relationInputList);
+        }
         // 关联优选
 //        CommonResult<List<CmsPrefrenceAreaProductRelationInput>> commonResult = cmsPrefrenceAreaProductRelationClient.relationByProductId(id);
 //        if (commonResult.getCode() == ResultCode.SUCCESS.getCode()) {
@@ -220,8 +220,8 @@ public class PmsProductServiceImpl implements PmsProductService {
         productAttributeValueExample.createCriteria().andProductIdEqualTo(id);
         productAttributeValueMapper.deleteByExample(productAttributeValueExample);
         relateAndInsertList(productAttributeValueDao, productParam.getProductAttributeValueList(), id);
-//        //关联专题
-//        subjectService.relateAndUpdateList(productParam.getSubjectProductRelationList(), id);
+        //关联专题
+        subjectService.relateAndUpdateList(productParam.getSubjectProductRelationList(), id);
 //        //关联优选
 //        prefrenceAreaService.relateAndUpdateList(productParam.getPrefrenceAreaProductRelationList(), id);
         count = 1;
@@ -422,6 +422,7 @@ public class PmsProductServiceImpl implements PmsProductService {
         record.setLockDel(0);
         PmsProductExample example = new PmsProductExample();
         example.createCriteria().andIdIn(ids);
+        subjectService.relateAndDeleteByProductId(ids);
         return productMapper.updateByExampleSelective(record, example);
     }
 

+ 11 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/SmsHomeRecommendSubjectServiceImpl.java

@@ -67,4 +67,15 @@ public class SmsHomeRecommendSubjectServiceImpl implements SmsHomeRecommendSubje
         example.setOrderByClause("sort desc");
         return recommendProductMapper.selectByExample(example);
     }
+
+    @Override
+    public List<SmsHomeRecommendSubject> homeSubjectByCmsSubject(Long id) {
+        if (id == null){
+            return null;
+        }
+        SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
+        SmsHomeRecommendSubjectExample.Criteria criteria = example.createCriteria();
+        criteria.andSubjectIdEqualTo(id);
+        return recommendProductMapper.selectByExample(example);
+    }
 }

+ 75 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/UmsRollBuyServiceImpl.java

@@ -0,0 +1,75 @@
+package com.hwrj.cloud.admin.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.hwrj.cloud.admin.dao.UmsRollBuyDao;
+import com.hwrj.cloud.admin.mapper.UmsRollBuyMapper;
+import com.hwrj.cloud.admin.model.UmsRollBuy;
+import com.hwrj.cloud.admin.model.UmsRollBuyExample;
+import com.hwrj.cloud.admin.service.UmsRollBuyService;
+import net.bytebuddy.asm.Advice;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+@Service
+public class UmsRollBuyServiceImpl implements UmsRollBuyService {
+
+    @Autowired
+    private UmsRollBuyMapper umsRollBuyMapper;
+    @Override
+    public int add(UmsRollBuy buy) {
+        if (buy != null){
+            int i = umsRollBuyMapper.insertSelective(buy);
+            return i;
+        }
+        return 0;
+    }
+
+    @Override
+    public int update(UmsRollBuy buy) {
+        if (buy != null&&buy.getId() !=null){
+            int i = umsRollBuyMapper.updateByPrimaryKeySelective(buy);
+            return i;
+        }
+        return 0;
+    }
+
+    @Override
+    public int delete(Long id) {
+        if (id != null){
+            int i = umsRollBuyMapper.deleteByPrimaryKey(id);
+            return i;
+        }
+        return 0;
+    }
+
+    @Override
+    public List<UmsRollBuy> page(String keyword, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum,pageSize);
+        UmsRollBuyExample example = new UmsRollBuyExample();
+        UmsRollBuyExample.Criteria criteria = example.createCriteria();
+        if (!StringUtils.isEmpty(keyword)){
+            criteria.andMemberNameLike("%"+keyword+"%");
+        }
+        return umsRollBuyMapper.selectByExample(example);
+    }
+
+    @Override
+    public UmsRollBuy info(Long id) {
+        if (id != null){
+            return umsRollBuyMapper.selectByPrimaryKey(id);
+        }
+        return null;
+    }
+    @Autowired
+    private UmsRollBuyDao umsRollBuyDao;
+    @Override
+    public int importExcel(List<UmsRollBuy> list) {
+        if (list != null &&list.size()>0){
+            return umsRollBuyDao.insertList(list);
+        }
+        return 0;
+    }
+}

+ 2 - 1
forest-admin/admin-server/src/main/resources/dao/PmsProductDao.xml

@@ -47,4 +47,5 @@
     </select>
 
 
-</mapper>
+
+</mapper>

+ 290 - 0
forest-admin/admin-server/src/main/resources/dao/UmsRollBuyDao.xml

@@ -0,0 +1,290 @@
+<?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.hwrj.cloud.admin.dao.UmsRollBuyDao">
+  <resultMap id="BaseResultMap" type="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="member_id" jdbcType="BIGINT" property="memberId" />
+    <result column="member_name" jdbcType="VARCHAR" property="memberName" />
+    <result column="money" jdbcType="DECIMAL" property="money" />
+    <result column="product_id" jdbcType="BIGINT" property="productId" />
+    <result column="product_name" jdbcType="VARCHAR" property="productName" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="comp_name" jdbcType="VARCHAR" property="compName" />
+    <result column="comp_id" jdbcType="BIGINT" property="compId" />
+  </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, member_id, member_name, money, product_id, product_name, create_time, comp_name,
+    comp_id
+  </sql>
+  <select id="selectByExample" parameterType="com.hwrj.cloud.admin.model.UmsRollBuyExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from ums_roll_buy
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ums_roll_buy
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hwrj.cloud.admin.model.UmsRollBuyExample">
+    delete from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy (member_id, member_name, money,
+      product_id, product_name, create_time,
+      comp_name, comp_id)
+    values (#{memberId,jdbcType=BIGINT}, #{memberName,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL},
+      #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+      #{compName,jdbcType=VARCHAR}, #{compId,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="memberId != null">
+        member_id,
+      </if>
+      <if test="memberName != null">
+        member_name,
+      </if>
+      <if test="money != null">
+        money,
+      </if>
+      <if test="productId != null">
+        product_id,
+      </if>
+      <if test="productName != null">
+        product_name,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="compName != null">
+        comp_name,
+      </if>
+      <if test="compId != null">
+        comp_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="memberId != null">
+        #{memberId,jdbcType=BIGINT},
+      </if>
+      <if test="memberName != null">
+        #{memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="money != null">
+        #{money,jdbcType=DECIMAL},
+      </if>
+      <if test="productId != null">
+        #{productId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="compName != null">
+        #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="compId != null">
+        #{compId,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hwrj.cloud.admin.model.UmsRollBuyExample" resultType="java.lang.Long">
+    select count(*) from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ums_roll_buy
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberId != null">
+        member_id = #{record.memberId,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberName != null">
+        member_name = #{record.memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.money != null">
+        money = #{record.money,jdbcType=DECIMAL},
+      </if>
+      <if test="record.productId != null">
+        product_id = #{record.productId,jdbcType=BIGINT},
+      </if>
+      <if test="record.productName != null">
+        product_name = #{record.productName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.compName != null">
+        comp_name = #{record.compName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.compId != null">
+        comp_id = #{record.compId,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ums_roll_buy
+    set id = #{record.id,jdbcType=BIGINT},
+      member_id = #{record.memberId,jdbcType=BIGINT},
+      member_name = #{record.memberName,jdbcType=VARCHAR},
+      money = #{record.money,jdbcType=DECIMAL},
+      product_id = #{record.productId,jdbcType=BIGINT},
+      product_name = #{record.productName,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      comp_name = #{record.compName,jdbcType=VARCHAR},
+      comp_id = #{record.compId,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    update ums_roll_buy
+    <set>
+      <if test="memberId != null">
+        member_id = #{memberId,jdbcType=BIGINT},
+      </if>
+      <if test="memberName != null">
+        member_name = #{memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="money != null">
+        money = #{money,jdbcType=DECIMAL},
+      </if>
+      <if test="productId != null">
+        product_id = #{productId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        product_name = #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="compName != null">
+        comp_name = #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="compId != null">
+        comp_id = #{compId,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    update ums_roll_buy
+    set member_id = #{memberId,jdbcType=BIGINT},
+      member_name = #{memberName,jdbcType=VARCHAR},
+      money = #{money,jdbcType=DECIMAL},
+      product_id = #{productId,jdbcType=BIGINT},
+      product_name = #{productName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      comp_name = #{compName,jdbcType=VARCHAR},
+      comp_id = #{compId,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+
+
+  <insert id="insertList" parameterType="com.hwrj.cloud.admin.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy (member_id, member_name, money,
+    product_id, product_name, create_time,
+    comp_name, comp_id)
+    values
+    <foreach collection="list" item="item" separator=",">
+      (#{item.memberId,jdbcType=BIGINT}, #{item.memberName,jdbcType=VARCHAR}, #{item.money,jdbcType=DECIMAL},
+      #{item.productId,jdbcType=BIGINT}, #{item.productName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
+      #{item.compName,jdbcType=VARCHAR}, #{item.compId,jdbcType=BIGINT})
+    </foreach>
+  </insert>
+</mapper>

BIN
forest-admin/admin-server/src/main/resources/excel/model/zoumaModel.xlsx


+ 30 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/mapper/UmsRollBuyMapper.java

@@ -0,0 +1,30 @@
+package com.hwrj.cloud.portal.mapper;
+
+import com.hwrj.cloud.portal.model.UmsRollBuy;
+import com.hwrj.cloud.portal.model.UmsRollBuyExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface UmsRollBuyMapper {
+    long countByExample(UmsRollBuyExample example);
+
+    int deleteByExample(UmsRollBuyExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(UmsRollBuy record);
+
+    int insertSelective(UmsRollBuy record);
+
+    List<UmsRollBuy> selectByExample(UmsRollBuyExample example);
+
+    UmsRollBuy selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") UmsRollBuy record, @Param("example") UmsRollBuyExample example);
+
+    int updateByExample(@Param("record") UmsRollBuy record, @Param("example") UmsRollBuyExample example);
+
+    int updateByPrimaryKeySelective(UmsRollBuy record);
+
+    int updateByPrimaryKey(UmsRollBuy record);
+}

+ 34 - 1
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubject.java

@@ -7,29 +7,37 @@ import java.util.Date;
 public class CmsSubject implements Serializable {
     private Long id;
 
+    @ApiModelProperty(value = "专题分类id")
     private Long categoryId;
 
+    @ApiModelProperty(value = "标题")
     private String title;
 
-    @ApiModelProperty(value = "专题主图")
+    @ApiModelProperty(value = "主图")
     private String pic;
 
     @ApiModelProperty(value = "关联产品数量")
     private Integer productCount;
 
+    @ApiModelProperty(value = "专题状态")
     private Integer recommendStatus;
 
+    @ApiModelProperty(value = "创建时间")
     private Date createTime;
 
+    @ApiModelProperty(value = "关联产品数量")
     private Integer collectCount;
 
+    @ApiModelProperty(value = "专题阅读数量")
     private Integer readCount;
 
+    @ApiModelProperty(value = "专题数量")
     private Integer commentCount;
 
     @ApiModelProperty(value = "画册图片用逗号分割")
     private String albumPics;
 
+    @ApiModelProperty(value = "专题描述")
     private String description;
 
     @ApiModelProperty(value = "显示状态:0->不显示;1->显示")
@@ -41,6 +49,13 @@ public class CmsSubject implements Serializable {
     @ApiModelProperty(value = "专题分类名称")
     private String categoryName;
 
+    @ApiModelProperty(value = "专题排序")
+    private Integer sort;
+
+    @ApiModelProperty(value = "删除标志:0-未删除,1-删除")
+    private Integer delFlag;
+
+    @ApiModelProperty(value = "专题内容")
     private String content;
 
     private static final long serialVersionUID = 1L;
@@ -165,6 +180,22 @@ public class CmsSubject implements Serializable {
         this.categoryName = categoryName;
     }
 
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
     public String getContent() {
         return content;
     }
@@ -194,6 +225,8 @@ public class CmsSubject implements Serializable {
         sb.append(", showStatus=").append(showStatus);
         sb.append(", forwardCount=").append(forwardCount);
         sb.append(", categoryName=").append(categoryName);
+        sb.append(", sort=").append(sort);
+        sb.append(", delFlag=").append(delFlag);
         sb.append(", content=").append(content);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");

+ 12 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubjectCategory.java

@@ -18,6 +18,9 @@ public class CmsSubjectCategory implements Serializable {
 
     private Integer sort;
 
+    @ApiModelProperty(value = "删除标志0-未删除,1-已删除")
+    private Integer delFlag;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -68,6 +71,14 @@ public class CmsSubjectCategory implements Serializable {
         this.sort = sort;
     }
 
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -80,6 +91,7 @@ public class CmsSubjectCategory implements Serializable {
         sb.append(", subjectCount=").append(subjectCount);
         sb.append(", showStatus=").append(showStatus);
         sb.append(", sort=").append(sort);
+        sb.append(", delFlag=").append(delFlag);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 60 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubjectCategoryExample.java

@@ -483,6 +483,66 @@ public class CmsSubjectCategoryExample {
             addCriterion("sort not between", value1, value2, "sort");
             return (Criteria) this;
         }
+
+        public Criteria andDelFlagIsNull() {
+            addCriterion("del_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNotNull() {
+            addCriterion("del_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagEqualTo(Integer value) {
+            addCriterion("del_flag =", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotEqualTo(Integer value) {
+            addCriterion("del_flag <>", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThan(Integer value) {
+            addCriterion("del_flag >", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("del_flag >=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThan(Integer value) {
+            addCriterion("del_flag <", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("del_flag <=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIn(List<Integer> values) {
+            addCriterion("del_flag in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotIn(List<Integer> values) {
+            addCriterion("del_flag not in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag not between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 120 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/CmsSubjectExample.java

@@ -1054,6 +1054,126 @@ public class CmsSubjectExample {
             addCriterion("category_name not between", value1, value2, "categoryName");
             return (Criteria) this;
         }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNull() {
+            addCriterion("del_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNotNull() {
+            addCriterion("del_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagEqualTo(Integer value) {
+            addCriterion("del_flag =", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotEqualTo(Integer value) {
+            addCriterion("del_flag <>", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThan(Integer value) {
+            addCriterion("del_flag >", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("del_flag >=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThan(Integer value) {
+            addCriterion("del_flag <", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("del_flag <=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIn(List<Integer> values) {
+            addCriterion("del_flag in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotIn(List<Integer> values) {
+            addCriterion("del_flag not in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("del_flag not between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 129 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/UmsRollBuy.java

@@ -0,0 +1,129 @@
+package com.hwrj.cloud.portal.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class UmsRollBuy implements Serializable {
+    @ApiModelProperty(value = "序列号")
+    private Long id;
+
+    @ApiModelProperty(value = "成员id")
+    private Long memberId;
+
+    @ApiModelProperty(value = "成员名称")
+    private String memberName;
+
+    @ApiModelProperty(value = "花费")
+    private BigDecimal money;
+
+    @ApiModelProperty(value = "产品id")
+    private Long productId;
+
+    @ApiModelProperty(value = "产品名称")
+    private String productName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "供应商名称")
+    private String compName;
+
+    @ApiModelProperty(value = "供应商id")
+    private Long compId;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getMemberId() {
+        return memberId;
+    }
+
+    public void setMemberId(Long memberId) {
+        this.memberId = memberId;
+    }
+
+    public String getMemberName() {
+        return memberName;
+    }
+
+    public void setMemberName(String memberName) {
+        this.memberName = memberName;
+    }
+
+    public BigDecimal getMoney() {
+        return money;
+    }
+
+    public void setMoney(BigDecimal money) {
+        this.money = money;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getCompName() {
+        return compName;
+    }
+
+    public void setCompName(String compName) {
+        this.compName = compName;
+    }
+
+    public Long getCompId() {
+        return compId;
+    }
+
+    public void setCompId(Long compId) {
+        this.compId = compId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", memberId=").append(memberId);
+        sb.append(", memberName=").append(memberName);
+        sb.append(", money=").append(money);
+        sb.append(", productId=").append(productId);
+        sb.append(", productName=").append(productName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", compName=").append(compName);
+        sb.append(", compId=").append(compId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 772 - 0
forest-portal/portal-mbg/src/main/java/com/hwrj/cloud/portal/model/UmsRollBuyExample.java

@@ -0,0 +1,772 @@
+package com.hwrj.cloud.portal.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class UmsRollBuyExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public UmsRollBuyExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    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;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        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 andMemberIdIsNull() {
+            addCriterion("member_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdIsNotNull() {
+            addCriterion("member_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdEqualTo(Long value) {
+            addCriterion("member_id =", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdNotEqualTo(Long value) {
+            addCriterion("member_id <>", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdGreaterThan(Long value) {
+            addCriterion("member_id >", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("member_id >=", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdLessThan(Long value) {
+            addCriterion("member_id <", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdLessThanOrEqualTo(Long value) {
+            addCriterion("member_id <=", value, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdIn(List<Long> values) {
+            addCriterion("member_id in", values, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdNotIn(List<Long> values) {
+            addCriterion("member_id not in", values, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdBetween(Long value1, Long value2) {
+            addCriterion("member_id between", value1, value2, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIdNotBetween(Long value1, Long value2) {
+            addCriterion("member_id not between", value1, value2, "memberId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameIsNull() {
+            addCriterion("member_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameIsNotNull() {
+            addCriterion("member_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameEqualTo(String value) {
+            addCriterion("member_name =", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotEqualTo(String value) {
+            addCriterion("member_name <>", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameGreaterThan(String value) {
+            addCriterion("member_name >", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameGreaterThanOrEqualTo(String value) {
+            addCriterion("member_name >=", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameLessThan(String value) {
+            addCriterion("member_name <", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameLessThanOrEqualTo(String value) {
+            addCriterion("member_name <=", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameLike(String value) {
+            addCriterion("member_name like", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotLike(String value) {
+            addCriterion("member_name not like", value, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameIn(List<String> values) {
+            addCriterion("member_name in", values, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotIn(List<String> values) {
+            addCriterion("member_name not in", values, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameBetween(String value1, String value2) {
+            addCriterion("member_name between", value1, value2, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNameNotBetween(String value1, String value2) {
+            addCriterion("member_name not between", value1, value2, "memberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyIsNull() {
+            addCriterion("money is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyIsNotNull() {
+            addCriterion("money is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyEqualTo(BigDecimal value) {
+            addCriterion("money =", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyNotEqualTo(BigDecimal value) {
+            addCriterion("money <>", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyGreaterThan(BigDecimal value) {
+            addCriterion("money >", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("money >=", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyLessThan(BigDecimal value) {
+            addCriterion("money <", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("money <=", value, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyIn(List<BigDecimal> values) {
+            addCriterion("money in", values, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyNotIn(List<BigDecimal> values) {
+            addCriterion("money not in", values, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("money between", value1, value2, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andMoneyNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("money not between", value1, value2, "money");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNull() {
+            addCriterion("product_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNotNull() {
+            addCriterion("product_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdEqualTo(Long value) {
+            addCriterion("product_id =", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotEqualTo(Long value) {
+            addCriterion("product_id <>", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThan(Long value) {
+            addCriterion("product_id >", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("product_id >=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThan(Long value) {
+            addCriterion("product_id <", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThanOrEqualTo(Long value) {
+            addCriterion("product_id <=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIn(List<Long> values) {
+            addCriterion("product_id in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotIn(List<Long> values) {
+            addCriterion("product_id not in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdBetween(Long value1, Long value2) {
+            addCriterion("product_id between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotBetween(Long value1, Long value2) {
+            addCriterion("product_id not between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameIsNull() {
+            addCriterion("product_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameIsNotNull() {
+            addCriterion("product_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameEqualTo(String value) {
+            addCriterion("product_name =", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotEqualTo(String value) {
+            addCriterion("product_name <>", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameGreaterThan(String value) {
+            addCriterion("product_name >", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameGreaterThanOrEqualTo(String value) {
+            addCriterion("product_name >=", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameLessThan(String value) {
+            addCriterion("product_name <", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameLessThanOrEqualTo(String value) {
+            addCriterion("product_name <=", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameLike(String value) {
+            addCriterion("product_name like", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotLike(String value) {
+            addCriterion("product_name not like", value, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameIn(List<String> values) {
+            addCriterion("product_name in", values, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotIn(List<String> values) {
+            addCriterion("product_name not in", values, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameBetween(String value1, String value2) {
+            addCriterion("product_name between", value1, value2, "productName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductNameNotBetween(String value1, String value2) {
+            addCriterion("product_name not between", value1, value2, "productName");
+            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 andCompNameIsNull() {
+            addCriterion("comp_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameIsNotNull() {
+            addCriterion("comp_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameEqualTo(String value) {
+            addCriterion("comp_name =", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotEqualTo(String value) {
+            addCriterion("comp_name <>", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameGreaterThan(String value) {
+            addCriterion("comp_name >", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameGreaterThanOrEqualTo(String value) {
+            addCriterion("comp_name >=", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameLessThan(String value) {
+            addCriterion("comp_name <", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameLessThanOrEqualTo(String value) {
+            addCriterion("comp_name <=", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameLike(String value) {
+            addCriterion("comp_name like", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotLike(String value) {
+            addCriterion("comp_name not like", value, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameIn(List<String> values) {
+            addCriterion("comp_name in", values, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotIn(List<String> values) {
+            addCriterion("comp_name not in", values, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameBetween(String value1, String value2) {
+            addCriterion("comp_name between", value1, value2, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompNameNotBetween(String value1, String value2) {
+            addCriterion("comp_name not between", value1, value2, "compName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdIsNull() {
+            addCriterion("comp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdIsNotNull() {
+            addCriterion("comp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdEqualTo(Long value) {
+            addCriterion("comp_id =", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdNotEqualTo(Long value) {
+            addCriterion("comp_id <>", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdGreaterThan(Long value) {
+            addCriterion("comp_id >", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("comp_id >=", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdLessThan(Long value) {
+            addCriterion("comp_id <", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdLessThanOrEqualTo(Long value) {
+            addCriterion("comp_id <=", value, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdIn(List<Long> values) {
+            addCriterion("comp_id in", values, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdNotIn(List<Long> values) {
+            addCriterion("comp_id not in", values, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdBetween(Long value1, Long value2) {
+            addCriterion("comp_id between", value1, value2, "compId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompIdNotBetween(Long value1, Long value2) {
+            addCriterion("comp_id not between", value1, value2, "compId");
+            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);
+        }
+    }
+}

+ 22 - 5
forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/CmsSubjectCategoryMapper.xml

@@ -8,6 +8,7 @@
     <result column="subject_count" jdbcType="INTEGER" property="subjectCount" />
     <result column="show_status" jdbcType="INTEGER" property="showStatus" />
     <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -68,7 +69,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, name, icon, subject_count, show_status, sort
+    id, name, icon, subject_count, show_status, sort, del_flag
   </sql>
   <select id="selectByExample" parameterType="com.hwrj.cloud.portal.model.CmsSubjectCategoryExample" resultMap="BaseResultMap">
     select
@@ -105,9 +106,11 @@
       SELECT LAST_INSERT_ID()
     </selectKey>
     insert into cms_subject_category (name, icon, subject_count, 
-      show_status, sort)
+      show_status, sort, del_flag
+      )
     values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER}, 
-      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
+      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.hwrj.cloud.portal.model.CmsSubjectCategory">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -130,6 +133,9 @@
       <if test="sort != null">
         sort,
       </if>
+      <if test="delFlag != null">
+        del_flag,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="name != null">
@@ -147,6 +153,9 @@
       <if test="sort != null">
         #{sort,jdbcType=INTEGER},
       </if>
+      <if test="delFlag != null">
+        #{delFlag,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.hwrj.cloud.portal.model.CmsSubjectCategoryExample" resultType="java.lang.Long">
@@ -176,6 +185,9 @@
       <if test="record.sort != null">
         sort = #{record.sort,jdbcType=INTEGER},
       </if>
+      <if test="record.delFlag != null">
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -188,7 +200,8 @@
       icon = #{record.icon,jdbcType=VARCHAR},
       subject_count = #{record.subjectCount,jdbcType=INTEGER},
       show_status = #{record.showStatus,jdbcType=INTEGER},
-      sort = #{record.sort,jdbcType=INTEGER}
+      sort = #{record.sort,jdbcType=INTEGER},
+      del_flag = #{record.delFlag,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -211,6 +224,9 @@
       <if test="sort != null">
         sort = #{sort,jdbcType=INTEGER},
       </if>
+      <if test="delFlag != null">
+        del_flag = #{delFlag,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -220,7 +236,8 @@
       icon = #{icon,jdbcType=VARCHAR},
       subject_count = #{subjectCount,jdbcType=INTEGER},
       show_status = #{showStatus,jdbcType=INTEGER},
-      sort = #{sort,jdbcType=INTEGER}
+      sort = #{sort,jdbcType=INTEGER},
+      del_flag = #{delFlag,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 42 - 7
forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/CmsSubjectMapper.xml

@@ -17,6 +17,8 @@
     <result column="show_status" jdbcType="INTEGER" property="showStatus" />
     <result column="forward_count" jdbcType="INTEGER" property="forwardCount" />
     <result column="category_name" jdbcType="VARCHAR" property="categoryName" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwrj.cloud.portal.model.CmsSubject">
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
@@ -81,7 +83,8 @@
   </sql>
   <sql id="Base_Column_List">
     id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, 
-    read_count, comment_count, album_pics, description, show_status, forward_count, category_name
+    read_count, comment_count, album_pics, description, show_status, forward_count, category_name, 
+    sort, del_flag
   </sql>
   <sql id="Blob_Column_List">
     content
@@ -142,14 +145,14 @@
       product_count, recommend_status, create_time, 
       collect_count, read_count, comment_count, 
       album_pics, description, show_status, 
-      forward_count, category_name, content
-      )
+      forward_count, category_name, sort, 
+      del_flag, content)
     values (#{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, 
       #{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER}, 
       #{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, 
-      #{forwardCount,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{forwardCount,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
+      #{delFlag,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.hwrj.cloud.portal.model.CmsSubject">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -199,6 +202,12 @@
       <if test="categoryName != null">
         category_name,
       </if>
+      <if test="sort != null">
+        sort,
+      </if>
+      <if test="delFlag != null">
+        del_flag,
+      </if>
       <if test="content != null">
         content,
       </if>
@@ -246,6 +255,12 @@
       <if test="categoryName != null">
         #{categoryName,jdbcType=VARCHAR},
       </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="delFlag != null">
+        #{delFlag,jdbcType=INTEGER},
+      </if>
       <if test="content != null">
         #{content,jdbcType=LONGVARCHAR},
       </if>
@@ -305,6 +320,12 @@
       <if test="record.categoryName != null">
         category_name = #{record.categoryName,jdbcType=VARCHAR},
       </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+      <if test="record.delFlag != null">
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
+      </if>
       <if test="record.content != null">
         content = #{record.content,jdbcType=LONGVARCHAR},
       </if>
@@ -330,6 +351,8 @@
       show_status = #{record.showStatus,jdbcType=INTEGER},
       forward_count = #{record.forwardCount,jdbcType=INTEGER},
       category_name = #{record.categoryName,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      del_flag = #{record.delFlag,jdbcType=INTEGER},
       content = #{record.content,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -351,7 +374,9 @@
       description = #{record.description,jdbcType=VARCHAR},
       show_status = #{record.showStatus,jdbcType=INTEGER},
       forward_count = #{record.forwardCount,jdbcType=INTEGER},
-      category_name = #{record.categoryName,jdbcType=VARCHAR}
+      category_name = #{record.categoryName,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      del_flag = #{record.delFlag,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -401,6 +426,12 @@
       <if test="categoryName != null">
         category_name = #{categoryName,jdbcType=VARCHAR},
       </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="delFlag != null">
+        del_flag = #{delFlag,jdbcType=INTEGER},
+      </if>
       <if test="content != null">
         content = #{content,jdbcType=LONGVARCHAR},
       </if>
@@ -423,6 +454,8 @@
       show_status = #{showStatus,jdbcType=INTEGER},
       forward_count = #{forwardCount,jdbcType=INTEGER},
       category_name = #{categoryName,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      del_flag = #{delFlag,jdbcType=INTEGER},
       content = #{content,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -441,7 +474,9 @@
       description = #{description,jdbcType=VARCHAR},
       show_status = #{showStatus,jdbcType=INTEGER},
       forward_count = #{forwardCount,jdbcType=INTEGER},
-      category_name = #{categoryName,jdbcType=VARCHAR}
+      category_name = #{categoryName,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      del_flag = #{delFlag,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 274 - 0
forest-portal/portal-mbg/src/main/resources/com/hwrj/cloud/portal/mapper/UmsRollBuyMapper.xml

@@ -0,0 +1,274 @@
+<?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.hwrj.cloud.portal.mapper.UmsRollBuyMapper">
+  <resultMap id="BaseResultMap" type="com.hwrj.cloud.portal.model.UmsRollBuy">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="member_id" jdbcType="BIGINT" property="memberId" />
+    <result column="member_name" jdbcType="VARCHAR" property="memberName" />
+    <result column="money" jdbcType="DECIMAL" property="money" />
+    <result column="product_id" jdbcType="BIGINT" property="productId" />
+    <result column="product_name" jdbcType="VARCHAR" property="productName" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="comp_name" jdbcType="VARCHAR" property="compName" />
+    <result column="comp_id" jdbcType="BIGINT" property="compId" />
+  </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, member_id, member_name, money, product_id, product_name, create_time, comp_name, 
+    comp_id
+  </sql>
+  <select id="selectByExample" parameterType="com.hwrj.cloud.portal.model.UmsRollBuyExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ums_roll_buy
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ums_roll_buy
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hwrj.cloud.portal.model.UmsRollBuyExample">
+    delete from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hwrj.cloud.portal.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy (member_id, member_name, money, 
+      product_id, product_name, create_time, 
+      comp_name, comp_id)
+    values (#{memberId,jdbcType=BIGINT}, #{memberName,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL}, 
+      #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{compName,jdbcType=VARCHAR}, #{compId,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hwrj.cloud.portal.model.UmsRollBuy">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_roll_buy
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="memberId != null">
+        member_id,
+      </if>
+      <if test="memberName != null">
+        member_name,
+      </if>
+      <if test="money != null">
+        money,
+      </if>
+      <if test="productId != null">
+        product_id,
+      </if>
+      <if test="productName != null">
+        product_name,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="compName != null">
+        comp_name,
+      </if>
+      <if test="compId != null">
+        comp_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="memberId != null">
+        #{memberId,jdbcType=BIGINT},
+      </if>
+      <if test="memberName != null">
+        #{memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="money != null">
+        #{money,jdbcType=DECIMAL},
+      </if>
+      <if test="productId != null">
+        #{productId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="compName != null">
+        #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="compId != null">
+        #{compId,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hwrj.cloud.portal.model.UmsRollBuyExample" resultType="java.lang.Long">
+    select count(*) from ums_roll_buy
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ums_roll_buy
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberId != null">
+        member_id = #{record.memberId,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberName != null">
+        member_name = #{record.memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.money != null">
+        money = #{record.money,jdbcType=DECIMAL},
+      </if>
+      <if test="record.productId != null">
+        product_id = #{record.productId,jdbcType=BIGINT},
+      </if>
+      <if test="record.productName != null">
+        product_name = #{record.productName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.compName != null">
+        comp_name = #{record.compName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.compId != null">
+        comp_id = #{record.compId,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ums_roll_buy
+    set id = #{record.id,jdbcType=BIGINT},
+      member_id = #{record.memberId,jdbcType=BIGINT},
+      member_name = #{record.memberName,jdbcType=VARCHAR},
+      money = #{record.money,jdbcType=DECIMAL},
+      product_id = #{record.productId,jdbcType=BIGINT},
+      product_name = #{record.productName,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      comp_name = #{record.compName,jdbcType=VARCHAR},
+      comp_id = #{record.compId,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hwrj.cloud.portal.model.UmsRollBuy">
+    update ums_roll_buy
+    <set>
+      <if test="memberId != null">
+        member_id = #{memberId,jdbcType=BIGINT},
+      </if>
+      <if test="memberName != null">
+        member_name = #{memberName,jdbcType=VARCHAR},
+      </if>
+      <if test="money != null">
+        money = #{money,jdbcType=DECIMAL},
+      </if>
+      <if test="productId != null">
+        product_id = #{productId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        product_name = #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="compName != null">
+        comp_name = #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="compId != null">
+        comp_id = #{compId,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hwrj.cloud.portal.model.UmsRollBuy">
+    update ums_roll_buy
+    set member_id = #{memberId,jdbcType=BIGINT},
+      member_name = #{memberName,jdbcType=VARCHAR},
+      money = #{money,jdbcType=DECIMAL},
+      product_id = #{productId,jdbcType=BIGINT},
+      product_name = #{productName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      comp_name = #{compName,jdbcType=VARCHAR},
+      comp_id = #{compId,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 2 - 2
forest-portal/portal-mbg/src/main/resources/generatorConfig.xml

@@ -37,8 +37,8 @@
         <javaClientGenerator type="XMLMAPPER" targetPackage="com.hwrj.cloud.portal.mapper"
                              targetProject="forest-portal\portal-mbg\src\main\java"/>
         <!--生成全部表tableName设为%-->
-        <table tableName="oms_order_pay">
+        <table tableName="ums_roll_buy%">
             <generatedKey column="id" sqlStatement="MySql" identity="true"/>
         </table>
     </context>
-</generatorConfiguration>
+</generatorConfiguration>

+ 5 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/config/Swagger2Config.java

@@ -1,7 +1,10 @@
 package com.hwrj.cloud.portal.config;
 
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
 import springfox.documentation.builders.ApiInfoBuilder;
 import springfox.documentation.builders.PathSelectors;
 import springfox.documentation.builders.RequestHandlerSelectors;
@@ -23,6 +26,8 @@ import java.util.List;
  */
 @Configuration
 @EnableSwagger2
+@EnableKnife4j
+@Import(BeanValidatorPluginsConfiguration.class)
 public class Swagger2Config {
     @Bean
     public Docket createRestApi() {

+ 37 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/controller/HomeController.java

@@ -1,10 +1,12 @@
 package com.hwrj.cloud.portal.controller;
 
+import com.hwrj.cloud.common.api.CommonPage;
 import com.hwrj.cloud.common.api.CommonResult;
 import com.hwrj.cloud.portal.model.CmsSubject;
 import com.hwrj.cloud.portal.model.PmsProduct;
 import com.hwrj.cloud.portal.model.PmsProductCategory;
 import com.hwrj.cloud.portal.domain.HomeContentResult;
+import com.hwrj.cloud.portal.model.UmsRollBuy;
 import com.hwrj.cloud.portal.service.HomeService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -33,6 +35,9 @@ public class HomeController {
         return CommonResult.success(contentResult);
     }
 
+
+
+
     @ApiOperation("分页获取推荐商品")
     @RequestMapping(value = "/recommendProductList", method = RequestMethod.GET)
     @ResponseBody
@@ -42,6 +47,29 @@ public class HomeController {
         return CommonResult.success(productList);
     }
 
+
+    @ApiOperation("分页获取优选推介产品")
+    @RequestMapping(value = "/better-select", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<CommonPage<PmsProduct>> hotProduct(@RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize,
+                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
+        List<PmsProduct> productList = homeService.hotProductList(pageSize, pageNum);
+        return CommonResult.success(CommonPage.restPage(productList));
+    }
+
+    @ApiOperation("分页获取专题产品")
+    @RequestMapping(value = "/subjectProductList", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<PmsProduct>> subjectProductList(@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
+                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                                                @RequestParam(value = "subjectId",required = true)Long subjectId) {
+        List<PmsProduct> productList = homeService.getSubjectProductList(subjectId,pageSize, pageNum);
+        if (productList == null){
+            return CommonResult.failed();
+        }
+        return CommonResult.success(productList);
+    }
+
     @ApiOperation("获取首页商品分类")
     @RequestMapping(value = "/productCateList/{parentId}", method = RequestMethod.GET)
     @ResponseBody
@@ -77,4 +105,13 @@ public class HomeController {
         List<PmsProduct> productList = homeService.newProductList(pageNum, pageSize);
         return CommonResult.success(productList);
     }
+
+    @ApiOperation("分页获取走马灯")
+    @RequestMapping(value = "/roll-buy", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<CommonPage<UmsRollBuy>> rollBuy(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
+        List<UmsRollBuy> buys = homeService.rollBuy(pageNum, pageSize);
+        return CommonResult.success(CommonPage.restPage(buys));
+    }
 }

+ 3 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/dao/PmsProductDao.java

@@ -1,6 +1,7 @@
 package com.hwrj.cloud.portal.dao;
 
 import com.hwrj.cloud.portal.domain.BrandVO;
+import com.hwrj.cloud.portal.model.PmsProduct;
 import org.apache.ibatis.annotations.Param;
 import org.mapstruct.Mapper;
 
@@ -10,4 +11,6 @@ import java.util.List;
 public interface PmsProductDao {
 
     List<BrandVO> selectBandList(@Param("compId") Long compId);
+
+    List<PmsProduct> subjectProduct(Long subjectId);
 }

+ 20 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/CmsSubjectService.java

@@ -0,0 +1,20 @@
+package com.hwrj.cloud.portal.service;
+
+import com.hwrj.cloud.portal.model.CmsSubjectProductRelation;
+
+import java.util.List;
+
+public interface CmsSubjectService {
+
+    /**
+     * 通过CmsSu
+     * @param id
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    public List<CmsSubjectProductRelation> subjectProductRelation(Long id,Integer pageNum,Integer pageSize);
+
+
+
+}

+ 18 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/HomeService.java

@@ -4,6 +4,7 @@ import com.hwrj.cloud.portal.model.CmsSubject;
 import com.hwrj.cloud.portal.model.PmsProduct;
 import com.hwrj.cloud.portal.model.PmsProductCategory;
 import com.hwrj.cloud.portal.domain.HomeContentResult;
+import com.hwrj.cloud.portal.model.UmsRollBuy;
 
 import java.util.List;
 
@@ -23,6 +24,8 @@ public interface HomeService {
      */
     List<PmsProduct> recommendProductList(Integer pageSize, Integer pageNum);
 
+
+
     /**
      * 获取商品分类
      *
@@ -37,6 +40,13 @@ public interface HomeService {
      */
     List<CmsSubject> getSubjectList(Long cateId, Integer pageSize, Integer pageNum);
 
+    /**
+     * 分页获取去专题产品
+     *
+     * @param subjectId 专题分类id
+     */
+    List<PmsProduct> getSubjectProductList(Long subjectId, Integer pageSize, Integer pageNum);
+
     /**
      * 分页获取人气推荐商品
      */
@@ -46,4 +56,12 @@ public interface HomeService {
      * 分页获取新品推荐商品
      */
     List<PmsProduct> newProductList(Integer pageNum, Integer pageSize);
+
+    /**
+     * 分页查询跑马灯
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    List<UmsRollBuy> rollBuy(Integer pageNum,Integer pageSize);
 }

+ 1 - 3
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/SubjectService.java

@@ -5,9 +5,7 @@ import com.hwrj.cloud.portal.model.CmsSubject;
 import java.util.List;
 
 /**
- * @author mtcarpenter
- * @github https://github.com/mtcarpenter/mall-cloud-alibaba
- * @desc 微信公众号:山间木匠
+ *
  */
 public interface SubjectService {
     /**

+ 43 - 0
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/impl/CmsSubjectServiceImpl.java

@@ -0,0 +1,43 @@
+package com.hwrj.cloud.portal.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.hwrj.cloud.common.exception.ApiException;
+import com.hwrj.cloud.portal.mapper.CmsSubjectMapper;
+import com.hwrj.cloud.portal.mapper.CmsSubjectProductRelationMapper;
+import com.hwrj.cloud.portal.model.CmsSubject;
+import com.hwrj.cloud.portal.model.CmsSubjectExample;
+import com.hwrj.cloud.portal.model.CmsSubjectProductRelation;
+import com.hwrj.cloud.portal.model.CmsSubjectProductRelationExample;
+import com.hwrj.cloud.portal.service.CmsSubjectService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CmsSubjectServiceImpl implements CmsSubjectService {
+
+    @Autowired
+    private CmsSubjectMapper cmsSubjectMapper;
+
+    @Autowired
+    private CmsSubjectProductRelationMapper relationMapper;
+    @Override
+    public List<CmsSubjectProductRelation> subjectProductRelation(Long id,Integer pageNum,Integer pageSize) {
+        if (id != null){
+            CmsSubjectExample subjectExample = new CmsSubjectExample();
+            CmsSubjectExample.Criteria criteria1 = subjectExample.createCriteria();
+            criteria1.andDelFlagEqualTo(0);criteria1.andIdEqualTo(id);
+            List<CmsSubject> subjects = cmsSubjectMapper.selectByExample(subjectExample);
+            if (subjects==null||subjects.size()<1){
+                throw new ApiException("没有对应的专题信息");
+            }
+            PageHelper.startPage(pageNum,pageSize);
+            CmsSubjectProductRelationExample example = new CmsSubjectProductRelationExample();
+            CmsSubjectProductRelationExample.Criteria criteria = example.createCriteria();
+            criteria.andSubjectIdEqualTo(id);
+            return relationMapper.selectByExample(example);
+        }
+        return null;
+    }
+}

+ 31 - 3
forest-portal/portal-server/src/main/java/com/hwrj/cloud/portal/service/impl/HomeServiceImpl.java

@@ -1,6 +1,8 @@
 package com.hwrj.cloud.portal.service.impl;
 
 import com.github.pagehelper.PageHelper;
+import com.hwrj.cloud.common.exception.ApiException;
+import com.hwrj.cloud.portal.dao.PmsProductDao;
 import com.hwrj.cloud.portal.mapper.*;
 import com.hwrj.cloud.portal.model.*;
 import com.hwrj.cloud.portal.dao.HomeDao;
@@ -32,10 +34,13 @@ public class HomeServiceImpl implements HomeService {
     @Autowired
     private CmsSubjectMapper subjectMapper;
 
-
+    @Autowired
+    private PmsProductDao pmsProductDao;
     @Autowired
     private SubjectService subjectService;
 
+    @Autowired
+    private UmsRollBuyMapper umsRollBuyMapper;
 
     @Autowired
     private CouponService couponService;
@@ -48,13 +53,15 @@ public class HomeServiceImpl implements HomeService {
         result.setAdvertiseList(smsHomeAdvertise);
 //        result.setAdvertiseList(couponFeign.getHomeAdvertiseList().getData());
         //获取推荐品牌
-        result.setBrandList(homeDao.getRecommendBrandList(0,6));
+//        result.setBrandList(homeDao.getRecommendBrandList(0,6));
         //获取秒杀信息
-        result.setHomeFlashPromotion(getHomeFlashPromotion());
+//        result.setHomeFlashPromotion(getHomeFlashPromotion());
         //获取新品推荐
         result.setNewProductList(homeDao.getNewProductList(0, 4));
         //获取人气推荐
         result.setHotProductList(homeDao.getHotProductList(0, 4));
+
+
         //获取推荐专题
         List<CmsSubject> cmsSubjects = subjectService.getRecommendSubjectList(0, 4);
         result.setSubjectList(cmsSubjects);
@@ -89,12 +96,25 @@ public class HomeServiceImpl implements HomeService {
         CmsSubjectExample example = new CmsSubjectExample();
         CmsSubjectExample.Criteria criteria = example.createCriteria();
         criteria.andShowStatusEqualTo(1);
+        criteria.andDelFlagEqualTo(0);
+        example.setOrderByClause("sort desc");
         if (cateId != null) {
             criteria.andCategoryIdEqualTo(cateId);
         }
         return subjectMapper.selectByExample(example);
     }
 
+    @Override
+    public List<PmsProduct> getSubjectProductList(Long subjectId, Integer pageSize, Integer pageNum) {
+        if (subjectId == null){
+            throw  new ApiException("非法操作");
+        }
+        PageHelper.startPage(pageNum,pageSize);
+        List<PmsProduct> list = pmsProductDao.subjectProduct(subjectId);
+
+        return list;
+    }
+
     @Override
     public List<PmsProduct> hotProductList(Integer pageNum, Integer pageSize) {
         int offset = pageSize * (pageNum - 1);
@@ -107,6 +127,14 @@ public class HomeServiceImpl implements HomeService {
         return homeDao.getNewProductList(offset, pageSize);
     }
 
+    @Override
+    public List<UmsRollBuy> rollBuy(Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum,pageSize);
+        UmsRollBuyExample example = new UmsRollBuyExample();
+
+        return umsRollBuyMapper.selectByExample(example);
+    }
+
     private HomeFlashPromotion getHomeFlashPromotion() {
         HomeFlashPromotion homeFlashPromotion = new HomeFlashPromotion();
         //获取当前秒杀活动

+ 10 - 1
forest-portal/portal-server/src/main/resources/dao/PmsProductDao.xml

@@ -9,4 +9,13 @@
         FROM
             pms_brand a WHERE a.comp_id = #{compId}
     </select>
-</mapper>
+
+    <select id="subjectProduct" parameterType="java.lang.Long" resultMap="com.hwrj.cloud.portal.mapper.PmsProductMapper.BaseResultMap">
+        select a.* from
+         pms_product a inner  join
+         cms_subject_product_relation b on a.id = b.product_id
+         inner join cms_subject c on b.subject_id = c.id
+         where c.del_flag=0
+         and b.subject_id = #{subjectId,jdbcType=BIGINT}
+    </select>
+</mapper>

+ 1 - 2
forest-portal/portal-server/src/main/resources/dao/SubjectDao.xml

@@ -8,9 +8,8 @@
             LEFT JOIN cms_subject s ON hs.subject_id = s.id
         WHERE
             hs.recommend_status = 1
-            AND s.show_status = 1
         ORDER BY
             hs.sort DESC
         LIMIT #{offset}, #{limit};
     </select>
-</mapper>
+</mapper>

+ 0 - 1
nacos/data/config-data/DEFAULT_GROUP/forest-common.yml

@@ -34,7 +34,6 @@ secure:
       - /sso/**
       - /wechat/**
       - /brand/**
-      - /app/pay
       - /app/payResult
 
 qiniu:

+ 4 - 8
nacos/data/config-data/DEFAULT_GROUP/forest-portal.yml

@@ -37,7 +37,7 @@ spring:
     publisher-confirms: true
 myredis:
   address: redis://${spring.redis.host}:${spring.redis.port}
-  passord: ${spring.redis.password}
+  password: ${spring.redis.password}
   
 logging:
   level:
@@ -65,13 +65,9 @@ redis:
     authLoginCode: 240
     common: 86400
 jwt:
-  #JWT存储的请求头
   tokenHeader: Authorization
-  #JWT加解密使用的密钥
   secret: forest-admin-secret
-  #JWT的超期限时间(60*60*24*7)
   expiration: 604800
-  #JWT负载中拿到开头
   tokenHead: Bearer
   
 forest:
@@ -89,10 +85,10 @@ wx:
     appId: wxbe90cc7c5233dd84
     secret: ec4a18ce1a7bcf17cf592c3d57cec68a
     token: 123
-    url: http://wx.hw.hongweisoft.com/zddapi/forest-portal/wechat/h5/userInfo
+    url: http://wx.hw.hongweisoft.com/fqb/forest-portal/wechat/h5/userInfo
     before: http://172.16.90.25:8080
   pay:
     appId: wxbe90cc7c5233dd84
     mchId: 1583849731
-    mchKey: B5F5A628C91D869F4CA357D2BCD6300
-    wxpayAppcallbackurl: http://wx.hw.hongweisoft.com/zddtest/forest-portal/app/payResult
+    mchKey: B5F5A628C91D869F4CA357D2BCD63006
+    wxpayAppcallbackurl: http://wx.hw.hongweisoft.com/fqb/forest-portal/app/payResult

+ 12 - 0
sql/表结构变化语句/qbsql.sql

@@ -0,0 +1,12 @@
+CREATE TABLE `forest-cloud-mall`.`ums_roll_buy`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '序列号',
+  `member_id` bigint(20) NULL COMMENT '成员id',
+  `member_name` varchar(300) NULL COMMENT '成员名称',
+  `money` decimal(15, 2) NULL COMMENT '花费',
+  `product_id` bigint(20) NULL COMMENT '产品id',
+  `product_name` varchar(500) NULL COMMENT '产品名称',
+  `create_time` datetime(0) NULL COMMENT '创建时间',
+  `comp_name` varchar(500) NULL COMMENT '供应商名称',
+  `comp_id` bigint(20) NULL COMMENT '供应商id',
+  PRIMARY KEY (`id`)
+);

+ 2 - 0
sql/表结构变化语句/更新sql.sql

@@ -361,3 +361,5 @@ INSERT INTO `sms_home_advertise` VALUES ('3', '特级雪燕', '1', 'http://qly.g
 INSERT INTO `sms_home_advertise` VALUES ('4', '刺梨原汁', '1', 'http://qly.gzqlyx.com/0/1/20201211164312000000003.png', '2018-11-13 14:01:37', '2018-11-13 14:01:37', '1', '0', '0', '#', '夏季大热促销2', '0');
 INSERT INTO `sms_home_advertise` VALUES ('9', '铁皮石斛枫斗', '1', 'http://qly.gzqlyx.com/0/1/20201211164246000000001.png', '2018-11-01 00:00:00', '2018-11-24 00:00:00', '1', '0', '0', '#', '电影推荐广告', '100');
 INSERT INTO `sms_home_advertise` VALUES ('11', '麻辣一家', '1', 'http://qly.gzqlyx.com/0/9/banner1.jpg', '2018-11-13 00:00:00', '2018-11-30 00:00:00', '1', '0', '0', '#', null, '98');
+
+