zouxuan 1 год назад
Родитель
Сommit
25ba479e1a
100 измененных файлов с 246 добавлено и 4679 удалено
  1. 0 37
      codegen/pom.xml
  2. 0 63
      codegen/src/main/java/com/yonge/crud/CodegenApplication.java
  3. 0 111
      codegen/src/main/java/com/yonge/crud/core/Configuration.java
  4. 0 144
      codegen/src/main/java/com/yonge/crud/core/CrudSession.java
  5. 0 60
      codegen/src/main/java/com/yonge/crud/core/CrudSessionFactory.java
  6. 0 93
      codegen/src/main/java/com/yonge/crud/core/FreemarkerTemplateEngine.java
  7. 0 84
      codegen/src/main/java/com/yonge/crud/core/GenerateConfiguration.java
  8. 0 59
      codegen/src/main/java/com/yonge/crud/core/db/ConnectionFactory.java
  9. 0 117
      codegen/src/main/java/com/yonge/crud/core/db/DatabaseIntrospector.java
  10. 0 127
      codegen/src/main/java/com/yonge/crud/core/db/model/Column.java
  11. 0 86
      codegen/src/main/java/com/yonge/crud/core/db/model/Table.java
  12. 0 234
      codegen/src/main/java/com/yonge/crud/core/generator/ModuleGenerateIntrospector.java
  13. 0 41
      codegen/src/main/java/com/yonge/crud/core/generator/module/JavaFileGenerator.java
  14. 0 129
      codegen/src/main/java/com/yonge/crud/core/generator/module/SpringGenerator.java
  15. 0 82
      codegen/src/main/java/com/yonge/crud/core/generator/module/SqlMapConfigGenerator.java
  16. 0 160
      codegen/src/main/java/com/yonge/crud/core/util/JavaBeansUtil.java
  17. 0 169
      codegen/src/main/java/com/yonge/crud/core/util/XmlUtil.java
  18. 0 17
      codegen/src/main/resources/generateConfigration.xml
  19. 0 10
      codegen/src/main/resources/template/dao.ftl
  20. 0 44
      codegen/src/main/resources/template/pojo.ftl
  21. 0 9
      codegen/src/main/resources/template/service.ftl
  22. 0 22
      codegen/src/main/resources/template/service_impl.ftl
  23. 0 36
      codegen/src/main/resources/template/spring.ftl
  24. 0 64
      codegen/src/main/resources/template/sqlmap.ftl
  25. 0 11
      codegen/src/main/resources/template/sqlmapConfig.ftl
  26. 1 1
      mec-application/src/main/java/com/ym/mec/student/controller/ActivityController.java
  27. 1 1
      mec-application/src/main/java/com/ym/mec/student/controller/ChildrenDayDegreeDetailController.java
  28. 5 2
      mec-application/src/main/java/com/ym/mec/student/controller/SporadicChargeInfoController.java
  29. 1 1
      mec-application/src/main/java/com/ym/mec/teacher/controller/VipGroupCategoryController.java
  30. 7 7
      mec-application/src/main/java/com/ym/mec/web/controller/ExportController.java
  31. 1 1
      mec-application/src/main/java/com/ym/mec/web/controller/SporadicChargeInfoController.java
  32. 1 1
      mec-application/src/main/java/com/ym/mec/web/controller/StudentStatisticsController.java
  33. 11 11
      mec-application/src/main/resources/exportColumnMapper.ini
  34. 1 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/provider/PhoneAuthenticationProvider.java
  35. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java
  36. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SporadicChargeInfoDao.java
  37. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ActivityCourseDetailDto.java
  38. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ActivityUserMapperSumDto.java
  39. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseReviewDto.java
  40. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DegreePayDto.java
  41. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DoubleEleven2021ActivityDto.java
  42. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DoubleEleven2021Dto.java
  43. 4 23
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/SporadicPayDto.java
  44. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java
  45. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleEvaluate.java
  46. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleReview.java
  47. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/OrganizationDegreeCourseFee.java
  48. 3 218
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SporadicChargeInfo.java
  49. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupCategory.java
  50. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ActivityCourseType.java
  51. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportEnum.java
  52. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportTypeEnum.java
  53. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexDataType.java
  54. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/OrderDetailTypeEnum.java
  55. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/SporadicChargeTypeEnum.java
  56. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/DoubleEleven2021QueryInfo.java
  57. 2 40
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/SporadicChargeInfoQueryInfo.java
  58. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/SporadicChargeInfoService.java
  59. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ActivityUserMapperServiceImpl.java
  60. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java
  61. 7 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  62. 15 7
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SporadicChargeInfoImpl.java
  63. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  64. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java
  65. 133 39
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  66. 1 1
      mec-biz/src/main/resources/config/mybatis/ActivityUserMapperMapper.xml
  67. 4 4
      mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml
  68. 10 6
      mec-biz/src/main/resources/config/mybatis/SporadicChargeInfo.xml
  69. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentStatisticsMapper.xml
  70. 0 120
      mec-education/pom.xml
  71. 0 37
      mec-education/src/main/java/com/ym/mec/education/EducationApplication.java
  72. 0 20
      mec-education/src/main/java/com/ym/mec/education/base/BaseQuery.java
  73. 0 61
      mec-education/src/main/java/com/ym/mec/education/base/BaseResponse.java
  74. 0 201
      mec-education/src/main/java/com/ym/mec/education/base/PageResponse.java
  75. 0 100
      mec-education/src/main/java/com/ym/mec/education/base/Response.java
  76. 0 28
      mec-education/src/main/java/com/ym/mec/education/config/ImageVerifyCodeConfig.java
  77. 0 22
      mec-education/src/main/java/com/ym/mec/education/config/MybatisPlusConfig.java
  78. 0 36
      mec-education/src/main/java/com/ym/mec/education/config/ResourceServerConfig.java
  79. 0 36
      mec-education/src/main/java/com/ym/mec/education/config/WebMvcConfig.java
  80. 0 66
      mec-education/src/main/java/com/ym/mec/education/controller/ApprovalController.java
  81. 0 81
      mec-education/src/main/java/com/ym/mec/education/controller/AttendClassController.java
  82. 0 35
      mec-education/src/main/java/com/ym/mec/education/controller/ClassGroupController.java
  83. 0 32
      mec-education/src/main/java/com/ym/mec/education/controller/CourseHomeworkTemplateController.java
  84. 0 102
      mec-education/src/main/java/com/ym/mec/education/controller/CourseScheduleController.java
  85. 0 31
      mec-education/src/main/java/com/ym/mec/education/controller/EducationDemoGroupController.java
  86. 0 101
      mec-education/src/main/java/com/ym/mec/education/controller/HomeWorkController.java
  87. 0 33
      mec-education/src/main/java/com/ym/mec/education/controller/MessageController.java
  88. 0 86
      mec-education/src/main/java/com/ym/mec/education/controller/MusicGroupController.java
  89. 0 89
      mec-education/src/main/java/com/ym/mec/education/controller/SmsCodeController.java
  90. 0 49
      mec-education/src/main/java/com/ym/mec/education/controller/StudentAttendanceController.java
  91. 0 59
      mec-education/src/main/java/com/ym/mec/education/controller/StudentController.java
  92. 0 33
      mec-education/src/main/java/com/ym/mec/education/controller/SubjectController.java
  93. 0 75
      mec-education/src/main/java/com/ym/mec/education/controller/TeacherAttendanceController.java
  94. 0 80
      mec-education/src/main/java/com/ym/mec/education/controller/TeacherController.java
  95. 0 33
      mec-education/src/main/java/com/ym/mec/education/controller/TeacherLeaveRecordController.java
  96. 0 49
      mec-education/src/main/java/com/ym/mec/education/controller/VipGroupController.java
  97. 0 129
      mec-education/src/main/java/com/ym/mec/education/entity/ChargeType.java
  98. 0 134
      mec-education/src/main/java/com/ym/mec/education/entity/ChargeTypeSubjectMapper.java
  99. 0 215
      mec-education/src/main/java/com/ym/mec/education/entity/ClassGroup.java
  100. 0 90
      mec-education/src/main/java/com/ym/mec/education/entity/ClassGroupRelation.java

+ 0 - 37
codegen/pom.xml

@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.ym</groupId>
-		<artifactId>mec</artifactId>
-		<version>1.0</version>
-	</parent>
-
-	<groupId>com.yonge</groupId>
-	<artifactId>codegen</artifactId>
-	<name>codegen</name>
-	<url>http://maven.apache.org</url>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.freemarker</groupId>
-			<artifactId>freemarker</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>com.ym</groupId>
-			<artifactId>mec-util</artifactId>
-		</dependency>
-	</dependencies>
-</project>

+ 0 - 63
codegen/src/main/java/com/yonge/crud/CodegenApplication.java

@@ -1,63 +0,0 @@
-package com.yonge.crud;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-import com.yonge.crud.core.Configuration;
-import com.yonge.crud.core.CrudSession;
-import com.yonge.crud.core.CrudSessionFactory;
-import com.yonge.crud.core.GenerateConfiguration;
-import com.yonge.crud.core.db.model.Table;
-
-@SpringBootApplication
-public class CodegenApplication {
-
-	public static void main(String[] args) throws JAXBException {
-		//SpringApplication.run(CodegenApplication.class, args);
-
-		/*
-		 * Configuration config = new Configuration("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@192.168.10.134:1521:orcl", "margin_gy",
-		 * "margin_gy", null, "margin_gy");
-		 */
-
-		// "src/generateConfigration.xml"
-		GenerateConfiguration genConfig = toObject("codegen/src/main/resources/generateConfigration.xml", GenerateConfiguration.class);
-
-		Configuration config = genConfig.getDbConfiguration();
-
-		CrudSessionFactory sessionFactory = config.buildCrudSessionFactory();
-		CrudSession session = sessionFactory.openSession();
-		List<Table> tables = session.getTables();
-		String srcBase = genConfig.getSrcBase();
-		String pojoPackageName = genConfig.getPojoPackageName();
-		String daoPackageName = genConfig.getDaoPackageName();
-		String servicePackageName = genConfig.getServicePackageName();
-		String sqlmapPackageName = genConfig.getSqlmapPackageName();
-		String sqlmapConfigPackageName = genConfig.getSqlmapConfigPackageName();
-		for (Table table : tables) {
-			try {
-				session.reverse(table, srcBase, pojoPackageName, sqlmapPackageName, daoPackageName, servicePackageName);
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-		// 生成sqlmapConfig
-		session.generateSqlmapConfig(tables, srcBase, sqlmapConfigPackageName, sqlmapPackageName);
-		session.closeSession();
-	}
-
-	public static <T> T toObject(String systemId, Class<T> clazz) throws JAXBException {
-		JAXBContext jc = JAXBContext.newInstance(clazz);
-		Unmarshaller unmarshaller = jc.createUnmarshaller();
-		StreamSource xml = new StreamSource(systemId);
-		JAXBElement<T> je = unmarshaller.unmarshal(xml, clazz);
-		return je.getValue();
-	}
-}

+ 0 - 111
codegen/src/main/java/com/yonge/crud/core/Configuration.java

@@ -1,111 +0,0 @@
-package com.yonge.crud.core;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Configuration {
-
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(Configuration.class);
-
-	private String driverClass;
-
-	private String url;
-
-	private String username;
-
-	private String password;
-
-	private String catalog;
-
-	private String schema;
-
-	public Configuration() {
-		// TODO Auto-generated constructor stub
-	}
-
-	public Configuration(String driverClass, String url, String username,
-			String password, String catalog, String schema) {
-		if (StringUtils.isBlank(driverClass)) {
-			LOGGER.warn("driverClass不能为空");
-			return;
-		}
-		if (StringUtils.isBlank(url)) {
-			LOGGER.warn("url不能为空");
-			return;
-		}
-		if (StringUtils.isBlank(username)) {
-			LOGGER.warn("username不能为空");
-			return;
-		}
-		if (StringUtils.isBlank(password)) {
-			LOGGER.warn("password不能为空");
-			return;
-		}
-		if (StringUtils.isBlank(schema)) {
-			LOGGER.warn("schema不能为空");
-			return;
-		}
-		this.driverClass = driverClass;
-		this.url = url;
-		this.username = username;
-		this.password = password;
-		if (catalog != null) {
-			this.catalog = catalog.toUpperCase();
-		}
-		this.schema = schema.toUpperCase();
-	}
-
-	public String getDriverClass() {
-		return driverClass;
-	}
-
-	public void setDriverClass(String driverClass) {
-		this.driverClass = driverClass;
-	}
-
-	public String getUrl() {
-		return url;
-	}
-
-	public void setUrl(String url) {
-		this.url = url;
-	}
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	public String getCatalog() {
-		return catalog;
-	}
-
-	public void setCatalog(String catalog) {
-		this.catalog = catalog;
-	}
-
-	public String getSchema() {
-		return schema;
-	}
-
-	public void setSchema(String schema) {
-		this.schema = schema;
-	}
-
-	public CrudSessionFactory buildCrudSessionFactory() {
-		return new CrudSessionFactory(this);
-	}
-}

+ 0 - 144
codegen/src/main/java/com/yonge/crud/core/CrudSession.java

@@ -1,144 +0,0 @@
-package com.yonge.crud.core;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.SQLException;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.yonge.crud.core.db.DatabaseIntrospector;
-import com.yonge.crud.core.db.model.Table;
-import com.yonge.crud.core.generator.ModuleGenerateIntrospector;
-
-public class CrudSession {
-
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(CrudSession.class);
-
-	private Connection connection;
-
-	private DatabaseMetaData dbMetaData;
-
-	private String catalog;
-
-	private String schema;
-
-	private CrudSessionFactory sessionFactory;
-
-	CrudSession(Connection connection, String catalog, String schema,
-			CrudSessionFactory sessionFactory) {
-		if (connection == null) {
-			LOGGER.warn("没有获取连接,不能打开session");
-			return;
-		}
-		this.connection = connection;
-		this.catalog = catalog;
-		this.schema = schema;
-		this.sessionFactory = sessionFactory;
-		try {
-			this.dbMetaData = connection.getMetaData();
-		} catch (SQLException e) {
-			LOGGER.warn("获取数据库连接的元数据失败", e);
-		}
-	}
-
-	/**
-	 * 关闭会话
-	 */
-	public void closeSession() {
-		if (connection != null) {
-			try {
-				connection.close();
-			} catch (SQLException e) {
-				LOGGER.warn("数据库连接关闭失败", e);
-			}
-		}
-	}
-
-	/**
-	 * 获取工厂信息
-	 * 
-	 * @return
-	 */
-	public CrudSessionFactory getFactory() {
-		return sessionFactory;
-	}
-
-	/**
-	 * 获取所有表信息
-	 * 
-	 * @return
-	 */
-	public List<Table> getTables() {
-		DatabaseIntrospector dbIntrospector = new DatabaseIntrospector(
-				dbMetaData);
-		return dbIntrospector.getTables(catalog, schema);
-	}
-
-	/**
-	 * 数据库表的反向工程
-	 * 
-	 * @param table
-	 *            表对象
-	 * @param srcBase
-	 *            生成目录的根路径
-	 * @param pojoPackageName
-	 *            存放pojo的包名称
-	 * @param sqlmapPackageName
-	 *            存放sqlmap的包名称
-	 * @param daoPackageName
-	 *            存放dao的包名称
-	 */
-	public void reverse(Table table, String srcBase, String pojoPackageName,
-			String sqlmapPackageName, String daoPackageName,
-			String servicePackageName) {
-		ModuleGenerateIntrospector
-				.generatePOJO(table, srcBase, pojoPackageName);
-		ModuleGenerateIntrospector.generatSqlmap(this.getFactory()
-				.getMetadata().getDriverClass(), table, srcBase,
-				sqlmapPackageName, daoPackageName);
-		ModuleGenerateIntrospector.generateDaoAndService(table, srcBase,
-				daoPackageName, servicePackageName);
-	}
-
-	/**
-	 * 生成spring的配置文件
-	 * 
-	 * @param tables
-	 *            需要生成spring配置文件对应的表
-	 * @param srcBase
-	 *            根目录
-	 * @param packageName
-	 *            配置文件的包路径
-	 * @param daoPackageName
-	 *            dao的包路径
-	 * @param servicePackageName
-	 *            service的包路径
-	 */
-	public void generateSpringConfig(List<Table> tables, String srcBase,
-			String packageName, String daoPackageName, String servicePackageName) {
-		ModuleGenerateIntrospector.generateSpring(tables, srcBase, packageName,
-				daoPackageName, servicePackageName);
-	}
-
-	/**
-	 * 生成sqlmapConfig文件
-	 * 
-	 * @param tables
-	 *            相关表信息
-	 * @param srcBase
-	 *            生成目标的根目录
-	 * @param packageName
-	 *            sqlmapConfig文件的包路径
-	 * @param sqlmapPackageName
-	 *            sqlmap文件的包路径
-	 */
-	public void generateSqlmapConfig(List<Table> tables, String srcBase,
-			String packageName, String sqlmapPackageName) {
-		ModuleGenerateIntrospector.generateSqlMapConfig(tables, srcBase,
-				sqlmapPackageName, packageName);
-	}
-
-}

+ 0 - 60
codegen/src/main/java/com/yonge/crud/core/CrudSessionFactory.java

@@ -1,60 +0,0 @@
-package com.yonge.crud.core;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.yonge.crud.core.db.ConnectionFactory;
-
-public class CrudSessionFactory {
-
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(CrudSessionFactory.class);
-
-	private CrudSession session;
-
-	private Connection connection;
-
-	private String catalog;
-
-	private String schema;
-
-	private Configuration config;
-
-	CrudSessionFactory(Configuration config) {
-		LOGGER.debug("数据库的连接信息:url={} user={} password={}", config.getUrl(),
-				config.getUsername(), config.getPassword());
-		try {
-			this.config = config;
-			this.catalog = config.getCatalog();
-			this.schema = config.getSchema();
-			connection = ConnectionFactory.getInstance().getConnection(
-					config.getDriverClass(), config.getUrl(),
-					config.getUsername(), config.getPassword());
-			session = new CrudSession(connection, catalog, schema, this);
-		} catch (SQLException e) {
-			LOGGER.warn("数据库连接创建失败", e);
-		}
-	}
-
-	/**
-	 * 开启一个会话
-	 */
-	public synchronized CrudSession openSession() {
-		if (session == null) {
-			session = new CrudSession(connection, catalog, schema, this);
-		}
-		return session;
-	}
-
-	/**
-	 * 获取元数据
-	 * 
-	 * @return
-	 */
-	public Configuration getMetadata() {
-		return config;
-	}
-}

+ 0 - 93
codegen/src/main/java/com/yonge/crud/core/FreemarkerTemplateEngine.java

@@ -1,93 +0,0 @@
-package com.yonge.crud.core;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import freemarker.template.Configuration;
-import freemarker.template.DefaultObjectWrapper;
-import freemarker.template.Template;
-
-public class FreemarkerTemplateEngine {
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(FreemarkerTemplateEngine.class);
-
-	private static Configuration cfg;
-
-	static {
-		cfg = new Configuration();
-		cfg.setOutputEncoding("UTF-8");
-		cfg.setClassForTemplateLoading(FreemarkerTemplateEngine.class,
-				"/template/");
-		cfg.setObjectWrapper(new DefaultObjectWrapper());
-	}
-
-	public void render(Map<String, Object> data, String templateFile,
-			File outputFile) {
-		FileWriter fw = null;
-		BufferedWriter bw = null;
-		try {
-			Template temp = cfg.getTemplate(templateFile);
-			fw = new FileWriter(outputFile);
-			bw = new BufferedWriter(fw);
-			temp.process(data, bw);
-			bw.flush();
-		} catch (Exception e) {
-			LOGGER.warn(String.format("将数据%1$s通过FreeMarker模板%2$s生成文件%3$s失败",
-					data, templateFile, outputFile), e);
-		} finally {
-			if (bw != null) {
-				try {
-					bw.close();
-				} catch (IOException e) {
-					LOGGER.warn("BufferedWriter关闭异常");
-				}
-			}
-			if (fw != null) {
-				try {
-					fw.close();
-				} catch (IOException e) {
-					LOGGER.warn("FileWriter关闭异常");
-				}
-			}
-		}
-	}
-
-	public void render(Map<String, Object> data, String templateFile,
-			String outputFile) {
-		FileWriter fw = null;
-		BufferedWriter bw = null;
-		try {
-			Template temp = cfg.getTemplate(templateFile);
-			File file = new File(outputFile);
-			fw = new FileWriter(file);
-			bw = new BufferedWriter(fw);
-			temp.process(data, bw);
-			bw.flush();
-		} catch (Exception e) {
-			LOGGER.warn(String.format("将数据%1$s通过FreeMarker模板%2$s生成文件%3$s失败",
-					data, templateFile, outputFile), e);
-		} finally {
-			if (bw != null) {
-				try {
-					bw.close();
-				} catch (IOException e) {
-					LOGGER.warn("BufferedWriter关闭异常");
-				}
-			}
-			if (fw != null) {
-				try {
-					fw.close();
-				} catch (IOException e) {
-					LOGGER.warn("FileWriter关闭异常");
-				}
-			}
-		}
-	}
-
-}

+ 0 - 84
codegen/src/main/java/com/yonge/crud/core/GenerateConfiguration.java

@@ -1,84 +0,0 @@
-package com.yonge.crud.core;
-
-public class GenerateConfiguration {
-
-	private Configuration dbConfiguration;
-
-	private String srcBase;
-
-	private String pojoPackageName;
-
-	private String daoPackageName;
-
-	private String servicePackageName;
-
-	private String sqlmapPackageName;
-
-	private String sqlmapConfigPackageName;
-
-	private String springConfigPackageName;
-
-	public Configuration getDbConfiguration() {
-		return dbConfiguration;
-	}
-
-	public void setDbConfiguration(Configuration dbConfiguration) {
-		this.dbConfiguration = dbConfiguration;
-	}
-
-	public String getSrcBase() {
-		return srcBase;
-	}
-
-	public void setSrcBase(String srcBase) {
-		this.srcBase = srcBase;
-	}
-
-	public String getPojoPackageName() {
-		return pojoPackageName;
-	}
-
-	public void setPojoPackageName(String pojoPackageName) {
-		this.pojoPackageName = pojoPackageName;
-	}
-
-	public String getDaoPackageName() {
-		return daoPackageName;
-	}
-
-	public void setDaoPackageName(String daoPackageName) {
-		this.daoPackageName = daoPackageName;
-	}
-
-	public String getServicePackageName() {
-		return servicePackageName;
-	}
-
-	public void setServicePackageName(String servicePackageName) {
-		this.servicePackageName = servicePackageName;
-	}
-
-	public String getSqlmapPackageName() {
-		return sqlmapPackageName;
-	}
-
-	public void setSqlmapPackageName(String sqlmapPackageName) {
-		this.sqlmapPackageName = sqlmapPackageName;
-	}
-
-	public String getSqlmapConfigPackageName() {
-		return sqlmapConfigPackageName;
-	}
-
-	public void setSqlmapConfigPackageName(String sqlmapConfigPackageName) {
-		this.sqlmapConfigPackageName = sqlmapConfigPackageName;
-	}
-
-	public String getSpringConfigPackageName() {
-		return springConfigPackageName;
-	}
-
-	public void setSpringConfigPackageName(String springConfigPackageName) {
-		this.springConfigPackageName = springConfigPackageName;
-	}
-}

+ 0 - 59
codegen/src/main/java/com/yonge/crud/core/db/ConnectionFactory.java

@@ -1,59 +0,0 @@
-package com.yonge.crud.core.db;
-
-import java.sql.Connection;
-import java.sql.Driver;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import org.apache.commons.lang3.StringUtils;
-
-public class ConnectionFactory {
-
-	private static ConnectionFactory instance = new ConnectionFactory();
-
-	private static final String ORACLE_DRIVER = "oracle.jdbc.driver.OracleDriver";
-
-	public static ConnectionFactory getInstance() {
-		return instance;
-	}
-
-	private ConnectionFactory() {
-		super();
-	}
-
-	public Connection getConnection(String driverClass, String url,
-			String username, String password) throws SQLException {
-		Driver driver = getDriver(driverClass);
-
-		Properties props = new Properties();
-
-		props.setProperty("user", username);
-
-		props.setProperty("password", password);
-
-		// 只有oracle才需要这个参数
-		if (StringUtils.equals(driverClass, ORACLE_DRIVER)) {
-			props.setProperty("remarksReporting", "true");
-		}
-
-		Connection conn = driver.connect(url, props);
-
-		if (conn == null) {
-			throw new SQLException("连接获取失败");
-		}
-
-		return conn;
-	}
-
-	private Driver getDriver(String driverClass) {
-		Driver driver = null;
-		try {
-			Class<?> clazz = Class.forName(driverClass);
-			driver = (Driver) clazz.newInstance();
-		} catch (Exception e) {
-			throw new RuntimeException("类加载器加载driver失败", e);
-		}
-
-		return driver;
-	}
-}

+ 0 - 117
codegen/src/main/java/com/yonge/crud/core/db/DatabaseIntrospector.java

@@ -1,117 +0,0 @@
-package com.yonge.crud.core.db;
-
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.yonge.crud.core.db.model.Column;
-import com.yonge.crud.core.db.model.Table;
-import com.yonge.crud.core.util.JavaBeansUtil;
-
-public class DatabaseIntrospector {
-	private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseIntrospector.class);
-
-	private DatabaseMetaData dbMetaData;
-
-	public DatabaseIntrospector(DatabaseMetaData dbMetaData) {
-		this.dbMetaData = dbMetaData;
-	}
-
-	public List<Table> getTables(String catalog, String schema) {
-		List<Table> tables = new ArrayList<Table>();
-		if (dbMetaData == null) {
-			LOGGER.warn("DatabaseMetaData对象不能为空");
-			return tables;
-		}
-		ResultSet resultSet = null;
-		try {
-			resultSet = dbMetaData.getTables(catalog, schema, null, new String[] { "TABLE" });
-			Table table = null;
-			while (resultSet.next()) {
-				table = new Table();
-				table.setName(resultSet.getString("TABLE_NAME"));
-				table.setCatalog(resultSet.getString("TABLE_CAT"));
-				table.setRemarks(resultSet.getString("REMARKS"));
-				table.setSchema(resultSet.getString("TABLE_SCHEM"));
-				table.setClassName(JavaBeansUtil.getCamelCaseString(table.getName(), true));
-
-				table.setColumns(getColumns(table));
-				tables.add(table);
-			}
-		} catch (SQLException e) {
-			LOGGER.warn("获取数据库表失败", e);
-		} finally {
-			if (resultSet != null) {
-				try {
-					resultSet.close();
-				} catch (SQLException e) {
-					LOGGER.warn("关闭ResultSet对象出现异常", e);
-				}
-			}
-		}
-		return tables;
-	}
-
-	private List<Column> getColumns(Table table) {
-		List<Column> columns = new ArrayList<Column>();
-		if (table == null) {
-			LOGGER.warn("参数不能为空");
-			return columns;
-		}
-		String tableName = table.getName();
-		String schema = table.getSchema();
-		String name = tableName.toUpperCase();
-		if (dbMetaData == null) {
-			LOGGER.warn("DatabaseMetaData对象不能为空");
-		}
-		ResultSet resultSet = null;
-		Column column = null;
-		try {
-			resultSet = dbMetaData.getPrimaryKeys(table.getCatalog(), schema, tableName);
-			List<String> keyColumns = new ArrayList<String>();
-			while (resultSet.next()) {
-				keyColumns.add(resultSet.getString("COLUMN_NAME"));
-			}
-
-			resultSet = dbMetaData.getColumns(table.getCatalog(), schema, tableName, null);
-			while (resultSet.next()) {
-				column = new Column();
-				// 获得字段名称
-				column.setFieldName(resultSet.getString("COLUMN_NAME"));
-				// 获得字段类型名称
-				column.setJdbcTypeName(resultSet.getString("TYPE_NAME"));
-				// 数据类型
-				column.setDataType(resultSet.getInt("DATA_TYPE"));
-				// 获得字段大小
-				column.setLength(resultSet.getInt("COLUMN_SIZE"));
-				column.setNullable((resultSet.getInt("NULLABLE") == DatabaseMetaData.columnNullable));
-				column.setScale(resultSet.getInt("DECIMAL_DIGITS"));
-				column.setRemarks(resultSet.getString("REMARKS"));
-				for (String key : keyColumns) {
-					if (StringUtils.equalsIgnoreCase(key, column.getFieldName())) {
-						column.setIsPrimaryKey(true);
-					}
-				}
-				columns.add(column);
-			}
-		} catch (SQLException e) {
-			LOGGER.warn("在" + schema + "中获取" + name + "表字段出现异常", e);
-		} finally {
-			if (resultSet != null) {
-				try {
-					resultSet.close();
-				} catch (SQLException e) {
-					LOGGER.warn("关闭ResultSet对象出现异常", e);
-				}
-			}
-		}
-		return columns;
-	}
-
-}

+ 0 - 127
codegen/src/main/java/com/yonge/crud/core/db/model/Column.java

@@ -1,127 +0,0 @@
-package com.yonge.crud.core.db.model;
-
-public class Column {
-
-	/** 字段名称 */
-	private String fieldName;
-
-	/** 是否是主键 */
-	private boolean isPrimaryKey;
-
-	/** 属性名称 */
-	private String propertyName;
-
-	/** JDBC类型 名称 */
-	private String jdbcTypeName;
-
-	/** java类型 */
-	private String javaTypeName;
-
-	/** 数据类型 */
-	private int dataType;
-
-	/** 字段长度 */
-	private int length;
-
-	/** 是否可以为空 */
-	private boolean nullable;
-
-	private int scale;
-
-	/** 描述 */
-	private String remarks;
-
-	public String getFieldName() {
-		return fieldName;
-	}
-
-	public void setFieldName(String fieldName) {
-		this.fieldName = fieldName;
-	}
-
-	public boolean isPrimaryKey() {
-		return isPrimaryKey;
-	}
-
-	public void setIsPrimaryKey(boolean isPrimaryKey) {
-		this.isPrimaryKey = isPrimaryKey;
-	}
-
-	public String getPropertyName() {
-		return propertyName;
-	}
-
-	public void setPropertyName(String propertyName) {
-		this.propertyName = propertyName;
-	}
-
-	public String getJdbcTypeName() {
-		return jdbcTypeName;
-	}
-
-	public void setJdbcTypeName(String jdbcTypeName) {
-		this.jdbcTypeName = jdbcTypeName;
-	}
-
-	public String getJavaTypeName() {
-		return javaTypeName;
-	}
-
-	public void setJavaTypeName(String javaTypeName) {
-		this.javaTypeName = javaTypeName;
-	}
-
-	public int getDataType() {
-		return dataType;
-	}
-
-	public void setDataType(int dataType) {
-		this.dataType = dataType;
-	}
-
-	public int getLength() {
-		return length;
-	}
-
-	public void setLength(int length) {
-		this.length = length;
-	}
-
-	public boolean isNullable() {
-		return nullable;
-	}
-
-	public void setNullable(boolean nullable) {
-		this.nullable = nullable;
-	}
-
-	public int getScale() {
-		return scale;
-	}
-
-	public void setScale(int scale) {
-		this.scale = scale;
-	}
-
-	public String getRemarks() {
-		return remarks;
-	}
-
-	public void setRemarks(String remarks) {
-		this.remarks = remarks;
-	}
-
-	public String toString() {
-		StringBuilder sb = new StringBuilder();
-		sb.append("fieldName = " + fieldName)
-				.append(" isPrimaryKey = " + isPrimaryKey)
-				.append(" propertyName = " + propertyName)
-				.append(" jdbcTypeName = " + jdbcTypeName)
-				.append(" javaTypeName = " + javaTypeName)
-				.append(" dataType = " + dataType)
-				.append(" length = " + length)
-				.append(" nullable = " + nullable).append(" scale = " + scale)
-				.append(" remarks = " + remarks);
-		return sb.toString();
-	}
-}

+ 0 - 86
codegen/src/main/java/com/yonge/crud/core/db/model/Table.java

@@ -1,86 +0,0 @@
-package com.yonge.crud.core.db.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Table {
-
-	private String name;
-
-	private String schema;
-
-	private String catalog;
-
-	private String remarks;
-
-	private String className;
-
-	private String packageName;
-
-	private List<Column> columns = new ArrayList<Column>();
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getSchema() {
-		return schema;
-	}
-
-	public void setSchema(String schema) {
-		this.schema = schema;
-	}
-
-	public String getCatalog() {
-		return catalog;
-	}
-
-	public void setCatalog(String catalog) {
-		this.catalog = catalog;
-	}
-
-	public String getRemarks() {
-		return remarks;
-	}
-
-	public void setRemarks(String remarks) {
-		this.remarks = remarks;
-	}
-
-	public List<Column> getColumns() {
-		return columns;
-	}
-
-	public void setColumns(List<Column> columns) {
-		this.columns = columns;
-	}
-
-	public String getClassName() {
-		return className;
-	}
-
-	public void setClassName(String className) {
-		this.className = className;
-	}
-
-	public String getPackageName() {
-		return packageName;
-	}
-
-	public void setPackageName(String packageName) {
-		this.packageName = packageName;
-	}
-
-	public String toString() {
-		StringBuilder sb = new StringBuilder();
-		sb.append("name = " + name).append(" catalog = " + catalog)
-				.append(" schema = " + schema).append(" remarks = " + remarks)
-				.append(" packageName = " + packageName)
-				.append(" className = " + className);
-		return sb.toString();
-	}
-}

+ 0 - 234
codegen/src/main/java/com/yonge/crud/core/generator/ModuleGenerateIntrospector.java

@@ -1,234 +0,0 @@
-package com.yonge.crud.core.generator;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.yonge.crud.core.db.model.Column;
-import com.yonge.crud.core.db.model.Table;
-import com.yonge.crud.core.generator.module.JavaFileGenerator;
-import com.yonge.crud.core.generator.module.SpringGenerator;
-import com.yonge.crud.core.generator.module.SqlMapConfigGenerator;
-import com.yonge.crud.core.util.JavaBeansUtil;
-
-public class ModuleGenerateIntrospector {
-
-	private static final String DAO_TEMPLATE_NAME = "dao.ftl";
-
-	private static final String POJO_TEMPLATE_NAME = "pojo.ftl";
-
-	private static final String SERVICE_IMPL_TEMPLATE_NAME = "service_impl.ftl";
-
-	private static final String SERVICE_TEMPLATE_NAME = "service.ftl";
-
-	private static final String SQLMAP_TEMPLATE_NAME = "sqlmap.ftl";
-
-	private static final String SQLMAPCONFIG_TEMPLATE_NAME = "sqlmapConfig.ftl";
-
-	private static final String SPRING_TEMPLATE = "spring.ftl";
-
-	private static final String POJO_FILE_SUFFIX = ".java";
-
-	private static final String SQLMAP_FILE_PREFIX = "SqlMap_";
-
-	private static final String XML_FILE_SUFFIX = ".xml";
-
-	private static final String DAO_FILE_SUFFIX = "Dao.java";
-
-	private static final String SERVICE_FILE_SUFFIX = "Service.java";
-
-	private static final String SERVICE_IMPL_FILE_SUFFIX = "ServiceImpl.java";
-
-	private static final String SQLMAP_CONFIG_FILE = "SqlMapConfig.xml";
-
-	private static final String SPRING_CONFIG_FILE = "spring-crud.xml";
-
-	public static void generatePOJO(Table table, String srcBase,
-			String packageName) {
-		List<Column> columns = table.getColumns();
-		for (Column col : columns) {
-			// 转换类型
-			col.setJavaTypeName(JavaBeansUtil.fromJdbcToJava(col));
-			// 转换属性名称
-			col.setPropertyName(JavaBeansUtil.getCamelCaseString(
-					col.getFieldName(), false));
-		}
-		table.setColumns(columns);
-		table.setPackageName(packageName);
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("props", columns);
-		params.put("table", table);
-		// 生成pojo
-		JavaFileGenerator entiryGenerator = new JavaFileGenerator();
-		entiryGenerator.generate(params, srcBase, packageName,
-				table.getClassName() + POJO_FILE_SUFFIX, POJO_TEMPLATE_NAME);
-	}
-
-	public static void generatSqlmap(String driverClass, Table table,
-			String srcBase, String sqlMapPackageName, String daoPackageName) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		String className = table.getClassName();
-		params.put("namespace", daoPackageName + "." + className + "Dao");
-		params.put("fullClassName", table.getPackageName() + "." + className);
-		params.put("alias", className);
-		params.put("columns", table.getColumns());
-
-		String tableName = table.getName();
-		params.put("tableName", tableName);
-
-		// 构建sql语句
-		String fields = "", properties = "", criteria = "", orderbyStr = "";
-		Map<String, String> fieldPropMapping = new HashMap<String, String>();
-		int keys = 0;
-		for (Column col : table.getColumns()) {
-			fields += (col.getFieldName() + ",");
-			properties += ("#{" + col.getPropertyName() + "},");
-			fieldPropMapping.put(col.getFieldName(), col.getPropertyName());
-			if (col.isPrimaryKey()) {
-				criteria += (col.getFieldName() + " = #{"
-						+ col.getPropertyName() + "} AND ");
-				++keys;
-				orderbyStr += (col.getFieldName() + ",");
-			}
-		}
-		if (keys > 1) {
-			params.put("paramType", Map.class.getName());
-		}
-		// 清除最后一个"AND"
-		if (StringUtils.isNotBlank(criteria)) {
-			criteria = criteria.substring(0, criteria.length() - 4);
-		}
-		// 删除最后一个“,”
-		fields = fields.substring(0, fields.length() - 1);
-		properties = properties.substring(0, properties.length() - 1);
-
-		String queryBaseSQL = "SELECT * FROM " + tableName;
-		// 全查询
-		String queryFullSQL = queryBaseSQL;
-		if (StringUtils.isNotBlank(orderbyStr)) {
-			orderbyStr = orderbyStr.substring(0, orderbyStr.length() - 1);
-			queryFullSQL += " ORDER BY " + orderbyStr;
-		}
-		params.put("queryFullSQL", queryFullSQL);
-		// 插入
-		String insertSQL = "INSERT INTO " + tableName + " (" + fields
-				+ ") VALUES(" + properties + ")";
-		params.put("insertSQL", insertSQL);
-		if (StringUtils.isNotBlank(criteria)) {
-			// 修改
-			String updateSQL = "UPDATE " + tableName + " <set>\n<if test=\"";
-			for (Entry<String, String> entry : fieldPropMapping.entrySet()) {
-				updateSQL += entry.getValue() + " != null\">\n" + (entry.getKey() + " = #{" + entry.getValue() + "},\n</if>\n<if test=\"");
-			}
-			// 删除最后一个“,”
-			updateSQL = updateSQL.substring(0, updateSQL.length() - 10);
-			updateSQL += ("</set> WHERE " + criteria);
-			params.put("updateSQL", updateSQL);
-			// 根据主键查询
-			String querySingleSQL = queryBaseSQL + " WHERE " + criteria;
-			params.put("querySingleSQL", querySingleSQL);
-			// 根据主键删除
-			String deleteSQL = "DELETE FROM " + tableName + " WHERE "
-					+ criteria;
-			params.put("deleteSQL", deleteSQL);
-		}
-		// 分页查询语句
-		String queryPage = "";
-
-		if (StringUtils.equals(driverClass, "com.mysql.jdbc.Driver")) {
-			// mysql
-			queryPage = queryFullSQL + " <include refid=\"global.limit\"/>";
-		} else if (StringUtils.equals(driverClass,
-				"oracle.jdbc.driver.OracleDriver")) {
-			// oracle
-			queryPage = "SELECT * FROM (SELECT A.*,ROWNUM FROM " + tableName
-					+ " A WHERE ROWNUM <= #endLine# ORDER BY " + orderbyStr
-					+ ") WHERE ROWNUM >= #startLine#";
-		} else if (StringUtils.equals(driverClass, "com.ibm.db2.jcc.DB2Driver")) {
-			// db2
-			queryPage = "SELECT * FROM (SELECT B.*,ROWNUMBER() OVER(ORDER BY "
-					+ orderbyStr
-					+ ") AS RN FROM "
-					+ tableName
-					+ " AS B) AS A WHERE A.RN BETWEEN #startLine# AND #endLine#";
-		}
-		if (StringUtils.isNotBlank(queryPage)) {
-			params.put("queryPage", queryPage);
-		}
-		// 生成sqlmap
-		JavaFileGenerator sqlMapGenerator = new JavaFileGenerator();
-		sqlMapGenerator.generate(params, srcBase, sqlMapPackageName,
-				className+"Mapper" + XML_FILE_SUFFIX,
-				SQLMAP_TEMPLATE_NAME);
-	}
-
-	public static void generateSqlMapConfig(List<Table> tables, String srcBase,
-			String sqlmapPackageName, String sqlMapConfigPackageName) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("sqlmapPackageName", sqlmapPackageName);
-		params.put("tables", tables);
-		// 生成sqlmap-config
-		SqlMapConfigGenerator sqlMapConfigGenerator = new SqlMapConfigGenerator();
-		sqlMapConfigGenerator.createSqlMapConfigFile(sqlmapPackageName, tables,
-				params, srcBase, sqlMapConfigPackageName, SQLMAP_CONFIG_FILE,
-				SQLMAPCONFIG_TEMPLATE_NAME);
-	}
-
-	public static void generateDaoAndService(Table table, String srcBase,
-			String daoPackageName, String servicePackageName) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		String className = table.getClassName();
-		String pojoFullClassName = table.getPackageName() + "."
-				+ table.getClassName();
-
-		List<Column> primarykeys = new ArrayList<Column>();
-		for (Column col : table.getColumns()) {
-			if (col.isPrimaryKey()) {
-				primarykeys.add(col);
-			}
-		}
-		String paramType = null;
-		if (primarykeys.size() == 1) {
-			paramType = primarykeys.get(0).getJavaTypeName();
-		} else if (primarykeys.size() > 1) {
-			paramType = Map.class.getName();
-		}
-		params.put("pojoFullClassName", pojoFullClassName);
-		params.put("className", className);
-		params.put("paramType", paramType);
-		params.put("daoPackageName", daoPackageName);
-
-		JavaFileGenerator daoGenerator = new JavaFileGenerator();
-		daoGenerator.generate(params, srcBase, daoPackageName, className
-				+ DAO_FILE_SUFFIX, DAO_TEMPLATE_NAME);
-
-		params.put("servicePackageName", servicePackageName);
-
-		JavaFileGenerator serviceGenerator = new JavaFileGenerator();
-		serviceGenerator.generate(params, srcBase, servicePackageName,
-				className + SERVICE_FILE_SUFFIX, SERVICE_TEMPLATE_NAME);
-
-		JavaFileGenerator serviceImplGenerator = new JavaFileGenerator();
-		serviceImplGenerator.generate(params, srcBase, servicePackageName
-				+ File.separator + "impl",
-				className + SERVICE_IMPL_FILE_SUFFIX,
-				SERVICE_IMPL_TEMPLATE_NAME);
-	}
-
-	public static void generateSpring(List<Table> tables, String srcBase,
-			String packageName, String daoPackageName, String servicePackageName) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("daoPackageName", daoPackageName);
-		params.put("servicePackageName", servicePackageName);
-		params.put("tables", tables);
-		SpringGenerator springGenerator = new SpringGenerator();
-		springGenerator.createSpringFile(daoPackageName, servicePackageName,
-				tables, params, srcBase, packageName, SPRING_CONFIG_FILE,
-				SPRING_TEMPLATE);
-	}
-}

+ 0 - 41
codegen/src/main/java/com/yonge/crud/core/generator/module/JavaFileGenerator.java

@@ -1,41 +0,0 @@
-package com.yonge.crud.core.generator.module;
-
-import java.io.File;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.yonge.crud.core.FreemarkerTemplateEngine;
-
-public final class JavaFileGenerator extends FreemarkerTemplateEngine {
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(JavaFileGenerator.class);
-
-	public JavaFileGenerator() {
-		super();
-	}
-
-	public void generate(Map<String, Object> data, String srcBase,
-			String packageName, String targetFile, String templateFile) {
-		StringBuilder buf = new StringBuilder();
-		buf.append(srcBase).append(File.separator);
-		buf.append(packageName.replaceAll("\\.", File.separator
-				+ File.separator));// 单个的File.separator会导致无法通过正则表达式解析
-		buf.append(File.separator);
-		File packageDir = new File(buf.toString());
-		if (!packageDir.exists()) {
-			boolean flag = packageDir.mkdirs();
-			if (!flag) {
-				LOGGER.warn("递归创建文件夹{}失败", packageDir);
-				return;
-			}
-		}
-		buf.append(targetFile);
-		String outputFile = buf.toString();
-		LOGGER.debug("根据输入内容[{},{},{}]得到文件名{}", new Object[] { templateFile,
-				srcBase, packageName, outputFile });
-		render(data, templateFile, outputFile);
-	}
-
-}

+ 0 - 129
codegen/src/main/java/com/yonge/crud/core/generator/module/SpringGenerator.java

@@ -1,129 +0,0 @@
-package com.yonge.crud.core.generator.module;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import com.yonge.crud.core.FreemarkerTemplateEngine;
-import com.yonge.crud.core.db.model.Table;
-import com.yonge.crud.core.util.XmlUtil;
-
-public class SpringGenerator extends FreemarkerTemplateEngine {
-
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(SpringGenerator.class);
-
-	public SpringGenerator() {
-		super();
-	}
-
-	public void createSpringFile(String daoPackageName,
-			String servicePackageName, List<Table> tables,
-			Map<String, Object> data, String srcBase, String packageName,
-			String targetFile, String templateFile) {
-		StringBuilder buf = new StringBuilder();
-		buf.append(srcBase).append(File.separator);
-		buf.append(packageName.replaceAll("\\.", File.separator
-				+ File.separator));// 单个的File.separator会导致无法通过正则表达式解析
-		buf.append(File.separator);
-		File dbDir = new File(buf.toString());
-		if (!dbDir.exists()) {
-			boolean flag = dbDir.mkdirs();
-			if (!flag) {
-				LOGGER.warn("递归创建文件夹{}失败", dbDir);
-				return;
-			}
-		}
-		buf.append(targetFile);
-		String outputFile = buf.toString();
-		File file = new File(outputFile);
-		if (file.exists()) {
-			Map<String, String> nsMap = new HashMap<String, String>();
-			nsMap.put("ns", "http://www.springframework.org/schema/beans");
-			try {
-				Document doc = XmlUtil.parse(file);
-				for (Table table : tables) {
-					String className = table.getClassName();
-					if (StringUtils.isNotBlank(className)) {
-						String className_firstLower = Character
-								.toLowerCase(className.charAt(0))
-								+ className.substring(1);
-						Object obj = XmlUtil.queryNodeValue(doc,
-								"//ns:beans/ns:bean[@id='"
-										+ className_firstLower + "Dao']",
-								XPathConstants.NODE, nsMap);
-						if (obj == null) {
-							// 创建dao
-							Element element = doc.createElement("bean");
-							element.setAttribute("id", className_firstLower
-									+ "Dao");
-							element.setAttribute("class",
-									"com.erayt.solar2.db.DaoProxyFactoryBean");
-							// 创建property元素
-							Element subElement = doc.createElement("property");
-							subElement.setAttribute("name", "daoInterface");
-							subElement.setAttribute("value", daoPackageName
-									+ "." + className + "Dao");
-							element.appendChild(subElement);
-
-							subElement = doc.createElement("property");
-							subElement.setAttribute("name", "sqlMapClient");
-							subElement.setAttribute("ref", "sqlMapClient");
-							element.appendChild(subElement);
-							doc.getDocumentElement().appendChild(element);
-
-						} else {
-							LOGGER.warn(targetFile + "中已经存在" + className
-									+ "的DAO配置");
-						}
-
-						obj = XmlUtil.queryNodeValue(doc,
-								"//ns:beans/ns:bean[@id='"
-										+ className_firstLower + "Service']",
-								XPathConstants.NODE, nsMap);
-						if (obj == null) {
-							// 创建service
-							Element element = doc.createElement("bean");
-							element.setAttribute("id", className_firstLower
-									+ "Service");
-							element.setAttribute("class", servicePackageName
-									+ ".impl." + className + "ServiceImpl");
-							doc.getDocumentElement().appendChild(element);
-						} else {
-							LOGGER.warn(targetFile + "中已经存在" + className
-									+ "的SERVICE配置");
-						}
-					}
-				}
-				// 将dom写入文件
-				XmlUtil.writeXmlFile(doc, outputFile);
-				return;
-			} catch (ParserConfigurationException e) {
-				LOGGER.warn("xml文件解析失败", e);
-			} catch (SAXException e) {
-				LOGGER.warn("xml文件解析失败", e);
-			} catch (IOException e) {
-				LOGGER.warn("xml文件解析失败", e);
-			} catch (XPathExpressionException e) {
-				LOGGER.warn("xpath表达式异常", e);
-			}
-		}
-		LOGGER.debug("根据输入内容[{},{},{}]得到文件名{}", new Object[] { templateFile,
-				srcBase, packageName, outputFile });
-		render(data, templateFile, outputFile);
-	}
-
-}

+ 0 - 82
codegen/src/main/java/com/yonge/crud/core/generator/module/SqlMapConfigGenerator.java

@@ -1,82 +0,0 @@
-package com.yonge.crud.core.generator.module;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import com.yonge.crud.core.FreemarkerTemplateEngine;
-import com.yonge.crud.core.db.model.Table;
-import com.yonge.crud.core.util.XmlUtil;
-
-public final class SqlMapConfigGenerator extends FreemarkerTemplateEngine {
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(SqlMapConfigGenerator.class);
-
-	public void createSqlMapConfigFile(String sqlmapPackageName,
-			List<Table> tables, Map<String, Object> data, String srcBase,
-			String packageName, String targetFile, String templateFile) {
-		StringBuilder buf = new StringBuilder();
-		buf.append(srcBase).append(File.separator);
-		buf.append(packageName.replaceAll("\\.", File.separator
-				+ File.separator));// 单个的File.separator会导致无法通过正则表达式解析
-		buf.append(File.separator);
-		File dbDir = new File(buf.toString());
-		if (!dbDir.exists()) {
-			boolean flag = dbDir.mkdirs();
-			if (!flag) {
-				LOGGER.warn("递归创建文件夹{}失败", dbDir);
-				return;
-			}
-		}
-		buf.append(targetFile);
-		String outputFile = buf.toString();
-		// 判断文件是否存在,如果存在,则在原来的基础上追加
-		File file = new File(outputFile);
-		if (file.exists()) {
-			try {
-				Document doc = XmlUtil.parse(file);
-				for (Table table : tables) {
-					String src = sqlmapPackageName.replace('.', '/')
-							+ "/SqlMap_" + table.getName() + ".xml";
-					Object obj = XmlUtil.queryNodeValue(doc,
-							"//sqlMapConfig/sqlMap[@resource='" + src + "']",
-							XPathConstants.NODE, null);
-					if (obj == null) {
-						// 创建一个新的节点
-						Element element = doc.createElement("sqlMap");
-						element.setAttribute("resource", src);
-						doc.getDocumentElement().appendChild(element);
-					} else {
-						LOGGER.warn(targetFile + "中已经存在" + table.getName()
-								+ "配置");
-					}
-				}
-				// 将dom写入文件
-				XmlUtil.writeXmlFile(doc, outputFile);
-				return;
-			} catch (ParserConfigurationException e) {
-				LOGGER.warn("xml文件解析失败", e);
-			} catch (SAXException e) {
-				LOGGER.warn("xml文件解析失败", e);
-			} catch (IOException e) {
-				LOGGER.warn("xml文件解析失败", e);
-			} catch (XPathExpressionException e) {
-				LOGGER.warn("xpath表达式异常", e);
-			}
-		}
-		LOGGER.debug("根据输入内容[{},{},{}]得到文件名{}", new Object[] { data,
-				templateFile, srcBase, outputFile });
-		render(data, templateFile, outputFile);
-	}
-}

+ 0 - 160
codegen/src/main/java/com/yonge/crud/core/util/JavaBeansUtil.java

@@ -1,160 +0,0 @@
-package com.yonge.crud.core.util;
-
-import java.sql.Types;
-import java.util.regex.Pattern;
-
-import com.yonge.crud.core.db.model.Column;
-
-public class JavaBeansUtil {
-
-	private static final Pattern allowedClassNames = Pattern
-			.compile("[a-zA-Z]+");
-
-	public static String fromJdbcToJava(Column column) {
-		String answer = null;
-		switch (column.getDataType()) {
-		case Types.ARRAY:
-		case Types.DATALINK:
-		case Types.DISTINCT:
-		case Types.JAVA_OBJECT:
-		case Types.NULL:
-		case Types.OTHER:
-		case Types.REF:
-		case Types.STRUCT:
-			answer = "Object";
-			break;
-
-		case Types.BIGINT:
-			answer = "Long";
-			break;
-
-		case Types.BINARY:
-		case Types.BLOB:
-		case Types.LONGVARBINARY:
-		case Types.VARBINARY:
-			answer = "byte[]"; //$NON-NLS-1$
-			break;
-
-		case Types.BIT:
-		case Types.BOOLEAN:
-			answer = "boolean";
-			break;
-		case Types.CHAR:
-		case Types.CLOB:
-		case Types.LONGVARCHAR:
-		case Types.VARCHAR:
-			answer = "String";
-			break;
-
-		case Types.DATE:
-		case Types.TIME:
-		case Types.TIMESTAMP:
-			answer = "java.util.Date";
-			break;
-
-		case Types.DECIMAL:
-			if (column.getScale() > 0 || column.getLength() > 18) {
-				answer = "java.math.BigDecimal";
-			} else if (column.getLength() > 9) {
-				answer = "long";
-			} else if (column.getLength() > 4) {
-				answer = "int";
-			} else {
-				answer = "short";
-			}
-			break;
-
-		case Types.DOUBLE:
-			answer = "double";
-			break;
-
-		case Types.FLOAT:
-		case Types.REAL:
-			answer = "float";
-			break;
-
-		case Types.INTEGER:
-		case Types.TINYINT:
-			answer = "Integer";
-			break;
-
-		case Types.NUMERIC:
-			if (column.getScale() > 0 || column.getLength() > 18) {
-				answer = "java.math.BigDecimal";
-			} else if (column.getLength() > 9) {
-				answer = "long";
-			} else if (column.getLength() > 4) {
-				answer = "int";
-			} else {
-				answer = "short";
-			}
-			break;
-
-		case Types.SMALLINT:
-			answer = "short";
-			break;
-
-
-		default:
-			answer = null;
-			break;
-		}
-
-		return answer;
-	}
-
-	public static String getClassName(String tableName) {
-		String className = tableName;
-		if (allowedClassNames.matcher(className).matches()) {
-			className = tableName;
-		} else {
-			for (String chunk : allowedClassNames.split(tableName)) {
-				className = className.replace(chunk, "");
-			}
-		}
-		if (Character.isLowerCase(className.charAt(0))) {
-			className = className.substring(0, 1).toUpperCase()
-					+ className.substring(1);
-		}
-		return className;
-	}
-
-	public static String getCamelCaseString(String inputString,
-			boolean firstCharacterUppercase) {
-		StringBuilder sb = new StringBuilder();
-
-		boolean nextUpperCase = false;
-		for (int i = 0; i < inputString.length(); i++) {
-			char c = inputString.charAt(i);
-
-			switch (c) {
-			case '_':
-			case '-':
-			case '@':
-			case '$':
-			case '#':
-			case ' ':
-				if (sb.length() > 0) {
-					nextUpperCase = true;
-				}
-				break;
-
-			default:
-				if (nextUpperCase) {
-					sb.append(Character.toUpperCase(c));
-					nextUpperCase = false;
-				} else {
-					sb.append(Character.toLowerCase(c));
-				}
-				break;
-			}
-		}
-
-		if (firstCharacterUppercase) {
-			sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
-		}
-
-		return sb.toString();
-	}
-
-}

+ 0 - 169
codegen/src/main/java/com/yonge/crud/core/util/XmlUtil.java

@@ -1,169 +0,0 @@
-package com.yonge.crud.core.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class XmlUtil {
-
-	private static final Logger LOGGER = LoggerFactory.getLogger(XmlUtil.class);
-
-	private static final Map<ClassLoader, DocumentBuilderFactory> DOCUMENT_BUILDER_FACTORIES = Collections
-			.synchronizedMap(new WeakHashMap<ClassLoader, DocumentBuilderFactory>());
-
-	/**
-	 * 根据xpath表达式查询目标document中节点的值
-	 * 
-	 * @param doc
-	 *            目标对象
-	 * @param expression
-	 *            xpath表达式
-	 * @param returnType
-	 *            节点值的返回类型(eg:XPathConstants.STRING)
-	 * @param nsMap
-	 *            如果有默认的命名空间,需设置默认的命名空间
-	 * @return
-	 * @throws XPathExpressionException
-	 */
-	public static Object queryNodeValue(final Document doc, String expression,
-			QName returnType, final Map<String, String> nsMap)
-			throws XPathExpressionException {
-		XPathFactory factory = XPathFactory.newInstance();
-		XPath xpath = factory.newXPath();
-
-		xpath.setNamespaceContext(new NamespaceContext() {
-
-			@SuppressWarnings("rawtypes")
-			public Iterator getPrefixes(String namespaceURI) {
-				throw new UnsupportedOperationException();
-			}
-
-			public String getPrefix(String namespaceURI) {
-				throw new UnsupportedOperationException();
-			}
-
-			public String getNamespaceURI(String prefix) {
-				String xmlns = doc.lookupNamespaceURI(prefix);
-				if (StringUtils.isBlank(xmlns)) {
-					xmlns = nsMap.get(prefix);
-				}
-				return xmlns;
-			}
-		});
-
-		XPathExpression expr = xpath.compile(expression);
-
-		return expr.evaluate(doc, returnType);
-	}
-
-	/**
-	 * 将document对象写入filename文件
-	 * 
-	 * @param doc
-	 *            目标对象
-	 * @param filename
-	 *            输出文件名称
-	 */
-	public static void writeXmlFile(Document doc, String filename) {
-		try {
-			// Prepare the DOM document for writing
-			Source source = new DOMSource(doc);
-
-			// Prepare the output file
-			File file = new File(filename);
-			Result result = new StreamResult(file);
-
-			// Write the DOM document to the file
-			Transformer xformer = TransformerFactory.newInstance()
-					.newTransformer();
-			xformer.setOutputProperty(OutputKeys.INDENT, "yes");
-			xformer.transform(source, result);
-		} catch (TransformerException e) {
-			LOGGER.warn("document对象写入文件失败", e);
-		}
-	}
-
-	public static DocumentBuilder getParser()
-			throws ParserConfigurationException {
-		return getDocumentBuilderFactory().newDocumentBuilder();
-	}
-
-	public static Document parse(InputSource is)
-			throws ParserConfigurationException, SAXException, IOException {
-		return getParser().parse(is);
-	}
-
-	public static Document parse(File is) throws ParserConfigurationException,
-			SAXException, IOException {
-		return getParser().parse(is);
-	}
-
-	public static Document parse(InputStream in)
-			throws ParserConfigurationException, SAXException, IOException {
-		if (in == null) {
-			LOGGER.warn("XMLUtils trying to parse a null inputstream");
-		}
-		return getParser().parse(in);
-	}
-
-	public static Document parse(String in)
-			throws ParserConfigurationException, SAXException, IOException {
-		return parse(in.getBytes());
-	}
-
-	public static Document parse(byte[] in)
-			throws ParserConfigurationException, SAXException, IOException {
-		if (in == null) {
-			LOGGER.warn("XMLUtils trying to parse a null bytes");
-			return null;
-		}
-		return getParser().parse(new ByteArrayInputStream(in));
-	}
-
-	private static DocumentBuilderFactory getDocumentBuilderFactory() {
-		ClassLoader loader = Thread.currentThread().getContextClassLoader();
-		if (loader == null) {
-			loader = XmlUtil.class.getClassLoader();
-		}
-		if (loader == null) {
-			return DocumentBuilderFactory.newInstance();
-		}
-		DocumentBuilderFactory factory = DOCUMENT_BUILDER_FACTORIES.get(loader);
-		if (factory == null) {
-			factory = DocumentBuilderFactory.newInstance();
-			factory.setNamespaceAware(true);
-			DOCUMENT_BUILDER_FACTORIES.put(loader, factory);
-		}
-		return factory;
-	}
-}

+ 0 - 17
codegen/src/main/resources/generateConfigration.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<GenerateConfiguration>
-	<dbConfiguration>
-		<driverClass>com.mysql.jdbc.Driver</driverClass>
-		<url>jdbc:mysql://47.114.176.40:3306/mec_test</url>
-		<username>mec_dev</username>
-		<password>dayaDataOnline@2019</password>
-		<catalog>mec_test</catalog>
-		<schema>mec_test</schema>
-	</dbConfiguration>
-	<srcBase>D:/usr/javabean</srcBase>
-	<pojoPackageName>com.ym.mec.biz.dal.entity</pojoPackageName>
-	<daoPackageName>com.ym.mec.biz.dal.dao</daoPackageName>
-	<servicePackageName>com.ym.mec.biz.service</servicePackageName>
-	<sqlmapPackageName>resources</sqlmapPackageName>
-	<sqlmapConfigPackageName>resources/config</sqlmapConfigPackageName>
-</GenerateConfiguration>

+ 0 - 10
codegen/src/main/resources/template/dao.ftl

@@ -1,10 +0,0 @@
-[#ftl]
-package ${daoPackageName};
-
-import com.ym.mec.common.dal.BaseDAO;
-import ${pojoFullClassName};
-
-public interface ${className}Dao [#if paramType??]extends BaseDAO<${paramType}, ${className}>[/#if] {
-
-	
-}

+ 0 - 44
codegen/src/main/resources/template/pojo.ftl

@@ -1,44 +0,0 @@
-[#ftl]
-package ${table.packageName};
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-/**
- * 对应数据库表(${table.name}):${table.remarks}
- */
-public class ${table.className} {
-
-	[#list props as prop]
-	[#if prop.remarks??]
-	/** ${prop.remarks} */
-	[/#if]
-	private ${prop.javaTypeName} ${prop.propertyName};
-	
-	[/#list]
-	[#list props as prop]
-		[#if prop.javaTypeName == 'boolean']
-	public void set${prop.propertyName?cap_first}(${prop.javaTypeName} ${prop.propertyName}){
-		this.${prop.propertyName} = ${prop.propertyName};
-	}
-	
-	public boolean is${prop.propertyName?cap_first}(){
-		return this.${prop.propertyName};
-	}
-			
-		[#else]
-	public void set${prop.propertyName?cap_first}(${prop.javaTypeName} ${prop.propertyName}){
-		this.${prop.propertyName} = ${prop.propertyName};
-	}
-	
-	public ${prop.javaTypeName} get${prop.propertyName?cap_first}(){
-		return this.${prop.propertyName};
-	}
-			
-		[/#if]
-	[/#list]
-	@Override
-	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
-	}
-
-}

+ 0 - 9
codegen/src/main/resources/template/service.ftl

@@ -1,9 +0,0 @@
-[#ftl]
-package ${servicePackageName};
-
-import ${pojoFullClassName};
-import com.ym.mec.common.service.BaseService;
-
-public interface ${className}Service extends BaseService<${paramType}, ${className}> {
-
-}

+ 0 - 22
codegen/src/main/resources/template/service_impl.ftl

@@ -1,22 +0,0 @@
-[#ftl]
-package ${servicePackageName}.impl;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
-import ${pojoFullClassName};
-import ${servicePackageName}.${className}Service;
-import ${daoPackageName}.${className}Dao;
-
-@Service
-public class ${className}ServiceImpl extends BaseServiceImpl<${paramType}, ${className}>  implements ${className}Service {
-	
-	[#assign daoName = className + 'Dao']
-	@Autowired
-	private ${daoName} ${daoName?uncap_first};
-
-	@Override
-	public BaseDAO<${paramType}, ${className}> getDAO() {
-		return ${daoName?uncap_first};
-	}
-	
-}

+ 0 - 36
codegen/src/main/resources/template/spring.ftl

@@ -1,36 +0,0 @@
-[#ftl]
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-This file is auto generated by Ant & FreeMarker.
-DO NOT MODIFY IT.All modified content will be lost when next auto generate.
-这个文件是用ANT和FreeMarker自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
-	default-autowire="byName">
-
-	[#-- 
-	<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
-		<property name="configLocation" value="${sqlmapConfigPackageName}/SqlMap_Config.xml" />
-		<property name="dataSource" ref ="${r"${dataSource}"}" />
-	</bean>
-	--]
-	
-	
-	<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
-		<property name="dataSource" ref="dataSource" />
-		<property name="configLocation" value="classpath:SqlMapConfig.xml" />
-	</bean>
-	
-	[#list tables as table]
-	<bean id="${table.className?uncap_first}Dao" class="org.mybatis.spring.mapper.MapperFactoryBean">
-		<property name="mapperInterface" value="${daoPackageName}.${table.className}Dao" />
-		<property name="sqlSessionFactory" ref="sqlSessionFactory" />
-	</bean>
-	
-	[/#list]
-</beans>

+ 0 - 64
codegen/src/main/resources/template/sqlmap.ftl

@@ -1,64 +0,0 @@
-[#ftl]
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!--
-这个文件是自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
-<mapper namespace="${namespace}">
-	
-	<resultMap type="${fullClassName}" id="${alias}">
-	[#list columns as col]
-		<result column="${col.fieldName}" property="${col.propertyName}" />
-	[/#list]
-	</resultMap>
-	
-	[#if querySingleSQL??]
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="${alias}" [#if paramType??]parameterType="${paramType}"[/#if]>
-		${querySingleSQL}
-	</select>
-	[/#if]
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="${alias}">
-		${queryFullSQL}
-	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="${fullClassName}" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		${insertSQL}
-	</insert>
-	
-	[#if updateSQL??]
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="${fullClassName}">
-		${updateSQL}
-	</update>
-	[/#if]
-	
-	[#if deleteSQL??]
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" [#if paramType??]parameterType="${paramType}"[/#if]>
-		${deleteSQL}
-	</delete>
-	[/#if]
-	
-	[#if queryPage??]
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="${alias}" parameterType="map">
-		${queryPage}
-	</select>
-	[/#if]
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM ${tableName}
-	</select>
-</mapper>
- 

+ 0 - 11
codegen/src/main/resources/template/sqlmapConfig.ftl

@@ -1,11 +0,0 @@
-[#ftl]
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD SQL Map Config 3.0//EN"  
-	"http://mybatis.org/dtd/mybatis-3-config.dtd">
-<configuration>
-	<mappers>
-	[#list tables as table]
-		<mapper resource="${sqlmapPackageName?replace(".","/")}/SqlMap_${table.name}.xml" />
-	[/#list]
-	</mappers>
-</configuration>

+ 1 - 1
mec-application/src/main/java/com/ym/mec/student/controller/ActivityController.java

@@ -82,7 +82,7 @@ public class ActivityController extends BaseController {
         SysUser user = sysUserService.getUser();
         Integer organId = user.getOrganId();
 
-        List<SporadicChargeInfo> activeInfos = sporadicChargeInfoService.getOrganActiveInfo(organId, 12);
+        List<SporadicChargeInfo> activeInfos = sporadicChargeInfoService.getOrganActiveInfo(organId.toString(), 12);
         activeInfos.sort(Comparator.comparing(SporadicChargeInfo::getAmount).reversed());
         if (activeInfos.size() <= 0) {
             return failed("分部活动不存在");

+ 1 - 1
mec-application/src/main/java/com/ym/mec/student/controller/ChildrenDayDegreeDetailController.java

@@ -33,7 +33,7 @@ public class ChildrenDayDegreeDetailController extends BaseController {
     @Autowired
     private StudentDao studentDao;
 
-    @ApiOperation(value = "获取用户已报名的详情,类型 1-专业考级 2-乐理考级 3-vip1v1,4-vip1v2 5-乐理课")
+    @ApiOperation(value = "获取用户已报名的详情,类型 1-专业考级 2-小组考级 3-vip1v1,4-vip1v2 5-小组课")
     @GetMapping("/getUserDegreeInfo")
     public HttpResponseResult<ChildrenDayDetailDto> getFeeInfo() {
         SysUser user = sysUserFeignService.queryUserInfo();

+ 5 - 2
mec-application/src/main/java/com/ym/mec/student/controller/SporadicChargeInfoController.java

@@ -62,6 +62,7 @@ public class SporadicChargeInfoController extends BaseController {
                 return failed("用户不存在");
             }
             sporadicPayDto.setUserId(sysUser.getId());
+            sporadicPayDto.setOrganId(sysUser.getOrganId());
         }
         if (sporadicPayDto.getRepeatPay() == false) {
         	List<StudentPaymentOrder> studentPaymentOrderList = studentPaymentOrderDao.findPaymentOrderByGroupType(sporadicPayDto.getUserId(), sporadicPayDto.getSporadicId(), "SPORADIC", DealStatusEnum.ING);
@@ -76,7 +77,9 @@ public class SporadicChargeInfoController extends BaseController {
             }
         }
         SporadicChargeInfo info = sporadicChargeInfoService.get(sporadicPayDto.getSporadicId());
-
+        if(sporadicPayDto.getOrganId() == null){
+            sporadicPayDto.setOrganId(Integer.parseInt(info.getOrganId()));
+        }
         if (info.getMaxAmount() != null) {
             String msg = "";
             for (int i = 1; i <= 100; i++) {
@@ -124,7 +127,7 @@ public class SporadicChargeInfoController extends BaseController {
         if (type == null || type <= 0) {
             return failed("参数不合法");
         }
-        SporadicChargeInfo chargeInfo = sporadicChargeInfoService.findByOrganIdAndType(organId, type);
+        SporadicChargeInfo chargeInfo = sporadicChargeInfoService.findByOrganIdAndType(organId.toString(), type);
         if (chargeInfo == null) {
             return failed("分部活动不存在");
         }

+ 1 - 1
mec-application/src/main/java/com/ym/mec/teacher/controller/VipGroupCategoryController.java

@@ -52,7 +52,7 @@ public class VipGroupCategoryController extends BaseController {
 	@ApiOperation("全查询")
 	@ApiImplicitParams({
 			@ApiImplicitParam(name = "organId", value = "分部id", dataType = "int", paramType = "query"),
-			@ApiImplicitParam(name = "includeMusicTheory", value = "是否包含乐理", dataType = "int", paramType = "query", defaultValue = "0"),
+			@ApiImplicitParam(name = "includeMusicTheory", value = "是否包含小组", dataType = "int", paramType = "query", defaultValue = "0"),
 			@ApiImplicitParam(name = "groupType", value = "课类别", dataType = "String", paramType = "query", defaultValue = "VIP")
 	})
 	@GetMapping(value = "/queryAll")

+ 7 - 7
mec-application/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -266,7 +266,7 @@ public class ExportController extends BaseController {
         }
         OutputStream outputStream = response.getOutputStream();
         try {
-            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "合作单位", "乐团", "学员编号", "学员姓名", "手机号", "声部", "所在班级", "是否预约", "器乐等级", "乐理等级", "是否购买VIP", "是否购买乐理课"}, new String[]{
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "合作单位", "乐团", "学员编号", "学员姓名", "手机号", "声部", "所在班级", "是否预约", "器乐等级", "小组等级", "是否购买VIP", "是否购买小组课"}, new String[]{
                     "organName", "cooperationOrganName", "musicGroupName", "userId", "username", "phone", "subjectName",
                     "currentClass", "isReserve == true ?'是':'否'", "gradeLeave"
                     , "theoryLevel", "buyVipFlag == true ?'是':'否'", "buyTheoryCourseFlag == true ?'是':'否'"}, rows);
@@ -340,7 +340,7 @@ public class ExportController extends BaseController {
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "总成交金额", "总购买人数", "人均购买金额",
                     "20节1v1成交金额", "20节1v1成交人数", "40节1v1成交金额", "40节1v1成交人数", "20节1v2成交金额", "20节1v2成交人数",
-                    "40节1v2成交金额", "40节1v2成交人数", "乐理课成交金额", "乐理课成交人数", "赠送会员人数"}, new String[]{
+                    "40节1v2成交金额", "40节1v2成交人数", "小组课成交金额", "小组课成交人数", "赠送会员人数"}, new String[]{
                     "organName", "totalBuyAmount", "totalBuyNum", "avgBuyAmount", "vip1V120Amount", "vip1V120Num", "vip1V140Amount",
                     "vip1V140Num", "vip1V220Amount", "vip1V220Num", "vip1V240Amount"
                     , "vip1V240Num", "musicTheoryAmount", "musicTheoryNum", "giveMemberNum"}, rows);
@@ -1037,7 +1037,7 @@ public class ExportController extends BaseController {
     public void queryPage(SporadicChargeInfoQueryInfo queryInfo, HttpServletResponse response) throws IOException {
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
-        queryInfo.setIsExport(true);
+        queryInfo.setExport(true);
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         List<SporadicChargeInfo> rows = sporadicChargeInfoService.queryDetailPage(queryInfo).getRows();
 //        for (SporadicChargeInfo row : rows) {
@@ -1363,7 +1363,7 @@ public class ExportController extends BaseController {
             }
 
             String[] header = {"分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏",
-                    "乐理", "曲目", "评价备注", "回访日期(布置训练)", "完成app双向沟通", "学员评分", "是否布置训练", "是否提交训练", "是否回复训练", "教务老师", "教务评价"};
+                    "小组", "曲目", "评价备注", "回访日期(布置训练)", "完成app双向沟通", "学员评分", "是否布置训练", "是否提交训练", "是否回复训练", "教务老师", "教务评价"};
             String[] body = {"organName", "classDateStr", "studentId", "id", "attendanceStr", "courseName",
                     "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song",
                     "memo", "createTimeStr", "hasLiaison", "studentReview", "assignHomeworkStr", "handHomeworkStr", "homeWorkReplied", "eduTeacherName", "courseReview"};
@@ -1727,7 +1727,7 @@ public class ExportController extends BaseController {
                 }
             }
 
-            String[] header = {"分部", "上课日期", "课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理",
+            String[] header = {"分部", "上课日期", "课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "小组",
                     "曲目", "评价备注", "回访日期(布置训练)", "是否布置训练", "是否提交训练", "教务老师", "教务评价"};
             String[] body = {"organName", "classDateStr", "id", "courseName", "teacherName", "teachingMaterial",
                     "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "assignHomeworkStr",
@@ -1778,7 +1778,7 @@ public class ExportController extends BaseController {
         for (DegreeRegistration row : pageList.getRows()) {
 //            row.setActivityTag(map.get(row.getLevel()));
 //            if (row.getType() == DegreeTypeEnum.THEORY) {
-//                row.setSubject("乐理");
+//                row.setSubject("小组");
 //            }
             row.setGender("1".equals(row.getGender()) ? "男" : "女");
             row.setLevel(map.get(row.getLevel()));
@@ -1801,7 +1801,7 @@ public class ExportController extends BaseController {
         OutputStream outputStream = response.getOutputStream();
         try {
             String[] header = {"姓名", "性别", "用户编号", "证件号码", "所属城市", "学校", "报考专业", "报考信息", "证书", "联系电话", "备注", "缴费状态", "订单编号", "交易流水号", "报名时间"};
-            String[] body = {"name", "gender", "userId", "idcard",  "organName", "com/ym/app/web/controller/school", "type.code =='GRADE'?'专业考级':'乐理考级'",
+            String[] body = {"name", "gender", "userId", "idcard",  "organName", "com/ym/app/web/controller/school", "type.code =='GRADE'?'专业考级':'小组考级'",
                     "type.code =='GRADE'?subjectName+'/'+level+'/'+money +'元':level+'/'+money +'元'",
                     "theoryCert", "mobile", "memo", "statusStr", "orderNo", "transNo", "createTime"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, pageList.getRows());

+ 1 - 1
mec-application/src/main/java/com/ym/mec/web/controller/SporadicChargeInfoController.java

@@ -68,7 +68,7 @@ public class SporadicChargeInfoController extends BaseController {
 			if(user.getOrganId() == null){
 				return failed("分部信息异常");
 			}
-			sporadicChargeInfo.setOrganId(user.getOrganId());
+			sporadicChargeInfo.setOrganId(user.getOrganId().toString());
 		}
 		if(sporadicChargeInfo.getChargeType().equals(SporadicChargeTypeEnum.LUCKY_BAG_ACTIVE)){
 			SporadicChargeInfo info = sporadicChargeInfoService.findByOrganIdAndType(sporadicChargeInfo.getOrganId(), sporadicChargeInfo.getChargeType().getCode());

+ 1 - 1
mec-application/src/main/java/com/ym/mec/web/controller/StudentStatisticsController.java

@@ -113,7 +113,7 @@ public class StudentStatisticsController extends BaseController {
         if(Objects.equals(queryInfo.getGroupType(),"VIP")){
             name = "VIP课学员统计";
         }else if(Objects.equals(queryInfo.getGroupType(),"THEORY")){
-            name = "乐理课学员统计";
+            name = "小组课学员统计";
         }
         String fileName = new StringBuffer(name)
                 .append("-")

+ 11 - 11
mec-application/src/main/resources/exportColumnMapper.ini

@@ -7,7 +7,7 @@ headColumns = ["分部", "乐团编号", "乐团名称","合作单位", "乐团
 fieldColumns = ["organName", "id", "name","cooperationOrganName", "status.msg", "courseViewType.msg","chargeTypeName","educationalTeacherName", "teamTeacherName", "groupMemberNum","payNum","createTime","updateTime","hasVerifyMusicalList?'已确认':'未确认'"]
 
 [21年暑期考级活动统计页面详情导出]
-headColumns = ["分部", "合作单位", "乐团","学员编号", "学员姓名", "手机号","声部","所在班级","指导老师", "是否预约", "器乐等级", "乐理等级", "是否购买VIP","是否购买乐理课"]
+headColumns = ["分部", "合作单位", "乐团","学员编号", "学员姓名", "手机号","声部","所在班级","指导老师", "是否预约", "器乐等级", "小组等级", "是否购买VIP","是否购买小组课"]
 fieldColumns = ["organName", "cooperationOrganName", "musicGroupName","userId", "username", "phone","subjectName","currentClass", "realName", "isReserve == true ?'是':'否'","gradeLeave","theoryLevel","buyVipFlag == true ?'是':'否'","buyTheoryCourseFlag == true ?'是':'否'"]
 
 [2021双十一学员购买详情]
@@ -15,7 +15,7 @@ headColumns = ["学员编号", "学员姓名","订单号", "交易金额","交
 fieldColumns = ["userId", "username", "orderNo","amount", "payTime", "createTime","type","giveMember==0?'否':'是'"]
 
 [分部2021双11活动统计导出]
-headColumns = ["分部", "总成交金额","总购买人数", "人均购买金额","20节1v1成交金额", "20节1v1成交人数", "40节1v1成交金额", "40节1v1成交人数", "20节1v2成交金额", "20节1v2成交人数","40节1v2成交金额", "40节1v2成交人数", "乐理课成交金额", "乐理课成交人数", "赠送会员人数"]
+headColumns = ["分部", "总成交金额","总购买人数", "人均购买金额","20节1v1成交金额", "20节1v1成交人数", "40节1v1成交金额", "40节1v1成交人数", "20节1v2成交金额", "20节1v2成交人数","40节1v2成交金额", "40节1v2成交人数", "小组课成交金额", "小组课成交人数", "赠送会员人数"]
 fieldColumns = ["organName", "totalBuyAmount", "totalBuyNum","avgBuyAmount", "vip1V120Amount", "vip1V120Num","vip1V140Amount", "vip1V140Num", "vip1V220Amount", "vip1V220Num","vip1V240Amount" ,"vip1V240Num","musicTheoryAmount","musicTheoryNum","giveMemberNum"]
 
 [学生个人账户余额导出]
@@ -115,15 +115,15 @@ headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订
 fieldColumns = ["id", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount","balancePaymentAmount","couponRemitFee", "transferFee", "platformFee", "payTime", "organName","memo"]
 
 [订单列表导出1]
-headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额", "课程家长采买","课程学校采买", "VIP课",  "直播课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它", "汇付手续费","平台手续费", "到账时间","关联乐团ID/VIP课ID","课程形态","类型","收费乐团编号","收费乐团","零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
+headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额", "课程家长采买","课程学校采买", "VIP课",  "直播课", "网管课", "小组课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它", "汇付手续费","平台手续费", "到账时间","关联乐团ID/VIP课ID","课程形态","类型","收费乐团编号","收费乐团","零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
 fieldColumns = ["id", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount","balancePaymentAmount","couponRemitFee","musicGroupCourseFee","courseSchoolBuyAmount", "vipCourseFee",  "liveCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee","leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee","retailGoodsFee","largeMusicalFee", "otherFee", "transferFee", "platformFee", "payTime", "musicGroupId","groupType.desc","typeDesc","feeMusicGroupId","feeMusicGroupName", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"]
 
 [订单列表导出2]
-headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额","课程家长采买","课程学校采买", "VIP课",  "直播课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它","平台手续费", "到账时间",    "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
+headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额","课程家长采买","课程学校采买", "VIP课",  "直播课", "网管课", "小组课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它","平台手续费", "到账时间",    "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
 fieldColumns = ["id", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount",  "couponRemitFee",     "musicGroupCourseFee","courseSchoolBuyAmount", "vipCourseFee",  "liveCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee",     "leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee","retailGoodsFee","largeMusicalFee", "otherFee", "platformFee", "payTime", "musicGroupId", "groupType.desc","typeDesc","feeMusicGroupId","feeMusicGroupName", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"]
 
 [订单列表汇总导出]
-headColumns = ["分部", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额","课程家长采买","课程学校采买", "VIP课",  "直播课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它"]
+headColumns = ["分部", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额","课程家长采买","课程学校采买", "VIP课",  "直播课", "网管课", "小组课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它"]
 fieldColumns = ["organName", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount",  "couponRemitFee","musicGroupCourseFee","courseSchoolBuyAmount", "vipCourseFee", "liveCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee","leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee","retailGoodsFee","largeMusicalFee", "otherFee"]
 
 [学员小课记录导出]
@@ -135,7 +135,7 @@ headColumns = ["学员编号", "学员姓名", "性别", "联系电话","入团
 fieldColumns = ["userId", "realName", "gender", "phone","registerTime", "currentGrade", "currentClass", "subjectName", "studentStatus", "paymentStatus.desc" ,"courseFee", "activeName", "hasCourse ? '是' : '否'" ,"carePackage == null || carePackage == 0 ? '不可用' : carePackage == 1 ? '可用' : '已使用'" ,"comeOnPackage == null || comeOnPackage == 0 ? '不可用' : comeOnPackage == 1 ? '可用' : '已使用'" ,"noPaymentAmount == null ? 0 : noPaymentAmount", "quitReason", "membershipEndTime","membershipEndTime == null ? hasNoStartCloudTeacher ? '未生效' : '未购买' : membershipDay >= 0 ? membershipDay : hasNoStartCloudTeacher ? '未生效' : '会员已过期'"]
 
 [评论列表导出]
-headColumns = ["分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置训练)", "完成app双向沟通", "学员评分", "是否布置训练", "是否提交训练", "是否回复训练", "教务老师", "教务评价"]
+headColumns = ["分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏", "小组", "曲目", "评价备注", "回访日期(布置训练)", "完成app双向沟通", "学员评分", "是否布置训练", "是否提交训练", "是否回复训练", "教务老师", "教务评价"]
 fieldColumns = ["organName", "classDateStr", "studentId", "id", "attendanceStr", "courseName",  "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song",  "memo", "createTimeStr", "hasLiaison", "studentReview", "assignHomeworkStr", "handHomeworkStr", "homeWorkReplied", "eduTeacherName", "courseReview"]
 
 [网管课管理导出]
@@ -159,11 +159,11 @@ headColumns = ["分部", "课程组类型", "课程编号", "时间", "课程名
 fieldColumns = ["organName", "groupType.desc", "courseScheduleId", "startClassTime", "courseName", "teacherId", "teacherName",         "signInStatusStr", "signOutStatusStr", "actualReceipts", "salaryType", "actualSalary", "reduceSalary", "finalSalary",         "confirmStatus.desc", "memo", "deductionReason"]
 
 [vip评论列表导出]
-headColumns = ["分部", "上课日期", "课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置训练)", "是否布置训练", "是否提交训练", "教务老师", "教务评价"]
+headColumns = ["分部", "上课日期", "课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "小组", "曲目", "评价备注", "回访日期(布置训练)", "是否布置训练", "是否提交训练", "教务老师", "教务评价"]
 fieldColumns = ["organName", "classDateStr", "id", "courseName", "teacherName", "teachingMaterial",  "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "assignHomeworkStr",  "handHomeworkStr", "eduTeacherName", "courseReview"]
 
 [考级报名导出]
-headColumns = ["姓名", "性别", "身份证号", "城市", "学校", "报考乐器", "报考级别","乐理级别证书", "家长联系电话", "考级费用","备注", "缴费状态", "订单编号", "商户订单号", "报名时间"]
+headColumns = ["姓名", "性别", "身份证号", "城市", "学校", "报考乐器", "报考级别","小组级别证书", "家长联系电话", "考级费用","备注", "缴费状态", "订单编号", "商户订单号", "报名时间"]
 fieldColumns = ["name", "gender == 1?'男':'女'", "idcard", "city", "school", "subject", "level", "theoryCert", "mobile", "money","memo", "status == 2?'已缴费':'未缴费'", "orderNo", "transNo", "createTime"]
 
 [合作单位导出]
@@ -175,11 +175,11 @@ headColumns = ["序号", "业务分部",  "学生编号", "学生姓名", "交
 fieldColumns = ["id", "userOrganName", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee", "transferFee", "platformFee", "payTime", "organName", "memo"]
 
 [财务管理导出1]
-headColumns = ["序号", "业务分部",  "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课",  "直播课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "汇付手续费", "平台手续费", "到账时间", "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
+headColumns = ["序号", "业务分部",  "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课",  "直播课", "网管课", "小组课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "汇付手续费", "平台手续费", "到账时间", "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
 fieldColumns = ["id", "userOrganName", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee","musicGroupCourseFee", "vipCourseFee",  "liveCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee", "leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee", "otherFee", "transferFee", "platformFee", "payTime", "musicGroupId", "groupType.desc","typeDesc","feeMusicGroupId","feeMusicGroupName", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"]
 
 [财务管理导出2]
-headColumns = ["序号", "业务分部", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课",  "直播课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "平台手续费", "到账时间", "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
+headColumns = ["序号", "业务分部", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课",  "直播课", "网管课", "小组课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "平台手续费", "到账时间", "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
 fieldColumns = ["id", "userOrganName", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount" , "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee","musicGroupCourseFee", "vipCourseFee",  "liveCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee", "leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee", "otherFee", "platformFee", "payTime", "musicGroupId", "groupType.desc","typeDesc","feeMusicGroupId","feeMusicGroupName", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"]
 
 [老师默认课酬导出]
@@ -274,7 +274,7 @@ fieldColumns = ["organName", "username", "userId", "teacherName", "teacherId", "
 headColumns = ["分部", "学员姓名", "学员编号", "指导老师", "指导老师编号", "教务老师", "教务老师编号", "声部课老师", "声部课老师编号", "总课次", "已进行课次", "剩余课次", "上次课时间", "近30天消耗课时", "是否活跃", "课程类型"]
 fieldColumns = ["organName", "username", "userId", "teacherName", "teacherId", "eduName", "eduId",  "subjectTeacherName",  "subjectTeacherId", "totalClassNum", "completedTimes", "remaindTimes", "lastCourseTime", "consumerTimes", "activeFlag", "courseType"]
 
-[乐理课学员课程信息导出]
+[小组课学员课程信息导出]
 headColumns = ["分部", "学员姓名", "学员编号", "指导老师", "指导老师编号", "教务老师", "教务老师编号", "总课次", "已进行课次", "剩余课次", "上次课时间", "年级"]
 fieldColumns = ["organName", "username", "userId", "teacherName", "teacherId", "eduName", "eduId", "totalClassNum", "startClassNum", "subClassNum", "beforeClassNum", "grade"]
 

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/provider/PhoneAuthenticationProvider.java

@@ -49,7 +49,7 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    protected UserDetails retrieveUser(String username, Authentication authentication) throws AuthenticationException {
+    public UserDetails retrieveUser(String username, Authentication authentication) throws AuthenticationException {
         LoginEntity loginEntity = (LoginEntity) authentication.getCredentials();
         if (loginEntity == null) {
             throw new BadCredentialsException("Bad credentials");

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java

@@ -435,7 +435,7 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
     //获取vip课订单数量
     List<IndexBaseMonthData> getStudentVipOrderNum(@Param("dayStr") String dayStr,@Param("tenantId") Integer tenantId);
 
-    //获取乐理课订单数量
+    //获取小组课订单数量
     List<IndexBaseMonthData> getStudentTheoryOrderNum(@Param("dayStr") String dayStr,@Param("tenantId") Integer tenantId);
 
     //获取网管课订单数量

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SporadicChargeInfoDao.java

@@ -12,7 +12,7 @@ import java.util.Map;
 public interface SporadicChargeInfoDao extends BaseDAO<Integer, SporadicChargeInfo> {
     SporadicChargeInfo findInfoById(@Param("id") Integer id);
 
-    SporadicChargeInfo findByOrganIdAndType(@Param("organId") Integer organId, @Param("chargeType") Integer chargeType);
+    SporadicChargeInfo findByOrganIdAndType(@Param("organId") String organId, @Param("chargeType") Integer chargeType);
 
     /**
      * 根据分部和类型获取活动信息
@@ -21,7 +21,7 @@ public interface SporadicChargeInfoDao extends BaseDAO<Integer, SporadicChargeIn
      * @param chargeType
      * @return
      */
-    List<SporadicChargeInfo> getOrganActiveInfo(@Param("organId") Integer organId, @Param("chargeType") Integer chargeType);
+    List<SporadicChargeInfo> getOrganActiveInfo(@Param("organId") String organId, @Param("chargeType") Integer chargeType);
 
     List<SporadicChargeInfo> findSporadicChargeInfos(Map<String, Object> params);
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ActivityCourseDetailDto.java

@@ -16,7 +16,7 @@ public class ActivityCourseDetailDto {
     @ApiModelProperty(value = "赠送vip", required = false)
     private Integer free_vip = 0;
 
-    @ApiModelProperty(value = "乐理课", required = false)
+    @ApiModelProperty(value = "小组课", required = false)
     private Integer music_theory = 0;
 
     private BigDecimal music_theory_price;

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ActivityUserMapperSumDto.java

@@ -40,7 +40,7 @@ public class ActivityUserMapperSumDto {
     @ApiModelProperty(value = "1v7")
     private String seven;
 
-    @ApiModelProperty(value = "乐理")
+    @ApiModelProperty(value = "小组")
     private String theory;
 
     @ApiModelProperty(value = "网管")

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseReviewDto.java

@@ -92,7 +92,7 @@ public class CourseReviewDto {
     @ApiModelProperty(value = "节奏",required = false)
     private Integer tempo;
 
-    @ApiModelProperty(value = "乐理",required = false)
+    @ApiModelProperty(value = "小组",required = false)
     private Integer musicTheory;
 
     @ApiModelProperty(value = "曲目",required = false)
@@ -122,7 +122,7 @@ public class CourseReviewDto {
     @ApiModelProperty(value = "节奏Str",required = false)
     private String tempoStr;
 
-    @ApiModelProperty(value = "乐理Str",required = false)
+    @ApiModelProperty(value = "小组Str",required = false)
     private String musicTheoryStr;
 
     @ApiModelProperty(value = "作业是否回复",required = false)

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DegreePayDto.java

@@ -19,7 +19,7 @@ public class DegreePayDto {
     @ApiModelProperty(value = "报考器乐等级必须购Vip课")
     private Boolean needVipCourse = false;
 
-    @ApiModelProperty(value = "乐理等级")
+    @ApiModelProperty(value = "小组等级")
     private Integer theoryLevel;
 
     @ApiModelProperty(value = "vip 1v1")
@@ -28,7 +28,7 @@ public class DegreePayDto {
     @ApiModelProperty(value = "vip 1v2")
     private Boolean vip1v2 = false;
 
-    @ApiModelProperty(value = "乐理课程")
+    @ApiModelProperty(value = "小组课程")
     private Boolean theoryCourse = false;
 
     @ApiModelProperty(value = "支付金额", required = true)

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DoubleEleven2021ActivityDto.java

@@ -13,7 +13,7 @@ public class DoubleEleven2021ActivityDto {
     @ApiModelProperty(value = "总购买数",required = false)
     private int buyNum = 0;
 
-    @ApiModelProperty(value = "购买的活动类型1、1v1 20节,2、1v1 40节,3、1v2 20节,4、1v2 40节,5、乐理课",required = false)
+    @ApiModelProperty(value = "购买的活动类型1、1v1 20节,2、1v1 40节,3、1v2 20节,4、1v2 40节,5、小组课",required = false)
     private Integer type;
 
     private Integer organId;

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DoubleEleven2021Dto.java

@@ -49,10 +49,10 @@ public class DoubleEleven2021Dto {
     @ApiModelProperty(value = "1v2 40节课购买人数",required = false)
     private Integer vip1V240Num = 0;
 
-    @ApiModelProperty(value = "乐理课购买金额",required = false)
+    @ApiModelProperty(value = "小组课购买金额",required = false)
     private BigDecimal musicTheoryAmount = BigDecimal.ZERO;
 
-    @ApiModelProperty(value = "乐理课购买人数",required = false)
+    @ApiModelProperty(value = "小组课购买人数",required = false)
     private Integer musicTheoryNum = 0;
 
     public Integer getOrganId() {

+ 4 - 23
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/SporadicPayDto.java

@@ -1,7 +1,9 @@
 package com.ym.mec.biz.dal.dto;
 
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
+@Data
 public class SporadicPayDto extends PayParamBasicDto {
 
     @ApiModelProperty(value = "用户编号",required = false)
@@ -13,27 +15,6 @@ public class SporadicPayDto extends PayParamBasicDto {
     @ApiModelProperty(value = "购买数量",required = false)
     private Integer num = 1;
 
-    public Integer getUserId() {
-        return userId;
-    }
-
-    public void setUserId(Integer userId) {
-        this.userId = userId;
-    }
-
-    public Integer getSporadicId() {
-        return sporadicId;
-    }
-
-    public void setSporadicId(Integer sporadicId) {
-        this.sporadicId = sporadicId;
-    }
-
-    public Integer getNum() {
-        return num;
-    }
-
-    public void setNum(Integer num) {
-        this.num = num;
-    }
+    @ApiModelProperty(value = "学员分部",required = false)
+    private Integer organId;
 }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java

@@ -64,8 +64,8 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrderRouteDto {
     @ApiModelProperty(value = "网管课程费用",required = true)
     private BigDecimal practiceCourseFee = BigDecimal.ZERO;
 
-    //乐理课程费用
-    @ApiModelProperty(value = "乐理课程费用",required = true)
+    //小组课程费用
+    @ApiModelProperty(value = "小组课程费用",required = true)
     private BigDecimal theoryCourseFee = BigDecimal.ZERO;
 
     //考级费用

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleEvaluate.java

@@ -54,7 +54,7 @@ public class CourseScheduleEvaluate extends BaseEntity {
 
     private String month;
 
-    @ApiModelProperty(value = "乐理")
+    @ApiModelProperty(value = "小组")
     private String musicTheory;
 
     @ApiModelProperty(value = "乐曲")

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleReview.java

@@ -69,7 +69,7 @@ public class CourseScheduleReview extends BaseEntity {
     private Integer tempo;
 
     /**
-    * 乐理
+    * 小组
     */
     private Integer musicTheory;
 

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/OrganizationDegreeCourseFee.java

@@ -44,15 +44,15 @@ public class OrganizationDegreeCourseFee extends BaseEntity {
     private BigDecimal vip1v2;
 
     /**
-     * 乐理课原价格
+     * 小组课原价格
      */
-    @ApiModelProperty(value = "乐理课价格")
+    @ApiModelProperty(value = "小组课价格")
     private BigDecimal originalTheory;
 
     /**
-     * 乐理课价格
+     * 小组课价格
      */
-    @ApiModelProperty(value = "乐理课价格")
+    @ApiModelProperty(value = "小组课价格")
     private BigDecimal theory;
 
     /**

+ 3 - 218
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SporadicChargeInfo.java

@@ -3,8 +3,8 @@ package com.ym.mec.biz.dal.entity;
 import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.entity.BaseEntity;
-
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -12,6 +12,7 @@ import java.util.Date;
 /**
  * 对应数据库表(sporadic_charge_info):
  */
+@Data
 public class SporadicChargeInfo extends BaseEntity {
 	/**  */
 	private Integer id;
@@ -22,7 +23,7 @@ public class SporadicChargeInfo extends BaseEntity {
 	@ApiModelProperty(value = "收费类型", required = true)
 	private SporadicChargeTypeEnum chargeType;
 
-	private Integer organId;
+	private String organId;
 
 	private String organName;
 
@@ -80,220 +81,4 @@ public class SporadicChargeInfo extends BaseEntity {
 	private YesOrNoEnum openMaxTerm;
 
 	private Integer version;
-
-	public String getMusicGroupName() {
-		return musicGroupName;
-	}
-
-	public void setMusicGroupName(String musicGroupName) {
-		this.musicGroupName = musicGroupName;
-	}
-
-	public String getMusicGroupId() {
-		return musicGroupId;
-	}
-
-	public void setMusicGroupId(String musicGroupId) {
-		this.musicGroupId = musicGroupId;
-	}
-
-	public Integer getOpenFlag() {
-		return openFlag;
-	}
-
-	public void setOpenFlag(Integer openFlag) {
-		this.openFlag = openFlag;
-	}
-
-	public String getUserName() {
-		return userName;
-	}
-
-	public void setUserName(String userName) {
-		this.userName = userName;
-	}
-
-	public Integer getUserId() {
-		return userId;
-	}
-
-	public void setUserId(Integer userId) {
-		this.userId = userId;
-	}
-
-	public Integer getDelFlag() {
-		return delFlag;
-	}
-
-	public void setDelFlag(Integer delFlag) {
-		this.delFlag = delFlag;
-	}
-
-	public String getOrganName() {
-		return organName;
-	}
-
-	public void setOrganName(String organName) {
-		this.organName = organName;
-	}
-
-	public String getOperatorName() {
-		return operatorName;
-	}
-
-	public void setOperatorName(String operatorName) {
-		this.operatorName = operatorName;
-	}
-
-	public BigDecimal getBalance() {
-		return balance;
-	}
-
-	public void setBalance(BigDecimal balance) {
-		this.balance = balance;
-	}
-
-	public Integer getId() {
-		return id;
-	}
-
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	public String getTitle() {
-		return title;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	public SporadicChargeTypeEnum getChargeType() {
-		return chargeType;
-	}
-
-	public void setChargeType(SporadicChargeTypeEnum chargeType) {
-		this.chargeType = chargeType;
-	}
-
-	public Integer getOrganId() {
-		return organId;
-	}
-
-	public void setOrganId(Integer organId) {
-		this.organId = organId;
-	}
-
-	public BigDecimal getAmount() {
-		return amount;
-	}
-
-	public void setAmount(BigDecimal amount) {
-		this.amount = amount;
-	}
-
-	public String getDetail() {
-		return detail;
-	}
-
-	public void setDetail(String detail) {
-		this.detail = detail;
-	}
-
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-
-	public Integer getOperatorId() {
-		return operatorId;
-	}
-
-	public void setOperatorId(Integer operatorId) {
-		this.operatorId = operatorId;
-	}
-
-	public BigDecimal getDiscountAmount() {
-		return discountAmount;
-	}
-
-	public void setDiscountAmount(BigDecimal discountAmount) {
-		this.discountAmount = discountAmount;
-	}
-
-	public String getOpenFlagStr() {
-		return openFlagStr;
-	}
-
-	public void setOpenFlagStr(String openFlagStr) {
-		this.openFlagStr = openFlagStr;
-	}
-
-	public String getOrderType() {
-		return orderType;
-	}
-
-	public void setOrderType(String orderType) {
-		this.orderType = orderType;
-	}
-
-	public Integer getMaxNum() {
-		return maxNum;
-	}
-
-	public void setMaxNum(Integer maxNum) {
-		this.maxNum = maxNum;
-	}
-
-	public Integer getPaidNum() {
-		return paidNum;
-	}
-
-	public void setPaidNum(Integer paidNum) {
-		this.paidNum = paidNum;
-	}
-
-	public Integer getVersion() {
-		return version;
-	}
-
-	public void setVersion(Integer version) {
-		this.version = version;
-	}
-
-	public BigDecimal getMaxAmount() {
-		return maxAmount;
-	}
-
-	public void setMaxAmount(BigDecimal maxAmount) {
-		this.maxAmount = maxAmount;
-	}
-
-	public BigDecimal getPaidAmount() {
-		return paidAmount;
-	}
-
-	public void setPaidAmount(BigDecimal paidAmount) {
-		this.paidAmount = paidAmount;
-	}
-
-	public YesOrNoEnum getOpenMaxTerm() {
-		return openMaxTerm;
-	}
-
-	public void setOpenMaxTerm(YesOrNoEnum openMaxTerm) {
-		this.openMaxTerm = openMaxTerm;
-	}
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroupCategory.java

@@ -43,7 +43,7 @@ public class VipGroupCategory extends BaseEntity {
 	@ApiModelProperty(value = "线下课单价",required = false)
 	private BigDecimal offlineClassesUnitPrice;
 
-	@ApiModelProperty(value = "是否乐理课")
+	@ApiModelProperty(value = "是否小组课")
 	private Boolean musicTheory = false;
 
 	@ApiModelProperty("购买单价id")

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ActivityCourseType.java

@@ -10,7 +10,7 @@ public enum ActivityCourseType implements BaseEnum<String, ComplaintsStatusEnum>
     FREE_VIP("free_vip", "考级活动赠送课"),
     VIP1("vip1", "考级活动1v1VIP课"),
     VIP2("vip2", "考级活动1v2VIP课"),
-    MUSIC_THEORY("music_theory", "考级活动乐理课");
+    MUSIC_THEORY("music_theory", "考级活动小组课");
 
     private String code;
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportEnum.java

@@ -71,7 +71,7 @@ public enum ExportEnum implements BaseEnum<String, ExportEnum> {
     STUDENT_INSTRUMENT("STUDENT_INSTRUMENT", "乐保导出"),
     EXPORT_BILL("EXPORT_BILL", "对账单导出"),
     STUDENT_VIP_COURSE_INFO("STUDENT_VIP_COURSE_INFO", "VIP课学员课程信息导出"),
-    STUDENT_MUSIC_THEORY_COURSE_INFO("STUDENT_MUSIC_THEORY_COURSE_INFO", "乐理课学员课程信息导出"),
+    STUDENT_MUSIC_THEORY_COURSE_INFO("STUDENT_MUSIC_THEORY_COURSE_INFO", "小组课学员课程信息导出"),
     VIP_STUDENT_COURSE_MANAGE("VIP_STUDENT_COURSE_MANAGE", "vip学员课程管理"),
     EXERCISES_SITUATION("EXERCISES_SITUATION", "服务指标导出"),
     EXPORT_STUDENT_SUBCOURSE("EXPORT_STUDENT_SUBCOURSE", "活动资格导出"),

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportTypeEnum.java

@@ -7,7 +7,7 @@ public enum ExportTypeEnum implements BaseEnum<Integer, ExportTypeEnum> {
 	COURSE_SCHEDULE(1, "课表列表"),
 	ROUTE_ORDER(2, "财务管理"),
 	STUDENT_VIP_PRACTICE(3, "VIP网管课耗导出"),
-	STUDENT_MUSIC_THEORY_COURSE_INFO(4, "乐理课学员课程导出"),
+	STUDENT_MUSIC_THEORY_COURSE_INFO(4, "小组课学员课程导出"),
 	STUDENT_VIP_COURSE_INFO(5, "VIP课学员课程信息导出"),
 	VIP_STUDENT_COURSE_MANAGE(6, "vip学员课程管理"),
 	STUDENT_SMALL_CLASS_STATISTICS(7, "学员小课数据统计"),

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexDataType.java

@@ -97,7 +97,7 @@ public enum IndexDataType implements BaseEnum<String, IndexDataType> {
 
     //小课数据统计
     STUDENT_VIP_ORDER_NUM("STUDENT_VIP_ORDER_NUM", "学员vip课订单数量", false, false),
-    STUDENT_THEORY_ORDER_NUM("STUDENT_THEORY_ORDER_NUM", "学员乐理课订单数量", false, false),
+    STUDENT_THEORY_ORDER_NUM("STUDENT_THEORY_ORDER_NUM", "学员小组课订单数量", false, false),
     STUDENT_PRACTICE_ORDER_NUM("STUDENT_PRACTICE_ORDER_NUM", "学员网管课订单数量", false, false),
     ;
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/OrderDetailTypeEnum.java

@@ -30,7 +30,7 @@ public enum OrderDetailTypeEnum implements BaseEnum<String, OrderDetailTypeEnum>
     MAINTENANCE("MAINTENANCE","乐保服务"),
     CLOUD_TEACHER("CLOUD_TEACHER","云教练"),
     CLOUD_TEACHER_PLUS("CLOUD_TEACHER_PLUS","云教练"),
-    THEORY_COURSE("THEORY_COURSE", "乐理课"),
+    THEORY_COURSE("THEORY_COURSE", "小组课"),
     REPAIR("REPAIR", "乐器维修"),
     ORGAN_SHARE_PROFIT("ORGAN_SHARE_PROFIT", "分部分润");
 

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/SporadicChargeTypeEnum.java

@@ -17,7 +17,8 @@ public enum SporadicChargeTypeEnum implements BaseEnum<Integer, SporadicChargeTy
     DOUBLE_ELEVEN2020(12,"2020双十一活动"),
     HIGH_ONLINE_ACTIVITY(13,"网基课活动"),
     PRACTICE_GROUP_BUY(14,"加油包"),
-    CLOUD_TEACHER_BUY(15,"系统购买");
+    CLOUD_TEACHER_BUY(15,"系统购买"),
+    DOUBLE_ELEVEN2023(16,"2023双十一活动");
 
     private Integer code;
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/page/DoubleEleven2021QueryInfo.java

@@ -13,7 +13,7 @@ public class DoubleEleven2021QueryInfo extends QueryInfo {
 
     private String organId;
 
-    @ApiModelProperty(value = "购买的活动类型1、1v1 20节,2、1v1 40节,3、1v2 20节,4、1v2 40节,5、乐理课",required = false)
+    @ApiModelProperty(value = "购买的活动类型1、1v1 20节,2、1v1 40节,3、1v2 20节,4、1v2 40节,5、小组课",required = false)
     private Integer type;
 
     private Date startTime;

+ 2 - 40
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SporadicChargeInfoQueryInfo.java

@@ -3,7 +3,9 @@ package com.ym.mec.biz.dal.page;
 import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
+@Data
 public class SporadicChargeInfoQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "分部编号",required = false)
@@ -19,44 +21,4 @@ public class SporadicChargeInfoQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "是否关闭", required = true)
     private Integer openFlag;
-
-    public Integer getOpenFlag() {
-        return openFlag;
-    }
-
-    public void setOpenFlag(Integer openFlag) {
-        this.openFlag = openFlag;
-    }
-
-    public boolean getIsExport() {
-        return isExport;
-    }
-
-    public void setIsExport(boolean export) {
-        isExport = export;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getOrganId() {
-        return organId;
-    }
-
-    public void setOrganId(String organId) {
-        this.organId = organId;
-    }
-
-    public SporadicChargeTypeEnum getChargeType() {
-        return chargeType;
-    }
-
-    public void setChargeType(SporadicChargeTypeEnum chargeType) {
-        this.chargeType = chargeType;
-    }
 }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/SporadicChargeInfoService.java

@@ -33,7 +33,7 @@ public interface SporadicChargeInfoService extends BaseService<Integer, Sporadic
      */
     SporadicChargeInfo getDetail(Integer id);
 
-    SporadicChargeInfo findByOrganIdAndType(Integer organId, Integer type);
+    SporadicChargeInfo findByOrganIdAndType(String organId, Integer type);
 
     /**
      * 开启/关闭缴费
@@ -68,7 +68,7 @@ public interface SporadicChargeInfoService extends BaseService<Integer, Sporadic
      * @param type
      * @return
      */
-    List<SporadicChargeInfo> getOrganActiveInfo(Integer organId, Integer type);
+    List<SporadicChargeInfo> getOrganActiveInfo(String organId, Integer type);
 
     List<SporadicChargeInfo> findByIds(String sporadicIds);
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ActivityUserMapperServiceImpl.java

@@ -503,7 +503,7 @@ public class ActivityUserMapperServiceImpl extends BaseServiceImpl<Integer, Acti
 			className.append(StringUtils.join(bySubIds, ","));
 			className.append(vipGroupCategory.getName());
 		} else {
-			className.append("乐理课•");
+			className.append("小组课•");
 		}
 		className.append(StringUtils.join(studentNames, ","));
 		applyBaseInfo.setName(className.toString());

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -2107,7 +2107,7 @@ public class ExportServiceImpl implements ExportService {
                             row.setVipCourseFee(typeFee);
                         } else if (feeTypeStr.contains("网管课")) {
                             row.setPracticeCourseFee(typeFee);
-                        } else if (feeTypeStr.contains("乐理课")) {
+                        } else if (feeTypeStr.contains("小组课")) {
                             row.setTheoryCourseFee(typeFee);
                         }
                     }
@@ -2459,7 +2459,7 @@ public class ExportServiceImpl implements ExportService {
                                 row.setVipCourseFee(typeFee);
                             } else if (feeTypeStr.contains("网管课")) {
                                 row.setPracticeCourseFee(typeFee);
-                            } else if (feeTypeStr.contains("乐理课")) {
+                            } else if (feeTypeStr.contains("小组课")) {
                                 row.setTheoryCourseFee(typeFee);
                             }
                         }

+ 7 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -890,7 +890,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         if (sporadicPayDto.getNum() == null) {
             sporadicPayDto.setNum(1);
         }
-        BigDecimal amount = chargeInfo.getAmount().multiply(new BigDecimal(sporadicPayDto.getNum()));
+		Integer organId = sporadicPayDto.getOrganId();
+		BigDecimal amount = chargeInfo.getAmount().multiply(new BigDecimal(sporadicPayDto.getNum()));
         if (chargeInfo.getDiscountAmount() != null && chargeInfo.getDiscountAmount().compareTo(BigDecimal.ZERO) > 0) {
             amount = amount.subtract(chargeInfo.getDiscountAmount().multiply(new BigDecimal(sporadicPayDto.getNum())));
         }
@@ -954,14 +955,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
 
         studentPaymentOrder.setPaymentChannel("BALANCE");
-        studentPaymentOrder.setOrganId(chargeInfo.getOrganId());
-        studentPaymentOrder.setRoutingOrganId(chargeInfo.getOrganId());
+        studentPaymentOrder.setOrganId(organId);
+        studentPaymentOrder.setRoutingOrganId(organId);
         studentPaymentOrder.setUpdateTime(date);
         studentPaymentOrderService.update(studentPaymentOrder);
         studentPaymentOrder.setVersion(studentPaymentOrder.getVersion() + 1);
 
         if (amount.compareTo(BigDecimal.ZERO) == 0) {
-            studentPaymentRouteOrderService.addRouteOrder(orderNo, chargeInfo.getOrganId(), balance);
+            studentPaymentRouteOrderService.addRouteOrder(orderNo, organId, balance);
             Map<String, String> notifyMap = new HashMap<>();
             notifyMap.put("tradeState", "1");
             notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
@@ -989,10 +990,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
                 chargeInfo.getTitle(),
                 chargeInfo.getTitle(),
-                chargeInfo.getOrganId(),
+				organId,
                 receiver
         );
-        studentPaymentOrder.setOrganId(chargeInfo.getOrganId());
+        studentPaymentOrder.setOrganId(organId);
         studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
         studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
         studentPaymentOrder.setUpdateTime(date);

+ 15 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SporadicChargeInfoImpl.java

@@ -49,7 +49,6 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
     private SysUserCashAccountDetailService sysUserCashAccountDetailService;
     @Autowired
     private DegreeRegistrationService degreeRegistrationService;
-
     @Lazy
     @Autowired
     private ContractService contractService;
@@ -188,20 +187,29 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
         PageInfo<SporadicChargeInfo> pageInfo = queryPage(queryInfo);
         List<SporadicChargeInfo> rows = pageInfo.getRows();
         if (rows != null && rows.size() > 0) {
-            if (queryInfo.getIsExport() && rows.size() > 50000) {
+            if (queryInfo.isExport() && rows.size() > 50000) {
                 throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
             }
-            Set<Integer> organIds = rows.stream().map(e -> e.getOrganId()).collect(Collectors.toSet());
+            String organIds = rows.stream().map(e -> e.getOrganId()).collect(Collectors.joining(","));
             List<Integer> userIds = rows.stream().map(e -> e.getUserId()).collect(Collectors.toList());
             if (userIds == null) {
                 userIds = new ArrayList<>();
             }
             Set<Integer> operatorIds = rows.stream().map(e -> e.getOperatorId()).collect(Collectors.toSet());
-            Map<Integer, String> organNames = MapUtil.convertMybatisMap(organizationDao.findOrganNameMapList(organIds));
+            Map<Integer, String> organNames = MapUtil.convertMybatisMap(organizationDao.findOrganNameMap(organIds));
             Map<Integer, String> operatorNames = MapUtil.convertMybatisMap(teacherDao.queryNameByIds(StringUtils.join(operatorIds, ",")));
             Map<Integer, String> userNames = MapUtil.convertMybatisMap(teacherDao.queryUsernameByIds(userIds));
             rows.forEach(e -> {
-                e.setOrganName(organNames.get(e.getOrganId()));
+                for (String organId : e.getOrganId().split(",")) {
+                    StringBuffer sb = new StringBuffer();
+                    if (organNames.containsKey(Integer.parseInt(organId))) {
+                        if(sb.length() > 0){
+                            sb.append(",");
+                        }
+                        sb.append(organNames.get(Integer.parseInt(organId)));
+                    }
+                    e.setOrganName(sb.toString());
+                }
                 if (e.getUserId() != null) {
                     e.setUserName(userNames.get(e.getUserId()));
                 }
@@ -222,7 +230,7 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
     }
 
     @Override
-    public SporadicChargeInfo findByOrganIdAndType(Integer organId, Integer type) {
+    public SporadicChargeInfo findByOrganIdAndType(String organId, Integer type) {
         return sporadicChargeInfoDao.findByOrganIdAndType(organId, type);
     }
 
@@ -270,7 +278,7 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
     }
 
     @Override
-    public List<SporadicChargeInfo> getOrganActiveInfo(Integer organId, Integer type) {
+    public List<SporadicChargeInfo> getOrganActiveInfo(String organId, Integer type) {
         return sporadicChargeInfoDao.getOrganActiveInfo(organId, type);
     }
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -2033,7 +2033,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
                                         row.setVipCourseFee(typeFee);
                                     } else if (feeTypeStr.contains("网管课")) {
                                         row.setPracticeCourseFee(typeFee);
-                                    } else if (feeTypeStr.contains("乐理课")) {
+                                    } else if (feeTypeStr.contains("小组课")) {
                                         row.setTheoryCourseFee(typeFee);
                                     }
                                 }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java

@@ -778,7 +778,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 			if(StringUtils.isEmpty(activity.getVipGroupCategoryIdList())){
 				activity.setActivityTypeEnum("PRACTICE");
 			}else {
-				if(StringUtils.equals(activity.getVipGroupCategoryNames(),"乐理课")){
+				if(StringUtils.equals(activity.getVipGroupCategoryNames(),"小组课")){
 					activity.setActivityTypeEnum("THEORY");
 				}else{
 					activity.setActivityTypeEnum(activity.getVipGroupCategoryNames());
@@ -788,7 +788,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 		String giveCourseType = activity.getGiveCourseType();
 		if(StringUtils.isNotEmpty(giveCourseType)){
 			if(StringUtils.equals(giveCourseType,"VIP")){
-				if(StringUtils.equals(activity.getGiveCategoryName(),"乐理课")){
+				if(StringUtils.equals(activity.getGiveCategoryName(),"小组课")){
 					activity.setGiveCourseType("THEORY");
 				}
 			}

+ 133 - 39
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -613,7 +613,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             className.append(StringUtils.join(bySubIds, ","));
             className.append(vipGroupCategory.getName());
         } else {
-            className.append("乐理课•");
+            className.append("小组课•");
         }
         className.append(StringUtils.join(studentNames, ","));
         vipGroupApplyBaseInfoDto.setName(className.toString());
@@ -734,6 +734,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         courseScheduleService.checkNewCourseSchedules(courseSchedules, false, false);
         vipGroupApplyBaseInfoDto.setCourseSchedulesJson(JSON.toJSONString(courseSchedules));
         vipGroupDao.update(vipGroupApplyBaseInfoDto);
+        //如果创建的是直播课,生成课程以及老师关联、群聊等信息
+        if(StringUtils.equals(vipGroupApplyBaseInfoDto.getGroupType(),"LIVE")){
+            this.liveProgress(vipGroupApplyBaseInfoDto,classGroup);
+        }
         return BaseController.succeed(vipGroupApplyBaseInfoDto.getAuditStatus().getCode());
     }
 
@@ -966,7 +970,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             className.append(StringUtils.join(bySubIds, ","));
             className.append(vipGroupCategory.getName());
         } else {
-            className.append("乐理课•");
+            className.append("小组课•");
         }
         className.append(StringUtils.join(studentNames, ","));
         vipGroupApplyBaseInfoDto.setName(className.toString());
@@ -1293,7 +1297,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             className.append(StringUtils.join(bySubIds, ","));
             className.append(vipGroupCategory.getName());
         } else {
-            className.append("乐理课•");
+            className.append("小组课•");
         }
         className.append(StringUtils.join(studentNames, ","));
         vipGroupApplyBaseInfoDto.setName(className.toString());
@@ -2949,6 +2953,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                     String organIdsString = StringUtils.join(hashSet, ",");
                     vipGroup.setOrganIdList(organIdsString);
                     vipGroupDao.update(vipGroup);
+                }else {
+                    this.liveProgress(vipGroup,classGroup,order);
                 }
                 SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(userId);
                 //插入缴费明细
@@ -4586,15 +4592,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         }
     }
 
-    private void liveProgress(VipGroup vipGroup,ClassGroup classGroup,List<ClassGroupStudentMapper> classGroupStudents){
-        vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
+    private void liveProgress(VipGroup vipGroup,ClassGroup classGroup){
         Integer tenantId = vipGroup.getTenantId();
-        classGroup.setDelFlag(0);
-        VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = vipGroupDefaultClassesUnitPriceDao.getByVipGroupCategory(vipGroup.getVipGroupCategoryId(),
-                null, vipGroup.getGroupType(),tenantId);
         //生成课表
         List<CourseSchedule> courseSchedules = JSON.parseArray(vipGroup.getCourseSchedulesJson(), CourseSchedule.class);
-        classGroup.setTotalClassTimes(courseSchedules.size());
         courseScheduleService.batchAddCourseSchedule1(courseSchedules);
         //考勤信息
         List<TeacherAttendance> teacherAttendances = new ArrayList<>();
@@ -4633,44 +4634,137 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             userRoleMap.put(vipGroup.getEducationalTeacherId(), "乐团主管");
         }
         userRoleMap.put(vipGroup.getUserId(), "指导老师");
-        //生成课程学员关联
-        List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<>();
-        List<Integer> studentIdList = classGroupStudents.stream().map(e -> e.getUserId()).collect(Collectors.toList());
-        for (ClassGroupStudentMapper classGroupStudent : classGroupStudents) {
-            StudentPaymentOrder successOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroup.getId(), classGroupStudent.getUserId(), "SUCCESS","VIP".equals(vipGroup.getGroupType())?"SMALL_CLASS_TO_BUY":"LIVE_GROUP_BUY");
-            //实际支付金额,去除优惠券
-            BigDecimal actualPrice = successOrder.getExpectAmount();
-            BigDecimal divide = actualPrice.divide(new BigDecimal(courseSchedules.size()), ROUND_DOWN);
-            BigDecimal firstAmount = actualPrice.subtract(divide.multiply(new BigDecimal(courseSchedules.size()))).add(divide);
-            for (int i = 0; i < courseSchedules.size(); i++) {
-                CourseSchedule courseSchedule = courseSchedules.get(i);
-                CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
-                courseScheduleStudentPayment.setUserId(classGroupStudent.getUserId());
-                courseScheduleStudentPayment.setGroupType(courseSchedule.getGroupType());
-                courseScheduleStudentPayment.setMusicGroupId(courseSchedule.getMusicGroupId());
-                courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
-                courseScheduleStudentPayment.setClassGroupId(courseSchedule.getClassGroupId());
-                if (i == 0) {
-                    courseScheduleStudentPayment.setExpectPrice(firstAmount);
-                } else {
-                    courseScheduleStudentPayment.setExpectPrice(divide);
+        imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
+        imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
+    }
+
+    private void liveProgress(VipGroup vipGroup,ClassGroup classGroup,List<ClassGroupStudentMapper> classGroupStudents){
+        vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
+        Integer tenantId = vipGroup.getTenantId();
+        classGroup.setDelFlag(0);
+        List<CourseSchedule> courseSchedules = courseScheduleDao.getClassGroupCourses(classGroup.getId().longValue());
+        //兼容历史逻辑,原有的直播课只有课程组变更状态时才生成课程
+        if(CollectionUtils.isEmpty(courseSchedules)){
+            //生成课表
+            courseSchedules = JSON.parseArray(vipGroup.getCourseSchedulesJson(), CourseSchedule.class);
+            VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = vipGroupDefaultClassesUnitPriceDao.getByVipGroupCategory(vipGroup.getVipGroupCategoryId(),
+                    null, vipGroup.getGroupType(),tenantId);
+            courseScheduleService.batchAddCourseSchedule1(courseSchedules);
+            //考勤信息
+            List<TeacherAttendance> teacherAttendances = new ArrayList<>();
+            //创建课酬信息
+            List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = new ArrayList<>();
+            Map<String, BigDecimal> stringBigDecimalMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId());
+            for (CourseSchedule courseSchedule : courseSchedules) {
+                //创建教师课程薪水记录
+                CourseScheduleTeacherSalary courseScheduleTeacherSalary = new CourseScheduleTeacherSalary();
+                courseScheduleTeacherSalary.setCourseScheduleId(courseSchedule.getId());
+                courseScheduleTeacherSalary.setGroupType(courseSchedule.getGroupType());
+                courseScheduleTeacherSalary.setMusicGroupId(courseSchedule.getMusicGroupId());
+                courseScheduleTeacherSalary.setTeacherRole(TeachTypeEnum.BISHOP);
+                courseScheduleTeacherSalary.setUserId(courseSchedule.getActualTeacherId().intValue());
+                courseScheduleTeacherSalary.setClassGroupId(courseSchedule.getClassGroupId());
+                courseScheduleTeacherSalary.setExpectSalary(stringBigDecimalMap.get("offlineTeacherSalary"));
+                courseScheduleTeacherSalary.setActualSalary(null);
+                courseScheduleTeacherSalary.setTenantId(tenantId);
+                courseScheduleTeacherSalaries.add(courseScheduleTeacherSalary);
+
+                TeacherAttendance teacherAttendance = new TeacherAttendance();
+                teacherAttendance.setGroupType(courseSchedule.getGroupType());
+                teacherAttendance.setClassGroupId(courseSchedule.getClassGroupId());
+                teacherAttendance.setMusicGroupId(courseSchedule.getMusicGroupId());
+                teacherAttendance.setTeacherId(courseSchedule.getActualTeacherId());
+                teacherAttendance.setCourseScheduleId(courseSchedule.getId());
+                teacherAttendance.setTenantId(tenantId);
+                teacherAttendances.add(teacherAttendance);
+            }
+            courseScheduleTeacherSalaryDao.batchInsert(courseScheduleTeacherSalaries);
+            teacherAttendanceDao.batchInsert(teacherAttendances);
+
+            //群聊数据
+            Map<Integer, String> userRoleMap = new HashMap<Integer, String>(5);
+            if (Objects.nonNull(vipGroup.getEducationalTeacherId())) {
+                userRoleMap.put(vipGroup.getEducationalTeacherId(), "乐团主管");
+            }
+            userRoleMap.put(vipGroup.getUserId(), "指导老师");
+            //生成课程学员关联
+            List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<>();
+            List<Integer> studentIdList = classGroupStudents.stream().map(e -> e.getUserId()).collect(Collectors.toList());
+            for (ClassGroupStudentMapper classGroupStudent : classGroupStudents) {
+                StudentPaymentOrder successOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroup.getId(), classGroupStudent.getUserId(), "SUCCESS","VIP".equals(vipGroup.getGroupType())?"SMALL_CLASS_TO_BUY":"LIVE_GROUP_BUY");
+                //实际支付金额,去除优惠券
+                BigDecimal actualPrice = successOrder.getExpectAmount();
+                BigDecimal divide = actualPrice.divide(new BigDecimal(courseSchedules.size()), ROUND_DOWN);
+                BigDecimal firstAmount = actualPrice.subtract(divide.multiply(new BigDecimal(courseSchedules.size()))).add(divide);
+                for (int i = 0; i < courseSchedules.size(); i++) {
+                    CourseSchedule courseSchedule = courseSchedules.get(i);
+                    CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
+                    courseScheduleStudentPayment.setUserId(classGroupStudent.getUserId());
+                    courseScheduleStudentPayment.setGroupType(courseSchedule.getGroupType());
+                    courseScheduleStudentPayment.setMusicGroupId(courseSchedule.getMusicGroupId());
+                    courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
+                    courseScheduleStudentPayment.setClassGroupId(courseSchedule.getClassGroupId());
+                    if (i == 0) {
+                        courseScheduleStudentPayment.setExpectPrice(firstAmount);
+                    } else {
+                        courseScheduleStudentPayment.setExpectPrice(divide);
+                    }
+                    courseScheduleStudentPayment.setOriginalPrice(vipGroupDefaultClassesUnitPrice.getOfflineClassesUnitPrice());
+                    courseScheduleStudentPayment.setActualPrice(courseScheduleStudentPayment.getExpectPrice());
+                    courseScheduleStudentPayments.add(courseScheduleStudentPayment);
                 }
-                courseScheduleStudentPayment.setOriginalPrice(vipGroupDefaultClassesUnitPrice.getOfflineClassesUnitPrice());
-                courseScheduleStudentPayment.setActualPrice(courseScheduleStudentPayment.getExpectPrice());
-                courseScheduleStudentPayments.add(courseScheduleStudentPayment);
+                userRoleMap.put(classGroupStudent.getUserId(), null);
             }
-            userRoleMap.put(classGroupStudent.getUserId(), null);
-        }
-        studentDao.updateStudentServiceTag(null, studentIdList, YesOrNoEnum.YES.getCode());
+            studentDao.updateStudentServiceTag(null, studentIdList, YesOrNoEnum.YES.getCode());
 
-        courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
+            courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
 
+            imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
+            imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
+        }
         imGroupService.create(classGroup.getId().toString(), null, classGroup.getName(), classGroup.getName(),
                 vipGroup.getName(), null, "https://gyt.ks3-cn-beijing.ksyuncs.com/icon_live_class_group_avatar.png",
                 vipGroup.getGroupType(), ImGroup.GroupTypeEnum.valueOf(vipGroup.getGroupType()));
+        classGroup.setTotalClassTimes(courseSchedules.size());
+        classGroupDao.update(classGroup);
+    }
+
+    private void liveProgress(VipGroup vipGroup,ClassGroup classGroup,StudentPaymentOrder studentPaymentOrder){
+        List<CourseSchedule> courseSchedules = courseScheduleDao.getClassGroupCourses(classGroup.getId().longValue());
+        VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = vipGroupDefaultClassesUnitPriceDao.getByVipGroupCategory(vipGroup.getVipGroupCategoryId(),
+                null, vipGroup.getGroupType(),vipGroup.getTenantId());
+        //群聊数据
+        Map<Integer, String> userRoleMap = new HashMap<Integer, String>(1);
+        //生成课程学员关联
+        List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<>();
+        //实际支付金额,去除优惠券
+        BigDecimal actualPrice = studentPaymentOrder.getExpectAmount();
+        BigDecimal divide = actualPrice.divide(new BigDecimal(courseSchedules.size()), ROUND_DOWN);
+        BigDecimal firstAmount = actualPrice.subtract(divide.multiply(new BigDecimal(courseSchedules.size()))).add(divide);
+        for (int i = 0; i < courseSchedules.size(); i++) {
+            CourseSchedule courseSchedule = courseSchedules.get(i);
+            CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
+            courseScheduleStudentPayment.setUserId(studentPaymentOrder.getUserId());
+            courseScheduleStudentPayment.setGroupType(courseSchedule.getGroupType());
+            courseScheduleStudentPayment.setMusicGroupId(courseSchedule.getMusicGroupId());
+            courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
+            courseScheduleStudentPayment.setClassGroupId(courseSchedule.getClassGroupId());
+            if (i == 0) {
+                courseScheduleStudentPayment.setExpectPrice(firstAmount);
+            } else {
+                courseScheduleStudentPayment.setExpectPrice(divide);
+            }
+            courseScheduleStudentPayment.setOriginalPrice(vipGroupDefaultClassesUnitPrice.getOfflineClassesUnitPrice());
+            courseScheduleStudentPayment.setActualPrice(courseScheduleStudentPayment.getExpectPrice());
+            courseScheduleStudentPayments.add(courseScheduleStudentPayment);
+        }
+        userRoleMap.put(studentPaymentOrder.getUserId(), null);
+        studentDao.updateStudentServiceTag(studentPaymentOrder.getUserId(), null, YesOrNoEnum.YES.getCode());
+
+        courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
+
         imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
         imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
-        classGroupDao.update(classGroup);
     }
 
 
@@ -4860,7 +4954,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         String subjectId = imLiveBroadcastRoomDto.getSubjectId();
         baseInfoDto.setSubjectIdList(subjectId);
         if ("-1".equals(subjectId)) {
-            baseInfoDto.setSubjectName("乐理");
+            baseInfoDto.setSubjectName("小组");
         } else {
             baseInfoDto.setSubjectName(subjectDao.findNames(subjectId));
         }

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/ActivityUserMapperMapper.xml

@@ -697,7 +697,7 @@
 		CONCAT(SUM(CASE WHEN vgc.name_ = '1v5' THEN aum.total_course_num_ - aum.sub_course_num_ ELSE 0 END) ,'/',SUM(CASE WHEN vgc.name_ = '1v5' THEN aum.total_course_num_ ELSE 0 END)) 'five',
 		CONCAT(SUM(CASE WHEN vgc.name_ = '1v6' THEN aum.total_course_num_ - aum.sub_course_num_ ELSE 0 END) ,'/',SUM(CASE WHEN vgc.name_ = '1v6' THEN aum.total_course_num_ ELSE 0 END)) 'six',
 		CONCAT(SUM(CASE WHEN vgc.name_ = '1v7' THEN aum.total_course_num_ - aum.sub_course_num_ ELSE 0 END) ,'/',SUM(CASE WHEN vgc.name_ = '1v7' THEN aum.total_course_num_ ELSE 0 END)) 'seven',
-		CONCAT(SUM(CASE WHEN vgc.name_ = '乐理课' THEN aum.total_course_num_ - aum.sub_course_num_ ELSE 0 END) ,'/',SUM(CASE WHEN vgc.name_ = '乐理课' THEN aum.total_course_num_ ELSE 0 END)) 'theory',
+		CONCAT(SUM(CASE WHEN vgc.name_ = '小组课' THEN aum.total_course_num_ - aum.sub_course_num_ ELSE 0 END) ,'/',SUM(CASE WHEN vgc.name_ = '乐理课' THEN aum.total_course_num_ ELSE 0 END)) 'theory',
 		CONCAT(SUM(CASE WHEN vgc.name_ IS NULL THEN aum.total_course_num_ - aum.sub_course_num_ ELSE 0 END) ,'/',SUM(CASE WHEN vgc.name_ IS NULL THEN aum.total_course_num_ ELSE 0 END)) 'practice'
 		from (select aum.user_id_,aum.category_id_,aum.sub_course_num_,aum.total_course_num_
 		from activity_user_mapper aum

+ 4 - 4
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -2057,8 +2057,8 @@
 		LEFT JOIN vip_group_category vgc2 ON vgc2.id_ = vga1.vip_group_category_id_list_
 		WHERE (spo.group_type_ = 'SPORADIC' AND spo.type_ = 'DEGREE_REGISTRATION' AND spod.type_ = 'DEGREE_REGISTRATION')
 		OR (spo.group_type_ = 'SPORADIC' AND spo.type_ = 'DOUBLE_ELEVEN2020') OR (spo.group_type_ = 'DEGREE' AND spod.type_ = 'VIP')
-		OR (spo.type_ = 'SMALL_CLASS_TO_BUY' AND vgc1.name_ != '乐理课') OR (spo.group_type_ = 'MUSIC' AND spod.type_ = 'VIP' AND vgc2.name_ != '乐理课')
-		OR (spo.type_ = 'DOUBLE_ELEVEN2021' AND vgc.name_ != '乐理课')
+		OR (spo.type_ = 'SMALL_CLASS_TO_BUY' AND vgc1.name_ != '小组课') OR (spo.group_type_ = 'MUSIC' AND spod.type_ = 'VIP' AND vgc2.name_ != '小组课')
+		OR (spo.type_ = 'DOUBLE_ELEVEN2021' AND vgc.name_ != '小组课')
 		GROUP BY spo.user_id_,spo.create_time_,spo.organ_id_;
 	</select>
 	<select id="getStudentTheoryOrderNum" resultMap="IndexBaseMonthData">
@@ -2077,8 +2077,8 @@
 				 LEFT JOIN vip_group_activity vga1 ON vga1.id_ = mgpca.activity_id_
 				 LEFT JOIN vip_group_category vgc2 ON vgc2.id_ = vga1.vip_group_category_id_list_
 		WHERE (spo.group_type_ = 'DEGREE' AND spod.type_ = 'THEORY_COURSE')
-		   OR (spo.type_ = 'SMALL_CLASS_TO_BUY' AND vgc1.name_ = '乐理课') OR (spo.group_type_ = 'MUSIC' AND spod.type_ = 'VIP' AND vgc2.name_ = '乐理课')
-		   OR (spo.type_ = 'DOUBLE_ELEVEN2021' AND vgc.name_ = '乐理课')
+		   OR (spo.type_ = 'SMALL_CLASS_TO_BUY' AND vgc1.name_ = '小组课') OR (spo.group_type_ = 'MUSIC' AND spod.type_ = 'VIP' AND vgc2.name_ = '小组课')
+		   OR (spo.type_ = 'DOUBLE_ELEVEN2021' AND vgc.name_ = '小组课')
 		GROUP BY spo.user_id_,spo.create_time_,spo.organ_id_;
 	</select>
 	<select id="getStudentPracticeOrderNum" resultMap="IndexBaseMonthData">

+ 10 - 6
mec-biz/src/main/resources/config/mybatis/SporadicChargeInfo.xml

@@ -130,8 +130,8 @@
     <sql id="queryPageSql">
         <where>
             sci.del_flag_ != 1 and sci.tenant_id_ = #{tenantId}
-            <if test="organId != null">
-                AND FIND_IN_SET(sci.organ_id_,#{organId})
+            <if test="organId != null and organId != ''">
+                AND INTE_ARRAY(sci.organ_id_,#{organId})
             </if>
             <if test="chargeType != null">
                 AND sci.charge_type_ = #{chargeType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
@@ -166,15 +166,19 @@
     <select id="findByOrganIdAndType" resultMap="SporadicChargeInfo">
         SELECT *
         FROM sporadic_charge_info
-        where organ_id_ = #{organId}
-          AND charge_type_ = #{chargeType}
+        where charge_type_ = #{chargeType}
+          <if test="organId != null and organId != ''">
+            AND organ_id_ = #{organId}
+          </if>
           AND del_flag_ = 0
     </select>
     <select id="getOrganActiveInfo" resultMap="SporadicChargeInfo">
         SELECT *
         FROM sporadic_charge_info
-        where organ_id_ = #{organId}
-          AND charge_type_ = #{chargeType}
+        where charge_type_ = #{chargeType}
+        <if test="organId != null and organId != ''">
+            AND organ_id_ = #{organId}
+        </if>
           AND del_flag_ = 0
     </select>
 

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentStatisticsMapper.xml

@@ -460,7 +460,7 @@
 			'VIP课回访'
 		</if>
 		<if test="groupType == 'THEORY'">
-			'乐理课回访'
+			'小组课回访'
 		</if>
 		<if test="groupType == 'PRACTICE'">
 			'网管课回访'

+ 0 - 120
mec-education/pom.xml

@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.ym</groupId>
-		<artifactId>mec</artifactId>
-		<version>1.0</version>
-	</parent>
-	<artifactId>mec-education</artifactId>
-	<name>mec-education</name>
-	<url>http://maven.apache.org</url>
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>org.springframework.cloud</groupId>
-			<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.cloud</groupId>
-			<artifactId>spring-cloud-starter-security</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.cloud</groupId>
-			<artifactId>spring-cloud-sleuth-zipkin</artifactId>
-		</dependency>
-
-		<!-- swagger-spring-boot -->
-		<dependency>
-			<groupId>com.spring4all</groupId>
-			<artifactId>swagger-spring-boot-starter</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>druid-spring-boot-starter</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>com.baomidou</groupId>
-			<artifactId>mybatis-plus-boot-starter</artifactId>
-			<version>3.1.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.projectlombok</groupId>
-			<artifactId>lombok</artifactId>
-			<version>1.18.4</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.baomidou</groupId>
-			<artifactId>mybatis-plus-generate</artifactId>
-			<version>2.3.3</version>
-		</dependency>
-		<!-- 模板引擎 -->
-		<dependency>
-			<groupId>org.apache.velocity</groupId>
-			<artifactId>velocity-engine-core</artifactId>
-			<version>2.0</version>
-		</dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-        </dependency>
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-test</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-test</artifactId>
-			<version>5.1.9.RELEASE</version>
-			<scope>compile</scope>
-		</dependency>
-        <dependency>
-            <groupId>javax.persistence</groupId>
-            <artifactId>javax.persistence-api</artifactId>
-        </dependency>
-		<dependency>
-			<groupId>com.ym</groupId>
-			<artifactId>common-core</artifactId>
-			<exclusions>
-				<exclusion>
-					<groupId>org.mybatis.spring.boot</groupId>
-					<artifactId>mybatis-spring-boot-starter</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-
-		<dependency>
-			<groupId>com.ym</groupId>
-			<artifactId>mec-biz</artifactId>
-		</dependency>
-
-        <dependency>
-            <groupId>com.ym</groupId>
-            <artifactId>snakerflowy</artifactId>
-        </dependency>
-
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.springframework.boot</groupId>
-				<artifactId>spring-boot-maven-plugin</artifactId>
-			</plugin>
-		</plugins>
-	</build>
-</project>

+ 0 - 37
mec-education/src/main/java/com/ym/mec/education/EducationApplication.java

@@ -1,37 +0,0 @@
-package com.ym.mec.education;
-
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.cloud.openfeign.EnableFeignClients;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.web.client.RestTemplate;
-
-import com.spring4all.swagger.EnableSwagger2Doc;
-
-@MapperScan({"com.ym.mec.education.mapper", "com.ym.mec.biz.dal.dao","com.ym.mec.biz.config.mybatis"})
-@SpringBootApplication
-@EnableDiscoveryClient
-@EnableFeignClients("com.ym.mec")
-@ComponentScan(basePackages = {"com.ym.mec", "org.snaker"})
-@Configuration
-@EnableSwagger2Doc
-@EnableAsync
-public class EducationApplication {
-
-    public static void main(String[] args) {
-        SpringApplication.run(EducationApplication.class, args);
-    }
-
-    @Bean
-    @LoadBalanced
-    public RestTemplate restTemplate() {
-        return new RestTemplate();
-    }
-
-}

+ 0 - 20
mec-education/src/main/java/com/ym/mec/education/base/BaseQuery.java

@@ -1,20 +0,0 @@
-package com.ym.mec.education.base;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import java.io.Serializable;
-
-/**
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月25日 21:50
- */
-@Data
-public class BaseQuery implements Serializable {
-
-    @ApiModelProperty(value = "起始页",required = false)
-    private Integer pageNo = 1;
-
-    @ApiModelProperty(value = "每页显示记录数",required = false)
-    private Integer pageSize = 10;
-}

+ 0 - 61
mec-education/src/main/java/com/ym/mec/education/base/BaseResponse.java

@@ -1,61 +0,0 @@
-package com.ym.mec.education.base;
-
-import com.ym.mec.education.enums.ReturnCodeEnum;
-import javax.persistence.MappedSuperclass;
-import java.io.Serializable;
-
-/**
- * @author : chengp
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月25日 17:53
- */
-@MappedSuperclass
-public class BaseResponse<T> extends Response implements Serializable {
-    protected T dataInfo;
-
-    public BaseResponse() {
-    }
-
-    public T getDataInfo() {
-        return this.dataInfo;
-    }
-
-    public void setDataInfo(final T dataInfo) {
-        this.dataInfo = dataInfo;
-    }
-
-    @Override
-    public String toString() {
-        return "BaseResponse(super=" + super.toString() + ", dataInfo=" + this.getDataInfo() + ")";
-    }
-
-    public static BaseResponse success(Object dataInfo) {
-        BaseResponse baseResponse = new BaseResponse<>();
-        baseResponse.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
-        baseResponse.setMessage(ReturnCodeEnum.CODE_200.getValue());
-        baseResponse.setDataInfo(dataInfo);
-        return baseResponse;
-    }
-
-    public static BaseResponse failParams() {
-        BaseResponse baseResponse = new BaseResponse<>();
-        baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
-        baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
-        return baseResponse;
-    }
-
-
-    public static BaseResponse errorParam(){
-        BaseResponse baseResponse = new BaseResponse();
-        baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
-        baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
-        return baseResponse;
-    }
-    public static BaseResponse noDataExists() {
-        BaseResponse baseResponse = new BaseResponse<>();
-        baseResponse.setReturnCode(ReturnCodeEnum.CODE_207.getCode());
-        baseResponse.setMessage(ReturnCodeEnum.CODE_207.getValue());
-        return baseResponse;
-    }
-}

+ 0 - 201
mec-education/src/main/java/com/ym/mec/education/base/PageResponse.java

@@ -1,201 +0,0 @@
-package com.ym.mec.education.base;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.ym.mec.education.enums.ReturnCodeEnum;
-import org.apache.commons.lang3.StringUtils;
-import org.snaker.engine.access.Page;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月25日 17:53
- */
-public class PageResponse<T> extends Response implements Serializable {
-    private static final long serialVersionUID = 1L;
-    private List<T> records;
-    private Integer total;
-    private Integer size;
-    private Integer pages;
-    private Integer current;
-    private boolean searchCount;
-    private boolean optimizeCount;
-    private String orderByField;
-    private boolean isAsc;
-
-    public PageResponse() {
-        this.records = Collections.emptyList();
-        this.size = 10;
-        this.current = 1;
-        this.searchCount = true;
-        this.optimizeCount = false;
-        this.isAsc = true;
-    }
-
-    public static PageResponse success(IPage page) {
-        PageResponse pageResponse = new PageResponse(Math.toIntExact(page.getCurrent()), Math.toIntExact(page.getSize()));
-        pageResponse.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
-        pageResponse.setMessage(ReturnCodeEnum.CODE_200.getValue());
-        pageResponse.setRecords(page.getRecords());
-        pageResponse.setTotal(Math.toIntExact(page.getTotal()));
-        return pageResponse;
-    }
-
-    public static PageResponse success(Page page) {
-        PageResponse pageResponse = new PageResponse(page.getPageNo(), page.getPageSize());
-        pageResponse.setReturnCode(ReturnCodeEnum.CODE_200.getCode());
-        pageResponse.setMessage(ReturnCodeEnum.CODE_200.getValue());
-        pageResponse.setRecords(page.getResult());
-        pageResponse.setTotal(Math.toIntExact(page.getTotalCount()));
-        return pageResponse;
-    }
-
-    public PageResponse(Integer current, Integer size) {
-        this(current, size, true);
-    }
-
-    public PageResponse(Integer current, Integer size, String orderByField) {
-        this.records = Collections.emptyList();
-        this.setOrderByField(orderByField);
-    }
-
-    public PageResponse(Integer current, Integer size, boolean searchCount) {
-        this.records = Collections.emptyList();
-        this.size = 10;
-        this.current = 1;
-        this.searchCount = true;
-        this.optimizeCount = false;
-        this.isAsc = true;
-        if (current > 1) {
-            this.current = current;
-        }
-
-        this.size = size;
-        this.searchCount = searchCount;
-    }
-
-    public List<T> getRecords() {
-        return this.records;
-    }
-
-    public void setRecords(List<T> records) {
-        this.records = records;
-    }
-
-    protected static Integer offsetCurrent(Integer current, Integer size) {
-        return current > 0 ? (current - 1) * size : 0;
-    }
-
-    public Integer getOffsetCurrent() {
-        return offsetCurrent(this.current, this.size);
-    }
-
-    public boolean hasPrevious() {
-        return this.current > 1;
-    }
-
-    public boolean hasNext() {
-        return this.current < this.pages;
-    }
-
-    public Integer getTotal() {
-        return this.total;
-    }
-
-    public void setTotal(Integer total) {
-        this.total = total;
-    }
-
-    public Integer getSize() {
-        return this.size;
-    }
-
-    public void setSize(Integer size) {
-        this.size = size;
-    }
-
-    public Integer getPages() {
-        if (this.size != null && 0 != this.size && this.total != null) {
-            this.pages = this.total / this.size;
-            if (this.total % this.size != 0) {
-                this.pages = this.pages + 1;
-            }
-
-            return this.pages;
-        } else {
-            return null;
-        }
-    }
-
-    public void setCurrent(Integer current) {
-        this.current = current;
-    }
-
-    public Integer getCurrent() {
-        return this.current;
-    }
-
-    public boolean isSearchCount() {
-        return this.searchCount;
-    }
-
-    public void setSearchCount(boolean searchCount) {
-        this.searchCount = searchCount;
-    }
-
-    public boolean isOptimizeCount() {
-        return this.optimizeCount;
-    }
-
-    public void setOptimizeCount(boolean optimizeCount) {
-        this.optimizeCount = optimizeCount;
-    }
-
-    public String getOrderByField() {
-        return this.orderByField;
-    }
-
-    public void setOrderByField(String orderByField) {
-        if (StringUtils.isNotEmpty(orderByField)) {
-            this.orderByField = orderByField;
-        }
-
-    }
-
-    public boolean isAsc() {
-        return this.isAsc;
-    }
-
-    public void setAsc(boolean isAsc) {
-        this.isAsc = isAsc;
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer pg = new StringBuffer();
-        pg.append(" Page:{ [").append(super.toString()).append("], ");
-        if (this.records != null) {
-            pg.append("records-size:").append(this.records.size());
-        } else {
-            pg.append("records is null");
-        }
-
-        return pg.append(" }").toString();
-    }
-
-    public static PageResponse errorParam(){
-        PageResponse pageResponse = new PageResponse();
-        pageResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
-        pageResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
-        return pageResponse;
-    }
-
-    public static PageResponse noDataExists() {
-        PageResponse pageResponse = new PageResponse();
-        pageResponse.setReturnCode(ReturnCodeEnum.CODE_207.getCode());
-        pageResponse.setMessage(ReturnCodeEnum.CODE_207.getValue());
-        return pageResponse;
-    }
-}

+ 0 - 100
mec-education/src/main/java/com/ym/mec/education/base/Response.java

@@ -1,100 +0,0 @@
-package com.ym.mec.education.base;
-
-/**
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月25日 17:50
- */
-import java.io.Serializable;
-
-public class Response implements Serializable {
-    protected Integer returnCode;
-    protected String message;
-    protected String chainId;
-
-    public Response() {
-    }
-
-    public Integer getReturnCode() {
-        return this.returnCode;
-    }
-
-    public String getMessage() {
-        return this.message;
-    }
-
-    public String getChainId() {
-        return this.chainId;
-    }
-
-    public void setReturnCode(final Integer returnCode) {
-        this.returnCode = returnCode;
-    }
-
-    public void setMessage(final String message) {
-        this.message = message;
-    }
-
-    public void setChainId(final String chainId) {
-        this.chainId = chainId;
-    }
-    @Override
-    public boolean equals(final Object o) {
-        if (o == this) {
-            return true;
-        } else if (!(o instanceof Response)) {
-            return false;
-        } else {
-            Response other = (Response) o;
-            if (!other.canEqual(this)) {
-                return false;
-            } else {
-                label47:
-                {
-                    Object this$returnCode = this.getReturnCode();
-                    Object other$returnCode = other.getReturnCode();
-                    if (this$returnCode == null) {
-                        if (other$returnCode == null) {
-                            break label47;
-                        }
-                    } else if (this$returnCode.equals(other$returnCode)) {
-                        break label47;
-                    }
-
-                    return false;
-                }
-
-                Object this$message = this.getMessage();
-                Object other$message = other.getMessage();
-                if (this$message == null) {
-                    if (other$message != null) {
-                        return false;
-                    }
-                } else if (!this$message.equals(other$message)) {
-                    return false;
-                }
-
-                Object this$chainId = this.getChainId();
-                Object other$chainId = other.getChainId();
-                if (this$chainId == null) {
-                    if (other$chainId != null) {
-                        return false;
-                    }
-                } else if (!this$chainId.equals(other$chainId)) {
-                    return false;
-                }
-
-                return true;
-            }
-        }
-    }
-
-    protected boolean canEqual(final Object other) {
-        return other instanceof Response;
-    }
-
-    @Override
-    public String toString() {
-        return "Response(returnCode=" + this.getReturnCode() + ", message=" + this.getMessage() + ", chainId=" + this.getChainId() + ")";
-    }
-}

+ 0 - 28
mec-education/src/main/java/com/ym/mec/education/config/ImageVerifyCodeConfig.java

@@ -1,28 +0,0 @@
-package com.ym.mec.education.config;
-
-import com.google.code.kaptcha.impl.DefaultKaptcha;
-import com.google.code.kaptcha.util.Config;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import java.util.Properties;
-
-@Configuration
-public class ImageVerifyCodeConfig {
-    @Bean(name="captchaProducer")
-    public DefaultKaptcha getKaptchaBean(){
-        DefaultKaptcha defaultKaptcha=new DefaultKaptcha();
-        Properties properties=new Properties();
-        properties.setProperty("kaptcha.border", "yes");
-        properties.setProperty("kaptcha.border.color", "105,179,90");
-        properties.setProperty("kaptcha.textproducer.font.color", "blue");
-        properties.setProperty("kaptcha.image.width", "125");
-        properties.setProperty("kaptcha.image.height", "45");
-        properties.setProperty("kaptcha.session.key", "code");
-        properties.setProperty("kaptcha.textproducer.char.length", "4");
-        properties.setProperty("kaptcha.textproducer.font.names", "宋体,楷体,微软雅黑");
-        Config config=new Config(properties);
-        defaultKaptcha.setConfig(config);
-        return defaultKaptcha;
-    }
-}

+ 0 - 22
mec-education/src/main/java/com/ym/mec/education/config/MybatisPlusConfig.java

@@ -1,22 +0,0 @@
-package com.ym.mec.education.config;
-
-import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * program: mec
- * description: mybatisplus分页插件
- * @author xw
- * create: 2019-09-25 13:26
- */
-@Configuration
-public class MybatisPlusConfig {
-
-    @Bean
-    public PaginationInterceptor paginationInterceptor(){
-        PaginationInterceptor page = new PaginationInterceptor();
-        page.setDialectType("mysql");
-        return page;
-    }
-}

+ 0 - 36
mec-education/src/main/java/com/ym/mec/education/config/ResourceServerConfig.java

@@ -1,36 +0,0 @@
-package com.ym.mec.education.config;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
-import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
-import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
-
-import com.ym.mec.common.security.BaseAccessDeniedHandler;
-import com.ym.mec.common.security.BaseAuthenticationEntryPoint;
-
-@Configuration
-@EnableResourceServer
-@EnableGlobalMethodSecurity(prePostEnabled = true)
-public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
-
-	@Autowired
-	private BaseAccessDeniedHandler baseAccessDeniedHandler;
-
-	@Autowired
-	private BaseAuthenticationEntryPoint baseAuthenticationEntryPoint;
-
-	@Override
-	public void configure(HttpSecurity http) throws Exception {
-		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and()
-				.authorizeRequests().antMatchers("/v2/api-docs","/code/*").permitAll().antMatchers("/api/**").permitAll().anyRequest().authenticated().and().httpBasic();
-	}
-
-	@Override
-	public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
-		resources.authenticationEntryPoint(baseAuthenticationEntryPoint).accessDeniedHandler(baseAccessDeniedHandler);
-	}
-
-}

+ 0 - 36
mec-education/src/main/java/com/ym/mec/education/config/WebMvcConfig.java

@@ -1,36 +0,0 @@
-package com.ym.mec.education.config;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.format.FormatterRegistry;
-import org.springframework.http.MediaType;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-import com.ym.mec.common.config.EnumConverterFactory;
-import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
-
-@Configuration
-public class WebMvcConfig implements WebMvcConfigurer {
-
-	/**
-	 * 枚举类的转换器 addConverterFactory
-	 */
-	@Override
-	public void addFormatters(FormatterRegistry registry) {
-		registry.addConverterFactory(new EnumConverterFactory());
-	}
-	
-	@Bean
-    public HttpMessageConverters fastJsonHttpMessageConverters(){
-		LocalFastJsonHttpMessageConverter converter = new LocalFastJsonHttpMessageConverter();
-        List<MediaType> fastMediaTypes =  new ArrayList<MediaType>();
-        fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
-        converter.setSupportedMediaTypes(fastMediaTypes);
-        return new HttpMessageConverters(converter);
-    }
-
-}

+ 0 - 66
mec-education/src/main/java/com/ym/mec/education/controller/ApprovalController.java

@@ -1,66 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.ApprovalReq;
-import com.ym.mec.education.service.ApprovalService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-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;
-
-/**
- * @program: mec
- * @description: 审批
- * @author: xw
- * @create: 2019-10-10 09:37
- */
-@RestController
-@RequestMapping("api/approval")
-@Api(tags = "审批")
-@Slf4j
-public class ApprovalController {
-
-    @Autowired
-    private ApprovalService approvalService;
-
-    @PostMapping("/processingList")
-    @ApiOperation("审批-待处理列表")
-    public PageResponse processingList(@RequestBody ApprovalReq approvalReq) {
-        return approvalService.getProcessingList(approvalReq);
-    }
-
-    @PostMapping("/processedList")
-    @ApiOperation("审批-已处理列表")
-    public PageResponse processedList(@RequestBody ApprovalReq approvalReq) {
-        return approvalService.getProcessedList(approvalReq);
-    }
-
-    @PostMapping("/launchList")
-    @ApiOperation("审批-我发起的审批列表")
-    public PageResponse launchList(@RequestBody ApprovalReq approvalReq) {
-        return approvalService.getLaunchList(approvalReq);
-    }
-
-    @PostMapping("/launchInfo")
-    @ApiOperation("审批-我发起的审批详情")
-    public BaseResponse launchInfo(@RequestBody ApprovalReq approvalReq) {
-        return approvalService.getLaunchInfo(approvalReq);
-    }
-
-    @PostMapping("/cancel")
-    @ApiOperation("审批-我发起的审批详情-取消审批")
-    public BaseResponse cancel(@RequestBody ApprovalReq approvalReq) {
-        return approvalService.cancel(approvalReq);
-    }
-
-    @PostMapping("/ccList")
-    @ApiOperation("审批-抄送列表")
-    public PageResponse ccList(@RequestBody ApprovalReq approvalReq) {
-        return approvalService.getCcList(approvalReq);
-    }
-}

+ 0 - 81
mec-education/src/main/java/com/ym/mec/education/controller/AttendClassController.java

@@ -1,81 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.AttendClassReq;
-import com.ym.mec.education.req.HomeWorkReq;
-import com.ym.mec.education.service.IStudentAttendanceService;
-import io.swagger.annotations.Api;
-import lombok.extern.slf4j.Slf4j;
-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;
-
-/**
- * @author : chengp
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年10月07日 10:08
- */
-@RestController
-@RequestMapping("api/attendClass")
-@Api(tags = "上课记录")
-@Slf4j
-public class AttendClassController {
-
-    @Autowired
-    private IStudentAttendanceService studentAttendanceService;
-    /**
-     * 服务降级处理
-     *
-     * @return
-     */
-    private BaseResponse defaultFallback() {
-        BaseResponse response = new BaseResponse();
-        response.setReturnCode(500);
-        response.setMessage("太拥挤了, 请稍后再试!");
-        return response;
-    }
-
-
-    /**
-     * 上课记录
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/attendRecord")
-    public PageResponse attendRecord(@RequestBody AttendClassReq req) {
-
-        return  studentAttendanceService.attendRecordList(req);
-    }
-
-
-    /**
-     * 点名记录
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/callStudent")
-    public PageResponse callStudent(@RequestBody HomeWorkReq req) {
-
-        return  studentAttendanceService.callStudent(req);
-    }
-
-
-    /**
-     * 签到
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/signInfo")
-    public BaseResponse signInfo(@RequestBody HomeWorkReq req) {
-
-
-        return studentAttendanceService.signInfo(req);
-    }
-
-
-
-}

+ 0 - 35
mec-education/src/main/java/com/ym/mec/education/controller/ClassGroupController.java

@@ -1,35 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.service.IClassGroupService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-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;
-
-/**
- * @program: mec
- * @description: 班级
- * @author: xw
- * @create: 2019-09-26 14:03
- */
-@RestController
-@RequestMapping("api/classGroup")
-@Api(tags = "班级")
-@Slf4j
-public class ClassGroupController {
-
-    @Autowired
-    private IClassGroupService classGroupService;
-
-    @PostMapping("/info")
-    @ApiOperation("班级详情")
-    public BaseResponse getInfo(@RequestBody ClassGroupReq classGroupReq) {
-        return classGroupService.getInfo(classGroupReq);
-    }
-}

+ 0 - 32
mec-education/src/main/java/com/ym/mec/education/controller/CourseHomeworkTemplateController.java

@@ -1,32 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.biz.dal.page.CourseHomeWorkTemplateQueryInfo;
-import com.ym.mec.biz.service.CourseHomeworkTemplateService;
-import com.ym.mec.common.controller.BaseController;
-import io.swagger.annotations.Api;
-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;
-
-/**
- * @Author Joburgess
- * @Date 2019/9/18
- */
-@RequestMapping("courseHomeworkTemplate")
-@Api(tags = "作业模板")
-@RestController
-public class CourseHomeworkTemplateController extends BaseController {
-
-    @Autowired
-    private CourseHomeworkTemplateService courseHomeworkTemplateService;
-
-    @ApiOperation(value = "分页查询作业模板列表")
-    @PostMapping("/queryPage")
-    public Object queryPage(@RequestBody CourseHomeWorkTemplateQueryInfo queryInfo){
-        return succeed(courseHomeworkTemplateService.queryPage(queryInfo));
-    }
-
-}

+ 0 - 102
mec-education/src/main/java/com/ym/mec/education/controller/CourseScheduleController.java

@@ -1,102 +0,0 @@
-package com.ym.mec.education.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-
-import lombok.extern.slf4j.Slf4j;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-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.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.service.CourseScheduleService;
-import com.ym.mec.common.exception.BizException;
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
-import com.ym.mec.education.resp.CourseScheduleResp;
-import com.ym.mec.education.service.ICourseScheduleService;
-
-/**
- * @program: mec
- * @description: 课表
- * @author: xw
- * @create: 2019-09-26 21:04
- */
-@RestController
-@RequestMapping("api/courseSchedule")
-@Api(tags = "课表")
-@Slf4j
-public class CourseScheduleController {
-
-    @Autowired
-    private ICourseScheduleService courseScheduleService;
-    @Autowired
-    private CourseScheduleService scheduleService;
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
-
-    @PostMapping("/list")
-    @ApiOperation("课表列表")
-    public PageResponse list(@RequestBody @Validated ClassGroupReq classGroupReq) {
-        return courseScheduleService.getPage(classGroupReq);
-    }
-
-    @PostMapping("/info")
-    @ApiOperation("点名详情-头信息")
-    public BaseResponse<CourseScheduleResp> getInfo(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return courseScheduleService.getInfo(courseScheduleReq);
-    }
-
-    @PostMapping("/statisticsInfo")
-    @ApiOperation("历史考勤统计-头信息")
-    public BaseResponse getStatisticsInfo(@RequestBody ClassGroupReq classGroupReq) {
-        return courseScheduleService.getStatisticsInfo(classGroupReq);
-    }
-
-
-    @PostMapping("/courseInfo")
-    @ApiOperation("课程详情-头信息")
-    public BaseResponse<CourseScheduleResp> courseInfo(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return courseScheduleService.courseInfo(courseScheduleReq);
-    }
-
-    @ApiOperation(value = "课时调整")
-    @PostMapping(value = "/classStartDateAdjust")
-    public Object classStartDateAdjust(ClassDateAdjustDto classDateAdjustDto){
-        if(Objects.isNull(classDateAdjustDto.getId())){
-            return BaseResponse.errorParam();
-        }
-        List<CourseSchedule> courseSchedules=new ArrayList<>();
-        courseSchedules.add(classDateAdjustDto);
-        scheduleService.courseAdjust(courseSchedules);
-        return BaseResponse.success(null);
-    }
-
-    @ApiOperation(value = "课时交换")
-    @GetMapping(value = "/courseSwap")
-    public Object courseSwap(Long courseScheduleId1,Long courseScheduleId2){
-        if(Objects.isNull(courseScheduleId1)||Objects.isNull(courseScheduleId2)){
-            return BaseResponse.errorParam();
-        }
-        scheduleService.courseSwap(courseScheduleId1,courseScheduleId2);
-        return BaseResponse.success(null);
-    }
-
-}

+ 0 - 31
mec-education/src/main/java/com/ym/mec/education/controller/EducationDemoGroupController.java

@@ -1,31 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.biz.service.DemoGroupService;
-import com.ym.mec.common.controller.BaseController;
-import io.swagger.annotations.Api;
-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;
-
-/**
- * @Author Joburgess
- * @Date 2019/9/27
- */
-
-@Api(tags = "试听课-教务端")
-@RequestMapping("educationDemoGroup")
-@RestController
-public class EducationDemoGroupController extends BaseController {
-
-    @Autowired
-    private DemoGroupService demoGroupService;
-
-    @ApiOperation(value = "试听课安排")
-    @PostMapping("/queryStudentDemoGroups")
-    public Object queryTeacherDemoGroups(Long teacherId){
-        return succeed(demoGroupService.findDemoGroupStartClassTimesWithWeekByTeacherId(teacherId));
-    }
-
-}

+ 0 - 101
mec-education/src/main/java/com/ym/mec/education/controller/HomeWorkController.java

@@ -1,101 +0,0 @@
-package com.ym.mec.education.controller;
-
-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.netflix.hystrix.contrib.javanica.annotation.DefaultProperties;
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.entity.StudentCourseHomework;
-import com.ym.mec.education.entity.SysUser;
-import com.ym.mec.education.enums.ReturnCodeEnum;
-import com.ym.mec.education.req.HomeWorkDetailReq;
-import com.ym.mec.education.req.HomeWorkReq;
-import com.ym.mec.education.req.MusicGroupReq;
-import com.ym.mec.education.resp.HomeWrokResp;
-import com.ym.mec.education.service.IStudentCourseHomeworkService;
-import com.ym.mec.education.service.ISysUserService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.CollectionUtils;
-import org.springframework.validation.BindingResult;
-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 java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
-/**
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月27日 19:31
- */
-
-@RestController
-@RequestMapping("/api/homeWork")
-@DefaultProperties(defaultFallback = "defaultFallback")
-@Slf4j
-public class HomeWorkController {
-
-
-    @Autowired
-    private IStudentCourseHomeworkService studentCourseHomeworkService;
-
-    /**
-     * 服务降级处理
-     *
-     * @return
-     */
-    private BaseResponse defaultFallback() {
-        BaseResponse response = new BaseResponse();
-        response.setReturnCode(500);
-        response.setMessage("太拥挤了, 请稍后再试!");
-        return response;
-    }
-
-
-    /**
-     *
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/workList")
-    public PageResponse workList(@RequestBody HomeWorkReq req) {
-
-        return studentCourseHomeworkService.workList(req);
-    }
-
-
-    /**
-     *
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/workDetail")
-    public BaseResponse workDetail(@RequestBody HomeWorkDetailReq req) {
-        BaseResponse baseResponse = new BaseResponse();
-        if(req == null || req.getWorkId() == null){
-            baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
-            baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
-            return baseResponse;
-        }
-        return studentCourseHomeworkService.getHomeWorkDetail(req);
-    }
-
-
-    /**
-     *
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/homeWorkList")
-    public PageResponse homeWorkList(@RequestBody HomeWorkReq req) {
-
-       return studentCourseHomeworkService.homeWorkList(req);
-    }
-}

+ 0 - 33
mec-education/src/main/java/com/ym/mec/education/controller/MessageController.java

@@ -1,33 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.service.ISysMessageService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @program: mec
- * @description: 消息
- * @author: xw
- * @create: 2019-10-10 19:12
- */
-@RestController
-@RequestMapping("/api/message")
-@Slf4j
-public class MessageController {
-
-    @Autowired
-    private ISysMessageService messageService;
-
-    /**
-     * 获取当前登陆人的消息
-     * @return
-     */
-    @GetMapping("/info")
-    public BaseResponse getMessage(){
-        return messageService.getInfo();
-    }
-}

+ 0 - 86
mec-education/src/main/java/com/ym/mec/education/controller/MusicGroupController.java

@@ -1,86 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.netflix.hystrix.contrib.javanica.annotation.DefaultProperties;
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.enums.ReturnCodeEnum;
-import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.MusicGroupReq;
-import com.ym.mec.education.service.IMusicGroupService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-
-/**
- * @author : chengp
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月25日 17:39
- */
-@RestController
-@RequestMapping("/api/musicGroup")
-@DefaultProperties(defaultFallback = "defaultFallback")
-@Slf4j
-public class MusicGroupController {
-
-    @Autowired
-    private IMusicGroupService musicGroupService;
-
-
-    /**
-     * 服务降级处理
-     *
-     * @return
-     */
-    private BaseResponse defaultFallback() {
-        BaseResponse response = new BaseResponse();
-        response.setReturnCode(500);
-        response.setMessage("太拥挤了, 请稍后再试!");
-        return response;
-    }
-
-    /**
-     * 乐团列表
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/groupList")
-    public PageResponse groupList(@RequestBody MusicGroupReq req) {
-
-        return musicGroupService.groupList(req);
-    }
-
-    /**
-     * 乐团详情
-     * @param groupId
-     * @return
-     */
-    @GetMapping(value = "/groupDetail")
-    public BaseResponse groupDetail(@RequestParam("groupId") Integer groupId) {
-
-        BaseResponse baseResponse = new BaseResponse();
-        if (groupId == null) {
-            baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
-            baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
-            return baseResponse;
-        }
-
-        return musicGroupService.groupDetail(groupId);
-
-    }
-
-    /**
-     * 班级列表
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/classGroupList")
-    public PageResponse classGroupList(@RequestBody ClassGroupReq req){
-
-        return musicGroupService.classGroupList(req);
-
-    }
-
-
-}

+ 0 - 89
mec-education/src/main/java/com/ym/mec/education/controller/SmsCodeController.java

@@ -1,89 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.google.code.kaptcha.Constants;
-import com.google.code.kaptcha.Producer;
-import com.google.code.kaptcha.servlet.KaptchaServlet;
-import com.ym.mec.biz.service.SmsCodeService;
-import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.security.SecurityConstants;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.imageio.ImageIO;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-import java.awt.image.BufferedImage;
-import java.util.concurrent.TimeUnit;
-
-@RestController
-@RequestMapping("code")
-@Api(tags = "验证码服务")
-public class SmsCodeController extends BaseController {
-
-    @Autowired
-    private SmsCodeService smsCodeService;
-    @Autowired
-    private Producer captchaProducer;
-    @Autowired
-    private RedisTemplate<String,String> redisTemplate;
-
-    @ApiOperation(value = "发送登录短信验证码")
-    @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String")
-    @PostMapping(value = "/sendSms")
-    public Object sendLoginVerifyCode(String mobile) throws Exception {
-        smsCodeService.sendValidCode(mobile);
-        return succeed();
-    }
-
-    @ApiOperation(value = "校验短信验证码")
-    @ApiImplicitParams({ @ApiImplicitParam(name = "phone", value = "手机号", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "code", value = "短信验证码", required = true, dataType = "String") })
-    @PostMapping(value = "/verifySmsCode")
-    public Object verifySmsCode(String phone,String code) {
-        if(StringUtils.isEmpty(phone) || StringUtils.isEmpty(code)){
-            return failed(SecurityConstants.PARAM_VERIFY_EXCEPTION);
-        }
-        if(smsCodeService.verifyValidCode(phone,code)){
-            return succeed();
-        }
-        return failed("验证码校验失败");
-    }
-
-    @PostMapping(value = "/verifyLoginImage")
-    @ApiOperation("校验登录图形验证码")
-    @ApiImplicitParams({ @ApiImplicitParam(name = "phone", value = "手机号", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "code", value = "验证码", required = true, dataType = "String") })
-    public Object verifyImageCode(String phone,String code){
-        if(StringUtils.isEmpty(phone) || StringUtils.isEmpty(code)){
-            return failed(SecurityConstants.PARAM_VERIFY_EXCEPTION);
-        }
-        String redisKey = MessageTypeEnum.KAPTCHA_SESSION_KEY + phone;
-        if(redisTemplate.hasKey(redisKey)){
-            if(StringUtils.equalsIgnoreCase(redisTemplate.opsForValue().get(redisKey),code)){
-                return succeed();
-            }
-        }
-        return failed(SecurityConstants.VERIFY_FAILURE);
-    }
-
-    @RequestMapping("/getLoginImage")
-    @ApiOperation("获取登录图片验证码")
-    @ApiImplicitParam(name = "phone", value = "手机号", required = true, dataType = "String")
-    public void getLoginImage(HttpServletRequest request, HttpServletResponse response,String phone) throws Exception {
-        if(StringUtils.isEmpty(phone)){
-            throw new BizException("请输入手机号");
-        }
-        SpecCaptcha specCaptcha = new SpecCaptcha(125, 45, 4);
-        redisTemplate.opsForValue().set(MessageTypeEnum.KAPTCHA_SESSION_KEY + phone,specCaptcha.text(),3, TimeUnit.MINUTES);
-        CaptchaUtil.out(specCaptcha, request, response);
-    }
-}

+ 0 - 49
mec-education/src/main/java/com/ym/mec/education/controller/StudentAttendanceController.java

@@ -1,49 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.CourseScheduleReq;
-import com.ym.mec.education.service.IStudentAttendanceService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-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;
-
-/**
- * @program: mec
- * @description: 考勤记录
- * @author: xw
- * @create: 2019-09-25 21:22
- */
-@RestController
-@RequestMapping("api/studentAttendance")
-@Api(tags = "学生考勤")
-@Slf4j
-public class StudentAttendanceController {
-
-    @Autowired
-    private IStudentAttendanceService studentAttendanceService;
-
-    @PostMapping("/list")
-    @ApiOperation("点名记录列表")
-    public PageResponse list(@RequestBody ClassGroupReq classGroupReq) {
-        return studentAttendanceService.getPage(classGroupReq);
-    }
-
-    @PostMapping("/listByCourse")
-    @ApiOperation("点名详情-考勤列表")
-    public PageResponse listByCourse(@RequestBody CourseScheduleReq courseScheduleReq) {
-        return studentAttendanceService.getPageByCourse(courseScheduleReq);
-    }
-
-    @PostMapping("/statisticsList")
-    @ApiOperation("历史考勤统计-考勤列表")
-    public PageResponse statisticsList(@RequestBody ClassGroupReq classGroupReq) {
-        return studentAttendanceService.statisticsList(classGroupReq);
-    }
-
-}

+ 0 - 59
mec-education/src/main/java/com/ym/mec/education/controller/StudentController.java

@@ -1,59 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.StudentReq;
-import com.ym.mec.education.service.IClassGroupStudentMapperService;
-import com.ym.mec.education.service.ICourseScheduleService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-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;
-
-/**
- * @program: mec
- * @description: 学员名单
- * @author: xw
- * @create: 2019-09-26 19:40
- */
-@RestController
-@RequestMapping("api/student")
-@Api(tags = "学员名单")
-@Slf4j
-public class StudentController {
-
-    @Autowired
-    private IClassGroupStudentMapperService groupStudentMapperService;
-    @Autowired
-    private ICourseScheduleService courseScheduleService;
-
-    @PostMapping("/list")
-    @ApiOperation("学员名单列表")
-    public PageResponse list(@RequestBody ClassGroupReq classGroupReq) {
-        return groupStudentMapperService.getPage(classGroupReq);
-    }
-
-    @PostMapping("/listByTeacher")
-    @ApiOperation("根据当前登录人查询对应学员名单列表")
-    public PageResponse listByTeacher(@RequestBody StudentReq studentReq) {
-        return groupStudentMapperService.getPageByTeacher(studentReq);
-    }
-
-    @PostMapping("/info")
-    @ApiOperation("根据学员id查询详情")
-    public BaseResponse info(@RequestBody StudentReq studentReq) {
-        return groupStudentMapperService.getInfo(studentReq);
-    }
-
-    @PostMapping("/course")
-    @ApiOperation("根据学员id查询进行中的课程计划和历史课程计划")
-    public BaseResponse courseInfo(@RequestBody StudentReq studentReq) {
-        return courseScheduleService.getCourseScheduleByStudent(studentReq);
-    }
-
-}

+ 0 - 33
mec-education/src/main/java/com/ym/mec/education/controller/SubjectController.java

@@ -1,33 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.alibaba.fastjson.JSONObject;
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.service.ISubjectService;
-import io.swagger.annotations.Api;
-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;
-
-/**
- * @program: mec
- * @description: 声部
- * @author: xw
- * @create: 2019-10-01 11:25
- */
-@RestController
-@RequestMapping("api/subject")
-@Api(tags = "声部")
-public class SubjectController {
-
-    @Autowired
-    private ISubjectService subjectService;
-
-    @PostMapping("/list")
-    @ApiOperation("声部列表")
-    public BaseResponse list(@RequestBody JSONObject jsonObject) {
-        return BaseResponse.success(subjectService.list());
-    }
-}

+ 0 - 75
mec-education/src/main/java/com/ym/mec/education/controller/TeacherAttendanceController.java

@@ -1,75 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.service.TeacherAttendanceService;
-import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.TeacherLeaveRecordReq;
-import com.ym.mec.education.service.ITeacherAttendanceService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-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 java.util.Date;
-import java.util.Objects;
-
-/**
- * @program: mec
- * @description: 老师考勤 上课
- * @author: xw
- * @create: 2019-09-30 13:54
- */
-@RestController
-@RequestMapping("api/teacherAttendance")
-@Api(tags = "老师考勤/上课")
-public class TeacherAttendanceController extends BaseController {
-
-    @Autowired
-    private ITeacherAttendanceService teacherAttendanceService;
-    @Autowired
-    private TeacherAttendanceService iteacherAttendanceService;
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
-
-    @PostMapping("/list")
-    @ApiOperation("老师上课记录列表")
-    public PageResponse list(@RequestBody TeacherLeaveRecordReq teacherLeaveRecordReq) {
-        return teacherAttendanceService.getPage(teacherLeaveRecordReq);
-    }
-
-    @PostMapping("/findTeacherAbnormalSignInCourseScheduleRecord")
-    @ApiOperation("根据日期获取部门下异常签到的课程记录")
-    public Object findTeacherAbnormalSignInCourseScheduleRecord(Date date, Integer signInStatus) {
-        SysUser user = sysUserFeignService.queryUserInfo();
-        if(Objects.isNull(user)){
-            return failed(HttpStatus.FORBIDDEN,"请登录");
-        }
-        return succeed(iteacherAttendanceService.findTeacherAbnormalSignInCourseScheduleRecord(user.getOrganId(),date,signInStatus));
-    }
-
-    @PostMapping("/findTeacherAbnormalSignInDates")
-    @ApiOperation("根据月份获取部门下异常签到的日期")
-    public Object findTeacherAbnormalSignInDates(Date month) {
-        SysUser user = sysUserFeignService.queryUserInfo();
-        if(Objects.isNull(user)){
-            return failed(HttpStatus.FORBIDDEN,"请登录");
-        }
-        return succeed(iteacherAttendanceService.findTeacherAbnormalSignInDates(user.getOrganId(),month));
-    }
-
-    @PostMapping("/countTeacherAbnormalSignInClassTimes")
-    @ApiOperation("根据日期获取对应签到状态的课程数量")
-    public Object countTeacherAbnormalSignInClassTimes(Date date) {
-        SysUser user = sysUserFeignService.queryUserInfo();
-        if(Objects.isNull(user)){
-            return failed(HttpStatus.FORBIDDEN,"请登录");
-        }
-        return iteacherAttendanceService.countTeacherAbnormalSignInClassTimes(user.getOrganId(),date);
-    }
-}

+ 0 - 80
mec-education/src/main/java/com/ym/mec/education/controller/TeacherController.java

@@ -1,80 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.alibaba.fastjson.JSONObject;
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.HomeWorkReq;
-import com.ym.mec.education.req.TeacherReq;
-import com.ym.mec.education.service.ITeacherService;
-import io.swagger.annotations.Api;
-import lombok.extern.slf4j.Slf4j;
-import net.bytebuddy.asm.Advice;
-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;
-
-/**
- * @author : chengp
- * @version V1.0
- * @Description: TODO
- * @date Date : 2019年09月29日 9:54
- */
-
-@RestController
-@RequestMapping("api/teacher")
-@Api(tags = "老师列表")
-@Slf4j
-public class TeacherController {
-
-    @Autowired
-    private ITeacherService teacherService;
-
-    /**
-     * 服务降级处理
-     *
-     * @return
-     */
-    private BaseResponse defaultFallback() {
-        BaseResponse response = new BaseResponse();
-        response.setReturnCode(500);
-        response.setMessage("太拥挤了, 请稍后再试!");
-        return response;
-    }
-
-
-    /**
-     * @param req
-     * @return
-     */
-    @PostMapping(value = "/teacherList")
-    public PageResponse teacherList(@RequestBody TeacherReq req) {
-
-        return teacherService.teacherList(req);
-    }
-
-    @PostMapping(value = "/teacherDetail")
-    public BaseResponse teacherDetail(@RequestBody TeacherReq req) {
-        return teacherService.teacherDetail(req);
-    }
-
-    /**
-     * @return
-     */
-    @PostMapping(value = "/teacherVipClass")
-    public PageResponse teacherVipClass(@RequestBody TeacherReq req) {
-
-        return teacherService.teacherVipClass(req);
-    }
-
-    /**
-     * 老师的日程安排
-     * @param teacherReq
-     * @return
-     */
-    @PostMapping("/dailySchedule")
-    public PageResponse dailySchedule(@RequestBody TeacherReq teacherReq) {
-        return teacherService.dailySchedule(teacherReq);
-    }
-}

+ 0 - 33
mec-education/src/main/java/com/ym/mec/education/controller/TeacherLeaveRecordController.java

@@ -1,33 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.TeacherLeaveRecordReq;
-import com.ym.mec.education.service.ITeacherLeaveRecordService;
-import io.swagger.annotations.Api;
-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;
-
-/**
- * @program: mec
- * @description: 老师考勤
- * @author: xw
- * @create: 2019-09-29 17:10
- */
-@RestController
-@RequestMapping("api/teacherLeaveRecord")
-@Api(tags = "老师请假记录")
-public class TeacherLeaveRecordController {
-
-    @Autowired
-    private ITeacherLeaveRecordService teacherLeaveRecordService;
-
-    @PostMapping("/list")
-    @ApiOperation("老师请假记录列表")
-    public PageResponse list(@RequestBody TeacherLeaveRecordReq teacherLeaveRecordReq) {
-        return teacherLeaveRecordService.getPage(teacherLeaveRecordReq);
-    }
-}

+ 0 - 49
mec-education/src/main/java/com/ym/mec/education/controller/VipGroupController.java

@@ -1,49 +0,0 @@
-package com.ym.mec.education.controller;
-
-import com.ym.mec.education.base.BaseResponse;
-import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.req.VipGroupReq;
-import com.ym.mec.education.service.IVipGroupService;
-import io.swagger.annotations.Api;
-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;
-
-/**
- * @program: mec
- * @description: 小课(VIP课)
- * @author: xw
- * @create: 2019-09-30 20:16
- */
-@RestController
-@RequestMapping("api/vipGroup")
-@Api(tags = "小课")
-public class VipGroupController {
-
-    @Autowired
-    private IVipGroupService vipGroupService;
-
-    @PostMapping("/info")
-    @ApiOperation("小课详情-头信息")
-    public BaseResponse info(@RequestBody VipGroupReq vipGroupReq) {
-        return vipGroupService.getInfo(vipGroupReq);
-    }
-    @PostMapping("/courseList")
-    @ApiOperation("小课详情-课表")
-    public PageResponse courseList(@RequestBody VipGroupReq vipGroupReq){
-
-        return vipGroupService.courseList(vipGroupReq);
-
-    }
-
-    @PostMapping("/attendanceList")
-    @ApiOperation("小课详情-点名记录")
-    public PageResponse attendanceList(@RequestBody VipGroupReq vipGroupReq){
-
-        return vipGroupService.attendanceList(vipGroupReq);
-
-    }
-}

+ 0 - 129
mec-education/src/main/java/com/ym/mec/education/entity/ChargeType.java

@@ -1,129 +0,0 @@
-package com.ym.mec.education.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 收费类型
- * </p>
- *
- * @author lemeng
- * @since 2019-09-25
- */
-@TableName("charge_type")
-public class ChargeType extends Model<ChargeType> {
-
-    private static final long serialVersionUID = 1L;
-
-    @TableId(value = "id_", type = IdType.AUTO)
-    private Integer id;
-    /**
-     * 名称
-     */
-    @TableField("name_")
-    private String name;
-    @TableField("del_flag_")
-    private String delFlag;
-    /**
-     * 描述
-     */
-    @TableField("description_")
-    private String description;
-    @TableField("create_time_")
-    private Date createTime;
-    @TableField("update_time_")
-    private Date updateTime;
-    /**
-     * 默认课程形态
-     */
-    @TableField("course_form_")
-    private String courseForm;
-
-
-    public Integer getId() {
-        return id;
-    }
-
-    public ChargeType setId(Integer id) {
-        this.id = id;
-        return this;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public ChargeType setName(String name) {
-        this.name = name;
-        return this;
-    }
-
-    public String getDelFlag() {
-        return delFlag;
-    }
-
-    public ChargeType setDelFlag(String delFlag) {
-        this.delFlag = delFlag;
-        return this;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public ChargeType setDescription(String description) {
-        this.description = description;
-        return this;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public ChargeType setCreateTime(Date createTime) {
-        this.createTime = createTime;
-        return this;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public ChargeType setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-        return this;
-    }
-
-    public String getCourseForm() {
-        return courseForm;
-    }
-
-    public ChargeType setCourseForm(String courseForm) {
-        this.courseForm = courseForm;
-        return this;
-    }
-
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
-    }
-
-    @Override
-    public String toString() {
-        return "ChargeType{" +
-        ", id=" + id +
-        ", name=" + name +
-        ", delFlag=" + delFlag +
-        ", description=" + description +
-        ", createTime=" + createTime +
-        ", updateTime=" + updateTime +
-        ", courseForm=" + courseForm +
-        "}";
-    }
-}

+ 0 - 134
mec-education/src/main/java/com/ym/mec/education/entity/ChargeTypeSubjectMapper.java

@@ -1,134 +0,0 @@
-package com.ym.mec.education.entity;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * 收费类型与科目的关联表
- * </p>
- *
- * @author lemeng
- * @since 2019-09-25
- */
-@TableName("charge_type_subject_mapper")
-public class ChargeTypeSubjectMapper extends Model<ChargeTypeSubjectMapper> {
-
-    private static final long serialVersionUID = 1L;
-
-    @TableId("id_")
-    private Long id;
-    @TableField("charge_type_id_")
-    private Integer chargeTypeId;
-    @TableField("subject_id_")
-    private Integer subjectId;
-    @TableField("create_time_")
-    private Date createTime;
-    @TableField("update_time_")
-    private Date updateTime;
-    @TableField("kit_group_purchase_type_")
-    private String kitGroupPurchaseType;
-    @TableField("deposit_fee_")
-    private BigDecimal depositFee;
-    @TableField("fee_")
-    private BigDecimal fee;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public ChargeTypeSubjectMapper setId(Long id) {
-        this.id = id;
-        return this;
-    }
-
-    public Integer getChargeTypeId() {
-        return chargeTypeId;
-    }
-
-    public ChargeTypeSubjectMapper setChargeTypeId(Integer chargeTypeId) {
-        this.chargeTypeId = chargeTypeId;
-        return this;
-    }
-
-    public Integer getSubjectId() {
-        return subjectId;
-    }
-
-    public ChargeTypeSubjectMapper setSubjectId(Integer subjectId) {
-        this.subjectId = subjectId;
-        return this;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public ChargeTypeSubjectMapper setCreateTime(Date createTime) {
-        this.createTime = createTime;
-        return this;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public ChargeTypeSubjectMapper setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-        return this;
-    }
-
-    public String getKitGroupPurchaseType() {
-        return kitGroupPurchaseType;
-    }
-
-    public ChargeTypeSubjectMapper setKitGroupPurchaseType(String kitGroupPurchaseType) {
-        this.kitGroupPurchaseType = kitGroupPurchaseType;
-        return this;
-    }
-
-    public BigDecimal getDepositFee() {
-        return depositFee;
-    }
-
-    public ChargeTypeSubjectMapper setDepositFee(BigDecimal depositFee) {
-        this.depositFee = depositFee;
-        return this;
-    }
-
-    public BigDecimal getFee() {
-        return fee;
-    }
-
-    public ChargeTypeSubjectMapper setFee(BigDecimal fee) {
-        this.fee = fee;
-        return this;
-    }
-
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
-    }
-
-    @Override
-    public String toString() {
-        return "ChargeTypeSubjectMapper{" +
-        ", id=" + id +
-        ", chargeTypeId=" + chargeTypeId +
-        ", subjectId=" + subjectId +
-        ", createTime=" + createTime +
-        ", updateTime=" + updateTime +
-        ", kitGroupPurchaseType=" + kitGroupPurchaseType +
-        ", depositFee=" + depositFee +
-        ", fee=" + fee +
-        "}";
-    }
-}

+ 0 - 215
mec-education/src/main/java/com/ym/mec/education/entity/ClassGroup.java

@@ -1,215 +0,0 @@
-package com.ym.mec.education.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 班级
- * </p>
- *
- * @author lemeng
- * @since 2019-09-25
- */
-@TableName("class_group")
-public class ClassGroup extends Model<ClassGroup> {
-
-    private static final long serialVersionUID = 1L;
-
-    @TableId(value = "id_", type = IdType.AUTO)
-    private Integer id;
-    @TableField("music_group_id_")
-    private Integer musicGroupId;
-    /**
-     * 科目列表(用逗号分隔)
-     */
-    @TableField("subject_id_list_")
-    private String subjectIdList;
-    /**
-     * 班级名称
-     */
-    @TableField("name_")
-    private String name;
-    /**
-     * 预计招生人数
-     */
-    @TableField("expect_student_num_")
-    private Integer expectStudentNum;
-    /**
-     * 实际学生数
-     */
-    @TableField("student_num_")
-    private Integer studentNum;
-    @TableField("create_time_")
-    private Date createTime;
-    @TableField("update_time_")
-    private Date updateTime;
-    /**
-     * 班级类型(普通班级、合奏班级、提高课班级、VIP班级、试听课)
-     */
-    @TableField("type_")
-    private String type;
-    /**
-     * 班级状态()
-     */
-    @TableField("del_flag_")
-    private String delFlag;
-    /**
-     * 教学形式(线上、线下)
-     */
-//    @TableField("teach_mode_")
-//    private String teachMode;
-    /**
-     * 总课次
-     */
-    @TableField("total_class_times_")
-    private Integer totalClassTimes;
-    @TableField("current_class_times_")
-    private Integer currentClassTimes;
-
-
-    public Integer getId() {
-        return id;
-    }
-
-    public ClassGroup setId(Integer id) {
-        this.id = id;
-        return this;
-    }
-
-    public Integer getMusicGroupId() {
-        return musicGroupId;
-    }
-
-    public ClassGroup setMusicGroupId(Integer musicGroupId) {
-        this.musicGroupId = musicGroupId;
-        return this;
-    }
-
-    public String getSubjectIdList() {
-        return subjectIdList;
-    }
-
-    public ClassGroup setSubjectIdList(String subjectIdList) {
-        this.subjectIdList = subjectIdList;
-        return this;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public ClassGroup setName(String name) {
-        this.name = name;
-        return this;
-    }
-
-    public Integer getExpectStudentNum() {
-        return expectStudentNum;
-    }
-
-    public ClassGroup setExpectStudentNum(Integer expectStudentNum) {
-        this.expectStudentNum = expectStudentNum;
-        return this;
-    }
-
-    public Integer getStudentNum() {
-        return studentNum;
-    }
-
-    public ClassGroup setStudentNum(Integer studentNum) {
-        this.studentNum = studentNum;
-        return this;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public ClassGroup setCreateTime(Date createTime) {
-        this.createTime = createTime;
-        return this;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public ClassGroup setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-        return this;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public ClassGroup setType(String type) {
-        this.type = type;
-        return this;
-    }
-
-    public String getDelFlag() {
-        return delFlag;
-    }
-
-    public ClassGroup setDelFlag(String delFlag) {
-        this.delFlag = delFlag;
-        return this;
-    }
-
-//    public String getTeachMode() {
-//        return teachMode;
-//    }
-//
-//    public ClassGroup setTeachMode(String teachMode) {
-//        this.teachMode = teachMode;
-//        return this;
-//    }
-
-    public Integer getTotalClassTimes() {
-        return totalClassTimes;
-    }
-
-    public ClassGroup setTotalClassTimes(Integer totalClassTimes) {
-        this.totalClassTimes = totalClassTimes;
-        return this;
-    }
-
-    public Integer getCurrentClassTimes() {
-        return currentClassTimes;
-    }
-
-    public ClassGroup setCurrentClassTimes(Integer currentClassTimes) {
-        this.currentClassTimes = currentClassTimes;
-        return this;
-    }
-
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
-    }
-
-    @Override
-    public String toString() {
-        return "ClassGroup{" +
-        ", id=" + id +
-        ", musicGroupId=" + musicGroupId +
-        ", subjectIdList=" + subjectIdList +
-        ", name=" + name +
-        ", expectStudentNum=" + expectStudentNum +
-        ", studentNum=" + studentNum +
-        ", createTime=" + createTime +
-        ", updateTime=" + updateTime +
-        ", type=" + type +
-        ", delFlag=" + delFlag +
-        ", totalClassTimes=" + totalClassTimes +
-        ", currentClassTimes=" + currentClassTimes +
-        "}";
-    }
-}

+ 0 - 90
mec-education/src/main/java/com/ym/mec/education/entity/ClassGroupRelation.java

@@ -1,90 +0,0 @@
-package com.ym.mec.education.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 班级关系表(定义合奏课的班级信息)
- * </p>
- *
- * @author lemeng
- * @since 2019-09-25
- */
-@TableName("class_group_relation")
-public class ClassGroupRelation extends Model<ClassGroupRelation> {
-
-    private static final long serialVersionUID = 1L;
-
-    @TableId(value = "id_", type = IdType.AUTO)
-    private Integer id;
-    /**
-     * 班级id
-     */
-    @TableField("class_group_id_")
-    private Integer classGroupId;
-    /**
-     * 子班id
-     */
-    @TableField("sub_class_group_id_")
-    private Integer subClassGroupId;
-    @TableField("create_time_")
-    private Date createTime;
-
-
-    public Integer getId() {
-        return id;
-    }
-
-    public ClassGroupRelation setId(Integer id) {
-        this.id = id;
-        return this;
-    }
-
-    public Integer getClassGroupId() {
-        return classGroupId;
-    }
-
-    public ClassGroupRelation setClassGroupId(Integer classGroupId) {
-        this.classGroupId = classGroupId;
-        return this;
-    }
-
-    public Integer getSubClassGroupId() {
-        return subClassGroupId;
-    }
-
-    public ClassGroupRelation setSubClassGroupId(Integer subClassGroupId) {
-        this.subClassGroupId = subClassGroupId;
-        return this;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public ClassGroupRelation setCreateTime(Date createTime) {
-        this.createTime = createTime;
-        return this;
-    }
-
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
-    }
-
-    @Override
-    public String toString() {
-        return "ClassGroupRelation{" +
-                ", id=" + id +
-                ", classGroupId=" + classGroupId +
-                ", subClassGroupId=" + subClassGroupId +
-                ", createTime=" + createTime +
-                "}";
-    }
-}

Некоторые файлы не были показаны из-за большого количества измененных файлов