allProducts(IPage iPage,String groundingStatus, String productName);
+
+}
diff --git b/src/main/java/com/subsidy/mapper/ServiceAdministerMappingMapper.java a/src/main/java/com/subsidy/mapper/ServiceAdministerMappingMapper.java
new file mode 100644
index 0000000..be5187a
--- /dev/null
+++ a/src/main/java/com/subsidy/mapper/ServiceAdministerMappingMapper.java
@@ -0,0 +1,27 @@
+package com.subsidy.mapper;
+
+import com.subsidy.model.ServiceAdministerMappingDO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.subsidy.model.ServiceDictDO;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ *
+ * 应用账户-服务映射表 Mapper 接口
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+ @Repository
+public interface ServiceAdministerMappingMapper extends BaseMapper {
+
+ /**
+ * 查看某个账户能管理的应用
+ */
+ List administerService(Long administerId);
+
+
+}
diff --git b/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java a/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java
new file mode 100644
index 0000000..811c1e6
--- /dev/null
+++ a/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java
@@ -0,0 +1,24 @@
+package com.subsidy.mapper;
+
+import com.subsidy.model.ServiceCompanyFilesDO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ *
+ * 协议管理材料表 Mapper 接口
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+ @Repository
+public interface ServiceCompanyFilesMapper extends BaseMapper {
+
+
+ List companyFiles(Long serviceCompanyId, String fileName);
+
+
+}
diff --git b/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java a/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java
new file mode 100644
index 0000000..155e105
--- /dev/null
+++ a/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java
@@ -0,0 +1,39 @@
+package com.subsidy.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.subsidy.model.ServiceCompanyMappingDO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.subsidy.model.ServiceDictDO;
+import com.subsidy.vo.service.GetServiceCompaniesVO;
+import com.subsidy.vo.service.ServiceCompaniesVO;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ *
+ * 业务公司 映射表 Mapper 接口
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Repository
+public interface ServiceCompanyMappingMapper extends BaseMapper {
+
+
+ IPage getServiceCompanies(IPage iPage, Long serviceId, String companyName, String authStatus);
+
+ List serviceCompanies(Long serviceId, String companyName);
+
+ /**
+ * 返回公司全部的业务
+ */
+ List companyService(Long companyId);
+
+ /**
+ * 返回公司授权给某个人的业务
+ */
+ List companyAdministerService(Long companyId, Long administerId);
+
+}
diff --git b/src/main/java/com/subsidy/mapper/ServiceDictMapper.java a/src/main/java/com/subsidy/mapper/ServiceDictMapper.java
new file mode 100644
index 0000000..2b75de5
--- /dev/null
+++ a/src/main/java/com/subsidy/mapper/ServiceDictMapper.java
@@ -0,0 +1,18 @@
+package com.subsidy.mapper;
+
+import com.subsidy.model.ServiceDictDO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * 业务管理字典表 Mapper 接口
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+ @Repository
+public interface ServiceDictMapper extends BaseMapper {
+
+}
diff --git b/src/main/java/com/subsidy/model/AdministerCompanyMappingDO.java a/src/main/java/com/subsidy/model/AdministerCompanyMappingDO.java
new file mode 100644
index 0000000..4316049
--- /dev/null
+++ a/src/main/java/com/subsidy/model/AdministerCompanyMappingDO.java
@@ -0,0 +1,33 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 管理员-公司映射表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("administer_company_mapping")
+public class AdministerCompanyMappingDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ private Long administerId;
+
+ private Long companyId;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/AdministerDO.java a/src/main/java/com/subsidy/model/AdministerDO.java
new file mode 100644
index 0000000..2925328
--- /dev/null
+++ a/src/main/java/com/subsidy/model/AdministerDO.java
@@ -0,0 +1,77 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 管理平台用户
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("administer")
+public class AdministerDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 手机号
+ */
+ private String telephone;
+
+ /**
+ * 账号
+ */
+ private String accountName;
+
+ /**
+ * 密码
+ */
+ private String password;
+
+// /**
+// * 公司id
+// */
+// private Long companyId;
+
+ /**
+ * 成员名称
+ */
+ private String userName;
+
+ /**
+ * 头像
+ */
+ private String img;
+
+ /**
+ * 1:启用 0:禁用
+ */
+ private String status;
+
+ /**
+ * 角色 0:应用 1:客户 2:中心 3:企业唯一账号
+ */
+ private Integer role;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/CompanyDictDO.java a/src/main/java/com/subsidy/model/CompanyDictDO.java
new file mode 100644
index 0000000..3070e90
--- /dev/null
+++ a/src/main/java/com/subsidy/model/CompanyDictDO.java
@@ -0,0 +1,76 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 企业字典表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("company_dict")
+public class CompanyDictDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ private String companyName;
+
+ /**
+ * 机构编码
+ */
+ private String companyCode;
+
+ /**
+ * 领域
+ */
+ private String field;
+
+ private String areaName;
+
+ /**
+ * 简称
+ */
+ private String shortName;
+
+ /**
+ * logo
+ */
+ private String logo;
+
+ private String banner;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ /**
+ * 是否需要跳转到Q学友
+ */
+ private String qxyStatus;
+
+ /**
+ * 监管第三方名称
+ */
+ private String superviseName;
+
+ private Integer timeLimit;
+
+ private Integer ipAddressRecord;
+
+ private Integer deviceNoRecord;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/CompanyMemberMappingDO.java a/src/main/java/com/subsidy/model/CompanyMemberMappingDO.java
new file mode 100644
index 0000000..59a7b9b
--- /dev/null
+++ a/src/main/java/com/subsidy/model/CompanyMemberMappingDO.java
@@ -0,0 +1,54 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 公司人员映射表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("company_member_mapping")
+public class CompanyMemberMappingDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 公司id
+ */
+ private Long companyId;
+
+ /**
+ * 人员id
+ */
+ private Long memberId;
+
+ /**
+ * 人员状态 1在职 0 离职
+ */
+ private Integer memberStatus;
+
+
+ /**
+ * 工号
+ */
+ private String workNo;
+
+ /**
+ * 入职时间
+ */
+ private String inductionDate;
+
+}
diff --git b/src/main/java/com/subsidy/model/DepartmentDictDO.java a/src/main/java/com/subsidy/model/DepartmentDictDO.java
new file mode 100644
index 0000000..07b783a
--- /dev/null
+++ a/src/main/java/com/subsidy/model/DepartmentDictDO.java
@@ -0,0 +1,59 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 部门字典表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("department_dict")
+public class DepartmentDictDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 企业管理员id
+ */
+ private Long companyId;
+
+ /**
+ * 部门名称
+ */
+ private String departmentName;
+
+ /**
+ * 部门负责人
+ */
+ private String leaderName;
+
+ /**
+ * 父节点id
+ */
+ private Long parentId;
+
+ /**
+ * 为写程序方便,数据库里为null
+ */
+ private String children;
+
+ private String fullName;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/FieldDictDO.java a/src/main/java/com/subsidy/model/FieldDictDO.java
new file mode 100644
index 0000000..52a9460
--- /dev/null
+++ a/src/main/java/com/subsidy/model/FieldDictDO.java
@@ -0,0 +1,34 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 行业字典表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("field_dict")
+public class FieldDictDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 行业名称
+ */
+ private String fieldName;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/JobDictDO.java a/src/main/java/com/subsidy/model/JobDictDO.java
new file mode 100644
index 0000000..4f06eea
--- /dev/null
+++ a/src/main/java/com/subsidy/model/JobDictDO.java
@@ -0,0 +1,44 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 岗位表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("job_dict")
+public class JobDictDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 公司id
+ */
+ private Long companyId;
+
+ /**
+ * 岗位名称
+ */
+ private String jobName;
+
+ /**
+ * 排序
+ */
+ private Integer orderNo;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/MemberDO.java a/src/main/java/com/subsidy/model/MemberDO.java
new file mode 100644
index 0000000..2a1d6e3
--- /dev/null
+++ a/src/main/java/com/subsidy/model/MemberDO.java
@@ -0,0 +1,110 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 学生表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("member")
+public class MemberDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 姓名
+ */
+ private String userName;
+
+ /**
+ * 账号
+ */
+ private String accountName;
+
+ /**
+ * 英文名
+ */
+ private String accountNameEn;
+
+ /**
+ * 邮箱
+ */
+ private String email;
+
+ /**
+ * 手机号
+ */
+ private String telephone;
+
+ /**
+ * 密码
+ */
+ private String password;
+
+ /**
+ * 性别
+ */
+ private String gender;
+
+ /**
+ * 头像
+ */
+ private String image;
+
+ /**
+ * 人脸核验--照片
+ */
+ private String checkImage;
+
+ /**
+ * 采集时间
+ */
+ private LocalDateTime checkTime;
+
+ /**
+ * 身份证号
+ */
+ private String idCard;
+
+ /**
+ * 身份证照片
+ */
+ private String idCardPhoto;
+
+ /**
+ * 启用/冻结
+ */
+ private String status;
+
+ /**
+ * 是否登陆过 1 是 0 不是
+ */
+ private Integer firstLogin;
+
+ /**
+ * QQ号
+ */
+ private String qqNo;
+
+ /**
+ * 微信账号
+ */
+ private String wechat;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/MemberDepartmentMappingDO.java a/src/main/java/com/subsidy/model/MemberDepartmentMappingDO.java
new file mode 100644
index 0000000..2db81cf
--- /dev/null
+++ a/src/main/java/com/subsidy/model/MemberDepartmentMappingDO.java
@@ -0,0 +1,44 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 老师部门映射表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("member_department_mapping")
+public class MemberDepartmentMappingDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 老师id
+ */
+ private Long memberId;
+
+ /**
+ * 部门id
+ */
+ private Long departmentId;
+
+ /**
+ * 状态
+ */
+ private Integer memberStatus;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/ProductDictDO.java a/src/main/java/com/subsidy/model/ProductDictDO.java
new file mode 100644
index 0000000..b39c54b
--- /dev/null
+++ a/src/main/java/com/subsidy/model/ProductDictDO.java
@@ -0,0 +1,53 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 产品管理字典表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("product_dict")
+public class ProductDictDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 产品名称
+ */
+ private String productName;
+
+ /**
+ * 产品图标
+ */
+ private String productLogo;
+
+ /**
+ * 产品描述
+ */
+ private String productDesc;
+
+ /**
+ * 联系方式
+ */
+ private String contactInfo;
+
+ private String groundingStatus;
+
+ private String highlightTag;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/ServiceAdministerMappingDO.java a/src/main/java/com/subsidy/model/ServiceAdministerMappingDO.java
new file mode 100644
index 0000000..8de013b
--- /dev/null
+++ a/src/main/java/com/subsidy/model/ServiceAdministerMappingDO.java
@@ -0,0 +1,33 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 应用账户-服务映射表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("service_administer_mapping")
+public class ServiceAdministerMappingDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ private Long administerId;
+
+ private Long serviceId;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java a/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java
new file mode 100644
index 0000000..c151f52
--- /dev/null
+++ a/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java
@@ -0,0 +1,40 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 协议管理材料表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("service_company_files")
+public class ServiceCompanyFilesDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ private Long serviceCompanyId;
+
+ /**
+ * 0:业务合同 1:业务材料
+ */
+ private String fileType;
+
+ private String fileName;
+
+ private String fileAddress;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/ServiceCompanyMappingDO.java a/src/main/java/com/subsidy/model/ServiceCompanyMappingDO.java
new file mode 100644
index 0000000..e773487
--- /dev/null
+++ a/src/main/java/com/subsidy/model/ServiceCompanyMappingDO.java
@@ -0,0 +1,39 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 业务公司 映射表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("service_company_mapping")
+public class ServiceCompanyMappingDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 公司id
+ */
+ private Long companyId;
+
+ /**
+ * 业务id
+ */
+ private Long serviceId;
+
+
+}
diff --git b/src/main/java/com/subsidy/model/ServiceDictDO.java a/src/main/java/com/subsidy/model/ServiceDictDO.java
new file mode 100644
index 0000000..23bab66
--- /dev/null
+++ a/src/main/java/com/subsidy/model/ServiceDictDO.java
@@ -0,0 +1,34 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * 业务管理字典表
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("service_dict")
+public class ServiceDictDO extends BaseModel {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 业务名称
+ */
+ private String serviceName;
+
+
+}
diff --git b/src/main/java/com/subsidy/service/AdministerCompanyMappingService.java a/src/main/java/com/subsidy/service/AdministerCompanyMappingService.java
new file mode 100644
index 0000000..70d3585
--- /dev/null
+++ a/src/main/java/com/subsidy/service/AdministerCompanyMappingService.java
@@ -0,0 +1,16 @@
+package com.subsidy.service;
+
+import com.subsidy.model.AdministerCompanyMappingDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 管理员-公司映射表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface AdministerCompanyMappingService extends IService {
+
+}
diff --git b/src/main/java/com/subsidy/service/AdministerService.java a/src/main/java/com/subsidy/service/AdministerService.java
new file mode 100644
index 0000000..cf36fb1
--- /dev/null
+++ a/src/main/java/com/subsidy/service/AdministerService.java
@@ -0,0 +1,31 @@
+package com.subsidy.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.subsidy.dto.administer.AdministerPermissionVO;
+import com.subsidy.dto.administer.DownloadFailMembersDTO;
+import com.subsidy.dto.administer.ImportMemberResultVO;
+import com.subsidy.dto.administer.LoginVO;
+import com.subsidy.model.AdministerDO;
+import com.subsidy.vo.administer.AuthVO;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ *
+ * 管理平台用户 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface AdministerService extends IService {
+
+ LoginVO login(AdministerDO administerDO);
+
+ AdministerPermissionVO getPermissions();
+
+ AuthVO auth(AdministerDO administerDO);
+
+ ImportMemberResultVO importMember(Long companyId, MultipartFile multipartFile)throws Exception;
+
+ void downloadFailMembers(DownloadFailMembersDTO downloadFailMembersDTO);
+}
diff --git b/src/main/java/com/subsidy/service/CompanyDictService.java a/src/main/java/com/subsidy/service/CompanyDictService.java
new file mode 100644
index 0000000..512430e
--- /dev/null
+++ a/src/main/java/com/subsidy/service/CompanyDictService.java
@@ -0,0 +1,26 @@
+package com.subsidy.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.subsidy.dto.company.GetCompanyMembersDTO;
+import com.subsidy.dto.company.OperatorsDTO;
+import com.subsidy.model.CompanyDictDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.subsidy.vo.company.GetCompanyMembersVO;
+import com.subsidy.vo.company.OperatorsVO;
+
+/**
+ *
+ * 企业字典表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface CompanyDictService extends IService {
+
+ IPage operators(OperatorsDTO operatorsDTO);
+
+ IPage getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO);
+
+
+}
diff --git b/src/main/java/com/subsidy/service/CompanyMemberMappingService.java a/src/main/java/com/subsidy/service/CompanyMemberMappingService.java
new file mode 100644
index 0000000..c2672c3
--- /dev/null
+++ a/src/main/java/com/subsidy/service/CompanyMemberMappingService.java
@@ -0,0 +1,36 @@
+package com.subsidy.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.subsidy.dto.company.AttendMembersDTO;
+import com.subsidy.dto.member.CancerMemberDTO;
+import com.subsidy.dto.member.DepartMembersDTO;
+import com.subsidy.model.CompanyMemberMappingDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.subsidy.vo.member.AttendMembersVO;
+import com.subsidy.vo.member.DepartMembersVO;
+import com.subsidy.vo.member.MemberAttendInfoVO;
+
+import java.util.List;
+
+/**
+ *
+ * 公司人员映射表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface CompanyMemberMappingService extends IService {
+
+ String cancerMember(CancerMemberDTO cancerMemberDTO);
+
+ IPage departMembers(DepartMembersDTO departMembersDTO);
+
+ void exportDepartMembers(DepartMembersDTO departMembersDTO);
+
+ IPage attendMembers(AttendMembersDTO attendMembersDTO);
+
+ List memberAttendInfo(CompanyMemberMappingDO companyMemberMappingDO);
+
+
+}
diff --git b/src/main/java/com/subsidy/service/DepartmentDictService.java a/src/main/java/com/subsidy/service/DepartmentDictService.java
new file mode 100644
index 0000000..add2f75
--- /dev/null
+++ a/src/main/java/com/subsidy/service/DepartmentDictService.java
@@ -0,0 +1,34 @@
+package com.subsidy.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.subsidy.dto.department.GetDepartmentMembersDTO;
+import com.subsidy.model.DepartmentDictDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.subsidy.vo.department.GetDepartmentsVO;
+import com.subsidy.vo.department.GetMembersVO;
+
+import java.util.List;
+
+/**
+ *
+ * 部门字典表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface DepartmentDictService extends IService {
+
+ List getDepartments(DepartmentDictDO departmentDictDO);
+
+ String addDepartment(DepartmentDictDO departmentDictDO);
+
+ String deleteDepartment(DepartmentDictDO departmentDictDO);
+
+ String updateDepartment(DepartmentDictDO departmentDictDO);
+
+ IPage getDepartmentMembers(GetDepartmentMembersDTO getDepartmentMembersDTO);
+
+ List getMembers(GetDepartmentMembersDTO getDepartmentMembersDTO);
+
+}
diff --git b/src/main/java/com/subsidy/service/FieldDictService.java a/src/main/java/com/subsidy/service/FieldDictService.java
new file mode 100644
index 0000000..c5a5f8c
--- /dev/null
+++ a/src/main/java/com/subsidy/service/FieldDictService.java
@@ -0,0 +1,16 @@
+package com.subsidy.service;
+
+import com.subsidy.model.FieldDictDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 行业字典表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface FieldDictService extends IService {
+
+}
diff --git b/src/main/java/com/subsidy/service/JobDictService.java a/src/main/java/com/subsidy/service/JobDictService.java
new file mode 100644
index 0000000..5ea68ec
--- /dev/null
+++ a/src/main/java/com/subsidy/service/JobDictService.java
@@ -0,0 +1,16 @@
+package com.subsidy.service;
+
+import com.subsidy.model.JobDictDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 岗位表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface JobDictService extends IService {
+
+}
diff --git b/src/main/java/com/subsidy/service/MemberDepartmentMappingService.java a/src/main/java/com/subsidy/service/MemberDepartmentMappingService.java
new file mode 100644
index 0000000..fbcb3b2
--- /dev/null
+++ a/src/main/java/com/subsidy/service/MemberDepartmentMappingService.java
@@ -0,0 +1,16 @@
+package com.subsidy.service;
+
+import com.subsidy.model.MemberDepartmentMappingDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 老师部门映射表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface MemberDepartmentMappingService extends IService {
+
+}
diff --git b/src/main/java/com/subsidy/service/MemberService.java a/src/main/java/com/subsidy/service/MemberService.java
new file mode 100644
index 0000000..f61d1f5
--- /dev/null
+++ a/src/main/java/com/subsidy/service/MemberService.java
@@ -0,0 +1,16 @@
+package com.subsidy.service;
+
+import com.subsidy.model.MemberDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 学生表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface MemberService extends IService {
+
+}
diff --git b/src/main/java/com/subsidy/service/ProductDictService.java a/src/main/java/com/subsidy/service/ProductDictService.java
new file mode 100644
index 0000000..0990c5e
--- /dev/null
+++ a/src/main/java/com/subsidy/service/ProductDictService.java
@@ -0,0 +1,27 @@
+package com.subsidy.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.subsidy.dto.product.AllProductsDTO;
+import com.subsidy.model.ProductDictDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 产品管理字典表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface ProductDictService extends IService {
+
+ IPage allProducts(AllProductsDTO allProductsDTO);
+
+ String addProduct(ProductDictDO productDictDO);
+
+ String deleteProduct(ProductDictDO productDictDO);
+
+ String updateProduct(ProductDictDO productDictDO);
+
+
+}
diff --git b/src/main/java/com/subsidy/service/ServiceAdministerMappingService.java a/src/main/java/com/subsidy/service/ServiceAdministerMappingService.java
new file mode 100644
index 0000000..373b71d
--- /dev/null
+++ a/src/main/java/com/subsidy/service/ServiceAdministerMappingService.java
@@ -0,0 +1,22 @@
+package com.subsidy.service;
+
+import com.subsidy.model.AdministerCompanyMappingDO;
+import com.subsidy.model.ServiceAdministerMappingDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.subsidy.model.ServiceDictDO;
+
+import java.util.List;
+
+/**
+ *
+ * 应用账户-服务映射表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface ServiceAdministerMappingService extends IService {
+
+ List administerServices(AdministerCompanyMappingDO administerCompanyMappingDO);
+
+}
diff --git b/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java a/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java
new file mode 100644
index 0000000..4d93bb1
--- /dev/null
+++ a/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java
@@ -0,0 +1,25 @@
+package com.subsidy.service;
+
+import com.subsidy.model.ServiceCompanyFilesDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ *
+ * 协议管理材料表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface ServiceCompanyFilesService extends IService {
+
+ List companyFiles(ServiceCompanyFilesDO serviceCompanyFilesDO);
+
+ String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO);
+
+ String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO);
+
+
+}
diff --git b/src/main/java/com/subsidy/service/ServiceCompanyMappingService.java a/src/main/java/com/subsidy/service/ServiceCompanyMappingService.java
new file mode 100644
index 0000000..a712af6
--- /dev/null
+++ a/src/main/java/com/subsidy/service/ServiceCompanyMappingService.java
@@ -0,0 +1,33 @@
+package com.subsidy.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.subsidy.dto.service.CancelAuthDTO;
+import com.subsidy.dto.service.GetServiceCompaniesDTO;
+import com.subsidy.model.ServiceCompanyMappingDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.subsidy.vo.service.GetServiceCompaniesVO;
+import com.subsidy.vo.service.ServiceCompaniesVO;
+
+import java.util.List;
+
+/**
+ *
+ * 业务公司 映射表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface ServiceCompanyMappingService extends IService {
+
+
+ IPage getServiceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO);
+
+ String cancelAuth(CancelAuthDTO cancelAuthDTO);
+
+ String addAuth(CancelAuthDTO cancelAuthDTO);
+
+ List serviceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO);
+
+
+}
diff --git b/src/main/java/com/subsidy/service/ServiceDictService.java a/src/main/java/com/subsidy/service/ServiceDictService.java
new file mode 100644
index 0000000..3a4e242
--- /dev/null
+++ a/src/main/java/com/subsidy/service/ServiceDictService.java
@@ -0,0 +1,20 @@
+package com.subsidy.service;
+
+import com.subsidy.model.ServiceDictDO;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ *
+ * 业务管理字典表 服务类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+public interface ServiceDictService extends IService {
+
+ List getAllServices();
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/AdministerCompanyMappingServiceImpl.java a/src/main/java/com/subsidy/service/impl/AdministerCompanyMappingServiceImpl.java
new file mode 100644
index 0000000..8b3965c
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/AdministerCompanyMappingServiceImpl.java
@@ -0,0 +1,20 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.AdministerCompanyMappingDO;
+import com.subsidy.mapper.AdministerCompanyMappingMapper;
+import com.subsidy.service.AdministerCompanyMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 管理员-公司映射表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class AdministerCompanyMappingServiceImpl extends ServiceImpl implements AdministerCompanyMappingService {
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
new file mode 100644
index 0000000..f5dd4bd
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
@@ -0,0 +1,386 @@
+package com.subsidy.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.common.configure.SubsidyConfig;
+import com.subsidy.common.exception.HttpException;
+
+import com.subsidy.dto.administer.*;
+import com.subsidy.mapper.*;
+import com.subsidy.model.*;
+import com.subsidy.service.AdministerService;
+import com.subsidy.service.CompanyMemberMappingService;
+import com.subsidy.util.*;
+import com.subsidy.util.excel.ExcelUtil;
+import com.subsidy.vo.administer.AuthVO;
+import net.sourceforge.pinyin4j.PinyinHelper;
+import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
+import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
+import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ *
+ * 管理平台用户 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class AdministerServiceImpl extends ServiceImpl implements AdministerService {
+
+
+ @Autowired
+ private SubsidyConfig subsidyConfig;
+
+ @Autowired
+ private MemberMapper memberMapper;
+
+ @Autowired
+ private DepartmentDictMapper departmentDictMapper;
+
+ @Autowired
+ private CompanyMemberMappingMapper companyMemberMappingMapper;
+
+ @Autowired
+ private MemberDepartmentMappingMapper memberDepartmentMappingMapper;
+
+ public LoginVO login(AdministerDO administerDO) {
+
+ LoginVO loginVO = new LoginVO();
+
+ AdministerDO administerDO1 = this.baseMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(AdministerDO::getAccountName, administerDO.getAccountName())
+ .ne(AdministerDO::getRole, 2));
+
+ if (null == administerDO1) {
+ throw new HttpException(10012);
+ }
+
+ if ("0".equals(administerDO1.getStatus())) {
+ throw new HttpException(10013);
+ }
+
+ if (administerDO1.getPassword().equals(administerDO.getPassword())) {
+ String token = JwtUtil.generateToken(administerDO1.getId(), ConstantUtils.ADMINISTER_TERMINATE);
+ loginVO.setToken(token);
+ return loginVO;
+ }else {
+ throw new HttpException(10011);
+ }
+ }
+
+
+ public AdministerPermissionVO getPermissions() {
+
+ AdministerPermissionVO administerPermissionVO = new AdministerPermissionVO();
+ AdministerDO administerDO = (AdministerDO) Localstorage.getUser();
+ if (administerDO == null) {
+ throw new HttpException(10012);
+ }
+ BeanUtils.copyProperties(administerDO, administerPermissionVO);
+
+ List list = this.baseMapper.getPermissions(administerDO.getId());
+ List treeList = new ArrayList();
+ if (list != null) {
+ list.forEach(permission -> {
+ if (permission.getParentId() == null) {
+ treeList.add(permission);
+ }
+
+ list.forEach(p -> {
+ if (null != p.getParentId() && p.getParentId().equals(permission.getId())) {
+ if (permission.getChildren() == null) {
+ permission.setChildren(new ArrayList<>());
+ }
+ permission.getChildren().add(p);
+ }
+ });
+ });
+ }
+ administerPermissionVO.setPermissions(treeList);
+// //查询角色
+// RoleAdministerMappingDO roleAdministerMappingDO = roleAdministerMappingMapper.selectOne(new QueryWrapper()
+// .lambda()
+// .eq(RoleAdministerMappingDO::getAdministerId, administerDO.getId()));
+// administerPermissionVO.setRole(roleAdministerMappingDO.getRoleId());
+
+// CompanyDictDO companyDictDO = companyDictMapper.selectById(administerDO.getCompanyId());
+// administerPermissionVO.setCompanyName(companyDictDO.getCompanyName());
+// administerPermissionVO.setShortName(companyDictDO.getShortName());
+
+ /**
+ * 所在公司
+ */
+ List getAllCompanyVOS = this.baseMapper.administerCompanys(administerDO.getId());
+ administerPermissionVO.setGetAllCompanyVOS(getAllCompanyVOS);
+
+ return administerPermissionVO;
+ }
+
+ public AuthVO auth(AdministerDO administerDO){
+
+ CloseableHttpClient client = null;
+ CloseableHttpResponse response = null;
+ String resValue = "";
+
+ long timestamp = System.currentTimeMillis();
+ String nonce = SecretUtils.getNonce(5);
+ String appId = subsidyConfig.getAppId();
+
+ String appKey = subsidyConfig.getSecurityKey();
+ String mobile = administerDO.getTelephone();
+ String signature = SecretUtils.gen(appKey, nonce, String.valueOf(timestamp), appId, mobile);
+ try {
+ client = HttpClients.createDefault();
+ HttpUriRequest build = RequestBuilder
+ .post(subsidyConfig.getUrl())
+ .addHeader("Content-Type", "application/json")
+ .setEntity(new StringEntity(""))
+ .addParameter("appId", appId)
+ .addParameter("mobile", mobile)
+ .addParameter("timestamp", String.valueOf(timestamp))
+ .addParameter("signature", signature)
+ .addParameter("nonce", nonce)
+ .build();
+ //请求
+ response = client.execute(build);
+ HttpEntity entity = response.getEntity();
+
+ if (entity != null) {
+ resValue = EntityUtils.toString(entity, "UTF-8");
+ ResultMode resMode = JSON.parseObject(resValue, ResultMode.class);
+ AuthVO qxyVO = new AuthVO();
+ qxyVO.setToken(resMode.getData().toString());
+ return qxyVO;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return new AuthVO();
+ }
+
+
+ // @Transactional(rollbackFor = Exception.class)
+ public ImportMemberResultVO importMember(Long companyId, MultipartFile multipartFile) throws Exception {
+
+ HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
+ //拼音小写
+ format.setCaseType(HanyuPinyinCaseType.LOWERCASE);
+ //不带声调
+ format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
+
+ ImportMemberResultVO importMemberResultVO = new ImportMemberResultVO();
+
+ List failMembers = new ArrayList<>();
+
+ int successCount = 0;
+ int failCount = 0;
+ List importMemberDTOS = ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile);
+ for (ImportMemberDTO s : importMemberDTOS) {
+ try {
+
+ MemberDO memberDel = memberMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(MemberDO::getTelephone, s.getTelephone()));
+
+ MemberDO memberIdCard = memberMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(MemberDO::getIdCard, s.getIdCard()));
+
+ boolean departmentFlag = false;
+ String[] fullName = s.getDepartments().split(",");
+
+ for (String dep : fullName) {
+ DepartmentDictDO departmentDictDO = departmentDictMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getFullName, dep));
+ if (null == departmentDictDO) {
+ departmentFlag = true;
+ }
+ }
+
+ //日期格式
+ SimpleDateFormat d = null;
+ Date date = null;
+
+ if (!StringUtils.isEmpty(s.getInductionDate())) {
+ String DATE_PATTERN = "yyyy-MM-dd";
+ SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US);
+ date = sdf.parse(s.getInductionDate());
+ d = new SimpleDateFormat(DATE_PATTERN);
+ }
+
+ if (StringUtils.isEmpty(s.getUserName()) || StringUtils.isEmpty(s.getTelephone()) || StringUtils.isEmpty(s.getGender()) || StringUtils.isEmpty(s.getIdCard()) || StringUtils.isEmpty(s.getDepartments())) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ importMemberVO.setReason("必填字段为空");
+ if (null != d && null != date) {
+ s.setInductionDate(d.format(date));
+ }
+ importMemberVO.setDepartments(s.getDepartments());
+ failMembers.add(importMemberVO);
+ failCount++;
+ } else if (departmentFlag) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ importMemberVO.setReason("未查询到部门名称");
+ if (null != d && null != date) {
+ s.setInductionDate(d.format(date));
+ }
+ importMemberVO.setDepartments(s.getDepartments());
+ failMembers.add(importMemberVO);
+ failCount++;
+ } else if (null != s.getIdCard() && s.getIdCard().length() != 18) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ importMemberVO.setReason("身份证位数不正确");
+ if (null != d && null != date) {
+ s.setInductionDate(d.format(date));
+ }
+ importMemberVO.setDepartments(s.getDepartments());
+ failMembers.add(importMemberVO);
+ failCount++;
+ } else if (null != s.getTelephone() && s.getTelephone().length() != 11) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ importMemberVO.setReason("手机号位数不正确");
+ if (null != d && null != date) {
+ s.setInductionDate(d.format(date));
+ }
+ importMemberVO.setDepartments(s.getDepartments());
+ failMembers.add(importMemberVO);
+ failCount++;
+ } else if (null != memberDel) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ importMemberVO.setReason("手机号重复");
+ if (null != d && null != date) {
+ s.setInductionDate(d.format(date));
+ }
+ importMemberVO.setDepartments(s.getDepartments());
+ failMembers.add(importMemberVO);
+ failCount++;
+ } else if (null != memberIdCard) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ importMemberVO.setReason("身份证重复");
+ if (null != d && null != date) {
+ s.setInductionDate(d.format(date));
+ }
+ importMemberVO.setDepartments(s.getDepartments());
+ failMembers.add(importMemberVO);
+ failCount++;
+ } else {
+ MemberDO memberDO1 = new MemberDO();
+ memberDO1.setUserName(s.getUserName());
+ memberDO1.setGender(s.getGender());
+ memberDO1.setEmail(s.getEmail());
+
+ String accountName = PinyinHelper.toHanYuPinyinString(s.getUserName(), format, "", true);
+ //查看人员目前所在公司是否有重名的情况
+ List memberDOS = companyMemberMappingMapper.companyAccountMembers(companyId, accountName);
+
+ if (memberDOS.size() > 0) {
+ String usernames = userName(accountName, 0, companyId);
+ memberDO1.setAccountName(usernames.replace("u:", "v"));
+ } else {
+ memberDO1.setAccountName(accountName.replace("u:", "v"));
+ }
+
+// memberDO1.setCompanyId(companyId);
+ memberDO1.setFirstLogin(0);
+ memberDO1.setTelephone(s.getTelephone());
+ memberDO1.setIdCard(s.getIdCard().toUpperCase());
+ memberDO1.setStatus("启用");
+ memberDO1.setPassword("Ykhl123456");
+ memberDO1.setAccountNameEn(s.getAccountNameEn());
+ memberMapper.insert(memberDO1);
+
+ //人和公司的映射
+ CompanyMemberMappingDO companyMemberMappingDO = new CompanyMemberMappingDO();
+ companyMemberMappingDO.setMemberId(memberDO1.getId());
+ companyMemberMappingDO.setCompanyId(companyId);
+ companyMemberMappingDO.setMemberStatus(1);
+ companyMemberMappingDO.setWorkNo(s.getWorkNo());
+ companyMemberMappingDO.setInductionDate(DateFormatUtil.format(new Date(), DateFormatUtil.FMT_sdf_yMd));
+ companyMemberMappingMapper.insert(companyMemberMappingDO);
+
+ successCount++;
+
+ //找到对应的部门
+ if (fullName.length > 0) {
+ for (String dep : fullName) {
+ DepartmentDictDO departmentDictDO = departmentDictMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getFullName, dep));
+ MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO();
+ memberDepartmentMappingDO.setDepartmentId(departmentDictDO.getId());
+ memberDepartmentMappingDO.setMemberId(memberDO1.getId());
+ memberDepartmentMappingDO.setMemberStatus(1);
+ memberDepartmentMappingMapper.insert(memberDepartmentMappingDO);
+ }
+ }
+ }
+ } catch (Exception e) {
+ ImportMemberVO importMemberVO = new ImportMemberVO();
+ BeanUtils.copyProperties(s, importMemberVO);
+ String DATE_PATTERN = "yyyy-MM-dd";
+ SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US);
+ if (null != s.getInductionDate()) {
+ Date date = sdf.parse(s.getInductionDate());
+ SimpleDateFormat d = new SimpleDateFormat(DATE_PATTERN);
+ importMemberVO.setInductionDate(d.format(date));
+ }
+ importMemberVO.setReason("其他原因");
+ importMemberVO.setDepartments(s.getDepartments());
+ failCount++;
+ failMembers.add(importMemberVO);
+ }
+ }
+ importMemberResultVO.setImportMemberVOS(failMembers);
+ importMemberResultVO.setSuccessCount(successCount);
+ importMemberResultVO.setFailCount(failCount);
+ return importMemberResultVO;
+ }
+
+ public void downloadFailMembers(DownloadFailMembersDTO downloadFailMembersDTO) {
+ List importMemberVOS = downloadFailMembersDTO.getImportMemberVOS();
+ ExcelUtil.writeExcel(importMemberVOS, ImportMemberVO.class);
+ }
+
+
+ public String userName(String originName, int i, Long companyId) {
+ i++;
+ List memberDOS = memberMapper.selectList(new QueryWrapper()
+ .lambda()
+ .eq(MemberDO::getAccountName, originName + i));
+ if (memberDOS.size() > 0) {
+ return userName(originName, i, companyId);
+ } else {
+ return originName + i;
+ }
+ }
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
new file mode 100644
index 0000000..5af43d9
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
@@ -0,0 +1,79 @@
+package com.subsidy.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.dto.company.GetCompanyMembersDTO;
+import com.subsidy.dto.company.OperatorsDTO;
+import com.subsidy.mapper.AdministerMapper;
+import com.subsidy.mapper.CompanyDictMapper;
+import com.subsidy.mapper.CompanyMemberMappingMapper;
+import com.subsidy.mapper.FieldDictMapper;
+import com.subsidy.model.AdministerDO;
+import com.subsidy.model.CompanyDictDO;
+import com.subsidy.model.FieldDictDO;
+import com.subsidy.service.CompanyDictService;
+import com.subsidy.vo.company.GetCompanyMembersVO;
+import com.subsidy.vo.company.MemberCompanyVO;
+import com.subsidy.vo.company.OperatorsVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 企业字典表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class CompanyDictServiceImpl extends ServiceImpl implements CompanyDictService {
+
+ @Autowired
+ private AdministerMapper administerMapper;
+
+ @Autowired
+ private FieldDictMapper fieldDictMapper;
+
+ @Autowired
+ private CompanyMemberMappingMapper companyMemberMappingMapper;
+
+ public IPage operators(OperatorsDTO operatorsDTO) {
+ Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
+
+// AdministerDO administerDO = administerMapper.selectById(operatorsDTO.getId());
+
+ IPage page = this.baseMapper.operators(pager, operatorsDTO.getUserId(), operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), operatorsDTO.getSuperviseName());
+ List operatorsVOS = page.getRecords();
+ for (OperatorsVO operatorsVO : operatorsVOS) {
+
+
+ //查看公司所在行业
+ List fieldDictDOS = fieldDictMapper.queryCompanyFields(operatorsVO.getCompanyId());
+ operatorsVO.setField(fieldDictDOS);
+ }
+ page.setRecords(operatorsVOS);
+ return page;
+ }
+
+
+ public IPage getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
+ Page pager = new Page(getCompanyMembersDTO.getPageNum(), getCompanyMembersDTO.getPageSize());
+
+ IPage companyMembersVOIPage = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(), getCompanyMembersDTO.getMemberStatus());
+
+ List records = companyMembersVOIPage.getRecords();
+ for (GetCompanyMembersVO gcmv : records) {
+
+ //历史带过的企业
+ List memberCompanyVOS = companyMemberMappingMapper.memberCompanys(gcmv.getId());
+ gcmv.setMemberCompanyVOS(memberCompanyVOS);
+
+ }
+ return companyMembersVOIPage;
+ }
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java a/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java
new file mode 100644
index 0000000..e937eff
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java
@@ -0,0 +1,78 @@
+package com.subsidy.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.subsidy.dto.company.AttendMembersDTO;
+import com.subsidy.dto.member.CancerMemberDTO;
+import com.subsidy.dto.member.DepartMembersDTO;
+import com.subsidy.mapper.MemberDepartmentMappingMapper;
+import com.subsidy.model.CompanyMemberMappingDO;
+import com.subsidy.mapper.CompanyMemberMappingMapper;
+import com.subsidy.service.CompanyMemberMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.util.ConstantUtils;
+import com.subsidy.util.excel.ExcelUtil;
+import com.subsidy.vo.member.AttendMembersVO;
+import com.subsidy.vo.member.DepartMembersVO;
+import com.subsidy.vo.member.MemberAttendInfoVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 公司人员映射表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class CompanyMemberMappingServiceImpl extends ServiceImpl implements CompanyMemberMappingService {
+
+ @Autowired
+ private MemberDepartmentMappingMapper memberDepartmentMappingMapper;
+
+ public String cancerMember(CancerMemberDTO cancerMemberDTO) {
+
+ List members = cancerMemberDTO.getMemberIds();
+
+ for (Long memberId : members) {
+ CompanyMemberMappingDO companyMemberMappingDO1 = this.baseMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(CompanyMemberMappingDO::getCompanyId, cancerMemberDTO.getCompanyId())
+ .eq(CompanyMemberMappingDO::getMemberId, memberId)
+ .eq(CompanyMemberMappingDO::getMemberStatus, 1));
+
+ companyMemberMappingDO1.setMemberStatus(0);
+ this.baseMapper.updateById(companyMemberMappingDO1);
+ memberDepartmentMappingMapper.cancelMember(memberId);
+ }
+ return ConstantUtils.DELETE_SUCCESS;
+ }
+
+ public IPage departMembers(DepartMembersDTO departMembersDTO) {
+ Page pager = new Page(departMembersDTO.getPageNum(), departMembersDTO.getPageSize());
+ return this.baseMapper.departMembers(pager, departMembersDTO.getCompanyId(), departMembersDTO.getUserName());
+ }
+
+ public void exportDepartMembers(DepartMembersDTO departMembersDTO) {
+ Page pager = new Page(1, -1);
+ IPage departMembersVOIPage = this.baseMapper.departMembers(pager, departMembersDTO.getCompanyId(), departMembersDTO.getUserName());
+ List departMembersVOS = departMembersVOIPage.getRecords();
+ ExcelUtil.writeExcel(departMembersVOS, DepartMembersVO.class);
+ }
+
+ public IPage attendMembers(AttendMembersDTO attendMembersDTO) {
+ Page pager = new Page(attendMembersDTO.getPageNum(), attendMembersDTO.getPageSize());
+ return this.baseMapper.attendMembers(pager, attendMembersDTO.getCompanyId(), attendMembersDTO.getDepartmentId(), attendMembersDTO.getUserName());
+ }
+
+ public List memberAttendInfo(CompanyMemberMappingDO companyMemberMappingDO) {
+ return this.baseMapper.memberAttendInfo(companyMemberMappingDO.getMemberId(),companyMemberMappingDO.getCompanyId());
+ }
+
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java a/src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
new file mode 100644
index 0000000..ff99862
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
@@ -0,0 +1,291 @@
+package com.subsidy.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.subsidy.common.exception.HttpException;
+import com.subsidy.dto.department.GetDepartmentMembersDTO;
+import com.subsidy.mapper.MemberDepartmentMappingMapper;
+import com.subsidy.mapper.MemberMapper;
+import com.subsidy.model.DepartmentDictDO;
+import com.subsidy.mapper.DepartmentDictMapper;
+import com.subsidy.model.MemberDO;
+import com.subsidy.model.MemberDepartmentMappingDO;
+import com.subsidy.service.DepartmentDictService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.util.ConstantUtils;
+import com.subsidy.vo.department.GetDepartmentsVO;
+import com.subsidy.vo.department.GetMembersVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * 部门字典表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class DepartmentDictServiceImpl extends ServiceImpl implements DepartmentDictService {
+
+
+ @Autowired
+ private MemberDepartmentMappingMapper memberDepartmentMappingMapper;
+
+ @Autowired
+ private MemberMapper memberMapper;
+
+ public List getDepartments(DepartmentDictDO departmentDictDO) {
+
+ //返回结果
+ List getDepartmentsVOS = new ArrayList<>();
+
+ List parentNodes = this.baseMapper.selectList(new QueryWrapper()
+ .lambda()
+ .isNull(DepartmentDictDO::getParentId)
+ .eq(DepartmentDictDO::getCompanyId, departmentDictDO.getCompanyId()));
+
+ for (DepartmentDictDO dd : parentNodes) {
+
+ GetDepartmentsVO getDepartmentsVO = new GetDepartmentsVO();
+ BeanUtils.copyProperties(dd, getDepartmentsVO);
+ //Integer count = memberDepartmentMappingMapper.selectCount(new QueryWrapper()
+ // .lambda()
+ // .eq(MemberDepartmentMappingDO::getDepartmentId, dd.getId()));
+ //getDepartmentsVO.setCnt(count);
+ getDepartmentsVO.setChildren(getChildNodes(getDepartmentsVO));
+ DepartmentDictDO departmentDictDO1 = this.baseMapper.selectById(dd.getParentId());
+ if (null != departmentDictDO1) {
+ getDepartmentsVO.setParentDepartmentName(departmentDictDO1.getDepartmentName());
+ }
+ getDepartmentsVOS.add(getDepartmentsVO);
+ }
+
+ return getDepartmentsVOS;
+ }
+
+ /**
+ * 递归部门列表 不包含老师信息和人数信息
+ *
+ * @param departmentDictDO
+ * @return
+ */
+ public List getChildNodes(GetDepartmentsVO departmentDictDO) {
+
+ List getDepartmentsVOS = new ArrayList<>();
+
+ List departmentDictDOS = this.baseMapper.selectList(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getParentId, departmentDictDO.getId()));
+
+ for (DepartmentDictDO departmentDictDO1 : departmentDictDOS) {
+
+ GetDepartmentsVO getDepartmentsVO = new GetDepartmentsVO();
+ BeanUtils.copyProperties(departmentDictDO1, getDepartmentsVO);
+ getDepartmentsVO.setChildren(getChildNodes(getDepartmentsVO));
+
+ Integer count = memberDepartmentMappingMapper.selectCount(new QueryWrapper()
+ .lambda()
+ .eq(MemberDepartmentMappingDO::getDepartmentId, getDepartmentsVO.getId())
+ .eq(MemberDepartmentMappingDO::getMemberStatus,1));
+ getDepartmentsVO.setCnt(count);
+ DepartmentDictDO departmentDictDO2 = this.baseMapper.selectById(departmentDictDO1.getParentId());
+ if (null != departmentDictDO2) {
+ getDepartmentsVO.setParentDepartmentName(departmentDictDO2.getDepartmentName());
+ }
+ getDepartmentsVOS.add(getDepartmentsVO);
+ }
+
+ if (getDepartmentsVOS.size() == 0) {
+ return null;
+ }
+ return getDepartmentsVOS;
+ }
+
+ public String addDepartment(DepartmentDictDO departmentDictDO) {
+
+ DepartmentDictDO departmentDictDO1 = departmentDictDO;
+ Integer counter = this.baseMapper.selectCount(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getCompanyId, departmentDictDO.getCompanyId())
+ .eq(DepartmentDictDO::getFullName, departmentDictDO.getFullName()));
+
+ if (counter > 0) {
+ throw new HttpException(30001);
+ }
+
+ List depNames = new ArrayList<>();
+
+ StringBuilder fullName = new StringBuilder();
+ //fullName 遍历生成全名称
+ do {
+ depNames.add("/" + departmentDictDO.getDepartmentName());
+ departmentDictDO = this.baseMapper.selectById(departmentDictDO.getParentId());
+ } while (null != departmentDictDO.getParentId());
+
+ depNames.add(departmentDictDO.getDepartmentName());
+
+ for (int i = depNames.size() - 1; i >= 0; i--) {
+ fullName.append(depNames.get(i));
+ }
+ departmentDictDO1.setFullName(fullName.toString());
+ this.baseMapper.insert(departmentDictDO1);
+
+ return ConstantUtils.ADD_SUCCESS;
+ }
+
+ public String deleteDepartment(DepartmentDictDO departmentDictDO) {
+ this.baseMapper.deleteById(departmentDictDO.getId());
+
+ List departmentDictDOS = this.baseMapper.selectList(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getParentId, departmentDictDO.getId())
+ );
+
+ for (DepartmentDictDO departmentDictDO1 : departmentDictDOS) {
+ deleteChildNode(departmentDictDO1);
+ }
+
+ return ConstantUtils.DELETE_SUCCESS;
+ }
+
+ void deleteChildNode(DepartmentDictDO departmentDictDO) {
+
+ List departmentDictDOS = this.baseMapper.selectList(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getParentId, departmentDictDO.getId()));
+
+ for (DepartmentDictDO departmentDictDO1 : departmentDictDOS) {
+ deleteChildNode(departmentDictDO1);
+ }
+ this.baseMapper.deleteById(departmentDictDO.getId());
+ }
+
+ public String updateDepartment(DepartmentDictDO departmentDictDO) {
+
+ Integer counter = this.baseMapper.selectCount(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getCompanyId, departmentDictDO.getCompanyId())
+ .eq(DepartmentDictDO::getDepartmentName, departmentDictDO.getDepartmentName())
+ .ne(DepartmentDictDO::getId, departmentDictDO.getId()));
+
+ if (counter > 0) {
+ throw new HttpException(30001);
+ }
+
+ this.baseMapper.updateById(departmentDictDO);
+ return ConstantUtils.SET_SUCCESS;
+ }
+
+ public IPage getDepartmentMembers(GetDepartmentMembersDTO getDepartmentMembersDTO) {
+
+ Page pager = new Page(getDepartmentMembersDTO.getPageNum(), getDepartmentMembersDTO.getPageSize());
+
+ if (null != getDepartmentMembersDTO.getDepartmentId()) {
+ //查询某个部门
+ IPage iPage = memberMapper.getMembers(pager, getDepartmentMembersDTO.getDepartmentId(), getDepartmentMembersDTO.getUserName(), null, getDepartmentMembersDTO.getStartDate(), getDepartmentMembersDTO.getEndDate());
+ return iPage;
+ } else {
+ //查询整个公司
+ IPage iPage = memberMapper.manageMember(pager, getDepartmentMembersDTO.getCompanyId(), getDepartmentMembersDTO.getUserName(), getDepartmentMembersDTO.getStartDate(), getDepartmentMembersDTO.getEndDate());
+ return iPage;
+ }
+ }
+
+ public List getMembers(GetDepartmentMembersDTO getDepartmentMembersDTO) {
+
+ List getMembersVOS = new ArrayList<>();
+
+// GetMembersVO getMembersVO = new GetMembersVO();
+
+ //找到父节点
+ DepartmentDictDO departmentDictDO = this.baseMapper.selectOne(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getCompanyId, getDepartmentMembersDTO.getCompanyId())
+ .isNull(DepartmentDictDO::getParentId));
+// BeanUtils.copyProperties(departmentDictDO,getMembersVO);
+
+// List departmentDictDOS = new ArrayList<>();
+// departmentDictDOS.add(departmentDictDO);
+
+// for (DepartmentDictDO dpt : departmentDictDOS){
+ GetMembersVO gmv = new GetMembersVO();
+ BeanUtils.copyProperties(departmentDictDO, gmv);
+// if (null!=departmentDictDO.getParentId()){
+// DepartmentDictDO departmentDictDO1 =this.baseMapper.selectById(departmentDictDO.getParentId());
+// gmv.setParentDepartmentName(departmentDictDO1.getDepartmentName());
+// }
+ gmv.setChildren(getChildNodes(gmv));
+
+ //父节点人员
+ List memberDOS = memberMapper.getMemberWithoutPage(departmentDictDO.getId(), getDepartmentMembersDTO.getUserName(), null, null, null);
+ if (memberDOS.size() > 0) {
+ gmv.setMemberDOS(memberDOS);
+ }
+// if (dpt.getParentId()!=null){
+// //部门人员
+// List memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null);
+// gmv.setMemberDOS(memberDOS1);
+// getMembersVOS.add(gmv);
+// }else {
+ //公司人员
+// List memberDOS = memberMapper.selectList(new QueryWrapper()
+// .lambda()
+// .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId()));
+// gmv.setMemberDOS(memberDOS);
+// getMembersVOS.add(gmv);
+// }
+ getMembersVOS.add(gmv);
+// }
+ return getMembersVOS;
+ }
+
+
+ /**
+ * 递归 带上部门总数,部门负责人等参数
+ *
+ * @param getMembersVO 父节点查找该节点的children
+ * @return 子节点
+ */
+ public List getChildNodes(GetMembersVO getMembersVO) {
+
+
+ List getAllDepartmentVOS = new ArrayList<>();
+
+ //查询该节点的子节点
+ List departmentDictDOS = this.baseMapper.selectList(new QueryWrapper()
+ .lambda()
+ .eq(DepartmentDictDO::getParentId, getMembersVO.getId()));
+
+ //递归
+ for (DepartmentDictDO dd : departmentDictDOS) {
+ GetMembersVO gmv = new GetMembersVO();
+ BeanUtils.copyProperties(dd, gmv);
+ if (null != dd.getParentId()) {
+ DepartmentDictDO departmentDictDO = this.baseMapper.selectById(dd.getParentId());
+ gmv.setParentDepartmentName(departmentDictDO.getDepartmentName());
+ }
+ gmv.setChildren(getChildNodes(gmv));
+
+
+ //部门人员
+ List memberDOS = memberMapper.getMemberWithoutPage(dd.getId(), getMembersVO.getUserName(), null, null, null);
+ if (memberDOS.size() > 0) {
+ gmv.setMemberDOS(memberDOS);
+ }
+ getAllDepartmentVOS.add(gmv);
+ }
+ if (departmentDictDOS.size() == 0) {
+ return null;
+ }
+
+ return getAllDepartmentVOS;
+ }
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/FieldDictServiceImpl.java a/src/main/java/com/subsidy/service/impl/FieldDictServiceImpl.java
new file mode 100644
index 0000000..c500407
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/FieldDictServiceImpl.java
@@ -0,0 +1,20 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.FieldDictDO;
+import com.subsidy.mapper.FieldDictMapper;
+import com.subsidy.service.FieldDictService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 行业字典表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class FieldDictServiceImpl extends ServiceImpl implements FieldDictService {
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java a/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java
new file mode 100644
index 0000000..e7d9182
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java
@@ -0,0 +1,20 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.JobDictDO;
+import com.subsidy.mapper.JobDictMapper;
+import com.subsidy.service.JobDictService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 岗位表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class JobDictServiceImpl extends ServiceImpl implements JobDictService {
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/MemberDepartmentMappingServiceImpl.java a/src/main/java/com/subsidy/service/impl/MemberDepartmentMappingServiceImpl.java
new file mode 100644
index 0000000..9057fa8
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/MemberDepartmentMappingServiceImpl.java
@@ -0,0 +1,20 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.MemberDepartmentMappingDO;
+import com.subsidy.mapper.MemberDepartmentMappingMapper;
+import com.subsidy.service.MemberDepartmentMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 老师部门映射表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class MemberDepartmentMappingServiceImpl extends ServiceImpl implements MemberDepartmentMappingService {
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
new file mode 100644
index 0000000..b643846
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
@@ -0,0 +1,20 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.MemberDO;
+import com.subsidy.mapper.MemberMapper;
+import com.subsidy.service.MemberService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 学生表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class MemberServiceImpl extends ServiceImpl implements MemberService {
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java a/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java
new file mode 100644
index 0000000..846224d
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java
@@ -0,0 +1,55 @@
+package com.subsidy.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.subsidy.common.exception.HttpException;
+import com.subsidy.dto.product.AllProductsDTO;
+import com.subsidy.model.ProductDictDO;
+import com.subsidy.mapper.ProductDictMapper;
+import com.subsidy.service.ProductDictService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.util.ConstantUtils;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 产品管理字典表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class ProductDictServiceImpl extends ServiceImpl implements ProductDictService {
+
+
+ public IPage allProducts(AllProductsDTO allProductsDTO) {
+ Page pager = new Page(allProductsDTO.getPageNum(), allProductsDTO.getPageSize());
+ return this.baseMapper.allProducts(pager, allProductsDTO.getGroundingStatus(),allProductsDTO.getProductName());
+ }
+
+ public String addProduct(ProductDictDO productDictDO) {
+ int count = this.baseMapper.selectCount(new QueryWrapper()
+ .lambda()
+ .eq(ProductDictDO::getProductName, productDictDO.getProductName()));
+
+ if (count > 0) {
+ throw new HttpException(30002);
+ }
+ this.baseMapper.insert(productDictDO);
+ return ConstantUtils.ADD_SUCCESS;
+ }
+
+ public String deleteProduct(ProductDictDO productDictDO) {
+ this.baseMapper.deleteById(productDictDO.getId());
+ return ConstantUtils.DELETE_SUCCESS;
+ }
+
+ public String updateProduct(ProductDictDO productDictDO) {
+ this.baseMapper.updateById(productDictDO);
+ return ConstantUtils.SUCCESS_UPDATE;
+ }
+
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java a/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java
new file mode 100644
index 0000000..7044dee
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java
@@ -0,0 +1,45 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.mapper.AdministerMapper;
+import com.subsidy.mapper.ServiceCompanyMappingMapper;
+import com.subsidy.model.*;
+import com.subsidy.mapper.ServiceAdministerMappingMapper;
+import com.subsidy.service.ServiceAdministerMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 应用账户-服务映射表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class ServiceAdministerMappingServiceImpl extends ServiceImpl implements ServiceAdministerMappingService {
+
+
+ @Autowired
+ private AdministerMapper administerMapper;
+
+ @Autowired
+ private ServiceCompanyMappingMapper serviceCompanyMappingMapper;
+
+ public List administerServices(AdministerCompanyMappingDO administerCompanyMappingDO) {
+
+ AdministerDO administerDO = administerMapper.selectById(administerCompanyMappingDO.getAdministerId());
+ if (3 == administerDO.getRole() || 1 == administerDO.getRole()) {
+ //返回企业全部的
+ return serviceCompanyMappingMapper.companyService(administerCompanyMappingDO.getCompanyId());
+ } else {
+ //返回企业中授权给这个人的应用
+ return serviceCompanyMappingMapper.companyAdministerService(administerCompanyMappingDO.getCompanyId(), administerCompanyMappingDO.getAdministerId());
+ }
+
+ }
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.java a/src/main/java/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.java
new file mode 100644
index 0000000..24e3b64
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.java
@@ -0,0 +1,39 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.ServiceCompanyFilesDO;
+import com.subsidy.mapper.ServiceCompanyFilesMapper;
+import com.subsidy.service.ServiceCompanyFilesService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.util.ConstantUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 协议管理材料表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class ServiceCompanyFilesServiceImpl extends ServiceImpl implements ServiceCompanyFilesService {
+
+
+ public List companyFiles(ServiceCompanyFilesDO serviceCompanyFilesDO) {
+ return this.baseMapper.companyFiles(serviceCompanyFilesDO.getServiceCompanyId(), serviceCompanyFilesDO.getFileName());
+ }
+
+ public String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO) {
+ this.baseMapper.deleteById(serviceCompanyFilesDO.getId());
+ return ConstantUtils.DELETE_SUCCESS;
+ }
+
+ public String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO) {
+ this.baseMapper.insert(serviceCompanyFilesDO);
+ return ConstantUtils.ADD_SUCCESS;
+ }
+
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/ServiceCompanyMappingServiceImpl.java a/src/main/java/com/subsidy/service/impl/ServiceCompanyMappingServiceImpl.java
new file mode 100644
index 0000000..7e8df87
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/ServiceCompanyMappingServiceImpl.java
@@ -0,0 +1,65 @@
+package com.subsidy.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.subsidy.dto.service.CancelAuthDTO;
+import com.subsidy.dto.service.GetServiceCompaniesDTO;
+import com.subsidy.model.ServiceCompanyMappingDO;
+import com.subsidy.mapper.ServiceCompanyMappingMapper;
+import com.subsidy.service.ServiceCompanyMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.subsidy.util.ConstantUtils;
+import com.subsidy.vo.service.GetServiceCompaniesVO;
+import com.subsidy.vo.service.ServiceCompaniesVO;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ *
+ * 业务公司 映射表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class ServiceCompanyMappingServiceImpl extends ServiceImpl implements ServiceCompanyMappingService {
+
+
+ public IPage getServiceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO) {
+ Page pager = new Page(getServiceCompaniesDTO.getPageNum(), getServiceCompaniesDTO.getPageSize());
+ return this.baseMapper.getServiceCompanies(pager, getServiceCompaniesDTO.getServiceId(), getServiceCompaniesDTO.getCompanyName(), getServiceCompaniesDTO.getAuthStatus());
+ }
+
+ @Transactional(rollbackFor = Exception.class)
+ public String cancelAuth(CancelAuthDTO cancelAuthDTO) {
+ List companyIds = cancelAuthDTO.getCompanyIds();
+ for (Long companyId : companyIds) {
+ this.baseMapper.delete(new QueryWrapper()
+ .lambda()
+ .eq(ServiceCompanyMappingDO::getCompanyId, companyId)
+ .eq(ServiceCompanyMappingDO::getServiceId, cancelAuthDTO.getServiceId()));
+ }
+ return ConstantUtils.DELETE_SUCCESS;
+ }
+
+ @Transactional(rollbackFor = Exception.class)
+ public String addAuth(CancelAuthDTO cancelAuthDTO) {
+ List companyIds = cancelAuthDTO.getCompanyIds();
+ for (Long companyId : companyIds) {
+ ServiceCompanyMappingDO serviceCompanyMappingDO = new ServiceCompanyMappingDO();
+ serviceCompanyMappingDO.setCompanyId(companyId);
+ serviceCompanyMappingDO.setServiceId(cancelAuthDTO.getServiceId());
+ this.baseMapper.insert(serviceCompanyMappingDO);
+ }
+ return ConstantUtils.ADD_SUCCESS;
+ }
+
+ public List serviceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO) {
+ return this.baseMapper.serviceCompanies(getServiceCompaniesDTO.getServiceId(),getServiceCompaniesDTO.getCompanyName());
+ }
+
+}
diff --git b/src/main/java/com/subsidy/service/impl/ServiceDictServiceImpl.java a/src/main/java/com/subsidy/service/impl/ServiceDictServiceImpl.java
new file mode 100644
index 0000000..7dacc66
--- /dev/null
+++ a/src/main/java/com/subsidy/service/impl/ServiceDictServiceImpl.java
@@ -0,0 +1,26 @@
+package com.subsidy.service.impl;
+
+import com.subsidy.model.ServiceDictDO;
+import com.subsidy.mapper.ServiceDictMapper;
+import com.subsidy.service.ServiceDictService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *
+ * 业务管理字典表 服务实现类
+ *
+ *
+ * @author Tuyp
+ * @since 2024-01-11
+ */
+@Service
+public class ServiceDictServiceImpl extends ServiceImpl implements ServiceDictService {
+
+ public List getAllServices(){
+ return this.baseMapper.selectList(null);
+ }
+
+}
diff --git b/src/main/java/com/subsidy/util/ActivityDetectionUtils.java a/src/main/java/com/subsidy/util/ActivityDetectionUtils.java
new file mode 100644
index 0000000..0f09334
--- /dev/null
+++ a/src/main/java/com/subsidy/util/ActivityDetectionUtils.java
@@ -0,0 +1,52 @@
+package com.subsidy.util;
+
+import com.tencentcloudapi.captcha.v20190722.CaptchaClient;
+import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultRequest;
+import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultResponse;
+import com.tencentcloudapi.common.Credential;
+import com.tencentcloudapi.common.profile.ClientProfile;
+import com.tencentcloudapi.common.profile.HttpProfile;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class ActivityDetectionUtils {
+
+ /**
+ * 活跃度检测工具类
+ *
+ * @throws Exception
+ */
+
+ public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request, String ticket, String randstr) {
+
+ try {
+ // 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密
+ // 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取
+ Credential cred = new Credential(ConstantUtils.SECRET_ID, ConstantUtils.SECRET_KEY);
+ // 实例化一个http选项,可选的,没有特殊需求可以跳过
+ HttpProfile httpProfile = new HttpProfile();
+ httpProfile.setEndpoint("captcha.tencentcloudapi.com");
+ // 实例化一个client选项,可选的,没有特殊需求可以跳过
+ ClientProfile clientProfile = new ClientProfile();
+ clientProfile.setHttpProfile(httpProfile);
+ // 实例化要请求产品的client对象,clientProfile是可选的
+ CaptchaClient client = new CaptchaClient(cred, "", clientProfile);
+ // 实例化一个请求对象,每个接口都会对应一个request对象
+ DescribeCaptchaResultRequest req = new DescribeCaptchaResultRequest();
+ req.setCaptchaType(9L);
+ String ip = IpAddressUtil.getIpAddress(request);
+ req.setUserIp(ip);
+ req.setRandstr(randstr);
+ req.setCaptchaAppId(ConstantUtils.CAPTCHAAPP_ID);
+ req.setAppSecretKey(ConstantUtils.APP_SECRET_KEY);
+ req.setBusinessId(ConstantUtils.BUSINESS_ID);
+ req.setTicket(ticket);
+ // 返回的resp是一个DescribeCaptchaResultResponse的实例,与请求对象对应
+ return client.DescribeCaptchaResult(req);
+ } catch (Exception e) {
+
+ }
+ return null;
+ }
+
+}
diff --git b/src/main/java/com/subsidy/util/Base64Util.java a/src/main/java/com/subsidy/util/Base64Util.java
new file mode 100644
index 0000000..cabdb91
--- /dev/null
+++ a/src/main/java/com/subsidy/util/Base64Util.java
@@ -0,0 +1,87 @@
+package com.subsidy.util;
+
+import sun.misc.BASE64Decoder;
+import sun.misc.BASE64Encoder;
+
+import javax.imageio.stream.FileImageInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+class Base64Util {
+ /**
+ * 字符串转图片
+ * @param base64Str
+ * @return
+ */
+ public static byte[] decode(String base64Str){
+ byte[] b = null;
+ BASE64Decoder decoder = new BASE64Decoder();
+ try {
+ b = decoder.decodeBuffer(replaceEnter(base64Str));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return b;
+ }
+
+ /**
+ * 图片转字符串
+ * @param image
+ * @return
+ */
+ public static String encode(byte[] image){
+ BASE64Encoder decoder = new BASE64Encoder();
+ return replaceEnter(decoder.encode(image));
+ }
+
+ public static void main(String[] args) {
+ System.out.println(encode("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"));
+ }
+
+ public static String encode(String uri){
+ BASE64Encoder encoder = new BASE64Encoder();
+ return replaceEnter(encoder.encode(uri.getBytes()));
+ }
+
+ /**
+ *
+ * @path 图片路径
+ * @return
+ */
+
+ public static byte[] imageTobyte(String path){
+ byte[] data = null;
+ FileImageInputStream input = null;
+ try {
+ input = new FileImageInputStream(new File(path));
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ byte[] buf = new byte[1024];
+ int numBytesRead = 0;
+ while((numBytesRead = input.read(buf)) != -1){
+ output.write(buf, 0, numBytesRead);
+ }
+ data = output.toByteArray();
+ output.close();
+ input.close();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return data;
+ }
+
+
+
+ public static String replaceEnter(String str){
+ String reg ="[\n-\r]";
+ Pattern p = Pattern.compile(reg);
+ Matcher m = p.matcher(str);
+ return m.replaceAll("");
+ }
+
+
+}
\ No newline at end of file
diff --git b/src/main/java/com/subsidy/util/BaseModel.java a/src/main/java/com/subsidy/util/BaseModel.java
new file mode 100644
index 0000000..7504dd0
--- /dev/null
+++ a/src/main/java/com/subsidy/util/BaseModel.java
@@ -0,0 +1,35 @@
+package com.subsidy.util;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public abstract class BaseModel {
+
+ /**
+ * 创建时间
+ */
+ @JsonIgnore
+ @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_date", fill = FieldFill.INSERT)
+ private LocalDateTime createDate;
+
+ /**
+ * 更新时间
+ */
+ @JsonIgnore
+ @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "update_date", fill = FieldFill.UPDATE)
+ private LocalDateTime updateDate;
+
+ /**
+ * 删除时间
+ */
+ @JsonIgnore
+ @TableLogic
+ private LocalDateTime deleteDate;
+}
diff --git b/src/main/java/com/subsidy/util/CodeGenerator.java a/src/main/java/com/subsidy/util/CodeGenerator.java
new file mode 100644
index 0000000..7b488bc
--- /dev/null
+++ a/src/main/java/com/subsidy/util/CodeGenerator.java
@@ -0,0 +1,129 @@
+package com.subsidy.util;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.InjectionConfig;
+import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
+import com.baomidou.mybatisplus.generator.config.FileOutConfig;
+import com.baomidou.mybatisplus.generator.config.GlobalConfig;
+import com.baomidou.mybatisplus.generator.config.PackageConfig;
+import com.baomidou.mybatisplus.generator.config.StrategyConfig;
+import com.baomidou.mybatisplus.generator.config.TemplateConfig;
+import com.baomidou.mybatisplus.generator.config.po.TableInfo;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+import java.util.Scanner;
+
+/**
+ * Mybatis-Plus CodeGenerator
+ *
+ * @author DengMin
+ * @date 2020/07/02
+ **/
+public class CodeGenerator {
+
+ public static String scanner(String tip) {
+ StringBuilder help = new StringBuilder();
+ help.append("1.生成全部表 2.输入需要生成表名");
+ System.out.println(help.toString());
+ Scanner scanner = new Scanner(System.in);
+ Integer ipt = Integer.valueOf(scanner.next());
+ if(ipt == 1) {
+ return "";
+ } else if(ipt == 2) {
+ StringBuilder help1 = new StringBuilder();
+ help1.append("请输入" + tip + ":");
+ System.out.println(help1.toString());
+ Scanner scanner1 = new Scanner(System.in);
+ if (scanner1.hasNext()) {
+ String name = scanner1.next();
+ if (StringUtils.isNotEmpty(name)) {
+ return name;
+ }
+ }
+ throw new MybatisPlusException("请输入正确的" + tip + "!");
+ }
+ return scanner(tip);
+ }
+
+ public static void main(String[] args) {
+ final ResourceBundle rb = ResourceBundle.getBundle("mybatis-plus");
+ // 代码生成器
+ AutoGenerator mpg = new AutoGenerator();
+
+ // 全局配置
+ GlobalConfig gc = new GlobalConfig();
+ gc.setOutputDir(System.getProperty("user.dir") + rb.getString("outputDir"));
+ gc.setOpen(false);
+ gc.setBaseResultMap(true);
+ gc.setBaseColumnList(true);
+ gc.setAuthor(rb.getString("author"));
+ gc.setMapperName("%sMapper");
+ gc.setEntityName("%sDO");
+ gc.setServiceName("%sService");
+ gc.setServiceImplName("%sServiceImpl");
+ gc.setControllerName("%sController");
+ mpg.setGlobalConfig(gc);
+
+ // 数据源配置
+ DataSourceConfig dsc = new DataSourceConfig();
+ dsc.setDbType(DbType.MYSQL);
+ dsc.setUrl(rb.getString("url"));
+ dsc.setDriverName(rb.getString("driverName"));
+ dsc.setUsername(rb.getString("userName"));
+ dsc.setPassword(rb.getString("password"));
+ mpg.setDataSource(dsc);
+
+ // 包配置
+ PackageConfig pc = new PackageConfig();
+ pc.setParent(rb.getString("setParent"));
+ pc.setController("controller");
+ pc.setService("service");
+ pc.setServiceImpl("service.impl");
+ pc.setEntity("model");
+ pc.setMapper("mapper");
+ mpg.setPackageInfo(pc);
+
+ // 自定义配置
+ InjectionConfig cfg = new InjectionConfig() {
+ @Override
+ public void initMap() {
+ // to do nothing
+ }
+ };
+ List focList = new ArrayList<>();
+ focList.add(new FileOutConfig("/templates/mapper.xml.ftl") {
+ @Override
+ public String outputFile(TableInfo tableInfo) {
+ // 自定义输入文件名称
+ return System.getProperty("user.dir")+ rb.getString("mapperPath") + tableInfo.getMapperName() + StringPool.DOT_XML;
+ }
+ });
+ cfg.setFileOutConfigList(focList);
+ mpg.setCfg(cfg);
+ mpg.setTemplate(new TemplateConfig().setXml(null));
+
+ // 策略配置
+ StrategyConfig strategy = new StrategyConfig();
+ strategy.setNaming(NamingStrategy.underline_to_camel);
+ strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+ strategy.setSuperEntityClass(BaseModel.class);
+ strategy.setEntityLombokModel(true);
+ strategy.setRestControllerStyle(true);
+ String [] tables = scanner("表名,多个英文逗号分割").split(",");
+ if(StringUtils.isNotBlank(tables[0])) {
+ strategy.setInclude(tables);
+ }
+ strategy.setControllerMappingHyphenStyle(true);
+ mpg.setStrategy(strategy);
+ mpg.setTemplateEngine(new FreemarkerTemplateEngine());
+ mpg.execute();
+ }
+}
\ No newline at end of file
diff --git b/src/main/java/com/subsidy/util/ConstantUtils.java a/src/main/java/com/subsidy/util/ConstantUtils.java
new file mode 100644
index 0000000..d19e82f
--- /dev/null
+++ a/src/main/java/com/subsidy/util/ConstantUtils.java
@@ -0,0 +1,116 @@
+package com.subsidy.util;
+
+
+/**
+ * 枚举类
+ */
+public class ConstantUtils {
+
+ public static final String DELETE_SUCCESS = "删除成功";
+
+ public static final String UPLOAD_FAIL = "上传失败";
+
+ public static final String ADD_SUCCESS = "新增成功";
+
+ public static final String COMMIT_SUCCESS = "提交成功";
+
+ public static final String SUCCESS_SEND_OUT = "发送成功";
+
+ public static final String FAIL_SEND_OUT = "发送失败";
+
+ public static final String SAVE_SUCCESS = "保存成功";
+
+ public static final String SHARE_SUCCESS = "共享成功";
+
+ public static final String SUBMIT_SUCCESS = "提交成功";
+
+ public static final String SUCCESS_UPDATE = "更新成功";
+
+ public static final String FAIL_UPDATE = "更新失败";
+
+ public static final String SET_SUCCESS = "设置成功";
+
+ public static final String SUCCESS_VERIFY = "验证成功";
+
+ public static final String FAIL_VERIFY = "验证失败";
+
+ public static final String COMPANY_NAME = "TeachAI";
+
+ public static final String ALREADY_DONE = "已完成";
+
+ public static final String ALREADY_RECOMMEND = "已推荐";
+
+ public static final String VERIFY_NAME = "有课互联";
+
+ public static final String NOTICE_NAME = "有课进度通知";
+
+ public static final String TECH_NAME = "有课互联学习平台";
+
+ public static final String PUBLISH_SUCCESS = "发布成功";
+
+ public static final String COMPRESS_SUCCESS = "压缩成功";
+
+ public static final String CHECK_STATUS = "审核通过";
+
+ /**
+ * 短信模板---验证模板
+ */
+ public static final String TEMPLATE_CODE = "SMS_190945394";
+
+ /**
+ * 短信 地域ID
+ */
+ public static final String REGION_ID = "cn-hangzhou";
+
+ /**
+ * 短信 RAM账号AccessKey ID
+ */
+ public static final String ACCESS_KEY_ID = "LTAI5tPAH7P7WQVeowo517BE";
+
+ /**
+ * 短信 RAM账号AccessKey Secret
+ */
+ public static final String SECRET = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY";
+
+ /**
+ * 腾讯云点播视频转码模板
+ */
+ public static final Long TEMPLATE_VOD = 100030L;
+
+ /**
+ * 手机端token
+ */
+ public static final String MOBILE_TERMINATE = "mobile";
+
+ public static final String ADMINISTER_TERMINATE = "administer";
+
+
+ /**
+ * API密钥--微信参数
+ */
+ public static final String SECRET_ID = "AKIDOcePHvZ2C5VeYHQGSO5aqtlNxJQLqfz2";
+
+ public static final String SECRET_KEY = "vjHYRmrfDbw0rWxA7oFcj7F8lDPKCm8E";
+
+ /**
+ * 图形验证码
+ */
+ public static final Long CAPTCHAAPP_ID = 2013197365L;
+
+ public static final String APP_SECRET_KEY = "04ABoF0ZVuMje8NP84DE5Sg**";
+
+ public static final Long BUSINESS_ID = 1L;
+
+ public static final String UTF8 = "UTF-8";
+
+ /**
+ * 保利威视
+ */
+ public static final String POLYV_VIEWLOG_2 = "http://api.polyv.net/live/v1/statistics/{channelId}/viewlog";
+
+ /**
+ * 推送人社局图片格式
+ */
+ public static final String IMAGE_FORMAT = "?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg";
+
+}
diff --git b/src/main/java/com/subsidy/util/DateFormatUtil.java a/src/main/java/com/subsidy/util/DateFormatUtil.java
new file mode 100644
index 0000000..f39120e
--- /dev/null
+++ a/src/main/java/com/subsidy/util/DateFormatUtil.java
@@ -0,0 +1,120 @@
+package com.subsidy.util;
+
+import java.awt.SystemTray;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.util.Date;
+
+/**
+ * 处理时间工具
+ *
+ * @author DengMin
+ * @date 2019/08/27 13:56
+ **/
+public class DateFormatUtil {
+
+ public final static String YEAR = "yyyy";
+ public final static String FMT_sdf14_L = "yyyy-MM-dd HH:mm:ss";
+ public final static String FMT_sdf_yMd = "yyyy-MM-dd";
+ public final static String FMT_sdf_yM = "yyyy-M";
+ public final static String FMT_sdf_yMM = "yyyy-MM";
+ public final static String FMT_sdf_Hm = "H:mm";
+ public final static String FMT_sdf_HHmm = "HH:mm";
+ public final static String cron = "s m H d M ? yyyy";
+
+ /**
+ * Date转String,自定义格式
+ * @param date
+ * @param pattern
+ * @return
+ */
+ public static String format(Date date, String pattern) {
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ return sdf.format(date);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * LocalDateTime转String,自定义格式
+ * @param localDateTime
+ * @param pattern
+ * @return
+ */
+ public static String format(LocalDateTime localDateTime, String pattern) {
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ return sdf.format(localDateTime);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * String转Date,自定义格式
+ * @param date
+ * @param pattern
+ * @return
+ */
+ public static Date parse(String date, String pattern) {
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ return sdf.parse(date);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * 比较两个时间
+ * .after 大于
+ * .before 小于
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static boolean compare(Date d1, Date d2 ) {
+ return !d1.after(d2);
+ }
+
+ /**
+ * Data转Cron
+ * @param date
+ * @return
+ */
+ public static String getCron(Date date) {
+ SimpleDateFormat sdf = new SimpleDateFormat("s m H d M ? yyyy");
+ return sdf.format(date);
+ }
+
+ public static Date localDateTimeToDate(LocalDateTime dateTime) {
+ if(dateTime == null) {
+ return null;
+ }
+ ZoneId zoneId = ZoneId.systemDefault();
+ ZonedDateTime zdt = dateTime.atZone(zoneId);
+ return Date.from(zdt.toInstant());
+ }
+
+ public static LocalDateTime secondToLocalDateTime(Long second) {
+ if(second != null) {
+ return LocalDateTime.ofEpochSecond(second, 0, ZoneOffset.ofHours(8));
+ }
+ return LocalDateTime.now();
+ }
+
+ public static Long LocalDateTimeToSecond(LocalDateTime localDateTime) {
+ if(localDateTime != null) {
+ return localDateTime.atZone(ZoneOffset.ofHours(8)).toInstant().toEpochMilli();
+ }
+ return System.currentTimeMillis();
+ }
+}
diff --git b/src/main/java/com/subsidy/util/DudaoConstant.java a/src/main/java/com/subsidy/util/DudaoConstant.java
new file mode 100644
index 0000000..22b77e2
--- /dev/null
+++ a/src/main/java/com/subsidy/util/DudaoConstant.java
@@ -0,0 +1,49 @@
+package com.subsidy.util;
+
+public class DudaoConstant {
+
+ /**
+ * POST-1:班级基本信息信息采集接口
+ */
+ public static final String POST_1 = "DUDAO_POST_1_insertClassBasicInformation";
+
+ /**
+ * POST-2:学时信息采集接口
+ */
+ public static final String POST_2 = "DUDAO_POST_2_insertLearnDuration";
+
+ /**
+ * POST-3:考试信息采集接口
+ */
+ public static final String POST_3 = "DUDAO_POST_3_insertExamInformation";
+
+ /**
+ * POST-4:答疑辅导采集接口
+ */
+ public static final String POST_4 = "DUDAO_POST_4_insertAnswerTutor";
+
+ /**
+ * POST-5 上下游班级数据绑定接口
+ */
+ public static final String POST_5 = "DUDAO_POST_5_insertBindClass";
+
+ /**
+ * 调取失败
+ */
+ public static final String API_ERROR = "调取失败";
+
+ /**
+ * 当天没数据
+ */
+ public static final String NO_DATA = "NO_DATA";
+
+ /**
+ * 推送失败
+ */
+ public static final String PUSH_FAIL = "推送失败";
+
+ /**
+ * 推送成功
+ */
+ public static final String PUSH_SUCCESS = "推送成功";
+}
diff --git b/src/main/java/com/subsidy/util/EhCacheUtil.java a/src/main/java/com/subsidy/util/EhCacheUtil.java
new file mode 100644
index 0000000..45dba17
--- /dev/null
+++ a/src/main/java/com/subsidy/util/EhCacheUtil.java
@@ -0,0 +1,53 @@
+package com.subsidy.util;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Element;
+import org.springframework.util.ClassUtils;
+
+/**
+ *
+ * Ehcache
+ *
+ *
+ * @author DengMin
+ * @since 2022/8/1
+ */
+public class EhCacheUtil {
+
+ static CacheManager cacheManager = CacheManager.newInstance(ClassUtils.getDefaultClassLoader().getResource("").getPath()+"ehcache.xml");
+
+ /**
+ * 添加缓存
+ * @param cacheName
+ * @param key
+ * @param value
+ */
+ public static void putEhCache(String cacheName, String key, Object value) {
+ Cache cache = cacheManager.getCache(cacheName);
+ Element element = new Element(key, value);
+ cache.put(element);
+ }
+
+ /**
+ * 获取缓存数据
+ * @param cacheName
+ * @param key
+ * @return
+ */
+ public static Object getEhCache(String cacheName, String key) {
+ Cache cache = cacheManager.getCache(cacheName);
+ Element element = cache.get(key);
+ return element == null ? null : element.getObjectValue();
+ }
+
+ /**
+ * 删除缓存
+ * @param cacheName
+ * @param key
+ */
+ public static void deleteEhCache(String cacheName, String key) {
+ Cache cache = cacheManager.getCache(cacheName);
+ cache.remove(key);
+ }
+}
diff --git b/src/main/java/com/subsidy/util/EncryptUtil.java a/src/main/java/com/subsidy/util/EncryptUtil.java
new file mode 100644
index 0000000..9db0ff2
--- /dev/null
+++ a/src/main/java/com/subsidy/util/EncryptUtil.java
@@ -0,0 +1,35 @@
+//package com.subsidy.util;
+//
+//import com.amdelamar.jhash.Hash;
+//import com.amdelamar.jhash.algorithms.Type;
+//import com.amdelamar.jhash.exception.InvalidHashException;
+//
+//public class EncryptUtil {
+//
+// /**
+// * 设置密文密码
+// *
+// * @param password 原始密码
+// * @return 加密密码
+// */
+// public static String encrypt(String password) {
+// char[] chars = password.toCharArray();
+// return Hash.password(chars).algorithm(Type.PBKDF2_SHA256).create();
+// }
+//
+// /**
+// * 验证加密密码
+// *
+// * @param encryptedPassword 密文密码
+// * @param plainPassword 明文密码
+// * @return 验证是否成功
+// */
+// public static boolean verify(String encryptedPassword, String plainPassword) {
+// char[] chars = plainPassword.toCharArray();
+// try {
+// return Hash.password(chars).algorithm(Type.PBKDF2_SHA256).verify(encryptedPassword);
+// } catch (InvalidHashException e) {
+// return false;
+// }
+// }
+//}
diff --git b/src/main/java/com/subsidy/util/ExcelFormatUtils.java a/src/main/java/com/subsidy/util/ExcelFormatUtils.java
new file mode 100644
index 0000000..c0330e2
--- /dev/null
+++ a/src/main/java/com/subsidy/util/ExcelFormatUtils.java
@@ -0,0 +1,19 @@
+package com.subsidy.util;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class ExcelFormatUtils {
+
+
+ public static final List memberList = Arrays.asList("序号", "成员名称","身份证号码", "性别", "账号", "联系方式", "签到次数", "课程进度", "学习时长(小时)","学习时长(分钟)","累计有效学习时长", "答疑数", "测试成绩", "总评价");
+
+ public static final List signList = Arrays.asList("序号", "成员名称", "身份证号", "联系方式", "签到次数", "签到时间","最近签到ip地址","最近签到设备型号");
+
+ public static final List scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数","开始时间","结束时间","测评时间", "总评价");
+
+ public static final List answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间");
+
+ public static final List studyLogList = Arrays.asList("开始时间","结束时间","课程","类型","学习时长","累计有效时长");
+
+}
diff --git b/src/main/java/com/subsidy/util/HttpUtil.java a/src/main/java/com/subsidy/util/HttpUtil.java
new file mode 100644
index 0000000..64125fd
--- /dev/null
+++ a/src/main/java/com/subsidy/util/HttpUtil.java
@@ -0,0 +1,461 @@
+package com.subsidy.util;
+
+
+import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+//import org.apache.http.entity.mime.MultipartEntityBuilder;
+//import org.apache.http.entity.mime.content.FileBody;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.net.URLEncoder;
+import java.util.*;
+
+/**
+ * @author: sadboy
+ **/
+
+public class HttpUtil {
+ private static final Logger log = LoggerFactory.getLogger(HttpUtil.class);
+ private static final String UTF8 = "UTF-8";
+ private static final String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded; charset=UTF-8";
+ private static final String APPLICATION_JSON = "application/json; charset=UTF-8";
+ private static final String TEXT_PLAIN = "text/plain; charset=UTF-8";
+ private static final String TEXT_HTML = "text/html; charset=UTF-8";
+ private static final String APPLICATION_XML = "application/xml; charset=UTF-8";
+
+ private HttpUtil() {
+ }
+
+ /**
+ * 向url发送get请求,当无参数时,paramMap为NULL
+ * @param url 请求url
+ * @param paramMap 需要拼接的参数
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ public static String get(String url, Map paramMap) throws IOException {
+ return get(url, paramMap, UTF8);
+ }
+
+ /**
+ * 向url发送get请求
+ * @param url 请求url
+ * @param paramMap 需要拼接的参数
+ * @param encoding 编码
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ public static String get(String url, Map paramMap, String encoding) throws IOException {
+ encoding = encoding == null ? UTF8 : encoding;
+ url = appendUrl(url, paramMap);
+ return get(url, encoding, new DataParse() {
+ @Override
+ public String parseData(HttpEntity httpEntity, String encoding) throws IOException {
+ return EntityUtils.toString(httpEntity, encoding);
+ }
+ });
+ }
+
+ /**
+ * 向url发送get请求
+ * @param url 请求url
+ * @param paramMap 需要拼接的参数
+ * @param encoding 编码
+ * @return 请求返回的字节数组,一般用于文件下载
+ * @throws IOException 读写异常
+ */
+ public static byte[] getBinary(String url, Map paramMap, String encoding) throws IOException {
+ encoding = encoding == null ? UTF8 : encoding;
+ url = appendUrl(url, paramMap);
+ return get(url, encoding, new DataParse() {
+ @Override
+ public byte[] parseData(HttpEntity httpEntity, String encoding) throws IOException {
+ return EntityUtils.toByteArray(httpEntity);
+ }
+ });
+ }
+
+
+ /**
+ * HTTP GET 内部公共请求处理逻辑
+ * @param url 请求地址
+ * @param encoding 编码字符集, 默认为 utf-8
+ * @param dataParse 返回数据反序列化逻辑实现类
+ * @return HTTP 返回的内容
+ * @throws IOException 客户端和服务器读写通讯异常
+ */
+ private static T get(String url, String encoding, DataParse dataParse) throws IOException {
+ log.debug("http 请求 url: {}", url);
+ T result = null;
+ // 创建httpclient对象
+ CloseableHttpClient httpClient = HttpClientBuilder.create().build();
+ // 创建get方式请求对象
+ HttpGet httpGet = new HttpGet(url);
+ httpGet.addHeader("Content-type", APPLICATION_JSON);
+ // 通过请求对象获取响应对象
+ CloseableHttpResponse response = sendRequestAndGetResult(url, httpClient, httpGet);
+ // 获取结果实体
+ if (null != response) {
+ result = dataParse.parseData(response.getEntity(), encoding);
+ if (!(result instanceof byte[])) {
+ log.debug("http 请求结果: {}", result);
+ } else {
+ Header[] headers = response.getHeaders("Content-Type");
+ for (Header responseHead : headers) {
+ String headStr = responseHead.getValue();
+ if (headStr.startsWith("application/json")) {
+ String json = new String((byte[]) result);
+ response.close();
+ throw new RuntimeException(json);
+ }
+ }
+ }
+ }
+ try {
+ if (null != response) {
+ response.close();
+ }
+ } catch (IOException ex) {
+ log.error(ex.getMessage(), ex);
+ }
+ return result;
+ }
+
+
+ /**
+ * 向url发送post请求
+ * @param url 请求url
+ * @param paramMap 需要拼接的参数
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ public static String postFormBody(String url, Map paramMap) throws IOException {
+ return postFormBody(url, paramMap, null);
+ }
+
+ /**
+ * 向url发送post请求
+ * @param url 请求url
+ * @param paramMap 需要拼接的参数
+ * @param encoding 编码
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ public static String postFormBody(String url, Map paramMap, String encoding) throws IOException {
+ return post(url, paramMap, encoding);
+ }
+
+
+ /**
+ * 向url发送post请求表单提交数据
+ * @param url 请求url
+ * @param paramMap 表单数据
+ * @param encoding 编码
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ private static String post(String url, Map paramMap, String encoding) throws IOException {
+ log.debug("http 请求 url: {} , 请求参数: {}", url, appendUrl("", paramMap).replace("?", ""));
+ encoding = encoding == null ? UTF8 : encoding;
+ // 创建post方式请求对象
+ HttpPost httpPost = new HttpPost(url);
+ // 装填参数
+ List nameValuePairs = new ArrayList();
+ if (paramMap != null) {
+ for (Map.Entry entry : paramMap.entrySet()) {
+ String value = entry.getValue();
+ //去掉如下判断会造成String类型的value为null时
+ if (value != null) {
+ nameValuePairs.add(new BasicNameValuePair(entry.getKey(), value));
+ }
+ }
+ }
+ // 设置参数到请求对象中
+ httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, encoding));
+ // 设置header信息
+ // 指定报文头【Content-type】、【User-Agent】
+ httpPost.setHeader("Content-type", APPLICATION_FORM_URLENCODED);
+ return post(url, httpPost, encoding, new DataParse() {
+ @Override
+ public String parseData(HttpEntity httpEntity, String encoding) throws IOException {
+ return EntityUtils.toString(httpEntity, encoding);
+ }
+ });
+ }
+
+ /**
+ * 向url发送post请求发送json
+ * @param url 请求url
+ * @param json json字符串
+ * @param encoding 编码
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ public static String postJsonBody(String url, String json, String encoding) throws IOException {
+ log.debug("http 请求 url: {} , 请求参数: {}", url, json);
+ encoding = encoding == null ? UTF8 : encoding;
+ // 创建post方式请求对象
+ HttpPost httpPost = new HttpPost(url);
+ // 设置参数到请求对象中
+ StringEntity stringEntity = new StringEntity(json, ContentType.APPLICATION_JSON);
+ // Constant.UTF8
+ stringEntity.setContentEncoding(encoding);
+ httpPost.setEntity(stringEntity);
+ String result = post(url, httpPost, encoding, new DataParse() {
+ @Override
+ public String parseData(HttpEntity httpEntity, String encoding) throws IOException {
+ return EntityUtils.toString(httpEntity, encoding);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * 向url发送post请求
+ * @param url 请求url
+ * @param httpPost httpClient
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ private static T post(String url, HttpPost httpPost, String encoding, DataParse dataParse)
+ throws IOException {
+ T result = null;
+ CloseableHttpResponse response = null;
+ // 创建httpclient对象
+ CloseableHttpClient httpClient = HttpClientBuilder.create().build();
+
+ // 执行请求操作,并拿到结果(同步阻塞)
+ response = sendRequestAndGetResult(url, httpClient, httpPost);
+ // 获取结果实体
+ // 判断网络连接状态码是否正常(0--200都数正常)
+ if (null != response) {
+ result = dataParse.parseData(response.getEntity(), encoding);
+ log.debug("http 请求结果: {}", result);
+ }
+ try {
+ if (null != response) {
+ response.close();
+ }
+ } catch (IOException ex) {
+ log.error(ex.getMessage(), ex);
+ }
+ return result;
+ }
+
+ /**
+ * 设置http头,发送http请求,打印请求耗时
+ * @param url 请求url
+ * @param httpClient httpClient
+ * @param httpUriRequest httpUriRequest
+ * @return 请求返回的数据
+ * @throws IOException 读写异常
+ */
+ private static CloseableHttpResponse sendRequestAndGetResult(String url, CloseableHttpClient httpClient,
+ HttpUriRequest httpUriRequest) throws IOException {
+ long startTime = System.currentTimeMillis();
+ CloseableHttpResponse response = httpClient.execute(httpUriRequest);
+ long endTime = System.currentTimeMillis();
+ collectAPISpendTime(url, startTime, endTime);
+ return response;
+ }
+
+ /**
+ * 打印请求信息
+ * @param url 请求url
+ * @param startTime 请求开始时间
+ * @param endTime 请求结束时间
+ */
+ private static void collectAPISpendTime(String url, long startTime, long endTime) {
+ log.debug("HTTP请求耗时分析,请求URL: {} , 耗时: {} ms", url, endTime - startTime);
+ }
+
+// /**
+// * 向url发送post请求上传单文件
+// * @param url 请求url
+// * @param paramMap 需要表单提交的参数
+// * @param fileMap 需要上传的文件
+// * @param encoding 编码
+// * @return 请求返回的数据
+// * @throws IOException 读写异常
+// */
+// public static String postFile(String url, Map paramMap, Map fileMap, String encoding)
+// throws IOException {
+// if (fileMap != null) {
+// Map> fileListMap = new HashMap>();
+// for (Map.Entry entry : fileMap.entrySet()) {
+// File file = entry.getValue();
+// List fileList = new ArrayList();
+// fileList.add(file);
+// fileListMap.put(entry.getKey(), fileList);
+// }
+// return postMultipleFile(url, paramMap, fileListMap, encoding);
+// }
+// return postMultipleFile(url, paramMap, null, encoding);
+// }
+
+// /**
+// * 向url发送post请求上传多文件
+// * 向url发送post请求上传单文件
+// * @param url 请求url
+// * @param paramMap 需要表单提交的参数
+// * @param fileListMap 需要上传的文件
+// * @param encoding 编码
+// * @return 请求返回的数据
+// * @throws IOException 读写异常
+// */
+// public static String postMultipleFile(String url, Map paramMap, Map> fileListMap,
+// String encoding) throws IOException {
+// return postFileBody(url, paramMap, fileListMap, encoding, new DataParse() {
+// @Override
+// public String parseData(HttpEntity httpEntity, String encoding) throws IOException {
+// return EntityUtils.toString(httpEntity, encoding);
+// }
+// });
+// }
+
+// /**
+// * 向url发送post请求上传多文件
+// * 向url发送post请求上传单文件
+// * @param url 请求url
+// * @param paramMap 需要表单提交的参数
+// * @param fileListMap 需要上传的文件
+// * @param encoding 编码
+// * @return 请求返回的数据
+// * @throws IOException 读写异常
+// */
+// private static T postFileBody(String url, Map paramMap, Map> fileListMap,
+// String encoding, DataParse dataParse) throws IOException {
+// log.debug("http 请求 url: {} , 请求参数: {}", url, appendUrl("", paramMap).replace("?", ""));
+// encoding = encoding == null ? UTF8 : encoding;
+// T result = null;
+// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
+// HttpPost httpPost = new HttpPost(url);
+// MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create();
+//
+// ContentType contentType = ContentType.create("text/plain", Charset.forName(encoding));
+// if (null != paramMap) {
+// for (Map.Entry entry : paramMap.entrySet()) {
+// entityBuilder.addTextBody(entry.getKey(), entry.getValue(), contentType);
+// }
+// }
+//
+// if (null != fileListMap) {
+// for (Map.Entry> entry : fileListMap.entrySet()) {
+// String key = entry.getKey();
+// List fileList = entry.getValue();
+// for (File file : fileList) {
+// FileBody fileBody = new FileBody(file);
+// entityBuilder.addPart(key, fileBody);
+// }
+// }
+// }
+//
+// HttpEntity entity = entityBuilder.build();
+// httpPost.setEntity(entity);
+// CloseableHttpResponse response = sendRequestAndGetResult(url, httpClient, httpPost);
+// if (null != response) {
+// result = dataParse.parseData(response.getEntity(), encoding);
+// log.debug("http 请求结果: {}", result);
+// }
+// try {
+// if (null != response) {
+// response.close();
+// }
+// } catch (IOException ex) {
+// log.error(ex.getMessage(), ex);
+// }
+// return result;
+// }
+
+
+ /**
+ * 公共数据解析接口
+ * @param
+ */
+ private interface DataParse {
+ /**
+ * 解析返回数据
+ * @param httpEntity 返回实体
+ * @param encoding 编码
+ * @return 实际解析返回内容
+ * @throws IOException io异常
+ */
+ T parseData(HttpEntity httpEntity, String encoding) throws IOException;
+
+ }
+
+ /**
+ * 将url与map拼接成HTTP查询字符串
+ * @param url 请求url
+ * @param paramMap 需要拼装的map
+ * @return 拼装好的url
+ */
+ public static String appendUrl(String url, Map paramMap) throws UnsupportedEncodingException {
+ if (paramMap == null) {
+ return url;
+ }
+ StringBuffer paramStringBuffer = new StringBuffer();
+ Iterator> mapIterator = paramMap.entrySet().iterator();
+ while (mapIterator.hasNext()) {
+ Map.Entry next = mapIterator.next();
+ paramStringBuffer.append(next.getKey()).append("=").append(URLEncoder.encode(next.getValue(), ConstantUtils.UTF8)).append("&");
+ }
+ String paramStr = paramStringBuffer.toString();
+// String paramStr = mapJoinNotEncode(paramMap);
+ if (paramStr != null && !"".equals(paramStr)) {
+ if (url.indexOf("?") > 0) {
+ if (url.endsWith("&")) {
+ url += paramStr.substring(0, paramStr.length() - 1);
+ } else {
+ url += "&" + paramStr.substring(0, paramStr.length() - 1);
+ }
+ } else {
+ url += "?" + paramStr.substring(0, paramStr.length() - 1);
+ }
+ }
+ return url;
+ }
+
+ /**
+ * 把二进制写入文件
+ * @param bytes
+ * @param path
+ * @throws IOException
+ */
+ public static void writeFile(byte[] bytes, String path) throws IOException {
+ OutputStream os = null;
+ try {
+ // 根据绝对路径初始化文件
+ File localFile = new File(path);
+ if (!localFile.exists()) {
+ boolean newFile = localFile.createNewFile();
+ if (!newFile) {
+ throw new RuntimeException("创建文件异常,路径:" + path);
+ }
+ }
+ // 输出流
+ os = new FileOutputStream(localFile);
+ os.write(bytes);
+ } finally {
+ if (os != null) {
+ os.close();
+ }
+ }
+ }
+
+}
+
diff --git b/src/main/java/com/subsidy/util/ImageCheckUtil.java a/src/main/java/com/subsidy/util/ImageCheckUtil.java
new file mode 100644
index 0000000..5fcead4
--- /dev/null
+++ a/src/main/java/com/subsidy/util/ImageCheckUtil.java
@@ -0,0 +1,33 @@
+package com.subsidy.util;
+
+
+import com.google.common.hash.Hashing;
+import org.apache.commons.codec.Charsets;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 人脸识别工具类
+ */
+public class ImageCheckUtil {
+
+ /**
+ * 签名方法
+ * @param values
+ * @param ticket
+ * @return
+ */
+ public static String sign(List values, String ticket) { //values传ticket外的其他参数
+ if (values == null) {
+ throw new NullPointerException("values is null");
+ }
+ values.removeAll(Collections.singleton(null));// remove null
+ values.add(ticket); java.util.Collections.sort(values);
+ StringBuilder sb = new StringBuilder();
+ for (String s : values) { sb.append(s);
+ }
+ return Hashing.sha1().hashString(sb,
+ Charsets.UTF_8).toString().toUpperCase();
+ }
+}
diff --git b/src/main/java/com/subsidy/util/IpAddressUtil.java a/src/main/java/com/subsidy/util/IpAddressUtil.java
new file mode 100644
index 0000000..b81d8b2
--- /dev/null
+++ a/src/main/java/com/subsidy/util/IpAddressUtil.java
@@ -0,0 +1,92 @@
+package com.subsidy.util;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+
+public class IpAddressUtil {
+
+ /**
+ * 返回客户端ip
+ */
+ public static String getIpAddress(HttpServletRequest request) {
+ String ipAddress = request.getHeader("x-forwarded-for");
+ if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+ ipAddress = request.getHeader("Proxy-Client-IP");
+ }
+ if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+ ipAddress = request.getHeader("WL-Proxy-Client-IP");
+ }
+ if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+ ipAddress = request.getRemoteAddr();
+ if (ipAddress.equals("127.0.0.1") || ipAddress.equals("0:0:0:0:0:0:0:1")) {
+ InetAddress inet = null;
+ try {
+ inet = InetAddress.getLocalHost();
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ }
+ ipAddress = inet.getHostAddress();
+ }
+ }
+ if (ipAddress != null && ipAddress.length() > 15) {
+ if (ipAddress.indexOf(",") > 0) {
+ ipAddress = ipAddress.substring(0, ipAddress.indexOf(","));
+ }
+ }
+ return ipAddress;
+ }
+
+ /**
+ * @Description:获取客户端外网ip
+ * @Author:zrt
+ * @Date:2019/6/13 11:23
+ **/
+ public static String getPublicIp() {
+ try {
+ String path = "http://subsidy.youkehulian.cn/";// 要获得html页面内容的地址
+
+ URL url = new URL(path);// 创建url对象
+
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();// 打开连接
+
+ conn.setRequestProperty("contentType", "GBK"); // 设置url中文参数编码
+
+ conn.setConnectTimeout(5 * 1000);// 请求的时间
+
+ conn.setRequestMethod("GET");// 请求方式
+
+ InputStream inStream = conn.getInputStream();
+ // readLesoSysXML(inStream);
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(
+ inStream, "GBK"));
+ StringBuffer buffer = new StringBuffer();
+ String line = "";
+ // 读取获取到内容的最后一行,写入
+ while ((line = in.readLine()) != null) {
+ buffer.append(line);
+ }
+ String str = buffer.toString();
+ String ipString1 = str.substring(str.indexOf("["));
+ // 获取你的IP是中间的[182.149.82.50]内容
+ String ipsString2 = ipString1.substring(ipString1.indexOf("[") + 1,
+ ipString1.lastIndexOf("]"));
+ //获取当前IP地址所在地址
+ /* String ipsString3=ipString1.substring(ipString1.indexOf(": "),ipString1.lastIndexOf(""));
+ System.err.println(ipsString3);*/
+
+ // 返回公网IP值
+ return ipsString2;
+
+ } catch (Exception e) {
+ System.out.println("获取公网IP连接超时");
+ return "连接超时";
+ }
+ }
+}
diff --git b/src/main/java/com/subsidy/util/JwtUtil.java a/src/main/java/com/subsidy/util/JwtUtil.java
new file mode 100644
index 0000000..972185b
--- /dev/null
+++ a/src/main/java/com/subsidy/util/JwtUtil.java
@@ -0,0 +1,96 @@
+package com.subsidy.util;
+
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.JWTVerifier;
+import com.auth0.jwt.algorithms.Algorithm;
+import com.auth0.jwt.interfaces.Claim;
+
+import java.util.Date;
+import java.util.Map;
+
+/**
+ *
+ * Token工具
+ *
+ *
+ * @author DengMin
+ * @since 2021/4/14
+ */
+public class JwtUtil {
+
+ private static Long EXPIRE_TIME = 24 * 60 * 60 * 1000L;
+
+ private static String SECRET = "PBKDF2SHA256:64000:18:24:N:GFHZ6Y0PTEUDYCJI3K6SOOXWYEKPOZED:WBWFJMX5DF252E0HR3BF3P/D";
+
+ /**
+ * 生成Token
+ * @param id
+ * @return
+ */
+ public static String generateToken(Long id, String type) {
+ Date expireDate = new Date(System.currentTimeMillis() + EXPIRE_TIME);
+ return JWT.create()
+ .withClaim("id", id)
+ .withClaim("type", type)
+ .withAudience()
+ .withExpiresAt(expireDate)
+ .withIssuedAt(new Date())
+ .sign(Algorithm.HMAC256(SECRET));
+ }
+
+ /**
+ * 检验token是否正确
+ * @param token
+ * @return
+ */
+ public static boolean verifyToken(String token) {
+ try {
+ Algorithm algorithm = Algorithm.HMAC256(SECRET);
+ JWTVerifier verifier = JWT.require(algorithm).build();
+ verifier.verify(token);
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ /**
+ * 获取用户自定义Claim集合
+ * @param token
+ * @return
+ */
+ public static Map getClaims(String token) {
+ Algorithm algorithm = Algorithm.HMAC256(SECRET);
+ JWTVerifier verifier = JWT.require(algorithm).build();
+ Map claims = verifier.verify(token).getClaims();
+ return claims;
+ }
+
+ /**
+ * 获取过期时间
+ * @param token
+ * @return
+ */
+ public static Date getExpiresAt(String token) {
+ Algorithm algorithm = Algorithm.HMAC256(SECRET);
+ return JWT
+ .require(algorithm)
+ .build()
+ .verify(token)
+ .getExpiresAt();
+ }
+
+ /**
+ * 验证token是否失效
+ * @param token
+ * @return true: 过期, false: 没过期
+ */
+ public static boolean isExpired(String token) {
+ try {
+ final Date expiration = getExpiresAt(token);
+ return expiration.before(new Date());
+ } catch (Exception e) {
+ return true;
+ }
+ }
+}
diff --git b/src/main/java/com/subsidy/util/Localstorage.java a/src/main/java/com/subsidy/util/Localstorage.java
new file mode 100644
index 0000000..4cc65bd
--- /dev/null
+++ a/src/main/java/com/subsidy/util/Localstorage.java
@@ -0,0 +1,21 @@
+package com.subsidy.util;
+
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class Localstorage {
+
+ private static final ThreadLocal