Browse Source

新增:导入excel添加生产地信息和产出物信息。

lym 4 years ago
parent
commit
35b792a4d9
23 changed files with 4685 additions and 1 deletions
  1. 36 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsMemberOriginMapper.java
  2. 36 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsMemberOriginProductMapper.java
  3. 343 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOrigin.java
  4. 1581 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOriginExample.java
  5. 164 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOriginProduct.java
  6. 901 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOriginProductExample.java
  7. 627 0
      forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/UmsMemberOriginMapper.xml
  8. 375 0
      forest-admin/admin-mbg/src/main/resources/com/hwrj/cloud/admin/mapper/UmsMemberOriginProductMapper.xml
  9. 2 1
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/AdminApplication.java
  10. 4 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/bo/AdminUserDetails.java
  11. 87 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsMemberOriginController.java
  12. 41 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsMemberOriginProductController.java
  13. 20 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/UmsMemberOriginDao.java
  14. 17 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/UmsMemberOriginProductDao.java
  15. 121 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/excelEntity/UmsMemberOriginExcel.java
  16. 47 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/listener/ImportExcelEventListener.java
  17. 16 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/UmsMemberOriginProductService.java
  18. 15 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/UmsMemberOriginService.java
  19. 50 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/UmsMemberOriginProductServiceImpl.java
  20. 115 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/UmsMemberOriginServiceImpl.java
  21. 59 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/util/CurrUserUtil.java
  22. 11 0
      forest-admin/admin-server/src/main/resources/dao/UmsMemberOriginDao.xml
  23. 17 0
      forest-admin/admin-server/src/main/resources/dao/UmsMemberOriginProductDao.xml

+ 36 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsMemberOriginMapper.java

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

+ 36 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsMemberOriginProductMapper.java

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

+ 343 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOrigin.java

@@ -0,0 +1,343 @@
+package com.hwrj.cloud.admin.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.Date;
+
+public class UmsMemberOrigin implements Serializable {
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @ApiModelProperty(value = "供应商id (供应商信息表 ums_company_info -> id)")
+    private Long fkCompanyInfoId;
+
+    @ApiModelProperty(value = "供应商名称")
+    private String compName;
+
+    @ApiModelProperty(value = "生产地名称")
+    private String originName;
+
+    @ApiModelProperty(value = "生产地面积(亩)")
+    private Double originArea;
+
+    @ApiModelProperty(value = "人数")
+    private Integer peopleNum;
+
+    @ApiModelProperty(value = "建立日期(年)")
+    private String foundDate;
+
+    @ApiModelProperty(value = "联系人")
+    private String linkUser;
+
+    @ApiModelProperty(value = "联系方式")
+    private String linkPhone;
+
+    @ApiModelProperty(value = "省")
+    private String provinceName;
+
+    @ApiModelProperty(value = "市")
+    private String cityName;
+
+    @ApiModelProperty(value = "县")
+    private String countyName;
+
+    @ApiModelProperty(value = "详细地址")
+    private String detailAddress;
+
+    private String altitude;
+
+    @ApiModelProperty(value = "经度")
+    private String longitude;
+
+    @ApiModelProperty(value = "纬度")
+    private String latitude;
+
+    @ApiModelProperty(value = "状态 0:可用,1:禁用,2:删除")
+    private Integer state;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "创建人")
+    private Integer createId;
+
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "修改人id")
+    private Integer updateId;
+
+    @ApiModelProperty(value = "生产地图片")
+    private String imgUrl;
+
+    @ApiModelProperty(value = "生产地宣传视频地址")
+    private String videoUrl;
+
+    @ApiModelProperty(value = "vr地址")
+    private String vrUrl;
+
+    @ApiModelProperty(value = "实时监控视频地址")
+    private String cameraUrl;
+
+    @ApiModelProperty(value = "简介")
+    private String summary;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getFkCompanyInfoId() {
+        return fkCompanyInfoId;
+    }
+
+    public void setFkCompanyInfoId(Long fkCompanyInfoId) {
+        this.fkCompanyInfoId = fkCompanyInfoId;
+    }
+
+    public String getCompName() {
+        return compName;
+    }
+
+    public void setCompName(String compName) {
+        this.compName = compName;
+    }
+
+    public String getOriginName() {
+        return originName;
+    }
+
+    public void setOriginName(String originName) {
+        this.originName = originName;
+    }
+
+    public Double getOriginArea() {
+        return originArea;
+    }
+
+    public void setOriginArea(Double originArea) {
+        this.originArea = originArea;
+    }
+
+    public Integer getPeopleNum() {
+        return peopleNum;
+    }
+
+    public void setPeopleNum(Integer peopleNum) {
+        this.peopleNum = peopleNum;
+    }
+
+    public String getFoundDate() {
+        return foundDate;
+    }
+
+    public void setFoundDate(String foundDate) {
+        this.foundDate = foundDate;
+    }
+
+    public String getLinkUser() {
+        return linkUser;
+    }
+
+    public void setLinkUser(String linkUser) {
+        this.linkUser = linkUser;
+    }
+
+    public String getLinkPhone() {
+        return linkPhone;
+    }
+
+    public void setLinkPhone(String linkPhone) {
+        this.linkPhone = linkPhone;
+    }
+
+    public String getProvinceName() {
+        return provinceName;
+    }
+
+    public void setProvinceName(String provinceName) {
+        this.provinceName = provinceName;
+    }
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public void setCityName(String cityName) {
+        this.cityName = cityName;
+    }
+
+    public String getCountyName() {
+        return countyName;
+    }
+
+    public void setCountyName(String countyName) {
+        this.countyName = countyName;
+    }
+
+    public String getDetailAddress() {
+        return detailAddress;
+    }
+
+    public void setDetailAddress(String detailAddress) {
+        this.detailAddress = detailAddress;
+    }
+
+    public String getAltitude() {
+        return altitude;
+    }
+
+    public void setAltitude(String altitude) {
+        this.altitude = altitude;
+    }
+
+    public String getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(String longitude) {
+        this.longitude = longitude;
+    }
+
+    public String getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(String latitude) {
+        this.latitude = latitude;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(Integer createId) {
+        this.createId = createId;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getUpdateId() {
+        return updateId;
+    }
+
+    public void setUpdateId(Integer updateId) {
+        this.updateId = updateId;
+    }
+
+    public String getImgUrl() {
+        return imgUrl;
+    }
+
+    public void setImgUrl(String imgUrl) {
+        this.imgUrl = imgUrl;
+    }
+
+    public String getVideoUrl() {
+        return videoUrl;
+    }
+
+    public void setVideoUrl(String videoUrl) {
+        this.videoUrl = videoUrl;
+    }
+
+    public String getVrUrl() {
+        return vrUrl;
+    }
+
+    public void setVrUrl(String vrUrl) {
+        this.vrUrl = vrUrl;
+    }
+
+    public String getCameraUrl() {
+        return cameraUrl;
+    }
+
+    public void setCameraUrl(String cameraUrl) {
+        this.cameraUrl = cameraUrl;
+    }
+
+    public String getSummary() {
+        return summary;
+    }
+
+    public void setSummary(String summary) {
+        this.summary = summary;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @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(", fkCompanyInfoId=").append(fkCompanyInfoId);
+        sb.append(", compName=").append(compName);
+        sb.append(", originName=").append(originName);
+        sb.append(", originArea=").append(originArea);
+        sb.append(", peopleNum=").append(peopleNum);
+        sb.append(", foundDate=").append(foundDate);
+        sb.append(", linkUser=").append(linkUser);
+        sb.append(", linkPhone=").append(linkPhone);
+        sb.append(", provinceName=").append(provinceName);
+        sb.append(", cityName=").append(cityName);
+        sb.append(", countyName=").append(countyName);
+        sb.append(", detailAddress=").append(detailAddress);
+        sb.append(", altitude=").append(altitude);
+        sb.append(", longitude=").append(longitude);
+        sb.append(", latitude=").append(latitude);
+        sb.append(", state=").append(state);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", createId=").append(createId);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", updateId=").append(updateId);
+        sb.append(", imgUrl=").append(imgUrl);
+        sb.append(", videoUrl=").append(videoUrl);
+        sb.append(", vrUrl=").append(vrUrl);
+        sb.append(", cameraUrl=").append(cameraUrl);
+        sb.append(", summary=").append(summary);
+        sb.append(", remark=").append(remark);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

File diff suppressed because it is too large
+ 1581 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOriginExample.java


+ 164 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOriginProduct.java

@@ -0,0 +1,164 @@
+package com.hwrj.cloud.admin.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.Date;
+
+public class UmsMemberOriginProduct implements Serializable {
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @ApiModelProperty(value = "生产地id (生产地信息表 ums_member_origin -> id)")
+    private Long fkOriginId;
+
+    @ApiModelProperty(value = "产品名称")
+    private String productName;
+
+    @ApiModelProperty(value = "产出物种植面积(亩)")
+    private String plantArea;
+
+    @ApiModelProperty(value = "产出物总产量(吨)")
+    private String outputNum;
+
+    @ApiModelProperty(value = "产出物亩产值(万元)")
+    private String outputValue;
+
+    @ApiModelProperty(value = "状态 0:可用,1:禁用,2:删除")
+    private Integer state;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "创建人")
+    private Integer createId;
+
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "修改人id")
+    private Integer updateId;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getFkOriginId() {
+        return fkOriginId;
+    }
+
+    public void setFkOriginId(Long fkOriginId) {
+        this.fkOriginId = fkOriginId;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getPlantArea() {
+        return plantArea;
+    }
+
+    public void setPlantArea(String plantArea) {
+        this.plantArea = plantArea;
+    }
+
+    public String getOutputNum() {
+        return outputNum;
+    }
+
+    public void setOutputNum(String outputNum) {
+        this.outputNum = outputNum;
+    }
+
+    public String getOutputValue() {
+        return outputValue;
+    }
+
+    public void setOutputValue(String outputValue) {
+        this.outputValue = outputValue;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(Integer createId) {
+        this.createId = createId;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getUpdateId() {
+        return updateId;
+    }
+
+    public void setUpdateId(Integer updateId) {
+        this.updateId = updateId;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @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(", fkOriginId=").append(fkOriginId);
+        sb.append(", productName=").append(productName);
+        sb.append(", plantArea=").append(plantArea);
+        sb.append(", outputNum=").append(outputNum);
+        sb.append(", outputValue=").append(outputValue);
+        sb.append(", state=").append(state);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", createId=").append(createId);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", updateId=").append(updateId);
+        sb.append(", remark=").append(remark);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 901 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/model/UmsMemberOriginProductExample.java

@@ -0,0 +1,901 @@
+package com.hwrj.cloud.admin.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class UmsMemberOriginProductExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public UmsMemberOriginProductExample() {
+        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 andFkOriginIdIsNull() {
+            addCriterion("fk_origin_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdIsNotNull() {
+            addCriterion("fk_origin_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdEqualTo(Long value) {
+            addCriterion("fk_origin_id =", value, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdNotEqualTo(Long value) {
+            addCriterion("fk_origin_id <>", value, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdGreaterThan(Long value) {
+            addCriterion("fk_origin_id >", value, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("fk_origin_id >=", value, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdLessThan(Long value) {
+            addCriterion("fk_origin_id <", value, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdLessThanOrEqualTo(Long value) {
+            addCriterion("fk_origin_id <=", value, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdIn(List<Long> values) {
+            addCriterion("fk_origin_id in", values, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdNotIn(List<Long> values) {
+            addCriterion("fk_origin_id not in", values, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdBetween(Long value1, Long value2) {
+            addCriterion("fk_origin_id between", value1, value2, "fkOriginId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFkOriginIdNotBetween(Long value1, Long value2) {
+            addCriterion("fk_origin_id not between", value1, value2, "fkOriginId");
+            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 andPlantAreaIsNull() {
+            addCriterion("plant_area is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaIsNotNull() {
+            addCriterion("plant_area is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaEqualTo(String value) {
+            addCriterion("plant_area =", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaNotEqualTo(String value) {
+            addCriterion("plant_area <>", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaGreaterThan(String value) {
+            addCriterion("plant_area >", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaGreaterThanOrEqualTo(String value) {
+            addCriterion("plant_area >=", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaLessThan(String value) {
+            addCriterion("plant_area <", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaLessThanOrEqualTo(String value) {
+            addCriterion("plant_area <=", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaLike(String value) {
+            addCriterion("plant_area like", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaNotLike(String value) {
+            addCriterion("plant_area not like", value, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaIn(List<String> values) {
+            addCriterion("plant_area in", values, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaNotIn(List<String> values) {
+            addCriterion("plant_area not in", values, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaBetween(String value1, String value2) {
+            addCriterion("plant_area between", value1, value2, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlantAreaNotBetween(String value1, String value2) {
+            addCriterion("plant_area not between", value1, value2, "plantArea");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumIsNull() {
+            addCriterion("output_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumIsNotNull() {
+            addCriterion("output_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumEqualTo(String value) {
+            addCriterion("output_num =", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumNotEqualTo(String value) {
+            addCriterion("output_num <>", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumGreaterThan(String value) {
+            addCriterion("output_num >", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumGreaterThanOrEqualTo(String value) {
+            addCriterion("output_num >=", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumLessThan(String value) {
+            addCriterion("output_num <", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumLessThanOrEqualTo(String value) {
+            addCriterion("output_num <=", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumLike(String value) {
+            addCriterion("output_num like", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumNotLike(String value) {
+            addCriterion("output_num not like", value, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumIn(List<String> values) {
+            addCriterion("output_num in", values, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumNotIn(List<String> values) {
+            addCriterion("output_num not in", values, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumBetween(String value1, String value2) {
+            addCriterion("output_num between", value1, value2, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputNumNotBetween(String value1, String value2) {
+            addCriterion("output_num not between", value1, value2, "outputNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueIsNull() {
+            addCriterion("output_value is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueIsNotNull() {
+            addCriterion("output_value is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueEqualTo(String value) {
+            addCriterion("output_value =", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueNotEqualTo(String value) {
+            addCriterion("output_value <>", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueGreaterThan(String value) {
+            addCriterion("output_value >", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueGreaterThanOrEqualTo(String value) {
+            addCriterion("output_value >=", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueLessThan(String value) {
+            addCriterion("output_value <", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueLessThanOrEqualTo(String value) {
+            addCriterion("output_value <=", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueLike(String value) {
+            addCriterion("output_value like", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueNotLike(String value) {
+            addCriterion("output_value not like", value, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueIn(List<String> values) {
+            addCriterion("output_value in", values, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueNotIn(List<String> values) {
+            addCriterion("output_value not in", values, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueBetween(String value1, String value2) {
+            addCriterion("output_value between", value1, value2, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andOutputValueNotBetween(String value1, String value2) {
+            addCriterion("output_value not between", value1, value2, "outputValue");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateIsNull() {
+            addCriterion("state is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateIsNotNull() {
+            addCriterion("state is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateEqualTo(Integer value) {
+            addCriterion("state =", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateNotEqualTo(Integer value) {
+            addCriterion("state <>", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateGreaterThan(Integer value) {
+            addCriterion("state >", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateGreaterThanOrEqualTo(Integer value) {
+            addCriterion("state >=", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateLessThan(Integer value) {
+            addCriterion("state <", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateLessThanOrEqualTo(Integer value) {
+            addCriterion("state <=", value, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateIn(List<Integer> values) {
+            addCriterion("state in", values, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateNotIn(List<Integer> values) {
+            addCriterion("state not in", values, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateBetween(Integer value1, Integer value2) {
+            addCriterion("state between", value1, value2, "state");
+            return (Criteria) this;
+        }
+
+        public Criteria andStateNotBetween(Integer value1, Integer value2) {
+            addCriterion("state not between", value1, value2, "state");
+            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 andCreateIdIsNull() {
+            addCriterion("create_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdIsNotNull() {
+            addCriterion("create_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdEqualTo(Integer value) {
+            addCriterion("create_id =", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdNotEqualTo(Integer value) {
+            addCriterion("create_id <>", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdGreaterThan(Integer value) {
+            addCriterion("create_id >", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("create_id >=", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdLessThan(Integer value) {
+            addCriterion("create_id <", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdLessThanOrEqualTo(Integer value) {
+            addCriterion("create_id <=", value, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdIn(List<Integer> values) {
+            addCriterion("create_id in", values, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdNotIn(List<Integer> values) {
+            addCriterion("create_id not in", values, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdBetween(Integer value1, Integer value2) {
+            addCriterion("create_id between", value1, value2, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("create_id not between", value1, value2, "createId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdIsNull() {
+            addCriterion("update_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdIsNotNull() {
+            addCriterion("update_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdEqualTo(Integer value) {
+            addCriterion("update_id =", value, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdNotEqualTo(Integer value) {
+            addCriterion("update_id <>", value, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdGreaterThan(Integer value) {
+            addCriterion("update_id >", value, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("update_id >=", value, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdLessThan(Integer value) {
+            addCriterion("update_id <", value, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdLessThanOrEqualTo(Integer value) {
+            addCriterion("update_id <=", value, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdIn(List<Integer> values) {
+            addCriterion("update_id in", values, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdNotIn(List<Integer> values) {
+            addCriterion("update_id not in", values, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdBetween(Integer value1, Integer value2) {
+            addCriterion("update_id between", value1, value2, "updateId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("update_id not between", value1, value2, "updateId");
+            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);
+        }
+    }
+}

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

@@ -0,0 +1,627 @@
+<?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.UmsMemberOriginMapper">
+  <resultMap id="BaseResultMap" type="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="fk_company_info_id" jdbcType="BIGINT" property="fkCompanyInfoId" />
+    <result column="comp_name" jdbcType="VARCHAR" property="compName" />
+    <result column="origin_name" jdbcType="VARCHAR" property="originName" />
+    <result column="origin_area" jdbcType="DOUBLE" property="originArea" />
+    <result column="people_num" jdbcType="INTEGER" property="peopleNum" />
+    <result column="found_date" jdbcType="VARCHAR" property="foundDate" />
+    <result column="link_user" jdbcType="VARCHAR" property="linkUser" />
+    <result column="link_phone" jdbcType="VARCHAR" property="linkPhone" />
+    <result column="province_name" jdbcType="VARCHAR" property="provinceName" />
+    <result column="city_name" jdbcType="VARCHAR" property="cityName" />
+    <result column="county_name" jdbcType="VARCHAR" property="countyName" />
+    <result column="detail_address" jdbcType="VARCHAR" property="detailAddress" />
+    <result column="altitude" jdbcType="VARCHAR" property="altitude" />
+    <result column="longitude" jdbcType="VARCHAR" property="longitude" />
+    <result column="latitude" jdbcType="VARCHAR" property="latitude" />
+    <result column="state" jdbcType="INTEGER" property="state" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="create_id" jdbcType="INTEGER" property="createId" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="update_id" jdbcType="INTEGER" property="updateId" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    <result column="img_url" jdbcType="LONGVARCHAR" property="imgUrl" />
+    <result column="video_url" jdbcType="LONGVARCHAR" property="videoUrl" />
+    <result column="vr_url" jdbcType="LONGVARCHAR" property="vrUrl" />
+    <result column="camera_url" jdbcType="LONGVARCHAR" property="cameraUrl" />
+    <result column="summary" jdbcType="LONGVARCHAR" property="summary" />
+    <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
+  </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, fk_company_info_id, comp_name, origin_name, origin_area, people_num, found_date, 
+    link_user, link_phone, province_name, city_name, county_name, detail_address, altitude, 
+    longitude, latitude, state, create_time, create_id, update_time, update_id
+  </sql>
+  <sql id="Blob_Column_List">
+    img_url, video_url, vr_url, camera_url, summary, remark
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from ums_member_origin
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ums_member_origin
+    <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="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from ums_member_origin
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ums_member_origin
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginExample">
+    delete from ums_member_origin
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_member_origin (fk_company_info_id, comp_name, origin_name, 
+      origin_area, people_num, found_date, 
+      link_user, link_phone, province_name, 
+      city_name, county_name, detail_address, 
+      altitude, longitude, latitude, 
+      state, create_time, create_id, 
+      update_time, update_id, img_url, 
+      video_url, vr_url, camera_url, 
+      summary, remark)
+    values (#{fkCompanyInfoId,jdbcType=BIGINT}, #{compName,jdbcType=VARCHAR}, #{originName,jdbcType=VARCHAR}, 
+      #{originArea,jdbcType=DOUBLE}, #{peopleNum,jdbcType=INTEGER}, #{foundDate,jdbcType=VARCHAR}, 
+      #{linkUser,jdbcType=VARCHAR}, #{linkPhone,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, 
+      #{cityName,jdbcType=VARCHAR}, #{countyName,jdbcType=VARCHAR}, #{detailAddress,jdbcType=VARCHAR}, 
+      #{altitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, 
+      #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createId,jdbcType=INTEGER}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{updateId,jdbcType=INTEGER}, #{imgUrl,jdbcType=LONGVARCHAR}, 
+      #{videoUrl,jdbcType=LONGVARCHAR}, #{vrUrl,jdbcType=LONGVARCHAR}, #{cameraUrl,jdbcType=LONGVARCHAR}, 
+      #{summary,jdbcType=LONGVARCHAR}, #{remark,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_member_origin
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="fkCompanyInfoId != null">
+        fk_company_info_id,
+      </if>
+      <if test="compName != null">
+        comp_name,
+      </if>
+      <if test="originName != null">
+        origin_name,
+      </if>
+      <if test="originArea != null">
+        origin_area,
+      </if>
+      <if test="peopleNum != null">
+        people_num,
+      </if>
+      <if test="foundDate != null">
+        found_date,
+      </if>
+      <if test="linkUser != null">
+        link_user,
+      </if>
+      <if test="linkPhone != null">
+        link_phone,
+      </if>
+      <if test="provinceName != null">
+        province_name,
+      </if>
+      <if test="cityName != null">
+        city_name,
+      </if>
+      <if test="countyName != null">
+        county_name,
+      </if>
+      <if test="detailAddress != null">
+        detail_address,
+      </if>
+      <if test="altitude != null">
+        altitude,
+      </if>
+      <if test="longitude != null">
+        longitude,
+      </if>
+      <if test="latitude != null">
+        latitude,
+      </if>
+      <if test="state != null">
+        state,
+      </if>
+        create_time,
+      <if test="createId != null">
+        create_id,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="updateId != null">
+        update_id,
+      </if>
+      <if test="imgUrl != null">
+        img_url,
+      </if>
+      <if test="videoUrl != null">
+        video_url,
+      </if>
+      <if test="vrUrl != null">
+        vr_url,
+      </if>
+      <if test="cameraUrl != null">
+        camera_url,
+      </if>
+      <if test="summary != null">
+        summary,
+      </if>
+      <if test="remark != null">
+        remark,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="fkCompanyInfoId != null">
+        #{fkCompanyInfoId,jdbcType=BIGINT},
+      </if>
+      <if test="compName != null">
+        #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="originName != null">
+        #{originName,jdbcType=VARCHAR},
+      </if>
+      <if test="originArea != null">
+        #{originArea,jdbcType=DOUBLE},
+      </if>
+      <if test="peopleNum != null">
+        #{peopleNum,jdbcType=INTEGER},
+      </if>
+      <if test="foundDate != null">
+        #{foundDate,jdbcType=VARCHAR},
+      </if>
+      <if test="linkUser != null">
+        #{linkUser,jdbcType=VARCHAR},
+      </if>
+      <if test="linkPhone != null">
+        #{linkPhone,jdbcType=VARCHAR},
+      </if>
+      <if test="provinceName != null">
+        #{provinceName,jdbcType=VARCHAR},
+      </if>
+      <if test="cityName != null">
+        #{cityName,jdbcType=VARCHAR},
+      </if>
+      <if test="countyName != null">
+        #{countyName,jdbcType=VARCHAR},
+      </if>
+      <if test="detailAddress != null">
+        #{detailAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="altitude != null">
+        #{altitude,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="state != null">
+        #{state,jdbcType=INTEGER},
+      </if>
+        NOW(),
+      <if test="createId != null">
+        #{createId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateId != null">
+        #{updateId,jdbcType=INTEGER},
+      </if>
+      <if test="imgUrl != null">
+        #{imgUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="videoUrl != null">
+        #{videoUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="vrUrl != null">
+        #{vrUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="cameraUrl != null">
+        #{cameraUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="summary != null">
+        #{summary,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginExample" resultType="java.lang.Long">
+    select count(*) from ums_member_origin
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ums_member_origin
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.fkCompanyInfoId != null">
+        fk_company_info_id = #{record.fkCompanyInfoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.compName != null">
+        comp_name = #{record.compName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.originName != null">
+        origin_name = #{record.originName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.originArea != null">
+        origin_area = #{record.originArea,jdbcType=DOUBLE},
+      </if>
+      <if test="record.peopleNum != null">
+        people_num = #{record.peopleNum,jdbcType=INTEGER},
+      </if>
+      <if test="record.foundDate != null">
+        found_date = #{record.foundDate,jdbcType=VARCHAR},
+      </if>
+      <if test="record.linkUser != null">
+        link_user = #{record.linkUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.linkPhone != null">
+        link_phone = #{record.linkPhone,jdbcType=VARCHAR},
+      </if>
+      <if test="record.provinceName != null">
+        province_name = #{record.provinceName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cityName != null">
+        city_name = #{record.cityName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.countyName != null">
+        county_name = #{record.countyName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.detailAddress != null">
+        detail_address = #{record.detailAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="record.altitude != null">
+        altitude = #{record.altitude,jdbcType=VARCHAR},
+      </if>
+      <if test="record.longitude != null">
+        longitude = #{record.longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="record.latitude != null">
+        latitude = #{record.latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="record.state != null">
+        state = #{record.state,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createId != null">
+        create_id = #{record.createId,jdbcType=INTEGER},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateId != null">
+        update_id = #{record.updateId,jdbcType=INTEGER},
+      </if>
+      <if test="record.imgUrl != null">
+        img_url = #{record.imgUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.videoUrl != null">
+        video_url = #{record.videoUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.vrUrl != null">
+        vr_url = #{record.vrUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.cameraUrl != null">
+        camera_url = #{record.cameraUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.summary != null">
+        summary = #{record.summary,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.remark != null">
+        remark = #{record.remark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update ums_member_origin
+    set id = #{record.id,jdbcType=BIGINT},
+      fk_company_info_id = #{record.fkCompanyInfoId,jdbcType=BIGINT},
+      comp_name = #{record.compName,jdbcType=VARCHAR},
+      origin_name = #{record.originName,jdbcType=VARCHAR},
+      origin_area = #{record.originArea,jdbcType=DOUBLE},
+      people_num = #{record.peopleNum,jdbcType=INTEGER},
+      found_date = #{record.foundDate,jdbcType=VARCHAR},
+      link_user = #{record.linkUser,jdbcType=VARCHAR},
+      link_phone = #{record.linkPhone,jdbcType=VARCHAR},
+      province_name = #{record.provinceName,jdbcType=VARCHAR},
+      city_name = #{record.cityName,jdbcType=VARCHAR},
+      county_name = #{record.countyName,jdbcType=VARCHAR},
+      detail_address = #{record.detailAddress,jdbcType=VARCHAR},
+      altitude = #{record.altitude,jdbcType=VARCHAR},
+      longitude = #{record.longitude,jdbcType=VARCHAR},
+      latitude = #{record.latitude,jdbcType=VARCHAR},
+      state = #{record.state,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      create_id = #{record.createId,jdbcType=INTEGER},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      update_id = #{record.updateId,jdbcType=INTEGER},
+      img_url = #{record.imgUrl,jdbcType=LONGVARCHAR},
+      video_url = #{record.videoUrl,jdbcType=LONGVARCHAR},
+      vr_url = #{record.vrUrl,jdbcType=LONGVARCHAR},
+      camera_url = #{record.cameraUrl,jdbcType=LONGVARCHAR},
+      summary = #{record.summary,jdbcType=LONGVARCHAR},
+      remark = #{record.remark,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ums_member_origin
+    set id = #{record.id,jdbcType=BIGINT},
+      fk_company_info_id = #{record.fkCompanyInfoId,jdbcType=BIGINT},
+      comp_name = #{record.compName,jdbcType=VARCHAR},
+      origin_name = #{record.originName,jdbcType=VARCHAR},
+      origin_area = #{record.originArea,jdbcType=DOUBLE},
+      people_num = #{record.peopleNum,jdbcType=INTEGER},
+      found_date = #{record.foundDate,jdbcType=VARCHAR},
+      link_user = #{record.linkUser,jdbcType=VARCHAR},
+      link_phone = #{record.linkPhone,jdbcType=VARCHAR},
+      province_name = #{record.provinceName,jdbcType=VARCHAR},
+      city_name = #{record.cityName,jdbcType=VARCHAR},
+      county_name = #{record.countyName,jdbcType=VARCHAR},
+      detail_address = #{record.detailAddress,jdbcType=VARCHAR},
+      altitude = #{record.altitude,jdbcType=VARCHAR},
+      longitude = #{record.longitude,jdbcType=VARCHAR},
+      latitude = #{record.latitude,jdbcType=VARCHAR},
+      state = #{record.state,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      create_id = #{record.createId,jdbcType=INTEGER},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      update_id = #{record.updateId,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    update ums_member_origin
+    <set>
+      <if test="fkCompanyInfoId != null">
+        fk_company_info_id = #{fkCompanyInfoId,jdbcType=BIGINT},
+      </if>
+      <if test="compName != null">
+        comp_name = #{compName,jdbcType=VARCHAR},
+      </if>
+      <if test="originName != null">
+        origin_name = #{originName,jdbcType=VARCHAR},
+      </if>
+      <if test="originArea != null">
+        origin_area = #{originArea,jdbcType=DOUBLE},
+      </if>
+      <if test="peopleNum != null">
+        people_num = #{peopleNum,jdbcType=INTEGER},
+      </if>
+      <if test="foundDate != null">
+        found_date = #{foundDate,jdbcType=VARCHAR},
+      </if>
+      <if test="linkUser != null">
+        link_user = #{linkUser,jdbcType=VARCHAR},
+      </if>
+      <if test="linkPhone != null">
+        link_phone = #{linkPhone,jdbcType=VARCHAR},
+      </if>
+      <if test="provinceName != null">
+        province_name = #{provinceName,jdbcType=VARCHAR},
+      </if>
+      <if test="cityName != null">
+        city_name = #{cityName,jdbcType=VARCHAR},
+      </if>
+      <if test="countyName != null">
+        county_name = #{countyName,jdbcType=VARCHAR},
+      </if>
+      <if test="detailAddress != null">
+        detail_address = #{detailAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="altitude != null">
+        altitude = #{altitude,jdbcType=VARCHAR},
+      </if>
+      <if test="longitude != null">
+        longitude = #{longitude,jdbcType=VARCHAR},
+      </if>
+      <if test="latitude != null">
+        latitude = #{latitude,jdbcType=VARCHAR},
+      </if>
+      <if test="state != null">
+        state = #{state,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createId != null">
+        create_id = #{createId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateId != null">
+        update_id = #{updateId,jdbcType=INTEGER},
+      </if>
+      <if test="imgUrl != null">
+        img_url = #{imgUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="videoUrl != null">
+        video_url = #{videoUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="vrUrl != null">
+        vr_url = #{vrUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="cameraUrl != null">
+        camera_url = #{cameraUrl,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="summary != null">
+        summary = #{summary,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="remark != null">
+        remark = #{remark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    update ums_member_origin
+    set fk_company_info_id = #{fkCompanyInfoId,jdbcType=BIGINT},
+      comp_name = #{compName,jdbcType=VARCHAR},
+      origin_name = #{originName,jdbcType=VARCHAR},
+      origin_area = #{originArea,jdbcType=DOUBLE},
+      people_num = #{peopleNum,jdbcType=INTEGER},
+      found_date = #{foundDate,jdbcType=VARCHAR},
+      link_user = #{linkUser,jdbcType=VARCHAR},
+      link_phone = #{linkPhone,jdbcType=VARCHAR},
+      province_name = #{provinceName,jdbcType=VARCHAR},
+      city_name = #{cityName,jdbcType=VARCHAR},
+      county_name = #{countyName,jdbcType=VARCHAR},
+      detail_address = #{detailAddress,jdbcType=VARCHAR},
+      altitude = #{altitude,jdbcType=VARCHAR},
+      longitude = #{longitude,jdbcType=VARCHAR},
+      latitude = #{latitude,jdbcType=VARCHAR},
+      state = #{state,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      create_id = #{createId,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      update_id = #{updateId,jdbcType=INTEGER},
+      img_url = #{imgUrl,jdbcType=LONGVARCHAR},
+      video_url = #{videoUrl,jdbcType=LONGVARCHAR},
+      vr_url = #{vrUrl,jdbcType=LONGVARCHAR},
+      camera_url = #{cameraUrl,jdbcType=LONGVARCHAR},
+      summary = #{summary,jdbcType=LONGVARCHAR},
+      remark = #{remark,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hwrj.cloud.admin.model.UmsMemberOrigin">
+    update ums_member_origin
+    set fk_company_info_id = #{fkCompanyInfoId,jdbcType=BIGINT},
+      comp_name = #{compName,jdbcType=VARCHAR},
+      origin_name = #{originName,jdbcType=VARCHAR},
+      origin_area = #{originArea,jdbcType=DOUBLE},
+      people_num = #{peopleNum,jdbcType=INTEGER},
+      found_date = #{foundDate,jdbcType=VARCHAR},
+      link_user = #{linkUser,jdbcType=VARCHAR},
+      link_phone = #{linkPhone,jdbcType=VARCHAR},
+      province_name = #{provinceName,jdbcType=VARCHAR},
+      city_name = #{cityName,jdbcType=VARCHAR},
+      county_name = #{countyName,jdbcType=VARCHAR},
+      detail_address = #{detailAddress,jdbcType=VARCHAR},
+      altitude = #{altitude,jdbcType=VARCHAR},
+      longitude = #{longitude,jdbcType=VARCHAR},
+      latitude = #{latitude,jdbcType=VARCHAR},
+      state = #{state,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      create_id = #{createId,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      update_id = #{updateId,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

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

@@ -0,0 +1,375 @@
+<?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.UmsMemberOriginProductMapper">
+  <resultMap id="BaseResultMap" type="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="fk_origin_id" jdbcType="BIGINT" property="fkOriginId" />
+    <result column="product_name" jdbcType="VARCHAR" property="productName" />
+    <result column="plant_area" jdbcType="VARCHAR" property="plantArea" />
+    <result column="output_num" jdbcType="VARCHAR" property="outputNum" />
+    <result column="output_value" jdbcType="VARCHAR" property="outputValue" />
+    <result column="state" jdbcType="INTEGER" property="state" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="create_id" jdbcType="INTEGER" property="createId" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="update_id" jdbcType="INTEGER" property="updateId" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
+  </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, fk_origin_id, product_name, plant_area, output_num, output_value, state, create_time, 
+    create_id, update_time, update_id
+  </sql>
+  <sql id="Blob_Column_List">
+    remark
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProductExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from ums_member_origin_product
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProductExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ums_member_origin_product
+    <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="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from ums_member_origin_product
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ums_member_origin_product
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProductExample">
+    delete from ums_member_origin_product
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_member_origin_product (fk_origin_id, product_name, plant_area, 
+      output_num, output_value, state, 
+      create_time, create_id, update_time, 
+      update_id, remark)
+    values (#{fkOriginId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{plantArea,jdbcType=VARCHAR}, 
+      #{outputNum,jdbcType=VARCHAR}, #{outputValue,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{createId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{updateId,jdbcType=INTEGER}, #{remark,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into ums_member_origin_product
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="fkOriginId != null">
+        fk_origin_id,
+      </if>
+      <if test="productName != null">
+        product_name,
+      </if>
+      <if test="plantArea != null">
+        plant_area,
+      </if>
+      <if test="outputNum != null">
+        output_num,
+      </if>
+      <if test="outputValue != null">
+        output_value,
+      </if>
+      <if test="state != null">
+        state,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="createId != null">
+        create_id,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="updateId != null">
+        update_id,
+      </if>
+      <if test="remark != null">
+        remark,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="fkOriginId != null">
+        #{fkOriginId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="plantArea != null">
+        #{plantArea,jdbcType=VARCHAR},
+      </if>
+      <if test="outputNum != null">
+        #{outputNum,jdbcType=VARCHAR},
+      </if>
+      <if test="outputValue != null">
+        #{outputValue,jdbcType=VARCHAR},
+      </if>
+      <if test="state != null">
+        #{state,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createId != null">
+        #{createId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateId != null">
+        #{updateId,jdbcType=INTEGER},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProductExample" resultType="java.lang.Long">
+    select count(*) from ums_member_origin_product
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ums_member_origin_product
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.fkOriginId != null">
+        fk_origin_id = #{record.fkOriginId,jdbcType=BIGINT},
+      </if>
+      <if test="record.productName != null">
+        product_name = #{record.productName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.plantArea != null">
+        plant_area = #{record.plantArea,jdbcType=VARCHAR},
+      </if>
+      <if test="record.outputNum != null">
+        output_num = #{record.outputNum,jdbcType=VARCHAR},
+      </if>
+      <if test="record.outputValue != null">
+        output_value = #{record.outputValue,jdbcType=VARCHAR},
+      </if>
+      <if test="record.state != null">
+        state = #{record.state,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createId != null">
+        create_id = #{record.createId,jdbcType=INTEGER},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateId != null">
+        update_id = #{record.updateId,jdbcType=INTEGER},
+      </if>
+      <if test="record.remark != null">
+        remark = #{record.remark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update ums_member_origin_product
+    set id = #{record.id,jdbcType=BIGINT},
+      fk_origin_id = #{record.fkOriginId,jdbcType=BIGINT},
+      product_name = #{record.productName,jdbcType=VARCHAR},
+      plant_area = #{record.plantArea,jdbcType=VARCHAR},
+      output_num = #{record.outputNum,jdbcType=VARCHAR},
+      output_value = #{record.outputValue,jdbcType=VARCHAR},
+      state = #{record.state,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      create_id = #{record.createId,jdbcType=INTEGER},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      update_id = #{record.updateId,jdbcType=INTEGER},
+      remark = #{record.remark,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ums_member_origin_product
+    set id = #{record.id,jdbcType=BIGINT},
+      fk_origin_id = #{record.fkOriginId,jdbcType=BIGINT},
+      product_name = #{record.productName,jdbcType=VARCHAR},
+      plant_area = #{record.plantArea,jdbcType=VARCHAR},
+      output_num = #{record.outputNum,jdbcType=VARCHAR},
+      output_value = #{record.outputValue,jdbcType=VARCHAR},
+      state = #{record.state,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      create_id = #{record.createId,jdbcType=INTEGER},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      update_id = #{record.updateId,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    update ums_member_origin_product
+    <set>
+      <if test="fkOriginId != null">
+        fk_origin_id = #{fkOriginId,jdbcType=BIGINT},
+      </if>
+      <if test="productName != null">
+        product_name = #{productName,jdbcType=VARCHAR},
+      </if>
+      <if test="plantArea != null">
+        plant_area = #{plantArea,jdbcType=VARCHAR},
+      </if>
+      <if test="outputNum != null">
+        output_num = #{outputNum,jdbcType=VARCHAR},
+      </if>
+      <if test="outputValue != null">
+        output_value = #{outputValue,jdbcType=VARCHAR},
+      </if>
+      <if test="state != null">
+        state = #{state,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createId != null">
+        create_id = #{createId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateId != null">
+        update_id = #{updateId,jdbcType=INTEGER},
+      </if>
+      <if test="remark != null">
+        remark = #{remark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    update ums_member_origin_product
+    set fk_origin_id = #{fkOriginId,jdbcType=BIGINT},
+      product_name = #{productName,jdbcType=VARCHAR},
+      plant_area = #{plantArea,jdbcType=VARCHAR},
+      output_num = #{outputNum,jdbcType=VARCHAR},
+      output_value = #{outputValue,jdbcType=VARCHAR},
+      state = #{state,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      create_id = #{createId,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      update_id = #{updateId,jdbcType=INTEGER},
+      remark = #{remark,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+    update ums_member_origin_product
+    set fk_origin_id = #{fkOriginId,jdbcType=BIGINT},
+      product_name = #{productName,jdbcType=VARCHAR},
+      plant_area = #{plantArea,jdbcType=VARCHAR},
+      output_num = #{outputNum,jdbcType=VARCHAR},
+      output_value = #{outputValue,jdbcType=VARCHAR},
+      state = #{state,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      create_id = #{createId,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      update_id = #{updateId,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 2 - 1
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/AdminApplication.java

@@ -3,8 +3,9 @@ package com.hwrj.cloud.admin;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.scheduling.annotation.EnableAsync;
 
-
+@EnableAsync
 @SpringBootApplication
 @ComponentScan(basePackages = {"com.hwrj.cloud"})
 public class AdminApplication {

+ 4 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/bo/AdminUserDetails.java

@@ -59,4 +59,8 @@ public class AdminUserDetails implements UserDetails {
     public boolean isEnabled() {
         return umsAdmin.getStatus().equals(1);
     }
+
+    public UmsAdmin getUmsAdmin(){
+        return umsAdmin;
+    }
 }

+ 87 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsMemberOriginController.java

@@ -0,0 +1,87 @@
+package com.hwrj.cloud.admin.controller;
+
+import com.hwrj.cloud.admin.excelEntity.UmsMemberOriginExcel;
+import com.hwrj.cloud.admin.listener.ImportExcelEventListener;
+import com.hwrj.cloud.admin.service.UmsMemberOriginService;
+import com.hwrj.cloud.admin.util.CurrUserUtil;
+import com.hwrj.cloud.admin.util.EasyExcelUtil;
+import com.hwrj.cloud.common.api.CommonResult;
+import com.hwrj.cloud.common.exception.GlobalException;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @className:
+ * @description: 生产地信息表
+ * @author: lym
+ * @date: 2020/9/5 10:38
+ */
+@RestController
+@Api(description = "生产地信息管理")
+@RequestMapping("/origin")
+public class UmsMemberOriginController {
+
+    @Autowired
+    private UmsMemberOriginService umsMemberOriginService;
+    @Autowired
+    private ImportExcelEventListener importExcelEventListener;
+
+    @ApiOperation(value = "导入生产地信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "file",value = "导入文件",required = true,paramType = "MultipartFile" )
+    })
+    @GetMapping("/import")
+    public CommonResult importExcel(@RequestParam("file") MultipartFile file, Principal principal){
+        List<UmsMemberOriginExcel> listAll = new ArrayList<>();
+        if(file != null){
+            List<Object> list = null;
+            try {
+                list = EasyExcelUtil.readExcel(file, new UmsMemberOriginExcel(),2,2);
+            } catch (IOException e) {
+                //e.printStackTrace();
+                throw new GlobalException(1,"上传文件错误");
+            }
+            if(list != null && list.size() > 0){
+                for(Object obj : list){
+                    UmsMemberOriginExcel excel = (UmsMemberOriginExcel) obj;
+                    excel.setCreateId(CurrUserUtil.getUserId());
+                    excel.setState(0);
+                    listAll.add(excel);
+                }
+            }
+        }
+        int saveNum = 0;
+        if (listAll != null && listAll.size() > 0){
+            int batchNum = 500;
+            if (listAll.size() > batchNum){
+                List<UmsMemberOriginExcel> list = listAll.subList(0,batchNum);
+                saveNum = umsMemberOriginService.batchSave(list);
+                //if (saveNum > 0){ //存在前面数据已存在情况
+                    //异步导入
+                    importExcelEventListener.batchSaveOriginExcel(listAll.subList(batchNum,listAll.size()));
+                    return CommonResult.success(null,"正在导入数据,请稍后刷新!");
+                //}
+            }
+            saveNum = umsMemberOriginService.batchSave(listAll);
+            if (saveNum < 1){
+                return CommonResult.success(null,"导入数据已存在,请勿重复导入");
+            }
+        }
+
+        return CommonResult.success();
+    }
+
+}

+ 41 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsMemberOriginProductController.java

@@ -0,0 +1,41 @@
+package com.hwrj.cloud.admin.controller;
+
+import com.hwrj.cloud.admin.model.UmsMemberOriginProduct;
+import com.hwrj.cloud.admin.service.UmsMemberOriginProductService;
+import com.hwrj.cloud.common.api.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/7 9:57
+ */
+@RestController
+@RequestMapping("/originProduct")
+@Api(description = "生产地产出物管理")
+public class UmsMemberOriginProductController {
+
+    @Autowired
+    private UmsMemberOriginProductService umsMemberOriginProductService;
+
+    @ApiOperation(value = "查询列表",notes = "查询列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "originProduct",value = "",required = true,paramType = "UmsMemberOriginProduct")
+    })
+    @PostMapping("/list")
+    public CommonResult list(@RequestBody UmsMemberOriginProduct originProduct,
+                             @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                             @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize){
+
+        List<UmsMemberOriginProduct> list = umsMemberOriginProductService.list(originProduct,pageNum,pageSize);
+        return CommonResult.success(list);
+    }
+}

+ 20 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/UmsMemberOriginDao.java

@@ -0,0 +1,20 @@
+package com.hwrj.cloud.admin.dao;
+
+import com.hwrj.cloud.admin.model.UmsMemberOrigin;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/6 17:39
+ */
+public interface UmsMemberOriginDao {
+
+    /**
+     * 检验是否存在
+     * lym
+     * @param umsMemberOrigin
+     * @return
+     */
+    int isExist(UmsMemberOrigin umsMemberOrigin);
+}

+ 17 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/UmsMemberOriginProductDao.java

@@ -0,0 +1,17 @@
+package com.hwrj.cloud.admin.dao;
+
+import com.hwrj.cloud.admin.model.UmsMemberOriginProduct;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/6 11:27
+ */
+public interface UmsMemberOriginProductDao {
+
+    int batchSave(@Param("list") List<UmsMemberOriginProduct> list);
+}

+ 121 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/excelEntity/UmsMemberOriginExcel.java

@@ -0,0 +1,121 @@
+package com.hwrj.cloud.admin.excelEntity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/5 17:54
+ */
+@Data
+public class UmsMemberOriginExcel extends BaseRowModel {
+
+    @ExcelProperty(value = "生产地名称")
+    @ApiModelProperty(value = "生产地名称")
+    private String originName;
+
+    @ExcelProperty("生产地面积(亩)")
+    @ApiModelProperty(value = "生产地面积(亩)")
+    private Double originArea;
+
+    @ExcelProperty("生产地图片")
+    @ApiModelProperty(value = "生产地图片")
+    private String imgUrl;
+
+    @ExcelProperty("生产地宣传视频")
+    @ApiModelProperty(value = "生产地宣传视频地址")
+    private String videoUrl;
+
+    @ExcelProperty("生产地vr")
+    @ApiModelProperty(value = "vr地址")
+    private String vrUrl;
+
+    @ExcelProperty("实时监控视频")
+    @ApiModelProperty(value = "实时监控视频地址")
+    private String cameraUrl;
+
+    @ExcelProperty("人员数")
+    @ApiModelProperty(value = "人数")
+    private Integer peopleNum;
+
+    @ExcelProperty("建立日期(年)")
+    @ApiModelProperty(value = "建立日期(年)")
+    private String foundDate;
+
+    @ExcelProperty("联系人")
+    @ApiModelProperty(value = "联系人")
+    private String linkUser;
+
+    @ExcelProperty("联系方式")
+    @ApiModelProperty(value = "联系方式")
+    private String linkPhone;
+
+    @ExcelProperty("简介")
+    @ApiModelProperty(value = "简介")
+    private String summary;
+
+    @ExcelProperty("产出物")
+    @ApiModelProperty(value = "产品名称")
+    private String productName;
+
+    @ExcelProperty("产出物种植面积(亩)")
+    @ApiModelProperty(value = "产出物种植面积(亩)")
+    private String plantArea;
+
+    @ExcelProperty("产出物总产量(吨)")
+    @ApiModelProperty(value = "产出物总产量(吨)")
+    private String outputNum;
+
+    @ExcelProperty("产出物亩产值(万元)")
+    @ApiModelProperty(value = "产出物亩产值(万元)")
+    private String outputValue;
+
+    @ExcelProperty("所在省")
+    @ApiModelProperty(value = "省")
+    private String provinceName;
+
+    @ExcelProperty("所在市")
+    @ApiModelProperty(value = "市")
+    private String cityName;
+
+    @ExcelProperty("所在县")
+    @ApiModelProperty(value = "县")
+    private String countyName;
+
+    @ExcelProperty(value = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String detailAddress;
+
+    @ExcelProperty(value = "海拔")
+    @ApiModelProperty(value = "海拔")
+    private String altitude;
+
+    @ExcelProperty(value = "经度(°)")
+    @ApiModelProperty(value = "经度")
+    private String longitude;
+
+    @ExcelProperty(value = "纬度(°)")
+    @ApiModelProperty(value = "纬度")
+    private String latitude;
+
+    @ApiModelProperty(value = "状态 0:可用,1:禁用,2:删除")
+    private Integer state;
+
+    @ApiModelProperty(value = "创建人")
+    private Integer createId;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "修改人id")
+    private Integer updateId;
+
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 47 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/listener/ImportExcelEventListener.java

@@ -0,0 +1,47 @@
+package com.hwrj.cloud.admin.listener;
+
+import com.hwrj.cloud.admin.excelEntity.UmsMemberOriginExcel;
+import com.hwrj.cloud.admin.service.UmsMemberOriginService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @className:
+ * @description: 大批量导入异步事件
+ * @author: lym
+ * @date: 2020/9/6 15:24
+ */
+@Component
+public class ImportExcelEventListener {
+
+    @Autowired
+    private UmsMemberOriginService umsMemberOriginService;
+
+    /**
+     * 批量添加生产地信息
+     * lym
+     * @param list
+     */
+    @Async
+    public void batchSaveOriginExcel(List<UmsMemberOriginExcel> list){
+        if (list == null && list.size() < 1) return;
+        int total = list.size(),i = 0,saveNum = 500; //名次添加500
+        List<UmsMemberOriginExcel> saveList = new ArrayList<>();
+
+        while (total > saveNum) {
+            saveList = list.subList(i, i + saveNum);
+            i = i + saveNum;
+            total = total - saveNum;
+            umsMemberOriginService.batchSave(saveList);
+        }
+        if(total > 0) {
+            saveList = list.subList(i, i + total);
+            umsMemberOriginService.batchSave(saveList);
+        }
+    }
+
+}

+ 16 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/UmsMemberOriginProductService.java

@@ -0,0 +1,16 @@
+package com.hwrj.cloud.admin.service;
+
+import com.hwrj.cloud.admin.model.UmsMemberOriginProduct;
+
+import java.util.List;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/7 10:13
+ */
+public interface UmsMemberOriginProductService {
+
+    List<UmsMemberOriginProduct> list(UmsMemberOriginProduct originProduct,Integer pageNum,Integer pageSize);
+}

+ 15 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/UmsMemberOriginService.java

@@ -0,0 +1,15 @@
+package com.hwrj.cloud.admin.service;
+
+import com.hwrj.cloud.admin.excelEntity.UmsMemberOriginExcel;
+
+import java.util.List;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/5 11:18
+ */
+public interface UmsMemberOriginService {
+    public int batchSave(List<UmsMemberOriginExcel> list);
+}

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

@@ -0,0 +1,50 @@
+package com.hwrj.cloud.admin.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.hwrj.cloud.admin.mapper.UmsMemberOriginProductMapper;
+import com.hwrj.cloud.admin.model.UmsMemberOriginProduct;
+import com.hwrj.cloud.admin.model.UmsMemberOriginProductExample;
+import com.hwrj.cloud.admin.service.UmsMemberOriginProductService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/7 10:24
+ */
+@Service
+public class UmsMemberOriginProductServiceImpl implements UmsMemberOriginProductService {
+
+    @Resource
+    private UmsMemberOriginProductMapper umsMemberOriginProductMapper;
+
+    @Override
+    public List<UmsMemberOriginProduct> list(UmsMemberOriginProduct originProduct, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        UmsMemberOriginProductExample example = new UmsMemberOriginProductExample();
+        UmsMemberOriginProductExample.Criteria criteria = example.createCriteria();
+        if (!StringUtils.isEmpty(originProduct.getFkOriginId())) {
+            criteria.andFkOriginIdNotEqualTo(originProduct.getFkOriginId());
+        }
+        if (!StringUtils.isEmpty(originProduct.getProductName())) {
+            criteria.andProductNameLike(originProduct.getProductName());
+        }
+        if (!StringUtils.isEmpty(originProduct.getPlantArea())) {
+            criteria.andPlantAreaLike(originProduct.getPlantArea());
+        }
+        if (!StringUtils.isEmpty(originProduct.getOutputNum())) {
+            criteria.andOutputNumLike(originProduct.getOutputNum());
+        }
+        if (!StringUtils.isEmpty(originProduct.getOutputValue())) {
+            criteria.andOutputValueLike(originProduct.getOutputValue());
+        }
+        criteria.andStateEqualTo(0);
+        example.setOrderByClause("create_time desc");
+        return umsMemberOriginProductMapper.selectByExample(example);
+    }
+}

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

@@ -0,0 +1,115 @@
+package com.hwrj.cloud.admin.service.impl;
+
+import com.hwrj.cloud.admin.dao.UmsMemberOriginDao;
+import com.hwrj.cloud.admin.dao.UmsMemberOriginProductDao;
+import com.hwrj.cloud.admin.excelEntity.UmsMemberOriginExcel;
+import com.hwrj.cloud.admin.mapper.UmsMemberOriginMapper;
+import com.hwrj.cloud.admin.model.UmsMemberOrigin;
+import com.hwrj.cloud.admin.model.UmsMemberOriginProduct;
+import com.hwrj.cloud.admin.service.UmsMemberOriginService;
+import com.hwrj.cloud.admin.util.CurrUserUtil;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @className:
+ * @description:
+ * @author: lym
+ * @date: 2020/9/5 11:23
+ */
+@Service
+public class UmsMemberOriginServiceImpl implements UmsMemberOriginService {
+    @Resource
+    private UmsMemberOriginMapper umsMemberOriginMapper;
+    @Resource
+    private UmsMemberOriginProductDao umsMemberOriginProductDao;
+    @Resource
+    private UmsMemberOriginDao umsMemberOriginDao;
+
+    @Override
+    //@Transactional
+    public int batchSave(List<UmsMemberOriginExcel> list) {
+        UmsMemberOrigin origin = null;
+        List<UmsMemberOriginProduct> originProductList = new ArrayList<>();
+        int saveNum = 0;
+        for (UmsMemberOriginExcel excel:list){
+            origin = new UmsMemberOrigin();
+            BeanUtils.copyProperties(excel,origin);
+            //检验是否唯一
+            int i = umsMemberOriginDao.isExist(origin);
+            if (i > 0) continue; //已存在
+            i = umsMemberOriginMapper.insertSelective(origin); //添加生产地信息
+            if (i > 0){
+                saveNum ++;
+                getOriginProductList(excel,origin.getId(),originProductList);
+            }
+        }
+        if (originProductList != null && originProductList.size() > 0)
+            umsMemberOriginProductDao.batchSave(originProductList);
+        return saveNum;
+    }
+
+    /**
+     * 产地产出物
+     * lym
+     * @param excel
+     * @param originProductList
+     */
+    private void getOriginProductList(UmsMemberOriginExcel excel,long originId,List<UmsMemberOriginProduct> originProductList){
+            if (!StringUtils.isEmpty(excel.getProductName())){ //产出物不为空
+                List<String> productNames = new ArrayList<>(),plantAreas = new ArrayList<>(),
+                        outputNums = new ArrayList<>(),outputValues = new ArrayList<>();
+                UmsMemberOriginProduct originProduct = null;
+                String productName = excel.getProductName();
+                String plantArea = excel.getPlantArea(); //产出物种植面积(亩)
+                String outputNum = excel.getOutputNum(); //产出物总产量(吨)
+                String outputValue = excel.getOutputValue(); //产出物亩产值(万元)
+                if (productName.contains(";")){ //多产出物
+                    productNames = Arrays.asList(productName.split(";"));
+                    //产出物不为空,种植面积这些才有价值
+                    if (plantArea.contains(";")){
+                        plantAreas = Arrays.asList(plantArea.split(";"));
+                    }
+
+                    if (outputNum.contains(";")){
+                        outputNums = Arrays.asList(outputNum.split(";"));
+                    }
+
+                    if (outputValue.contains(";")){
+                        outputValues = Arrays.asList(outputValue.split(";"));
+                    }
+
+                    for (int i = 0;i < productNames.size();i++){ //产出物
+                        originProduct = new UmsMemberOriginProduct();
+                        originProduct.setFkOriginId(originId);
+                        originProduct.setProductName(productNames.get(i));
+                        if (plantAreas != null && plantAreas.size() > i)
+                            originProduct.setPlantArea(plantAreas.get(i));
+                        if (outputNums != null && outputNums.size() > i)
+                            originProduct.setOutputNum(outputNums.get(i));
+                        if (outputValues != null && outputValues.size() > i)
+                            originProduct.setOutputValue(outputValues.get(i));
+                        originProduct.setState(0);
+                        originProduct.setCreateId(CurrUserUtil.getUserId());
+                        originProductList.add(originProduct);
+                    }
+                }else {
+                    originProduct = new UmsMemberOriginProduct();
+                    originProduct.setFkOriginId(originId);
+                    originProduct.setProductName(productName);
+                    originProduct.setPlantArea(plantArea);
+                    originProduct.setOutputNum(outputNum);
+                    originProduct.setOutputValue(outputValue);
+                    originProduct.setState(0);
+                    originProduct.setCreateId(CurrUserUtil.getUserId());
+                    originProductList.add(originProduct);
+                }
+            }
+    }
+}

+ 59 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/util/CurrUserUtil.java

@@ -0,0 +1,59 @@
+package com.hwrj.cloud.admin.util;
+
+import com.hwrj.cloud.admin.bo.AdminUserDetails;
+import com.hwrj.cloud.admin.model.UmsAdmin;
+import com.hwrj.cloud.common.api.ResultCode;
+import com.hwrj.cloud.common.exception.GlobalException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.util.StringUtils;
+
+/**
+ * @className:
+ * @description: 当前登录用户
+ * @author: lym
+ * @date: 2020/9/6 16:16
+ */
+public class CurrUserUtil {
+
+    /**
+     * 获取Authentication
+     */
+    public static Authentication getAuthentication() {
+        return SecurityContextHolder.getContext().getAuthentication();
+    }
+
+    public static UmsAdmin getUmsAdmin(){
+        Authentication authentication = getAuthentication();
+        if (authentication == null) {
+            return null;
+        }
+        AdminUserDetails adminUserDetails = getLoginUser(authentication);
+        UmsAdmin umsAdmin = adminUserDetails.getUmsAdmin();
+        if (StringUtils.isEmpty(umsAdmin)) {
+            throw new GlobalException((int)ResultCode.UNAUTHORIZED.getCode(),ResultCode.UNAUTHORIZED.getMessage());
+        }
+        return umsAdmin;
+    }
+
+    /**
+     * 获取用户
+     */
+    public static AdminUserDetails getLoginUser(Authentication authentication) {
+        Object principal = authentication.getPrincipal();
+        if (principal instanceof AdminUserDetails) {
+            return (AdminUserDetails) principal;
+        }
+        throw new GlobalException((int)ResultCode.UNAUTHORIZED.getCode(),ResultCode.UNAUTHORIZED.getMessage());
+    }
+
+    /**
+     * 获取用户id
+     */
+    public static int getUserId() {
+        UmsAdmin umsAdmin = getUmsAdmin();
+        long userId = umsAdmin.getId();
+        return (int) userId;
+    }
+}
+

+ 11 - 0
forest-admin/admin-server/src/main/resources/dao/UmsMemberOriginDao.xml

@@ -0,0 +1,11 @@
+<?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.UmsMemberOriginDao">
+    <select id="isExist" parameterType="com.hwrj.cloud.admin.model.UmsMemberOrigin" resultType="int">
+        SELECT COUNT(*) FROM ums_member_origin WHERE state = 0
+        <if test="id != null">
+            AND id != #{id}
+        </if>
+        AND origin_name = #{originName}
+    </select>
+</mapper>

+ 17 - 0
forest-admin/admin-server/src/main/resources/dao/UmsMemberOriginProductDao.xml

@@ -0,0 +1,17 @@
+<?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.UmsMemberOriginProductDao">
+    <insert id="batchSave" parameterType="com.hwrj.cloud.admin.model.UmsMemberOriginProduct">
+        insert into ums_member_origin_product (fk_origin_id, product_name, plant_area,
+        output_num, output_value, state,
+        create_time, create_id, update_time,
+        update_id, remark)
+        values
+        <foreach collection="list" item="item" separator=",">
+        (#{item.fkOriginId,jdbcType=BIGINT}, #{item.productName,jdbcType=VARCHAR}, #{item.plantArea,jdbcType=VARCHAR},
+        #{item.outputNum,jdbcType=VARCHAR}, #{item.outputValue,jdbcType=VARCHAR}, #{item.state,jdbcType=INTEGER},
+        NOW(), #{item.createId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP},
+        #{item.updateId,jdbcType=INTEGER}, #{item.remark,jdbcType=LONGVARCHAR})
+        </foreach>
+    </insert>
+</mapper>