+ * JobFactory实例 + *
+ * + * @author DengMin + * @since 2020/12/9 + */ +@Component +public class JobFactory extends AdaptableJobFactory { + + private AutowireCapableBeanFactory factory; + + public JobFactory(AutowireCapableBeanFactory factory) { + this.factory = factory; + } + + @Override + protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { + Object job = super.createJobInstance(bundle); + factory.autowireBean(job); + return job; + } +} diff --git b/src/main/java/com/subsidy/common/configure/MyTomcat.java a/src/main/java/com/subsidy/common/configure/MyTomcat.java new file mode 100644 index 0000000..52d1ac7 --- /dev/null +++ a/src/main/java/com/subsidy/common/configure/MyTomcat.java @@ -0,0 +1,89 @@ +package com.subsidy.common.configure; + +import org.apache.catalina.connector.Connector; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.servlet.MultipartConfigFactory; +import org.springframework.boot.web.servlet.server.ServletWebServerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.servlet.MultipartConfigElement; + +@Configuration +public class MyTomcat { + + + @Value("${spring.server.port}") + private String port; + @Value("${spring.server.acceptorThreadCount}") + private String acceptorThreadCount; + @Value("${spring.server.minSpareThreads}") + private String minSpareThreads; + @Value("${spring.server.maxSpareThreads}") + private String maxSpareThreads; + @Value("${spring.server.maxThreads}") + private String maxThreads; + @Value("${spring.server.maxConnections}") + private String maxConnections; + @Value("${spring.server.protocol}") + private String protocol; + @Value("${spring.server.redirectPort}") + private String redirectPort; + @Value("${spring.server.compression}") + private String compression; + @Value("${spring.server.connectionTimeout}") + private String connectionTimeout; + + @Value("${spring.server.MaxFileSize}") + private String MaxFileSize; + @Value("${spring.server.MaxRequestSize}") + private String MaxRequestSize; + + @Bean + public ServletWebServerFactory servletContainer() { + TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); + tomcat.addConnectorCustomizers(new GwsTomcatConnectionCustomizer()); + return tomcat; + } + + @Bean + public MultipartConfigElement multipartConfigElement() { + MultipartConfigFactory factory = new MultipartConfigFactory(); + // 单个数据大小 + factory.setMaxFileSize(MaxFileSize); // KB,MB + /// 总上传数据大小 + factory.setMaxRequestSize(MaxRequestSize); + return factory.createMultipartConfig(); + } + + /** + * + * 默认http连接 + * + * @version + * @author liuyi 2016年7月20日 下午7:59:41 + * + */ + public class GwsTomcatConnectionCustomizer implements TomcatConnectorCustomizer { + + public GwsTomcatConnectionCustomizer() { + } + + @Override + public void customize(Connector connector) { + connector.setPort(Integer.valueOf(port)); + connector.setAttribute("connectionTimeout", connectionTimeout); + connector.setAttribute("acceptorThreadCount", acceptorThreadCount); + connector.setAttribute("minSpareThreads", minSpareThreads); + connector.setAttribute("maxSpareThreads", maxSpareThreads); + connector.setAttribute("maxThreads", maxThreads); + connector.setAttribute("maxConnections", maxConnections); + connector.setAttribute("protocol", protocol); + connector.setAttribute("redirectPort", "redirectPort"); + connector.setAttribute("compression", "compression"); + } + } + +} diff --git b/src/main/java/com/subsidy/common/configure/MybatisPlusConfig.java a/src/main/java/com/subsidy/common/configure/MybatisPlusConfig.java new file mode 100644 index 0000000..c02a5b2 --- /dev/null +++ a/src/main/java/com/subsidy/common/configure/MybatisPlusConfig.java @@ -0,0 +1,54 @@ +package com.subsidy.common.configure; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.config.GlobalConfig; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import com.subsidy.common.handler.MetaHandler; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author: tuyp + * @create: 2020-08-12 12:01 + */ +@Configuration +@ConditionalOnClass(value = {PaginationInterceptor.class}) +public class MybatisPlusConfig { + + /** + * 分页 + * @return + */ + @Bean + public PaginationInterceptor paginationInterceptor(){ + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + paginationInterceptor.setDialectType(DbType.MYSQL.getDb()); + return paginationInterceptor; + } +// +// /** +// * 打印 sql +// */ +// @Bean +// public PerformanceInterceptor performanceInterceptor() { +// PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor(); +// //格式化sql语句 +// Properties properties = new Properties(); +// properties.setProperty("format", "false"); +// performanceInterceptor.setProperties(properties); +// return performanceInterceptor; +// } + + /** + * 自动填充功能 + * @return + */ + @Bean + public GlobalConfig globalConfig() { + GlobalConfig globalConfig = new GlobalConfig(); + globalConfig.setMetaObjectHandler(new MetaHandler()); + return globalConfig; + } + +} diff --git b/src/main/java/com/subsidy/common/configure/PolyvConfig.java a/src/main/java/com/subsidy/common/configure/PolyvConfig.java new file mode 100644 index 0000000..8082d40 --- /dev/null +++ a/src/main/java/com/subsidy/common/configure/PolyvConfig.java @@ -0,0 +1,19 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@Data +@ConfigurationProperties(prefix = "polyv") +public class PolyvConfig { + + private String userId; + + private String appId; + + private String appSecret; + + private String secretKey; +} diff --git b/src/main/java/com/subsidy/common/configure/QXueYouConfig.java a/src/main/java/com/subsidy/common/configure/QXueYouConfig.java new file mode 100644 index 0000000..0bf6873 --- /dev/null +++ a/src/main/java/com/subsidy/common/configure/QXueYouConfig.java @@ -0,0 +1,18 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Data +@Configuration +@ConfigurationProperties(prefix = "qxueyou") +public class QXueYouConfig { + + private String appId; + + private String securityKey; + + private String url; + +} diff --git b/src/main/java/com/subsidy/common/configure/QuartzConfig.java a/src/main/java/com/subsidy/common/configure/QuartzConfig.java new file mode 100644 index 0000000..b9c9a33 --- /dev/null +++ a/src/main/java/com/subsidy/common/configure/QuartzConfig.java @@ -0,0 +1,46 @@ +package com.subsidy.common.configure; + +import org.quartz.Scheduler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; + +import javax.sql.DataSource; + +/** + *+ * Quartz配置 + *
+ * + * @author DengMin + * @since 2020/12/8 + */ +@Configuration +public class QuartzConfig { + + @Autowired + private JobFactory jobFactory; + + @Autowired + private DataSource dataSource; + + @Bean + public SchedulerFactoryBean schedulerFactoryBean() { + SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean(); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setStartupDelay(60); + schedulerFactoryBean.setJobFactory(jobFactory); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setStartupDelay(1); + schedulerFactoryBean.setDataSource(dataSource); + schedulerFactoryBean.setConfigLocation(new ClassPathResource("/application-quartz.properties")); + return schedulerFactoryBean; + } + + @Bean + public Scheduler scheduler() { + return schedulerFactoryBean().getScheduler(); + } +} diff --git b/src/main/java/com/subsidy/common/configure/RedisConfig.java a/src/main/java/com/subsidy/common/configure/RedisConfig.java new file mode 100644 index 0000000..63cf2de --- /dev/null +++ a/src/main/java/com/subsidy/common/configure/RedisConfig.java @@ -0,0 +1,122 @@ +package com.subsidy.common.configure; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.HashOperations; +import org.springframework.data.redis.core.ListOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.SetOperations; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +@EnableCaching + +/** + *+ * Redis + *
+ * + * @author DengMin + * @since 2020/12/14 + */ +@Configuration +public class RedisConfig extends CachingConfigurerSupport { + + /** + * retemplate相关配置 + * @param factory + * @return + */ + @Bean + public RedisTemplate+ * 读取状态码 + *
+ * + * @author DengMin + * @date Created in 2020/08/24 + */ +@Component +@ConfigurationProperties(prefix = "meishu") +@PropertySource(value = "classpath:code.properties", encoding = "UTF-8") +public class RemoteProperties { + + private static Map+ * 鉴权拦截器 + *
+ * + * @author DengMin + * @since 2021/4/14 + */ +@Component +public class AuthenticationInterceptor implements HandlerInterceptor { + + @Autowired + private AdministerMapper administerMapper; + + @Override + @CrossOrigin() + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { + // 不需要进行拦截 + if (!(handler instanceof HandlerMethod)) { + return true; + } + + HandlerMethod handlerMethod = (HandlerMethod) handler; + Method method = handlerMethod.getMethod(); + + TimeRequired timeRequired = method.getAnnotation(TimeRequired.class); + if (timeRequired != null) { + Calendar calendar = Calendar.getInstance(); + + int hour = calendar.get(Calendar.HOUR_OF_DAY); + if (hour < 6 || hour >= 23 ) { + throw new HttpException(17001); + } + } + + LoginRequired methodAnnotation = method.getAnnotation(LoginRequired.class); + if (methodAnnotation != null) { + String authorization = request.getHeader("Authorization"); + if (!StringUtils.isBlank(authorization)) { + String token = authorization; + if (authorization.startsWith("Bearer")) { + token = authorization.replace("Bearer ", ""); + } + /*Token不存在*/ + if (token == null || !JwtUtil.verifyToken(token)) { + throw new HttpException(1010); + } + + Map+ * 自定义验证登陆注解 + *
+ * + * @author DengMin + * @since 2020/12/18 + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface LoginRequired { + + //String[] value(); +} \ No newline at end of file diff --git b/src/main/java/com/subsidy/common/interceptor/TimeRequired.java a/src/main/java/com/subsidy/common/interceptor/TimeRequired.java new file mode 100644 index 0000000..d720289 --- /dev/null +++ a/src/main/java/com/subsidy/common/interceptor/TimeRequired.java @@ -0,0 +1,10 @@ +package com.subsidy.common.interceptor; + +import java.lang.annotation.*; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface TimeRequired { +} diff --git b/src/main/java/com/subsidy/controller/AdministerCompanyMappingController.java a/src/main/java/com/subsidy/controller/AdministerCompanyMappingController.java new file mode 100644 index 0000000..ca70e59 --- /dev/null +++ a/src/main/java/com/subsidy/controller/AdministerCompanyMappingController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 管理员-公司映射表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "管理员-公司映射表") +@RequestMapping("/administer-company-mapping-do") +public class AdministerCompanyMappingController { + +} diff --git b/src/main/java/com/subsidy/controller/AdministerController.java a/src/main/java/com/subsidy/controller/AdministerController.java new file mode 100644 index 0000000..5413a0d --- /dev/null +++ a/src/main/java/com/subsidy/controller/AdministerController.java @@ -0,0 +1,91 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.administer.AddAdministerDTO; +import com.subsidy.dto.company.OperatorsDTO; +import com.subsidy.model.AdministerDO; +import com.subsidy.service.AdministerService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 管理平台用户 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "管理平台用户") +@RequestMapping("/administer") +public class AdministerController { + + @Autowired + private AdministerService administerService; + + @PostMapping("centerLogin") + @ApiOperation("中心端登录入口 accountName password ") + public ResponseVO centerLogin(@RequestBody AdministerDO administerDO){ + return ResponseData.generateCreatedResponse(0,administerService.centerLogin(administerDO)); + } + + @PostMapping("/getPermissions") + @ApiOperation("权限查询") + @LoginRequired + public ResponseVO getPermissions() { + return ResponseData.generateCreatedResponse(0, administerService.getPermissions()); + } + + @PostMapping("/administers") + @ApiOperation("客户账户管理 查中心账户 { userName companyName pageNum pageSize }") +// @LoginRequired + public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO) { + return ResponseData.generateCreatedResponse(0, administerService.operators(operatorsDTO)); + } + + @PostMapping("/appOperators") + @ApiOperation("应用账户管理 查中心账户 { userName companyName pageNum pageSize }") +// @LoginRequired + public ResponseVO appOperators(@RequestBody OperatorsDTO operatorsDTO) { + return ResponseData.generateCreatedResponse(0, administerService.appOperators(operatorsDTO)); + } + + @PostMapping("/clientOperators") + @ApiOperation("客户账户管理 查中心账户 { userName companyName pageNum pageSize }") +// @LoginRequired + public ResponseVO clientOperators(@RequestBody OperatorsDTO operatorsDTO) { + return ResponseData.generateCreatedResponse(0, administerService.clientOperators(operatorsDTO)); + } + + @PostMapping("addAdminister") + @ApiOperation("添加客户账户 userName 名称 accountName 账户 password 密码 telephone 联系方式 role:0:应用 1:客户 2:中心 3:企业唯一账号 remark 备注 companyIds[] serviceIds[]") + @LoginRequired + public ResponseVO addAdminister(@RequestBody AddAdministerDTO addAdministerDTO) { + return ResponseData.generateCreatedResponse(0, administerService.addAdminister(addAdministerDTO)); + } + + @PostMapping("deleteAdminister") + @ApiOperation("客户账户管理 删除 id ") + @LoginRequired + public ResponseVO deleteAdminister(@RequestBody AdministerDO administerDO) { + return ResponseData.generateCreatedResponse(0, administerService.deleteAdminister(administerDO)); + } + + @PostMapping("updateAdminister") + @ApiOperation("编辑客户账户 id userName 名称 accountName 账号 password remark telephone companyIds[] serviceIds[]") + @LoginRequired + public ResponseVO updateAdminister(@RequestBody AddAdministerDTO addAdministerDTO) { + return ResponseData.generateCreatedResponse(0, administerService.updateAdminister(addAdministerDTO)); + } + +} diff --git b/src/main/java/com/subsidy/controller/ClassHourDictController.java a/src/main/java/com/subsidy/controller/ClassHourDictController.java new file mode 100644 index 0000000..7788b7e --- /dev/null +++ a/src/main/java/com/subsidy/controller/ClassHourDictController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 当天课时限时表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "当天课时限时表") +@RequestMapping("/class-hour-dict-do") +public class ClassHourDictController { + +} diff --git b/src/main/java/com/subsidy/controller/ClassTypeDictController.java a/src/main/java/com/subsidy/controller/ClassTypeDictController.java new file mode 100644 index 0000000..1ce5a5b --- /dev/null +++ a/src/main/java/com/subsidy/controller/ClassTypeDictController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 班级类型字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "班级类型字典表") +@RequestMapping("/class-type-dict-do") +public class ClassTypeDictController { + +} diff --git b/src/main/java/com/subsidy/controller/CompanyDictController.java a/src/main/java/com/subsidy/controller/CompanyDictController.java new file mode 100644 index 0000000..4229d43 --- /dev/null +++ a/src/main/java/com/subsidy/controller/CompanyDictController.java @@ -0,0 +1,89 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.company.AddCompanyDTO; +import com.subsidy.dto.company.GetCompanyMembersDTO; +import com.subsidy.dto.company.OperatorsDTO; +import com.subsidy.model.CompanyDictDO; +import com.subsidy.service.CompanyDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 企业字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "企业字典表") +@RequestMapping("/companyDict") +public class CompanyDictController { + + @Autowired + private CompanyDictService companyDictService; + + @PostMapping("/administers") + @ApiOperation("查询所有企业 {id companyName fieldId 行业id superviseName 监管第三方名称 pageNum pageSize }") + @LoginRequired + public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.operators(operatorsDTO)); + } + + @PostMapping("updateCompany") + @ApiOperation("修改企业 id superviseName 第三方监管名称 accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 " + + "banner:标语 field[]:领域 role 3 ") + @LoginRequired + public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO)); + } + + @PostMapping("deleteCompany") + @ApiOperation("删除企业 id") + @LoginRequired + public ResponseVO deleteAdminister(@RequestBody CompanyDictDO companyDictDO){ + return ResponseData.generateCreatedResponse(0,companyDictService.deleteAdminister(companyDictDO)); + } + + @PostMapping("addCompany") + @ApiOperation("添加企业 {accountName:账号 superviseName 第三方监管名称 companyName:企业名称 address 企业所在地 shortName " + + "简称 banner:标语 field[]:领域 role }") + @LoginRequired + public ResponseVO addOperator(@RequestBody AddCompanyDTO addCompanyDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.addOperator(addCompanyDTO)); + } + + @PostMapping("getCompanyMembers") + @ApiOperation("获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称 memberStatus") +// @LoginRequired + public ResponseVO getCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO)); + } + + @PostMapping("exportCompanyMembers") + @ApiOperation("获取公司里的成员 companyId 公司id userName 成员名称") + @LoginRequired + public void exportCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ + companyDictService.exportCompanyMembers(getCompanyMembersDTO); + } + + + @PostMapping("memberSummary") + @ApiOperation("学员认证详情 companyId") + @LoginRequired + public ResponseVO memberSummary(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.memberSummary(getCompanyMembersDTO)); + } + +} diff --git b/src/main/java/com/subsidy/controller/CompanyFieldMappingController.java a/src/main/java/com/subsidy/controller/CompanyFieldMappingController.java new file mode 100644 index 0000000..aa05d2a --- /dev/null +++ a/src/main/java/com/subsidy/controller/CompanyFieldMappingController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 公司行业映射表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "公司行业映射表") +@RequestMapping("/company-field-mapping-do") +public class CompanyFieldMappingController { + +} diff --git b/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java a/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java new file mode 100644 index 0000000..8fe714f --- /dev/null +++ a/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 公司人员映射表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "公司人员映射表") +@RequestMapping("/company-member-mapping-do") +public class CompanyMemberMappingController { + +} diff --git b/src/main/java/com/subsidy/controller/DepartmentDictController.java a/src/main/java/com/subsidy/controller/DepartmentDictController.java new file mode 100644 index 0000000..a081408 --- /dev/null +++ a/src/main/java/com/subsidy/controller/DepartmentDictController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 部门字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "部门字典表") +@RequestMapping("/department-dict-do") +public class DepartmentDictController { + +} diff --git b/src/main/java/com/subsidy/controller/FieldDictController.java a/src/main/java/com/subsidy/controller/FieldDictController.java new file mode 100644 index 0000000..3794351 --- /dev/null +++ a/src/main/java/com/subsidy/controller/FieldDictController.java @@ -0,0 +1,62 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.field.QueryFieldsDTO; +import com.subsidy.model.FieldDictDO; +import com.subsidy.service.FieldDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 行业字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "行业字典表") +@RequestMapping("/fieldDict") +public class FieldDictController { + + @Autowired + private FieldDictService fieldDictService; + + @PostMapping("queryFields") + @ApiOperation("查询行业 pageSize pageNum fieldName") + @LoginRequired + public ResponseVO queryFields(@RequestBody QueryFieldsDTO queryFieldsDTO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.queryFields(queryFieldsDTO)); + } + + @PostMapping("addField") + @ApiOperation("添加行业 fieldName 行业名称") + @LoginRequired + public ResponseVO addField(@RequestBody FieldDictDO fieldDictDO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.addField(fieldDictDO)); + } + + @PostMapping("updateField") + @ApiOperation("修改行业 id fieldName 行业名称") + @LoginRequired + public ResponseVO updateField(@RequestBody FieldDictDO fieldDictDO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.updateField(fieldDictDO)); + } + + @PostMapping("deleteField") + @ApiOperation("删除行业 id") + @LoginRequired + public ResponseVO deleteField(@RequestBody FieldDictDO fieldDictDO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.deleteField(fieldDictDO)); + } +} diff --git b/src/main/java/com/subsidy/controller/JobDictController.java a/src/main/java/com/subsidy/controller/JobDictController.java new file mode 100644 index 0000000..162ada7 --- /dev/null +++ a/src/main/java/com/subsidy/controller/JobDictController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 岗位表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "岗位表") +@RequestMapping("/job-dict-do") +public class JobDictController { + +} diff --git b/src/main/java/com/subsidy/controller/MemberController.java a/src/main/java/com/subsidy/controller/MemberController.java new file mode 100644 index 0000000..385cda9 --- /dev/null +++ a/src/main/java/com/subsidy/controller/MemberController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 学生表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "学生表") +@RequestMapping("/member-do") +public class MemberController { + +} diff --git b/src/main/java/com/subsidy/controller/OssController.java a/src/main/java/com/subsidy/controller/OssController.java new file mode 100644 index 0000000..3176267 --- /dev/null +++ a/src/main/java/com/subsidy/controller/OssController.java @@ -0,0 +1,202 @@ +package com.subsidy.controller; + +import com.aliyun.oss.ClientException; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.OSSException; +import com.aliyun.oss.model.*; +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; + +import com.subsidy.vo.oss.GetSecretVO; +import com.subsidy.vo.oss.UploadFileVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +@Api(tags = "oss") +@RestController +@RequestMapping("/oss") +public class OssController { + + public static final String keyId = "LTAI5tPAH7P7WQVeowo517BE"; + + + public static final String secret = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + + + @Value("${spring.profiles.active}") + private String env; + + @PostMapping("getSecret") + @ApiOperation("oss秘钥") + public ResponseVO getSecret() { + GetSecretVO getSecretVO = new GetSecretVO(); + getSecretVO.setKey(keyId); + getSecretVO.setSecret(secret); + return ResponseData.generateCreatedResponse(0, getSecretVO); + } + + @PostMapping("uploadFile") + @ApiOperation("分片上传") + public ResponseVO fenpian(@RequestParam("file") MultipartFile file) { + + UploadFileVO uploadFileVO = new UploadFileVO(); + + // Endpoint以华东1(杭州)为例,其它Region请按实际情况填写。 + String endpoint = "http://oss-cn-beijing.aliyuncs.com"; + // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。 + String accessKeyId = keyId; + String accessKeySecret = secret; + // 填写Bucket名称,例如examplebucket。 +// String bucketName = "zhongzhi-cms"; + // 填写Object完整路径,例如exampledir/exampleobject.txt。Object完整路径中不能包含Bucket名称。 + String objectName = System.currentTimeMillis() + "_" + file.getOriginalFilename(); + + // 创建OSSClient实例。 + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + + if (env.equals("dev")) { + env = "ykhl-bigger-test"; + } + if (env.equals("prod")) { + env = "ykhl-bigger"; + } + + + try { + // 创建InitiateMultipartUploadRequest对象。 + InitiateMultipartUploadRequest request = new InitiateMultipartUploadRequest(env, objectName); + + // 如果需要在初始化分片时设置请求头,请参考以下示例代码。 + ObjectMetadata metadata = new ObjectMetadata(); + metadata.setContentType(file.getContentType()); + metadata.setContentDisposition("inline"); + // 如果需要在初始化分片时设置请求头,请参考以下示例代码。 + // ObjectMetadata metadata = new ObjectMetadata(); + // metadata.setHeader(OSSHeaders.OSS_STORAGE_CLASS, StorageClass.Standard.toString()); + // 指定该Object的网页缓存行为。 + // metadata.setCacheControl("no-cache"); + // 指定该Object被下载时的名称。 + // metadata.setContentDisposition("attachment;filename=oss_MultipartUpload.txt"); + // 指定该Object的内容编码格式。 + // metadata.setContentEncoding(OSSConstants.DEFAULT_CHARSET_NAME); + // 指定初始化分片上传时是否覆盖同名Object。此处设置为true,表示禁止覆盖同名Object。 + // metadata.setHeader("x-oss-forbid-overwrite", "true"); + // 指定上传该Object的每个part时使用的服务器端加密方式。 + // metadata.setHeader(OSSHeaders.OSS_SERVER_SIDE_ENCRYPTION, ObjectMetadata.KMS_SERVER_SIDE_ENCRYPTION); + // 指定Object的加密算法。如果未指定此选项,表明Object使用AES256加密算法。 + // metadata.setHeader(OSSHeaders.OSS_SERVER_SIDE_DATA_ENCRYPTION, ObjectMetadata.KMS_SERVER_SIDE_ENCRYPTION); + // 指定KMS托管的用户主密钥。 + // metadata.setHeader(OSSHeaders.OSS_SERVER_SIDE_ENCRYPTION_KEY_ID, "9468da86-3509-4f8d-a61e-6eab1eac****"); + // 指定Object的存储类型。 + // metadata.setHeader(OSSHeaders.OSS_STORAGE_CLASS, StorageClass.Standard); + // 指定Object的对象标签,可同时设置多个标签。 + // metadata.setHeader(OSSHeaders.OSS_TAGGING, "a:1"); + // request.setObjectMetadata(metadata); + + metadata.setHeader("x-oss-force-download", false); + request.setObjectMetadata(metadata); + + // 初始化分片。 + InitiateMultipartUploadResult upresult = ossClient.initiateMultipartUpload(request); + // 返回uploadId,它是分片上传事件的唯一标识。您可以根据该uploadId发起相关的操作,例如取消分片上传、查询分片上传等。 + String uploadId = upresult.getUploadId(); + + // partETags是PartETag的集合。PartETag由分片的ETag和分片号组成。 + List+ * 产品管理字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "产品管理字典表") +@RequestMapping("/productDict") +public class ProductDictController { + + + @Autowired + private ProductDictService productDictService; + + @PostMapping("allProducts") + @ApiOperation("查看所有产品 productName pageSize pageNum") + public ResponseVO allProducts(@RequestBody AllProductsDTO allProductsDTO){ + return ResponseData.generateCreatedResponse(0,productDictService.allProducts(allProductsDTO)); + } + + @PostMapping("addProduct") + @ApiOperation("添加产品 productName productLogo productDesc contactInfo groundingStatus highlightTag ") + public ResponseVO addProduct(@RequestBody ProductDictDO productDictDO){ + return ResponseData.generateCreatedResponse(0,productDictService.addProduct(productDictDO)); + } + + @PostMapping("deleteProduct") + @ApiOperation("删除产品 id") + public ResponseVO deleteProduct(@RequestBody ProductDictDO productDictDO){ + return ResponseData.generateCreatedResponse(0,productDictService.deleteProduct(productDictDO)); + } + + @PostMapping("updateProduct") + @ApiOperation("编辑产品 id productName productLogo productDesc contactInfo groundingStatus highlightTag ") + public ResponseVO updateProduct(@RequestBody ProductDictDO productDictDO){ + return ResponseData.generateCreatedResponse(0,productDictService.updateProduct(productDictDO)); + } + + +} diff --git b/src/main/java/com/subsidy/controller/RankDictController.java a/src/main/java/com/subsidy/controller/RankDictController.java new file mode 100644 index 0000000..ee679d4 --- /dev/null +++ a/src/main/java/com/subsidy/controller/RankDictController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 职级字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "职级字典表") +@RequestMapping("/rank-dict-do") +public class RankDictController { + +} diff --git b/src/main/java/com/subsidy/controller/RoleAdministerMappingController.java a/src/main/java/com/subsidy/controller/RoleAdministerMappingController.java new file mode 100644 index 0000000..24a6022 --- /dev/null +++ a/src/main/java/com/subsidy/controller/RoleAdministerMappingController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "") +@RequestMapping("/role-administer-mapping-do") +public class RoleAdministerMappingController { + +} diff --git b/src/main/java/com/subsidy/controller/RotationImgDictController.java a/src/main/java/com/subsidy/controller/RotationImgDictController.java new file mode 100644 index 0000000..d3b1437 --- /dev/null +++ a/src/main/java/com/subsidy/controller/RotationImgDictController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 轮播图 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "轮播图") +@RequestMapping("/rotation-img-dict-do") +public class RotationImgDictController { + +} diff --git b/src/main/java/com/subsidy/controller/ServiceAdministerMappingController.java a/src/main/java/com/subsidy/controller/ServiceAdministerMappingController.java new file mode 100644 index 0000000..a1fad6f --- /dev/null +++ a/src/main/java/com/subsidy/controller/ServiceAdministerMappingController.java @@ -0,0 +1,24 @@ +package com.subsidy.controller; + + +import com.subsidy.service.ServiceAdministerMappingService; +import io.swagger.annotations.Api; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 应用账户-服务映射表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "应用账户-服务映射表") +@RequestMapping("/serviceAdministerMapping") +public class ServiceAdministerMappingController { + + +} diff --git b/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java a/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java new file mode 100644 index 0000000..b22fbab --- /dev/null +++ a/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java @@ -0,0 +1,55 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.company.CompanyFilesDTO; +import com.subsidy.dto.company.GetServiceCompaniesDTO; +import com.subsidy.dto.service.CancelAuthDTO; +import com.subsidy.model.ServiceCompanyFilesDO; +import com.subsidy.service.ServiceCompanyFilesService; +import com.subsidy.service.ServiceCompanyMappingService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 协议管理材料表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "协议管理材料表") +@RequestMapping("/serviceCompanyFiles") +public class ServiceCompanyFilesController { + + @Autowired + private ServiceCompanyFilesService serviceCompanyFilesService; + + @PostMapping("companyFiles") + @ApiOperation("查看业务合同/业务材料 pageSize pageNum fileName serviceCompanyId fileType 0:业务合同 1:业务材料 ") + public ResponseVO companyFiles(@RequestBody CompanyFilesDTO companyFilesDTO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.companyFiles(companyFilesDTO)); + } + + @PostMapping("deleteFile") + @ApiOperation("删除协议/材料 id companyFiles返回的id") + public ResponseVO deleteFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.deleteFile(serviceCompanyFilesDO)); + } + + @PostMapping("uploadFile") + @ApiOperation("上传新文件 serviceCompanyId fileType 0:业务合同 1:业务材料 fileName fileAddress ") + public ResponseVO uploadFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.uploadFile(serviceCompanyFilesDO)); + } + +} diff --git b/src/main/java/com/subsidy/controller/ServiceCompanyMappingController.java a/src/main/java/com/subsidy/controller/ServiceCompanyMappingController.java new file mode 100644 index 0000000..f6d2227 --- /dev/null +++ a/src/main/java/com/subsidy/controller/ServiceCompanyMappingController.java @@ -0,0 +1,60 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.company.GetServiceCompaniesDTO; +import com.subsidy.dto.service.CancelAuthDTO; +import com.subsidy.service.ServiceCompanyMappingService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 业务公司 映射表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "业务公司 映射表") +@RequestMapping("/serviceCompanyMapping") +public class ServiceCompanyMappingController { + + @Autowired + private ServiceCompanyMappingService serviceCompanyMappingService; + + @PostMapping("getServiceCompanies") + @ApiOperation("获取某个业务下的公司(筛选可查全部的) serviceId 业务id pageSize authStatus pageNum companyName") + public ResponseVO getServiceCompanies(@RequestBody GetServiceCompaniesDTO getServiceCompaniesDTO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.getServiceCompanies(getServiceCompaniesDTO)); + } + + @PostMapping("cancelAuth") + @ApiOperation("取消授权 serviceId companyIds[]") + public ResponseVO cancelAuth(@RequestBody CancelAuthDTO cancelAuthDTO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.cancelAuth(cancelAuthDTO)); + } + + @PostMapping("addAuth") + @ApiOperation("添加授权 serviceId companyIds[]") + public ResponseVO addAuth(@RequestBody CancelAuthDTO cancelAuthDTO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.addAuth(cancelAuthDTO)); + } + + @PostMapping("serviceCompanies") + @ApiOperation("获取某个业务管理下的所有公司 companyName serviceId") + public ResponseVO serviceCompanies(@RequestBody GetServiceCompaniesDTO getServiceCompaniesDTO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.serviceCompanies(getServiceCompaniesDTO)); + } + + + +} diff --git b/src/main/java/com/subsidy/controller/ServiceDictController.java a/src/main/java/com/subsidy/controller/ServiceDictController.java new file mode 100644 index 0000000..806a6e0 --- /dev/null +++ a/src/main/java/com/subsidy/controller/ServiceDictController.java @@ -0,0 +1,38 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.service.ServiceDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 业务管理字典表 前端控制器 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@RestController +@Api(tags = "业务管理字典表") +@RequestMapping("/serviceDict") +public class ServiceDictController { + + @Autowired + private ServiceDictService serviceDictService; + + @PostMapping("getAllServices") + @ApiOperation("获取所有的服务") + public ResponseVO getAllServices(){ + return ResponseData.generateCreatedResponse(0,serviceDictService.getAllServices()); + } + + +} diff --git b/src/main/java/com/subsidy/dto/administer/AddAdministerDTO.java a/src/main/java/com/subsidy/dto/administer/AddAdministerDTO.java new file mode 100644 index 0000000..0ac08eb --- /dev/null +++ a/src/main/java/com/subsidy/dto/administer/AddAdministerDTO.java @@ -0,0 +1,52 @@ +package com.subsidy.dto.administer; + +import lombok.Data; + +import java.util.List; + +@Data +public class AddAdministerDTO { + + + private Long id; + + /** + * 账号 + */ + private String accountName; + + /** + * 手机号/企业账号 + */ + private String telephone; + + /** + * 密码 + */ + private String password; + + /** + * 成员名称 + */ + private String userName; + + /** + * 备注 + */ + private String remark; + + /** + * 角色 + */ + private Integer role; + /** + * 企业 + */ + private List+ * 管理员-公司映射表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface AdministerCompanyMappingMapper extends BaseMapper+ * 管理平台用户 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface AdministerMapper extends BaseMapper+ * 当天课时限时表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface ClassHourDictMapper extends BaseMapper+ * 班级类型字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface ClassTypeDictMapper extends BaseMapper+ * 企业字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface CompanyDictMapper extends BaseMapper+ * 公司行业映射表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface CompanyFieldMappingMapper extends BaseMapper+ * 公司人员映射表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface CompanyMemberMappingMapper extends BaseMapper+ * 部门字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface DepartmentDictMapper extends BaseMapper+ * 行业字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface FieldDictMapper extends BaseMapper+ * 岗位表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface JobDictMapper extends BaseMapper+ * 学生表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface MemberMapper extends BaseMapper+ * 产品管理字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface ProductDictMapper extends BaseMapper+ * 职级字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface RankDictMapper extends BaseMapper+ * Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface RoleAdministerMappingMapper extends BaseMapper+ * 轮播图 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface RotationImgDictMapper extends BaseMapper+ * 应用账户-服务映射表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface ServiceAdministerMappingMapper extends BaseMapper+ * 协议管理材料表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Repository +public interface ServiceCompanyFilesMapper extends BaseMapper+ * 业务公司 映射表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface ServiceCompanyMappingMapper extends BaseMapper+ * 业务管理字典表 Mapper 接口 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ + @Repository +public interface ServiceDictMapper extends BaseMapper+ * 管理员-公司映射表 + *
+ * + * @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..9a411db --- /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/ClassHourDictDO.java a/src/main/java/com/subsidy/model/ClassHourDictDO.java new file mode 100644 index 0000000..af16e7a --- /dev/null +++ a/src/main/java/com/subsidy/model/ClassHourDictDO.java @@ -0,0 +1,64 @@ +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("class_hour_dict") +public class ClassHourDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 课时 + */ + private Integer classHour; + + /** + * 断联时间,单位分钟 + */ + private Integer interrupt; + + /** + * 重复测试次数 + */ + private Integer repeatTime; + + /** + * 有效/无效 + */ + private Integer status; + + /** + * 断联是否开启 + */ + private Integer interruptStatus; + + /** + * 是否开启重复测试 + */ + private Integer repeatStatus; + + +} diff --git b/src/main/java/com/subsidy/model/ClassTypeDictDO.java a/src/main/java/com/subsidy/model/ClassTypeDictDO.java new file mode 100644 index 0000000..d8b8b35 --- /dev/null +++ a/src/main/java/com/subsidy/model/ClassTypeDictDO.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("class_type_dict") +public class ClassTypeDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 课程类型 + */ + private String classType; + + +} 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..1949f8c --- /dev/null +++ a/src/main/java/com/subsidy/model/CompanyDictDO.java @@ -0,0 +1,71 @@ +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 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/CompanyFieldMappingDO.java a/src/main/java/com/subsidy/model/CompanyFieldMappingDO.java new file mode 100644 index 0000000..c73cbfd --- /dev/null +++ a/src/main/java/com/subsidy/model/CompanyFieldMappingDO.java @@ -0,0 +1,36 @@ +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("company_field_mapping") +public class CompanyFieldMappingDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long companyId; + + private Long fieldId; + + private LocalDateTime updateDate; + + +} 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..22f4bb8 --- /dev/null +++ a/src/main/java/com/subsidy/model/CompanyMemberMappingDO.java @@ -0,0 +1,56 @@ +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/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/RankDictDO.java a/src/main/java/com/subsidy/model/RankDictDO.java new file mode 100644 index 0000000..45c671c --- /dev/null +++ a/src/main/java/com/subsidy/model/RankDictDO.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("rank_dict") +public class RankDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 职级 + */ + private String rankLevel; + + +} diff --git b/src/main/java/com/subsidy/model/RoleAdministerMappingDO.java a/src/main/java/com/subsidy/model/RoleAdministerMappingDO.java new file mode 100644 index 0000000..b85f846 --- /dev/null +++ a/src/main/java/com/subsidy/model/RoleAdministerMappingDO.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("role_administer_mapping") +public class RoleAdministerMappingDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long administerId; + + private Long roleId; + + +} diff --git b/src/main/java/com/subsidy/model/RotationImgDictDO.java a/src/main/java/com/subsidy/model/RotationImgDictDO.java new file mode 100644 index 0000000..9079b48 --- /dev/null +++ a/src/main/java/com/subsidy/model/RotationImgDictDO.java @@ -0,0 +1,36 @@ +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("rotation_img_dict") +public class RotationImgDictDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long companyId; + + /** + * 轮播图 + */ + private String rotationImg; + + +} 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+ * 管理平台用户 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface AdministerService extends IService+ * 当天课时限时表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ClassHourDictService extends IService+ * 班级类型字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ClassTypeDictService extends IService+ * 企业字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface CompanyDictService extends IService+ * 公司行业映射表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface CompanyFieldMappingService extends IService+ * 公司人员映射表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface CompanyMemberMappingService extends IService+ * 部门字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface DepartmentDictService extends IService+ * 行业字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface FieldDictService extends IService+ * 岗位表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface JobDictService extends IService+ * 学生表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface MemberService extends IService+ * 产品管理字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ProductDictService extends IService+ * 职级字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface RankDictService extends IService+ * 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface RoleAdministerMappingService extends IService+ * 轮播图 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface RotationImgDictService extends IService+ * 应用账户-服务映射表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ServiceAdministerMappingService extends IService+ * 协议管理材料表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ServiceCompanyFilesService extends IService+ * 业务公司 映射表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ServiceCompanyMappingService extends IService+ * 业务管理字典表 服务类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +public interface ServiceDictService extends IService+ * 管理员-公司映射表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class AdministerCompanyMappingServiceImpl extends ServiceImpl+ * 管理平台用户 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class AdministerServiceImpl extends ServiceImpl+ * 当天课时限时表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ClassHourDictServiceImpl extends ServiceImpl+ * 班级类型字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ClassTypeDictServiceImpl extends ServiceImpl+ * 企业字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class CompanyDictServiceImpl extends ServiceImpl+ * 公司行业映射表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class CompanyFieldMappingServiceImpl extends ServiceImpl+ * 公司人员映射表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class CompanyMemberMappingServiceImpl extends ServiceImpl+ * 部门字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class DepartmentDictServiceImpl extends ServiceImpl+ * 行业字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class FieldDictServiceImpl extends ServiceImpl+ * 岗位表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class JobDictServiceImpl extends ServiceImpl+ * 学生表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class MemberServiceImpl extends ServiceImpl+ * 产品管理字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ProductDictServiceImpl extends ServiceImpl+ * 职级字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class RankDictServiceImpl extends ServiceImpl+ * 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class RoleAdministerMappingServiceImpl extends ServiceImpl+ * 轮播图 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class RotationImgDictServiceImpl extends ServiceImpl+ * 应用账户-服务映射表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ServiceAdministerMappingServiceImpl extends ServiceImpl+ * 协议管理材料表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ServiceCompanyFilesServiceImpl extends ServiceImpl+ * 业务公司 映射表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ServiceCompanyMappingServiceImpl extends ServiceImpl+ * 业务管理字典表 服务实现类 + *
+ * + * @author Tuyp + * @since 2024-01-11 + */ +@Service +public class ServiceDictServiceImpl extends ServiceImpl+ * 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+ * 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