Ver código fonte

Merge remote-tracking branch 'origin/master'

Joburgess 5 anos atrás
pai
commit
ccdcf84436
39 arquivos alterados com 430 adições e 657 exclusões
  1. 13 83
      cms/src/main/java/com/ym/mec/cms/config/WebMvcConfig.java
  2. 2 0
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/AuthServerApplication.java
  3. 13 84
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebMvcConfig.java
  4. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  5. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupTeacherSalaryDao.java
  6. 23 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectPlan.java
  7. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMessageConfig.java
  8. 35 12
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultMusicGroupSalary.java
  9. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/SalarySettlementTypeEnum.java
  10. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  11. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupTeacherSalaryService.java
  12. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java
  13. 4 3
      mec-biz/src/main/java/com/ym/mec/biz/service/SysMessageService.java
  14. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  15. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupTeacherSalaryServiceImpl.java
  16. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java
  17. 16 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java
  18. 92 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  19. 14 11
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMessageServiceImpl.java
  20. 6 1
      mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectPlanMapper.xml
  21. 3 3
      mec-biz/src/main/resources/config/mybatis/SysAccountMapper.xml
  22. 10 3
      mec-biz/src/main/resources/config/mybatis/SysMessageConfigMapper.xml
  23. 14 6
      mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml
  24. 2 0
      mec-education/src/main/java/com/ym/mec/education/EducationApplication.java
  25. 13 84
      mec-education/src/main/java/com/ym/mec/education/config/WebMvcConfig.java
  26. 50 0
      mec-education/src/main/java/com/ym/mec/education/enums/ApprovalStatusEnum.java
  27. 3 0
      mec-im/src/main/java/com/ym/SealClassApplication.java
  28. 2 0
      mec-student/src/main/java/com/ym/mec/student/StudentApplication.java
  29. 6 105
      mec-student/src/main/java/com/ym/mec/student/config/WebMvcConfig.java
  30. 8 8
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  31. 2 0
      mec-task/src/main/java/com/ym/mec/task/TaskApplication.java
  32. 13 56
      mec-task/src/main/java/com/ym/mec/task/config/WebMvcConfig.java
  33. 2 0
      mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java
  34. 13 56
      mec-teacher/src/main/java/com/ym/mec/teacher/config/WebMvcConfig.java
  35. 3 3
      mec-util/src/main/java/com/ym/mec/util/json/JsonUtil.java
  36. 2 0
      mec-web/src/main/java/com/ym/mec/web/WebApplication.java
  37. 13 56
      mec-web/src/main/java/com/ym/mec/web/config/WebMvcConfig.java
  38. 5 5
      mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java
  39. 13 56
      mec-workflow/src/main/java/com/ym/mec/workfow/config/WebMvcConfig.java

+ 13 - 83
cms/src/main/java/com/ym/mec/cms/config/WebMvcConfig.java

@@ -1,39 +1,17 @@
 package com.ym.mec.cms.config;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
-import com.ym.mec.common.enums.BaseEnum;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 
 @Configuration
 public class WebMvcConfig implements WebMvcConfigurer {
@@ -45,62 +23,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }

+ 2 - 0
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/AuthServerApplication.java

@@ -9,6 +9,7 @@ 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;
@@ -20,6 +21,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @ComponentScan(basePackages="com.ym.mec")
 @Configuration
 @EnableSwagger2Doc
+@EnableAsync
 public class AuthServerApplication {
 
 	public static void main(String[] args) {

+ 13 - 84
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebMvcConfig.java

@@ -1,39 +1,17 @@
 package com.ym.mec.auth.config;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
-import com.ym.mec.common.enums.BaseEnum;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 
 @Configuration
 public class WebMvcConfig implements WebMvcConfigurer {
@@ -45,63 +23,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }

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

@@ -101,7 +101,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeachersDto> findClassGroupByMusicGroupId(@Param("musicGroupId") Integer musicGroupId);
+    List<ClassGroupTeachersDto> findClassGroupByMusicGroupId(@Param("musicGroupId") String musicGroupId);
 
     /**
      * 获取学生所购买课程列表

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

@@ -14,5 +14,5 @@ public interface ClassGroupTeacherSalaryDao extends BaseDAO<Long, ClassGroupTeac
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeacherSalary> findByMusicGroupId(@Param("musicGroupId") int musicGroupId);
+    List<ClassGroupTeacherSalary> findByMusicGroupId(@Param("musicGroupId") String musicGroupId);
 }

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

@@ -36,7 +36,11 @@ public class MusicGroupSubjectPlan {
 	@ApiModelProperty(value = "报名学生数",required = false)
 	private Integer applyStudentNum;
 
-	/** 报名学生数 */
+	/** 已缴费学生数 */
+	@ApiModelProperty(value = "已缴费学生数",required = false)
+	private Integer paidStudentNum;
+
+	/** 未分班学生数 */
 	@ApiModelProperty(value = "未分班学生数",hidden = true)
 	private Integer noClassStudentNum;
 
@@ -58,6 +62,8 @@ public class MusicGroupSubjectPlan {
 	/**  */
 	private java.util.Date updateTime;
 
+	private Integer version;
+
 	public String getSubName() {
 		return subName;
 	}
@@ -153,6 +159,22 @@ public class MusicGroupSubjectPlan {
 	public void setNoClassStudentNum(Integer noClassStudentNum) {
 		this.noClassStudentNum = noClassStudentNum;
 	}
+
+	public Integer getPaidStudentNum() {
+		return paidStudentNum;
+	}
+
+	public void setPaidStudentNum(Integer paidStudentNum) {
+		this.paidStudentNum = paidStudentNum;
+	}
+
+	public Integer getVersion() {
+		return version;
+	}
+
+	public void setVersion(Integer version) {
+		this.version = version;
+	}
 			
 	@Override
 	public String toString() {

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMessageConfig.java

@@ -49,6 +49,8 @@ public class SysMessageConfig {
 
 	/** 跳转url */
 	private String url;
+	
+	private String group;
 
 	public void setId(Integer id) {
 		this.id = id;
@@ -98,6 +100,14 @@ public class SysMessageConfig {
 		return this.url;
 	}
 
+	public String getGroup() {
+		return group;
+	}
+
+	public void setGroup(String group) {
+		this.group = group;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 35 - 12
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultMusicGroupSalary.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.entity;
 
+import com.ym.mec.biz.dal.enums.SalarySettlementTypeEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.math.BigDecimal;
@@ -24,10 +25,18 @@ public class TeacherDefaultMusicGroupSalary {
 	/** 班级类型(参照 course_schedule表的type_字段) */
 	@ApiModelProperty(value = "课程类型",required = false)
 	private CourseScheduleType courseScheduleType;
-	
+
+
+	@ApiModelProperty(value = "结算方式",required = false)
+	private SalarySettlementTypeEnum settlementType;
+
+	/**  */
+	@ApiModelProperty(value = "最小课时长度",required = false)
+	private Integer durationMin;
+
 	/**  */
-	@ApiModelProperty(value = "专业技能",required = false)
-	private Integer subjectId;
+	@ApiModelProperty(value = "最大课时长度",required = false)
+	private Integer durationMax;
 	
 	/** 主教薪酬 */
 	@ApiModelProperty(value = "主教薪酬",required = false)
@@ -78,14 +87,6 @@ public class TeacherDefaultMusicGroupSalary {
 		this.courseScheduleType = courseScheduleType;
 	}
 
-	public void setSubjectId(Integer subjectId){
-		this.subjectId = subjectId;
-	}
-	
-	public Integer getSubjectId(){
-		return this.subjectId;
-	}
-
 	public BigDecimal getMainTeacherSalary() {
 		return mainTeacherSalary;
 	}
@@ -117,7 +118,29 @@ public class TeacherDefaultMusicGroupSalary {
 	public java.util.Date getUpdateTime(){
 		return this.updateTime;
 	}
-			
+	public Integer getDurationMin() {
+		return durationMin;
+	}
+
+	public void setDurationMin(Integer durationMin) {
+		this.durationMin = durationMin;
+	}
+
+	public Integer getDurationMax() {
+		return durationMax;
+	}
+
+	public void setDurationMax(Integer durationMax) {
+		this.durationMax = durationMax;
+	}
+
+	public SalarySettlementTypeEnum getSettlementType() {
+		return settlementType;
+	}
+
+	public void setSettlementType(SalarySettlementTypeEnum settlementType) {
+		this.settlementType = settlementType;
+	}
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -10,7 +10,8 @@ public enum SalarySettlementTypeEnum implements BaseEnum<Integer,SalarySettlemen
 
     TEACHER_DEFAULT(1,"老师默认课酬"),
     RATIO_DISCOUNT(2,"课程单价比例折扣"),
-    FIXED_SALARY(3,"固定课酬");
+    FIXED_SALARY(3,"固定课酬"),
+    GRADIENT_SALARY(4,"梯度课酬");
 
     private Integer code;
 

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

@@ -114,7 +114,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeachersDto> getClassGroupAndTeachers(Integer musicGroupId);
+    List<ClassGroupTeachersDto> getClassGroupAndTeachers(String musicGroupId);
 
     /**
      * 获取乐团班级老师课酬
@@ -122,7 +122,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(Integer musicGroupId);
+    List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(String musicGroupId);
 
 
     /**

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

@@ -14,6 +14,6 @@ public interface ClassGroupTeacherSalaryService extends BaseService<Long, ClassG
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeacherSalary> findByMusicGroupId(int musicGroupId);
+    List<ClassGroupTeacherSalary> findByMusicGroupId(String musicGroupId);
 
 }

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java

@@ -95,6 +95,20 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
 			List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, String musicGroupId);
 
 	/**
+	 * 学生注册缴费重新下订单
+	 * @param userId
+	 * @param amount
+	 * @param courseFee
+	 * @param goodsGroups
+	 * @param goodsList
+	 * @return
+	 */
+	StudentPaymentOrder reAddOrder(
+			Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee,
+			List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList,
+			String musicGroupId,StudentPaymentOrder oldOrder);
+
+	/**
 	 * 查询用户指定乐团的报名信息
 	 * @param userId 用户编号
 	 * @param musicGroupId 乐团编号

+ 4 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/SysMessageService.java

@@ -23,10 +23,11 @@ public interface SysMessageService extends BaseService<Long, SysMessage> {
 	 * @param errorMsg 错误消息
 	 * @param readStatus 阅读状态
 	 * @param memo 备注
+	 * @param group 消息组
 	 * @return
 	 */
 	public int addMessage(Integer userId, String subject, String content, String receivers, Date triggerTime, MessageSendMode mode, SendStatusEnum status,
-			String errorMsg, Integer readStatus, String memo);
+			String errorMsg, Integer readStatus, String memo, String group);
 
 	/**
 	 * 修改消息对象
@@ -54,14 +55,14 @@ public interface SysMessageService extends BaseService<Long, SysMessage> {
 	 * @param userId 用户编号
 	 * @param mode 消息模式
 	 * @param messageType 消息类型
-	 * @param receiver 消息接受者
+	 * @param receivers 消息接受者(多个用户用逗号分隔)
 	 * @param triggerTime 触发时间
 	 * @param readStatus 阅读状态(0-未读  1-已读)
 	 * @param url 超链接地址
 	 * @param args 参数
 	 * @return
 	 */
-	public void sendMessage(MessageSender messageSender, Integer userId, MessageSendMode mode, MessageType messageType, String receiver, Date triggerTime,
+	public void sendMessage(MessageSender messageSender, Integer userId, MessageSendMode mode, MessageType messageType, String receivers, Date triggerTime,
 			Integer readStatus, String url, Object... args);
 
 	/**

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

@@ -263,7 +263,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroupTeachersDto> getClassGroupAndTeachers(Integer musicGroupId) {
+    public List<ClassGroupTeachersDto> getClassGroupAndTeachers(String musicGroupId) {
         List<ClassGroupTeachersDto> classGroupAndTeachersList = classGroupDao.findClassGroupByMusicGroupId(musicGroupId);
 
         List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupTeacherMapperService.findClassGroupTeachers(classGroupAndTeachersList);
@@ -281,7 +281,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(Integer musicGroupId) {
+    public List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(String musicGroupId) {
         //乐团班级及班级老师
         List<ClassGroupTeachersDto> classGroupAndTeachers = getClassGroupAndTeachers(musicGroupId);
         //乐团的课程计划

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

@@ -23,7 +23,7 @@ public class ClassGroupTeacherSalaryServiceImpl extends BaseServiceImpl<Long, Cl
 
 
     @Override
-    public List<ClassGroupTeacherSalary> findByMusicGroupId(int musicGroupId) {
+    public List<ClassGroupTeacherSalary> findByMusicGroupId(String musicGroupId) {
         return ClassGroupTeacherSalaryDao.findByMusicGroupId(musicGroupId);
     }
 }

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

@@ -59,7 +59,7 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
 
     @Override
     public MusicGroupSubjectGoodsAndInfoDto getSubjectGoodsAndInfo(String musicGroupId, Integer subjectId) {
-        MusicGroup musicGroup = musicGroupService.get(musicGroupId.toString());
+        MusicGroup musicGroup = musicGroupService.get(musicGroupId);
 
         //课程形态
         Map<String, Object> courseForm = JSON.parseObject(musicGroup.getCourseForm(), Map.class);

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

@@ -12,7 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.util.HashMap;
 import java.util.Map;
+import java.util.Random;
 
 /**
  * 支付服务类
@@ -43,12 +45,20 @@ public class PayServiceImpl implements PayService {
     public Map getPayMap(BigDecimal amount, String orderNo, String notifyUrl, String returnUrl, String orderSubject, String orderBody) throws Exception {
         //支付通道决策
         SysAccount routingAccount = getRoutingAccount(amount);
+        HashMap<String, Object> unionPay = new HashMap<>();
+        String type = "YQPAY";
+        Map payMap;
         if (routingAccount != null) {
             //易乾支付
-            return YqPayUtil.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody, routingAccount.getMerNo());
+            payMap = YqPayUtil.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody, routingAccount.getMerNo());
         } else {
-            return UnionPay.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject);
+            type = "UNIONPAY";
+            payMap = UnionPay.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject);
         }
+        unionPay.put("orderNo", orderNo);
+        unionPay.put("type", type);
+        unionPay.put("payMap", payMap);
+        return unionPay;
     }
 
     public Map<String, Object> query(String orderNo) throws Exception {
@@ -64,6 +74,10 @@ public class PayServiceImpl implements PayService {
         if (rem > 0 && rem <= 5) { //私人账户
             routingAccount = sysAccountService.getPerAccount(money);
         }
+
+        //临时全返回双乾
+        routingAccount = sysAccountService.getPerAccount(money);
+
         return routingAccount;
     }
 

+ 92 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -10,6 +10,8 @@ import java.util.Map;
 import javax.annotation.Resource;
 
 import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -22,11 +24,6 @@ import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
 import com.ym.mec.biz.dal.dto.StudentFeeDto;
 import com.ym.mec.biz.dal.dto.StudentInfo;
-import com.ym.mec.biz.dal.entity.Goods;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
-import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.GoodsType;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
@@ -54,6 +51,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
     private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
     @Autowired
     private TeacherDao teacherDao;
+    @Autowired
+    private MusicGroupSubjectPlanService musicGroupSubjectPlanService;
 
     @Override
     public BaseDAO<Long, StudentRegistration> getDAO() {
@@ -140,6 +139,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         }
         studentRegistration.setUserId(sysUser.getId());
         studentRegistrationDao.insert(studentRegistration);
+        //增加报名学生数
+        MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId());
+        musicOneSubjectClassPlan.setApplyStudentNum(musicOneSubjectClassPlan.getApplyStudentNum()+1);
         return studentRegistration;
     }
 
@@ -227,10 +229,91 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         return studentPaymentOrder;
     }
 
-	@Override
-	public StudentRegistration queryByUserIdAndMusicGroupId(Integer userId, String musicGroupId) {
-		return studentRegistrationDao.queryByUserIdAndMusicGroupId(userId, musicGroupId);
-	}
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public StudentPaymentOrder reAddOrder(Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, String musicGroupId, StudentPaymentOrder oldOrder) {
+        //关闭老订单
+        oldOrder.setStatus(DealStatusEnum.CLOSE);
+        studentPaymentOrderService.update(oldOrder);
+        Date date = new Date();
+        StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
+        studentPaymentOrder.setUserId(userId);
+        studentPaymentOrder.setOrderNo(orderNo);
+        studentPaymentOrder.setType(OrderTypeEnum.APPLY);
+        studentPaymentOrder.setExpectAmount(amount);
+        studentPaymentOrder.setActualAmount(amount);
+        studentPaymentOrder.setStatus(DealStatusEnum.ING);
+        studentPaymentOrder.setPaymentChannel(paymentChannel);
+        studentPaymentOrder.setMusicGroupId(musicGroupId);
+        studentPaymentOrderService.insert(studentPaymentOrder);
+
+        ArrayList<StudentPaymentOrderDetail> studentPaymentOrderDetailList = new ArrayList<>();
+        StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
+        studentPaymentOrderDetail.setType(OrderDetailTypeEnum.COURSE);
+        studentPaymentOrderDetail.setPrice(courseFee);
+        studentPaymentOrderDetail.setCreateTime(date);
+        studentPaymentOrderDetail.setUpdateTime(date);
+        studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
+        studentPaymentOrderDetailList.add(studentPaymentOrderDetail);
+        //乐器及打包辅件
+        if (goodsGroups != null) {
+            for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
+                StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
+                OrderDetailTypeEnum type = null;
+                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
+                    type = OrderDetailTypeEnum.MUSICAL;
+                } else if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
+                    type = OrderDetailTypeEnum.ACCESSORIES;
+                } else if (goodsGroup.getType().equals(GoodsType.OTHER)) {
+                    type = OrderDetailTypeEnum.TEACHING;
+                }
+                studentPaymentOrderDetail4goodsGroup.setType(type);
+                studentPaymentOrderDetail4goodsGroup.setPrice(goodsGroup.getPrice());
+                studentPaymentOrderDetail4goodsGroup.setGoodsIdList(goodsGroup.getGoodsIdList());
+                studentPaymentOrderDetail4goodsGroup.setCreateTime(date);
+                studentPaymentOrderDetail4goodsGroup.setUpdateTime(date);
+                studentPaymentOrderDetail4goodsGroup.setPaymentOrderId(studentPaymentOrder.getId());
+                studentPaymentOrderDetailList.add(studentPaymentOrderDetail4goodsGroup);
+            }
+        }
+
+        //单独辅件
+        if (goodsList != null) {
+            for (Goods goods : goodsList) {
+                StudentPaymentOrderDetail studentPaymentOrderDetail4goods = new StudentPaymentOrderDetail();
+                studentPaymentOrderDetail4goods.setType(OrderDetailTypeEnum.ACCESSORIES);
+                studentPaymentOrderDetail4goods.setPrice(goods.getGroupPurchasePrice());
+                studentPaymentOrderDetail4goods.setGoodsIdList(goods.getId().toString());
+                studentPaymentOrderDetail4goods.setCreateTime(date);
+                studentPaymentOrderDetail4goods.setUpdateTime(date);
+                studentPaymentOrderDetail4goods.setPaymentOrderId(studentPaymentOrder.getId());
+                studentPaymentOrderDetailList.add(studentPaymentOrderDetail4goods);
+
+            }
+        }
+        //单独教谱
+        if (otherGoodsList != null) {
+            for (Goods goods : otherGoodsList) {
+                StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
+                studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
+                studentPaymentOrderDetail4otherGoods.setPrice(goods.getGroupPurchasePrice());
+                studentPaymentOrderDetail4otherGoods.setGoodsIdList(goods.getId().toString());
+                studentPaymentOrderDetail4otherGoods.setCreateTime(date);
+                studentPaymentOrderDetail4otherGoods.setUpdateTime(date);
+                studentPaymentOrderDetail4otherGoods.setPaymentOrderId(studentPaymentOrder.getId());
+                studentPaymentOrderDetailList.add(studentPaymentOrderDetail4otherGoods);
+            }
+        }
+
+        studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
+
+        return studentPaymentOrder;
+    }
+
+    @Override
+    public StudentRegistration queryByUserIdAndMusicGroupId(Integer userId, String musicGroupId) {
+        return studentRegistrationDao.queryByUserIdAndMusicGroupId(userId, musicGroupId);
+    }
 
     @Override
     public StudentRegistration getByPhoneAndMusicGroupId(String musicGroupId, String parentsPhone) {

+ 14 - 11
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMessageServiceImpl.java

@@ -47,9 +47,9 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
-	
+
 	@Autowired
-	private RedisCache<String,Object> redisCache;
+	private RedisCache<String, Object> redisCache;
 
 	// 验证码有效期
 	public static final int CODE_EXPIRE = 60 * 5;
@@ -69,7 +69,7 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 
 	@Override
 	public int addMessage(Integer userId, String subject, String content, String receivers, Date triggerTime, MessageSendMode mode, SendStatusEnum status,
-			String errorMsg, Integer readStatus, String memo) {
+			String errorMsg, Integer readStatus, String memo, String group) {
 		SysMessage message = null;
 		Date date = new Date();
 
@@ -99,6 +99,7 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 				message.setErrorMsg(errorMsg);
 				message.setReadStatus(readStatus);
 				message.setMemo(memo);
+				message.setGroup(group);
 
 				messages.add(message);
 			}
@@ -143,7 +144,7 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 				errorMsg = e.getMessage();
 				LOGGER.warn("消息发送失败", e);
 			}
-			return addMessage(null, subject, content, receivers, triggerTime, mode, status, errorMsg, readStatus, memo) > 0;
+			return addMessage(null, subject, content, receivers, triggerTime, mode, status, errorMsg, readStatus, memo, null) > 0;
 		}
 
 		return false;
@@ -151,12 +152,13 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 
 	@Override
 	@Async
-	public void sendMessage(MessageSender messageSender, Integer userId, MessageSendMode mode, MessageType type, String receiver, Date triggerTime,
+	public void sendMessage(MessageSender messageSender, Integer userId, MessageSendMode mode, MessageType type, String receivers, Date triggerTime,
 			Integer readStatus, String url, Object... args) {
 
-		if (StringUtils.isBlank(receiver)) {
+		if (StringUtils.isBlank(receivers)) {
 			throw new BizException("接收地址不能为空");
 		}
+		String[] tos = StringUtils.split(receivers, ',');
 		SysMessageConfig messageConfig = sysMessageConfigService.queryByType(type);
 		if (messageConfig == null) {
 			throw new BizException("消息类型错误");
@@ -168,8 +170,9 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 		if (triggerTime == null || date.after(triggerTime)) {
 			status = SendStatusEnum.SENDING;
 			try {
-				if (debugMode == true || messageSenderPluginContext.send(messageSender, messageConfig.getDescription(),
-								MessageFormatter.arrayFormat(messageConfig.getContent(), args), receiver, url)) {
+				if (debugMode == true
+						|| messageSenderPluginContext.batchSend(messageSender, messageConfig.getDescription(),
+								MessageFormatter.arrayFormat(messageConfig.getContent(), args), tos, url)) {
 					status = SendStatusEnum.SUCCESSED;
 				} else {
 					status = SendStatusEnum.FAILED;
@@ -180,8 +183,8 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 				LOGGER.warn("消息发送失败", e);
 			}
 		}
-		addMessage(userId, type.getCode(), MessageFormatter.arrayFormat(messageConfig.getContent(), args), receiver, triggerTime, mode, status, errorMsg,
-				readStatus, url);
+		addMessage(userId, type.getCode(), MessageFormatter.arrayFormat(messageConfig.getContent(), args), receivers, triggerTime, mode, status, errorMsg,
+				readStatus, url, messageConfig.getGroup());
 	}
 
 	@Override
@@ -209,7 +212,7 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 				LOGGER.warn("消息发送失败", e);
 			}
 		}
-		addMessage(userId, title, content, receiver, triggerTime, mode, status, errorMsg, readStatus, url);
+		addMessage(userId, title, content, receiver, triggerTime, mode, status, errorMsg, readStatus, url, null);
 	}
 
 	@Override

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

@@ -12,12 +12,14 @@
         <result column="subject_id_" property="subjectId"/>
         <result column="expected_student_num_" property="expectedStudentNum"/>
         <result column="apply_student_num_" property="applyStudentNum"/>
+        <result column="paid_student_num_" property="paidStudentNum"/>
         <result column="fee_" property="fee"/>
         <result column="kit_group_purchase_type_" property="kitGroupPurchaseType"
                 typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="deposit_fee_" property="depositFee"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
+        <result column="version" property="version"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -69,8 +71,11 @@
             <if test="musicGroupId != null">
                 music_group_id_ = #{musicGroupId},
             </if>
+            <if test="version != null">
+                version = version+1,
+            </if>
         </set>
-        WHERE id_ = #{id}
+        WHERE id_ = #{id} AND version =#{version}
     </update>
 
     <!-- 根据主键删除一条记录 -->

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/SysAccountMapper.xml

@@ -90,10 +90,10 @@
         channel_type_ = #{channelType,jdbcType=CHAR},
       </if>
       <if test="version != null">
-        version = #{version,jdbcType=INTEGER},
+        version = version+1,
       </if>
     </set>
-    where id_ = #{id,jdbcType=INTEGER}
+    where id_ = #{id,jdbcType=INTEGER} AND version =#{version}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.ym.mec.biz.dal.entity.SysAccount">
     <!--@mbg.generated-->
@@ -109,6 +109,6 @@
   <select id="find"></select>
   <!-- 获取一个私户账户 -->
   <select id="getPerAccount" resultMap="SysAccount">
-    SELECT * FROM sys_account WHERE channel_type_ = 'YQPAY' AND channel_type_ = 'PER'
+    SELECT * FROM sys_account WHERE channel_ = 'YQPAY' AND channel_type_ = 'PER'
   </select>
 </mapper>

+ 10 - 3
mec-biz/src/main/resources/config/mybatis/SysMessageConfigMapper.xml

@@ -12,6 +12,7 @@
 		<result column="description_" property="description" />
 		<result column="modify_on_" property="modifyOn" />
 		<result column="url_" property="url" />
+		<result column="group_" property="group" />
 	</resultMap>
 
 	<sql id="queryCondition">
@@ -24,7 +25,10 @@
 				and content_ = #{content,jdbcType=VARCHAR},
 			</if>
 			<if test="description != null">
-				and description_ = #{description,jdbcType=TIMESTAMP}
+				and description_ = #{description,jdbcType=VARCHAR}
+			</if>
+			<if test="group != null">
+				and group_ = #{group,jdbcType=VARCHAR}
 			</if>
 		</where>
 	</sql>
@@ -47,8 +51,8 @@
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 			AS ID FROM DUAL </selectKey> -->
 		INSERT INTO sys_message_config
-		(id_,message_type_,content_,description_,modify_on_,url_)
-		VALUES(#{id},#{messageType},#{content},#{description},#{modifyOn},#{url})
+		(id_,message_type_,content_,description_,modify_on_,url_,group_)
+		VALUES(#{id},#{messageType},#{content},#{description},#{modifyOn},#{url},#{group})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -67,6 +71,9 @@
 			<if test="url != null">
 				url_ = #{url},
 			</if>
+			<if test="group != null">
+				group_ = #{group},
+			</if>
 			<if test="content != null">
 				content_ = #{content},
 			</if>

+ 14 - 6
mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml

@@ -8,7 +8,9 @@
 		<result column="id_" property="id" />
 		<result column="user_id_" property="userId" />
 		<result column="course_schedule_type_" property="courseScheduleType" />
-		<result column="subject_id_" property="subjectId" />
+		<result column="settlement_type_" property="settlementType" />
+		<result column="duration_min_" property="durationMin" />
+		<result column="duration_max_" property="durationMax" />
 		<result column="main_teacher_salary_" property="mainTeacherSalary" />
 		<result column="assistant_teacher_salary_" property="assistantTeacherSalary" />
 		<result column="create_time_" property="createTime" />
@@ -33,8 +35,8 @@
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 			AS ID FROM DUAL </selectKey> -->
 		INSERT INTO teacher_default_music_group_salary
-		(id_,user_id_,course_schedule_type_,subject_id_,main_teacher_salary_,assistant_teacher_salary_,create_time_,update_time_)
-		VALUES(#{id},#{userId},#{courseScheduleType},#{subjectId},#{mainTeacherSalary},#{assistantTeacherSalary},now(),now())
+		(id_,user_id_,course_schedule_type_,settlement_type_,duration_min_,duration_max_,main_teacher_salary_,assistant_teacher_salary_,create_time_,update_time_)
+		VALUES(#{id},#{userId},#{courseScheduleType},#{settlementType},#{durationMin},#{durationMax},#{mainTeacherSalary},#{assistantTeacherSalary},now(),now())
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -42,9 +44,6 @@
 		parameterType="com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary">
 		UPDATE teacher_default_music_group_salary
 		<set>
-			<if test="subjectId != null">
-				subject_id_ = #{subjectId},
-			</if>
 			<if test="userId != null">
 				user_id_ = #{userId},
 			</if>
@@ -54,6 +53,15 @@
 			<if test="courseScheduleType != null">
 				course_schedule_type_ = #{courseScheduleType},
 			</if>
+			<if test="settlementType != null">
+				settlement_type_ = #{settlementType},
+			</if>
+			<if test="duration_min_ != null">
+				duration_min_ = #{durationMin},
+			</if>
+			<if test="duration_max_ != null">
+				duration_max_ = #{durationMax},
+			</if>
 			<if test="mainTeacherSalary != null">
 				main_teacher_salary_ = #{mainTeacherSalary},
 			</if>

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

@@ -9,6 +9,7 @@ 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;
@@ -20,6 +21,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @ComponentScan(basePackages = {"com.ym.mec", "org.snaker"})
 @Configuration
 @EnableSwagger2Doc
+@EnableAsync
 public class EducationApplication {
 
     public static void main(String[] args) {

+ 13 - 84
mec-education/src/main/java/com/ym/mec/education/config/WebMvcConfig.java

@@ -1,39 +1,17 @@
 package com.ym.mec.education.config;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
-import com.ym.mec.common.enums.BaseEnum;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 
 @Configuration
 public class WebMvcConfig implements WebMvcConfigurer {
@@ -41,67 +19,18 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	/**
 	 * 枚举类的转换器 addConverterFactory
 	 */
-
 	@Override
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }

+ 50 - 0
mec-education/src/main/java/com/ym/mec/education/enums/ApprovalStatusEnum.java

@@ -0,0 +1,50 @@
+package com.ym.mec.education.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+import java.util.Arrays;
+
+/**
+ * 审核状态枚举(待审批、审批中、审批拒绝、审批通过)
+ */
+public enum ApprovalStatusEnum implements BaseEnum<String, ApprovalStatusEnum> {
+    PENDING("PENDING", "待审批"),APPROVAL("APPROVAL", "审核中"), REJECT("REJECT", "拒绝"), PASS("PASS", "通过");
+
+	private String code;
+
+	private String msg;
+
+	ApprovalStatusEnum(String code, String msg) {
+		this.code = code;
+		this.msg = msg;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getMsg() {
+		return msg;
+	}
+
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+
+	@Override
+	public String getCode() {
+		return this.code;
+	}
+
+    /**
+     * 根据枚举值获取枚举信息
+     *
+     * @param code 枚举值
+     * @return 枚举信息
+     */
+    public static String getMsgByCode(String code) {
+        return Arrays.stream(ApprovalStatusEnum.values())
+            .filter(AuditStatusEnum -> AuditStatusEnum.getCode().equals(code))
+            .findFirst()
+            .map(ApprovalStatusEnum::getMsg).orElse(null);
+    }
+}

+ 3 - 0
mec-im/src/main/java/com/ym/SealClassApplication.java

@@ -1,6 +1,7 @@
 package com.ym;
 
 import lombok.extern.slf4j.Slf4j;
+
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@@ -9,6 +10,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.web.client.RestTemplate;
 
@@ -19,6 +21,7 @@ import org.springframework.web.client.RestTemplate;
 @EnableScheduling
 @EnableDiscoveryClient
 @Configuration
+@EnableAsync
 public class SealClassApplication {
 
 	public static void main(String[] args) {

+ 2 - 0
mec-student/src/main/java/com/ym/mec/student/StudentApplication.java

@@ -9,6 +9,7 @@ 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;
@@ -20,6 +21,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @ComponentScan(basePackages = "com.ym.mec")
 @Configuration
 @EnableSwagger2Doc
+@EnableAsync
 public class StudentApplication {
 
 	public static void main(String[] args) {

+ 6 - 105
mec-student/src/main/java/com/ym/mec/student/config/WebMvcConfig.java

@@ -1,41 +1,17 @@
 package com.ym.mec.student.config;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
-import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
 import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
-import com.ym.mec.common.enums.BaseEnum;
 
 @Configuration
 public class WebMvcConfig implements WebMvcConfigurer {
@@ -51,85 +27,10 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	@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);
     }
 
-	@SuppressWarnings("rawtypes")
-	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		
-		objectMapper.getSerializerProvider().setNullValueSerializer(new JsonSerializer<Object>(){
-
-			@Override
-			public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
-				// TODO Auto-generated method stub
-				
-			}});
-
-		// 日期和时间格式化
-		SimpleModule javaTimeModule = new SimpleModule();
-
-		javaTimeModule.addSerializer(String.class, new JsonSerializer<String>() {
-
-			@Override
-			public void serialize(String value, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				if (value == null) {
-					jsonGenerator.writeString("");
-				} else {
-					jsonGenerator.writeString(value);
-				}
-			}
-		});
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
-
 }

+ 8 - 8
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -138,7 +138,7 @@ public class MusicGroupController extends BaseController {
         }
 
         //判断用户是否已存在订单
-        ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId().toString(), DealStatusEnum.ING);
+        ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.ING);
         if (ApplyOrder != null) {
             return failed(HttpStatus.CONTINUE, "您有待支付的订单");
         }
@@ -192,7 +192,7 @@ public class MusicGroupController extends BaseController {
 
         Map payMap = payService.getPayMap(orderAmount, orderNo, "https://pay.dayaedu.com/api/yqpay/notify", "http://dev.dayaedu.com", "测试订单", "测试订单");
 
-        studentRegistrationService.addOrder(userId, amount, orderNo, "双乾", courseFee, goodsGroups, goodsList, otherGoodsList, studentRegistration.getMusicGroupId().toString());
+        studentRegistrationService.addOrder(userId, amount, orderNo, "双乾", courseFee, goodsGroups, goodsList, otherGoodsList, studentRegistration.getMusicGroupId());
 
         return succeed(payMap);
     }
@@ -268,7 +268,7 @@ public class MusicGroupController extends BaseController {
 
         Map payMap = payService.getPayMap(orderAmount, orderNo, "https://pay.dayaedu.com/api/yqpay/notify", "http://dev.dayaedu.com", "测试订单", "测试订单");
 
-        studentRegistrationService.addOrder(userId, amount, orderNo, "双乾", courseFee, goodsGroups, goodsList, otherGoodsList, studentRegistration.getMusicGroupId().toString());
+        studentRegistrationService.reAddOrder(userId, amount, orderNo, "双乾", courseFee, goodsGroups, goodsList, otherGoodsList, studentRegistration.getMusicGroupId(),ApplyOrder);
 
         return succeed(payMap);
     }
@@ -282,11 +282,11 @@ public class MusicGroupController extends BaseController {
 //
 //        System.out.println(query);
 //
-//        IdWorker idWorker = new IdWorker(0, 0);
-//        String orderNo = "1017" + idWorker.nextId();
-//        BigDecimal amount = new BigDecimal("200");
-//        Map map = payService.getPayMap(amount, orderNo, "https://pay.dayaedu.com/notify", "https://baodiu.com", "测试订单", "测试订单");
-       return succeed(sysUser);
+        IdWorker idWorker = new IdWorker(0, 0);
+        String orderNo = "1017" + idWorker.nextId();
+        BigDecimal amount = new BigDecimal("200");
+        Map map = payService.getPayMap(amount, orderNo, "https://pay.dayaedu.com/notify", "https://baodiu.com", "测试订单", "测试订单");
+       return succeed(map);
     }
 
     @ApiOperation(value = "订单状态查询")

+ 2 - 0
mec-task/src/main/java/com/ym/mec/task/TaskApplication.java

@@ -9,6 +9,7 @@ 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;
@@ -20,6 +21,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @ComponentScan(basePackages="com.ym.mec")
 @Configuration
 @EnableSwagger2Doc
+@EnableAsync
 public class TaskApplication {
 
 	public static void main(String[] args) {

+ 13 - 56
mec-task/src/main/java/com/ym/mec/task/config/WebMvcConfig.java

@@ -7,12 +7,16 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import com.fasterxml.jackson.core.JsonGenerator;
@@ -33,6 +37,7 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 import com.ym.mec.common.enums.BaseEnum;
 
 @Configuration
@@ -45,62 +50,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }

+ 2 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/TeacherApplication.java

@@ -9,6 +9,7 @@ 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;
@@ -20,6 +21,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @ComponentScan(basePackages = { "com.ym.mec", "org.snaker.engine" })
 @Configuration
 @EnableSwagger2Doc
+@EnableAsync
 public class TeacherApplication {
 	
 	public static void main(String[] args) {

+ 13 - 56
mec-teacher/src/main/java/com/ym/mec/teacher/config/WebMvcConfig.java

@@ -7,12 +7,16 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import com.fasterxml.jackson.core.JsonGenerator;
@@ -33,6 +37,7 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 import com.ym.mec.common.enums.BaseEnum;
 
 @Configuration
@@ -45,62 +50,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }

+ 3 - 3
mec-util/src/main/java/com/ym/mec/util/json/JsonUtil.java

@@ -169,10 +169,10 @@ public class JsonUtil {
 	}
 
 	public static String toJSONString(Object object, SerializeConfig config, ValueFilter filter, SerializerFeature... features) {
-		
+
 		SerializeWriter out = new SerializeWriter(SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteNullStringAsEmpty,
-				SerializerFeature.WriteMapNullValue, SerializerFeature.QuoteFieldNames);
-		
+				SerializerFeature.WriteMapNullValue, SerializerFeature.QuoteFieldNames, SerializerFeature.WriteNullNumberAsZero);
+
 		JSONSerializer serializer = new JSONSerializer(out, config);
 		for (SerializerFeature feature : features) {
 			serializer.config(feature, true);

+ 2 - 0
mec-web/src/main/java/com/ym/mec/web/WebApplication.java

@@ -9,6 +9,7 @@ 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;
@@ -20,6 +21,7 @@ import com.spring4all.swagger.EnableSwagger2Doc;
 @ComponentScan(basePackages = "com.ym.mec")
 @Configuration
 @EnableSwagger2Doc
+@EnableAsync
 public class WebApplication {
 
 	public static void main(String[] args) {

+ 13 - 56
mec-web/src/main/java/com/ym/mec/web/config/WebMvcConfig.java

@@ -7,12 +7,16 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import com.fasterxml.jackson.core.JsonGenerator;
@@ -33,6 +37,7 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 import com.ym.mec.common.enums.BaseEnum;
 
 @Configuration
@@ -45,62 +50,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }

+ 5 - 5
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java

@@ -7,9 +7,7 @@ import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.ClassGroupTeacherMapperService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.page.QueryInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.*;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -107,13 +105,15 @@ public class ClassGroupController extends BaseController {
 
     @ApiOperation(value = "获取乐团班级老师")
     @GetMapping("/findMusicGroupClassTeacher")
-    public Object findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId) {
+    public Object findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
         return succeed(classGroupService.getClassGroupAndTeachers(musicGroupId));
     }
 
     @ApiOperation(value = "获取乐团班级老师课酬")
     @GetMapping("/findMusicGroupClassTeacherSalary")
-    public Object findMusicGroupClassTeacherSalary(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId) {
+    @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer"),
+            @ApiImplicitParam(name = "subjectId", value = "声部编号", required = true, dataType = "Integer")})
+    public Object findMusicGroupClassTeacherSalary(String musicGroupId) {
         return succeed(classGroupService.getClassGroupAndTeacherSalary(musicGroupId));
     }
 

+ 13 - 56
mec-workflow/src/main/java/com/ym/mec/workfow/config/WebMvcConfig.java

@@ -7,12 +7,16 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.Date;
+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.context.annotation.Primary;
 import org.springframework.format.FormatterRegistry;
+import org.springframework.http.MediaType;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import com.fasterxml.jackson.core.JsonGenerator;
@@ -33,6 +37,7 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
 import com.ym.mec.common.config.EnumConverterFactory;
+import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
 import com.ym.mec.common.enums.BaseEnum;
 
 @Configuration
@@ -45,62 +50,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addFormatters(FormatterRegistry registry) {
 		registry.addConverterFactory(new EnumConverterFactory());
 	}
-
-	@SuppressWarnings("rawtypes")
+	
 	@Bean
-	@Primary
-	public ObjectMapper ObjectMapper() {
-		ObjectMapper objectMapper = new ObjectMapper();
-		// 对于空的对象转json的时候不抛出错误
-		objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-		// 禁用遇到未知属性抛出异常
-		objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-		// 序列化BigDecimal时不使用科学计数法输出
-		objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
-		// 日期和时间格式化
-		JavaTimeModule javaTimeModule = new JavaTimeModule();
-		javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-		javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
-		javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
-
-		// BaseEnum序列化
-		javaTimeModule.addSerializer(BaseEnum.class, new JsonSerializer<BaseEnum>() {
-
-			@Override
-			public void serialize(BaseEnum enumObj, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException {
-				jsonGenerator.writeString(enumObj.getCode().toString());
-			}
-
-		});
-
-		// Date序列化和反序列化
-		javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
-			@Override
-			public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
-				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String formattedDate = formatter.format(date);
-				jsonGenerator.writeString(formattedDate);
-			}
-		});
-
-		javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
-			@Override
-			public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-				String date = jsonParser.getText();
-				try {
-					return format.parse(date);
-				} catch (ParseException e) {
-					return null;
-				}
-			}
-		});
-
-		objectMapper.registerModule(javaTimeModule);
-		return objectMapper;
-	}
+    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);
+    }
 
 }