ソースを参照

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into saas

yonge 2 年 前
コミット
533d50347e

+ 4 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -1289,15 +1289,13 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 
             Map<CourseSchedule.CourseScheduleType, TeacherDefaultMusicGroupSalary> collect = teacherSalaryList.stream().collect(Collectors.toMap(TeacherDefaultMusicGroupSalary::getCourseScheduleType, teacherDefaultMusicGroupSalary -> teacherDefaultMusicGroupSalary));
             
-            if(courseSchedule.getType() == CourseSchedule.CourseScheduleType.HIGH){
-            	courseSchedule.setType(CourseScheduleType.HIGH_ONLINE);
-            }
-
-            TeacherDefaultMusicGroupSalary teacherDefaultMusicGroupSalary = collect.get(courseSchedule.getType());
+            TeacherDefaultMusicGroupSalary teacherDefaultMusicGroupSalary =
+                    collect.get(courseSchedule.getType()==CourseScheduleType.HIGH?CourseScheduleType.HIGH_ONLINE:courseSchedule.getType());
 
             if (teacherDefaultMusicGroupSalary == null) {
                 Teacher teacher = teacherDao.get(courseScheduleTeacherSalary.getUserId());
-                throw new BizException("请设置" + teacher.getRealName() + "老师的" + courseSchedule.getType().getMsg() + "课酬");
+                throw new BizException("请设置" + teacher.getRealName() + "老师的" +
+                        (courseSchedule.getType()==CourseScheduleType.HIGH?CourseScheduleType.HIGH_ONLINE:courseSchedule.getType()).getMsg() + "课酬");
             }
 
             //对应基准课酬

+ 2 - 2
mec-mall/mall-admin/src/main/resources/bootstrap-prod.yml

@@ -2,8 +2,8 @@ spring:
   cloud:
     nacos:
       config:
-        server-addr: 121.41.82.151:8848
-        namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
+        server-addr: 47.96.80.97:8848
+        namespace: f40a7594-4bd0-4bc6-8397-9353c6d2e63a
         group: DEFAULT_GROUP
         prefix: mall-admin
         file-extension: yaml

+ 69 - 0
mec-mall/mall-admin/src/main/resources/logback-spring.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+	<property name="LOG_HOME" value="/mdata/logs/mall-admin-%d{yyyy-MM-dd_HH}-%i.log" />
+	<property name="CONSOLE_LOG_PATTERN"
+			  value="[%X{username} %X{ip} %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}] : %msg%n" />
+
+	<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder charset="UTF-8">
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<appender name="file"
+			  class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<FileNamePattern>${LOG_HOME}</FileNamePattern>
+			<MaxHistory>90</MaxHistory>
+			<TimeBasedFileNamingAndTriggeringPolicy
+					class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<MaxFileSize>20MB</MaxFileSize>
+			</TimeBasedFileNamingAndTriggeringPolicy>
+		</rollingPolicy>
+
+		<encoder>
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<logger name="com.yonge" level="INFO" />
+
+	<!--本地环境:打印控制台 -->
+	<springProfile name="local">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+	<!--开发环境:打印控制台 -->
+	<springProfile name="dev">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+	<springProfile name="test">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+	<springProfile name="pre">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+	<!--生产环境:输出到文件 -->
+	<springProfile name="prod">
+		<root level="WARN">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+</configuration>

+ 2 - 2
mec-mall/mall-portal/src/main/resources/bootstrap-prod.yml

@@ -2,8 +2,8 @@ spring:
   cloud:
     nacos:
       config:
-        server-addr: 121.41.82.151:8848
-        namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
+        server-addr: 47.96.80.97:8848
+        namespace: f40a7594-4bd0-4bc6-8397-9353c6d2e63a
         group: DEFAULT_GROUP
         prefix: mall-portal
         file-extension: yaml

+ 69 - 0
mec-mall/mall-portal/src/main/resources/logback-spring.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+	<property name="LOG_HOME" value="/mdata/logs/mall-portal-%d{yyyy-MM-dd_HH}-%i.log" />
+	<property name="CONSOLE_LOG_PATTERN"
+			  value="[%X{username} %X{ip} %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}] : %msg%n" />
+
+	<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder charset="UTF-8">
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<appender name="file"
+			  class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<FileNamePattern>${LOG_HOME}</FileNamePattern>
+			<MaxHistory>90</MaxHistory>
+			<TimeBasedFileNamingAndTriggeringPolicy
+					class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<MaxFileSize>20MB</MaxFileSize>
+			</TimeBasedFileNamingAndTriggeringPolicy>
+		</rollingPolicy>
+
+		<encoder>
+			<pattern>${CONSOLE_LOG_PATTERN}</pattern>
+		</encoder>
+	</appender>
+
+	<logger name="com.yonge" level="info" />
+
+	<!--本地环境:打印控制台 -->
+	<springProfile name="local">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+	<!--开发环境:打印控制台 -->
+	<springProfile name="dev">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+	<springProfile name="test">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+	<springProfile name="pre">
+		<root level="INFO">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+	<!--生产环境:输出到文件 -->
+	<springProfile name="prod">
+		<root level="WARN">
+			<appender-ref ref="stdout" />
+			<appender-ref ref="file" />
+		</root>
+	</springProfile>
+
+</configuration>