Преглед на файлове

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

zouxuan преди 2 години
родител
ревизия
932d471048
променени са 83 файла, в които са добавени 1690 реда и са изтрити 99 реда
  1. 1 0
      audio-analysis/src/main/java/com/yonge/netty/server/handler/NettyChannelManager.java
  2. 11 0
      audio-analysis/src/main/java/com/yonge/netty/server/handler/NettyServerHandler.java
  3. 1 0
      cms/pom.xml
  4. 1 0
      mec-auth/mec-auth-server/pom.xml
  5. 1 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebMvcConfig.java
  6. 9 3
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebSecurityConfig.java
  7. 35 6
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/provider/PhoneAuthenticationProvider.java
  8. 112 0
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java
  9. 67 0
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/queryInfo/QRLoginDto.java
  10. 7 0
      mec-biz/pom.xml
  11. 4 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CloudTeacherFreeCourseDao.java
  12. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleRewardsRulesDao.java
  13. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleSwDao.java
  14. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ExtensionOrderDao.java
  15. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java
  16. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysMusicCompareRecordDao.java
  17. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ExportTeacherSalaryDto.java
  18. 84 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherCloudTrainingDto.java
  19. 145 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleSw.java
  20. 124 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ExtensionOrder.java
  21. 13 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ImLiveBroadcastRoom.java
  22. 43 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/LiveServiceProviderEnum.java
  23. 70 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseScheduleSWQueryInfo.java
  24. 35 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtensionSWQueryInfo.java
  25. 47 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloudTrainingQueryInfo.java
  26. 46 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomVo.java
  27. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java
  28. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleRewardsRulesService.java
  29. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleSwService.java
  30. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/ExtensionOrderService.java
  31. 13 7
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java
  32. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentStatisticsService.java
  33. 6 2
      mec-biz/src/main/java/com/ym/mec/biz/service/SysMusicCompareRecordService.java
  34. 13 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java
  35. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleRewardsRulesServiceImpl.java
  36. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleSwServiceImpl.java
  37. 9 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  38. 5 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java
  39. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtensionOrderServiceImpl.java
  40. 83 7
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java
  41. 16 11
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  42. 7 8
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java
  43. 0 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java
  44. 20 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java
  45. 29 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  46. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java
  47. 18 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java
  48. 2 2
      mec-biz/src/main/resources/config/contracts/latest_contract_template.ftl
  49. 8 4
      mec-biz/src/main/resources/config/mybatis/ActivityUserMapperMapper.xml
  50. 0 6
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  51. 5 0
      mec-biz/src/main/resources/config/mybatis/CloudTeacherFreeCourseMapper.xml
  52. 2 2
      mec-biz/src/main/resources/config/mybatis/CourseConvertLogMapper.xml
  53. 1 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleRewardsMapper.xml
  54. 135 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleSwMapper.xml
  55. 3 3
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  56. 110 0
      mec-biz/src/main/resources/config/mybatis/ExtensionOrderMapper.xml
  57. 2 1
      mec-biz/src/main/resources/config/mybatis/ImLiveBroadcastRoomMapper.xml
  58. 2 2
      mec-biz/src/main/resources/config/mybatis/MusicGroupCalenderRefundPeriodMapper.xml
  59. 9 0
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  60. 21 0
      mec-biz/src/main/resources/config/mybatis/SysMusicCompareRecordMapper.xml
  61. 1 0
      mec-eureka/pom.xml
  62. 1 0
      mec-gateway/mec-gateway-admin/pom.xml
  63. 1 0
      mec-gateway/mec-gateway-web/pom.xml
  64. 1 0
      mec-im/pom.xml
  65. 1 0
      mec-monitor/pom.xml
  66. 1 0
      mec-student/pom.xml
  67. 1 0
      mec-task/pom.xml
  68. 1 0
      mec-teacher/pom.xml
  69. 15 2
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherImLiveBroadcastRoomController.java
  70. 1 1
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/adapay/SettleAccountService.java
  71. 2 2
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/provider/TsignPlugin.java
  72. 1 0
      mec-web/pom.xml
  73. 39 0
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  74. 1 0
      mec-web/src/main/java/com/ym/mec/web/controller/IndexController.java
  75. 2 2
      mec-web/src/main/java/com/ym/mec/web/controller/StudentStatisticsController.java
  76. 77 0
      mec-web/src/main/java/com/ym/mec/web/controller/SwTempJcController.java
  77. 4 0
      mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java
  78. 14 1
      mec-web/src/main/java/com/ym/mec/web/controller/TempController.java
  79. 1 1
      mec-web/src/main/resources/bootstrap-local.properties
  80. 2 2
      mec-web/src/main/resources/exportColumnMapper.ini
  81. 1 0
      mec-websocket/pom.xml
  82. 1 0
      mec-zipkin/pom.xml
  83. 23 2
      pom.xml

+ 1 - 0
audio-analysis/src/main/java/com/yonge/netty/server/handler/NettyChannelManager.java

@@ -83,6 +83,7 @@ public class NettyChannelManager {
 	 * @param channel Channel
 	 */
 	public void remove(Channel channel) {
+		
 		// 移除 channels
 		channels.remove(channel.id());
 

+ 11 - 0
audio-analysis/src/main/java/com/yonge/netty/server/handler/NettyServerHandler.java

@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.oauth2.common.OAuth2AccessToken;
 import org.springframework.stereotype.Component;
 
+import com.yonge.netty.server.service.UserChannelContextService;
+
 @Component
 @ChannelHandler.Sharable
 public class NettyServerHandler extends ChannelInboundHandlerAdapter {
@@ -22,6 +24,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
 
 	@Autowired
 	private NettyChannelManager channelManager;
+	
+	@Autowired
+	private UserChannelContextService userChannelContextService;
 
 	@Override
 	public void channelActive(ChannelHandlerContext ctx) {
@@ -31,6 +36,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
 
 	@Override
 	public void channelUnregistered(ChannelHandlerContext ctx) {
+		
+		userChannelContextService.remove(ctx.channel());
+		
 		// 从管理器中移除
 		channelManager.remove(ctx.channel());
 	}
@@ -38,6 +46,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
 	@Override
 	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
 		LOGGER.error("[exceptionCaught][连接({}) 发生异常]", ctx.channel().id(), cause);
+		
+		userChannelContextService.remove(ctx.channel());
+		
 		// 断开连接
 		ctx.channel().close();
 	}

+ 1 - 0
cms/pom.xml

@@ -89,6 +89,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-auth/mec-auth-server/pom.xml

@@ -101,6 +101,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

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

@@ -38,7 +38,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
 	public void addInterceptors(InterceptorRegistry registry) {
 		registry.addInterceptor(tenantInterceptor).addPathPatterns("/**").
 				excludePathPatterns("/queryUserInfo","/user/updatePassword","/user/queryUserByPhone","/user/add",
-						"user/queryUserById/*","/role/queryRoleCodeListByUserId","/user/updateSysUser");
+						"user/queryUserById/*","/role/queryRoleCodeListByUserId","/user/updateSysUser","/user/open/*");
 		registry.addInterceptor(operationLogInterceptor).addPathPatterns("/userDevice/unbind").excludePathPatterns("/*");
 	}
 	

+ 9 - 3
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebSecurityConfig.java

@@ -1,5 +1,6 @@
 package com.ym.mec.auth.config;
 
+import com.ym.mec.common.redis.service.RedisCache;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -47,7 +48,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 	
 	@Autowired
 	private SysUserDeviceService sysUserDeviceService;
-	
+
+
+	@Autowired
+	private RedisCache<String,Object> redisCache;
+
 	@Override
 	protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 		auth.authenticationProvider(daoAuthenticationProvider());
@@ -65,7 +70,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 			.addFilterBefore(getPhoneLoginAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)
 				// 请求授权
 				.authorizeRequests()// 不需要权限认证的url
-				.antMatchers("/usernameLogin","/smsLogin", "/refreshToken", "/v2/api-docs").permitAll()// 任何请求
+				.antMatchers("/usernameLogin","/smsLogin", "/refreshToken", "/v2/api-docs","/user/open/*").permitAll()// 任何请求
 				.anyRequest()// 需要身份认证
 				.authenticated().and()// 关闭跨站请求防护
 				.csrf().disable();
@@ -74,7 +79,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 	@Override
 	public void configure(WebSecurity web) throws Exception {
 		web.ignoring().antMatchers("/usernameLogin", "/smsLogin", "/refreshToken",
-				"/v2/api-docs","/loginIn","/user/updatePassword");
+				"/v2/api-docs","/loginIn","/user/updatePassword","/user/open/*");
 	}
 
 	@Bean
@@ -105,6 +110,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
     	PhoneAuthenticationProvider provider = new PhoneAuthenticationProvider();
         // 设置userDetailsService
         provider.setUserDetailsService(defaultUserDetailsService);
+		provider.setRedisCache(redisCache);
         provider.setSmsCodeService(smsCodeService);
         provider.setSysUserService(sysUserService);
         provider.setSysUserDeviceService(sysUserDeviceService);

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

@@ -2,7 +2,10 @@ package com.ym.mec.auth.core.provider;
 
 import java.util.Date;
 
+import com.ym.mec.auth.web.controller.queryInfo.QRLoginDto;
+import com.ym.mec.common.redis.service.RedisCache;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.security.authentication.InternalAuthenticationServiceException;
 import org.springframework.security.authentication.LockedException;
@@ -30,7 +33,9 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 	private SysUserService sysUserService;
 	
 	private SysUserDeviceService sysUserDeviceService;
-	
+
+	private RedisCache<String,Object> redisCache;
+
 	@Override
 	protected void additionalAuthenticationChecks(UserDetails userDetails, Authentication authentication) throws AuthenticationException {
 
@@ -48,19 +53,38 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 		}
 		String smsCode = loginEntity.getSmsCode();
 		String phone = loginEntity.getPhone();
+		String clientId = loginEntity.getClientId();
 
 		// 验证码验证
-		if (!smsCodeService.verifyValidCode(phone, smsCode)) {
+		if (!clientId.startsWith("QR_") && !smsCodeService.verifyValidCode(phone, smsCode)) {
 			throw new BadCredentialsException("验证码校验失败");
 		}
 
-		String clientId = loginEntity.getClientId();
 
 		Boolean isRegister = loginEntity.getIsRegister();
 		
 		String deviceNum = loginEntity.getDeviceNum();
 
-		SysUserInfo userInfo = sysUserService.queryUserInfoByPhone(phone);
+
+
+		SysUserInfo userInfo;
+
+		if (clientId.startsWith("QR_")) {
+			Object data = redisCache.get(loginEntity.getPhone());
+			if (data == null) {
+				throw new LockedException("用户不存在");
+			} else {
+				QRLoginDto loginDto = (QRLoginDto) data;
+				if (loginDto.getPrivateKey().equals(loginEntity.getSmsCode())) {
+					userInfo = loginDto.getUserInfo();
+					username = username.replaceAll(loginDto.getCode(),userInfo.getSysUser().getPhone());
+				} else {
+					throw new LockedException("用户不存在");
+				}
+			}
+		} else {
+			userInfo = sysUserService.queryUserInfoByPhone(phone);
+		}
 
 		if (userInfo == null) {
 			if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
@@ -85,8 +109,9 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 			if (StringUtils.isNotBlank(deviceNum)) {
 				sysUserDeviceService.bindDevice(clientId, user.getId(), deviceNum, userInfo.getSysUser().getTenantId());
 			}
-			
-			if (!userInfo.getSysUser().getUserType().contains(clientId)) {
+
+			if (clientId.startsWith("QR_" )) {
+			} else  if (!userInfo.getSysUser().getUserType().contains(clientId)) {
 				if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
 					throw new LockedException("用户不存在");
 				} else {
@@ -137,6 +162,10 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 		this.userDetailsService = userDetailsService;
 	}
 
+	public void setRedisCache(RedisCache<String, Object> redisCache) {
+		this.redisCache = redisCache;
+	}
+
 	public void setSysUserService(SysUserService sysUserService) {
 		this.sysUserService = sysUserService;
 	}

+ 112 - 0
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -1,17 +1,22 @@
 package com.ym.mec.auth.web.controller;
 
+import com.alibaba.fastjson.JSONObject;
+import com.huifu.adapay.core.util.StringUtil;
+import com.ym.mec.auth.api.dto.SysUserInfo;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.service.SysRoleService;
 import com.ym.mec.auth.service.SysUserRoleService;
 import com.ym.mec.auth.service.SysUserService;
 import com.ym.mec.auth.service.TenantInfoService;
 import com.ym.mec.auth.api.dto.SysUserQueryInfo;
+import com.ym.mec.auth.web.controller.queryInfo.QRLoginDto;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.entity.ImResult;
 import com.ym.mec.common.entity.ImUserModel;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.common.redis.service.RedisCache;
 import com.ym.mec.common.security.AuthUser;
 import com.ym.mec.common.security.SecurityConstants;
 import com.ym.mec.common.security.SecurityUtils;
@@ -24,16 +29,28 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
 import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.web.bind.annotation.*;
 
+import java.io.IOException;
+import java.util.Base64;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 @RestController()
 @RequestMapping("user")
@@ -52,6 +69,10 @@ public class UserController extends BaseController {
 	private IdGeneratorService smsCodeService;
 	@Autowired
 	private TenantInfoService tenantInfoService;
+
+	@Autowired
+	private RedisCache<String,Object> redisCache;
+
 	@Value("${message.debugMode}")
 	private boolean debugMode;
 	@Autowired
@@ -377,4 +398,95 @@ public class UserController extends BaseController {
 	public HttpResponseResult<List<SysUser>> page(@RequestBody SysUserQueryInfo queryInfo) {
 		return succeed(sysUserService.queryEmployeeList(queryInfo));
 	}
+
+
+
+	@GetMapping("/open/getQRLoginCode")
+	@ApiOperation(value = "获取二维码登录code(不需要鉴权)")
+	public HttpResponseResult<String> getQRLoginCode(String clientId) {
+
+		String uuid = UUID.randomUUID().toString();
+
+		QRLoginDto qrLoginDto = new QRLoginDto();
+		qrLoginDto.setCode(uuid);
+		qrLoginDto.setClientId(clientId);
+		redisCache.put(uuid,qrLoginDto,5*60);
+		return succeed(uuid);
+	}
+
+
+	@GetMapping("/open/pollingQRLoginCode")
+	@ApiOperation(value = "前端轮询登录(不需要鉴权)")
+	public HttpResponseResult<QRLoginDto> pollingQRLoginCode(@ApiParam(value = "二维码登录code", required = true) @RequestParam("code") String code) {
+		if (StringUtil.isEmpty(code)) {
+			throw new BizException("登录失败");
+		}
+
+		Object obj = redisCache.get(code);
+		if (null != obj) {
+			QRLoginDto dto = (QRLoginDto) obj;
+			dto.setUserInfo(null);
+			return succeed(dto);
+		} else {
+			QRLoginDto qrLoginDto = new QRLoginDto();
+			qrLoginDto.setExpireFlag(true);
+			return succeed(qrLoginDto);
+		}
+	}
+
+	@GetMapping(value = "/qrLogin")
+	@ApiOperation(value = "二维码登录-扫码")
+	public HttpResponseResult<QRLoginDto> qrLogin(
+		@ApiParam(value = "二维码登录code", required = true) @RequestParam("code") String code
+	) throws IOException {
+		AuthUser authUser = SecurityUtils.getUser();
+		if (authUser == null) {
+			throw new BizException("请先登录");
+		}
+		SysUser sysUser = sysUserService.get(authUser.getUserId());
+
+
+		Object data = redisCache.get(code);
+		if (null == data) {
+			QRLoginDto qrLoginDto = new QRLoginDto();
+			qrLoginDto.setExpireFlag(true);
+			return succeed(qrLoginDto);
+		}
+		redisCache.put(code,data,5*60);
+		return succeed( (QRLoginDto) data);
+	}
+
+	@GetMapping(value = "/doQrLogin")
+	@ApiOperation(value = "二维码登录-确认登录")
+	public HttpResponseResult<QRLoginDto> doQrLogin(
+		@ApiParam(value = "二维码登录code", required = true) @RequestParam("code") String code
+	) {
+		AuthUser authUser = SecurityUtils.getUser();
+		if (authUser == null) {
+			throw new BizException("请先登录");
+		}
+		SysUser sysUser = sysUserService.get(authUser.getUserId());
+
+		Object data = redisCache.get(code);
+		if (null == data) {
+			QRLoginDto qrLoginDto = new QRLoginDto();
+			qrLoginDto.setExpireFlag(true);
+			return succeed(qrLoginDto);
+		}
+
+
+		SysUserInfo userInfo = sysUserService.queryUserInfoByPhone(sysUser.getPhone());
+		QRLoginDto dto = (QRLoginDto) data;
+		dto.setUserInfo(userInfo);
+
+
+		String uuid = UUID.randomUUID().toString();
+		dto.setPrivateKey(uuid);
+		redisCache.put(code,dto,5*60);
+
+		dto.setUserInfo(null);
+
+		return succeed(dto);
+	}
+
 }

+ 67 - 0
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/queryInfo/QRLoginDto.java

@@ -0,0 +1,67 @@
+package com.ym.mec.auth.web.controller.queryInfo;
+
+import com.ym.mec.auth.api.dto.SysUserInfo;
+
+import java.io.Serializable;
+
+/**
+ * Description
+ *
+ * @author liujunchi
+ * @date 2023-02-24
+ */
+public class QRLoginDto implements Serializable {
+
+    // 是否过期
+    private Boolean expireFlag;
+
+    // clientId
+    private String clientId;
+
+    // code
+    private String code;
+
+    private String privateKey;
+
+    private SysUserInfo userInfo;
+
+    public String getPrivateKey() {
+        return privateKey;
+    }
+
+    public void setPrivateKey(String privateKey) {
+        this.privateKey = privateKey;
+    }
+
+    public SysUserInfo getUserInfo() {
+        return userInfo;
+    }
+
+    public void setUserInfo(SysUserInfo userInfo) {
+        this.userInfo = userInfo;
+    }
+
+    public Boolean getExpireFlag() {
+        return expireFlag;
+    }
+
+    public void setExpireFlag(Boolean expireFlag) {
+        this.expireFlag = expireFlag;
+    }
+
+    public String getClientId() {
+        return clientId;
+    }
+
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+}

+ 7 - 0
mec-biz/pom.xml

@@ -51,5 +51,12 @@
             <artifactId>thumbnailator</artifactId>
             <version>0.4.11</version>
         </dependency>
+
+		<dependency>
+			<groupId>com.microsvc.toolkit.middleware</groupId>
+			<artifactId>microsvc-middleware-live</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+
     </dependencies>
 </project>

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CloudTeacherFreeCourseDao.java

@@ -4,7 +4,9 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.biz.dal.entity.CloudTeacherFreeCourse;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
+import java.util.Map;
 
 public interface CloudTeacherFreeCourseDao extends BaseDAO<Long, CloudTeacherFreeCourse> {
 
@@ -13,4 +15,6 @@ public interface CloudTeacherFreeCourseDao extends BaseDAO<Long, CloudTeacherFre
     void deleteByCourseIds(@Param("courseIdList") List<Long> courseIdList);
 
     Integer countByCourseIdList(@Param("courseIdList") List<Long> courseIdList);
+
+    List<Map<Long, BigDecimal>> queryMapByClassDate(@Param("month") String month);
 }

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

@@ -70,7 +70,7 @@ public interface CourseScheduleRewardsRulesDao extends BaseDAO<Integer, CourseSc
 	 * @param lastDayOfMonth
 	 * @return
 	 */
-    List<TaskRewardsRulesDto> queryVipGroupTeacherClassTimesByMonth(@Param("firstDayOfMonth") String firstDayOfMonth, @Param("lastDayOfMonth") String lastDayOfMonth);
+    List<TaskRewardsRulesDto> queryVipGroupTeacherClassTimesByMonth(@Param("month") String month);
 
 	/**
 	 * 根据主键列表获取数据

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleSwDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.biz.dal.entity.CourseScheduleSw;
+
+public interface CourseScheduleSwDao extends BaseDAO<Long, CourseScheduleSw> {
+
+	
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ExtensionOrderDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.biz.dal.entity.ExtensionOrder;
+
+public interface ExtensionOrderDao extends BaseDAO<Long, ExtensionOrder> {
+
+	
+}

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java

@@ -10,6 +10,7 @@ import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.dal.vo.StudentPaymentOrderVo;
 import com.ym.mec.common.dal.BaseDAO;
+
 import org.apache.ibatis.annotations.Param;
 
 import java.math.BigDecimal;
@@ -79,6 +80,8 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
      * @return
      */
     StudentPaymentOrder findOrderByOrderNo(@Param("orderNo") String orderNo);
+    
+    List<StudentPaymentOrder> findOrderByOrderNos(@Param("orderNoList") List<String> orderNoList);
 
     /**
      * 根据批次号查询

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysMusicCompareRecordDao.java

@@ -5,7 +5,9 @@ import com.ym.mec.biz.dal.entity.SysMusicCompareRecord;
 import com.ym.mec.biz.dal.entity.SysMusicCompareWeekData;
 import com.ym.mec.biz.dal.enums.HeardLevelEnum;
 import com.ym.mec.biz.dal.page.ExportCompareQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloudTrainingQueryInfo;
 import com.ym.mec.common.dal.BaseDAO;
+
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -117,4 +119,8 @@ public interface SysMusicCompareRecordDao extends BaseDAO<Long, SysMusicCompareR
     void deleteDayData(@Param("date") String date);
 
     void init(String date);
+    
+    List<TeacherCloudTrainingDto> queryTeacherTrainingList(@Param("queryInfo") TeacherCloudTrainingQueryInfo queryInfo);
+    
+    int queryTeacherTrainingCount(@Param("queryInfo") TeacherCloudTrainingQueryInfo queryInfo);
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ExportTeacherSalaryDto.java

@@ -116,6 +116,17 @@ public class ExportTeacherSalaryDto{
     @ApiModelProperty(value = "课程收入")
     private BigDecimal courseIncome;
 
+    @ApiModelProperty(value = "云教练转结")
+    private BigDecimal cloudReverse;
+
+    public BigDecimal getCloudReverse() {
+        return cloudReverse;
+    }
+
+    public void setCloudReverse(BigDecimal cloudReverse) {
+        this.cloudReverse = cloudReverse;
+    }
+
     public BigDecimal getCourseIncome() {
         return courseIncome;
     }

+ 84 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherCloudTrainingDto.java

@@ -0,0 +1,84 @@
+package com.ym.mec.biz.dal.dto;
+
+public class TeacherCloudTrainingDto {
+
+	private Integer organId;
+	
+	private String organName;
+	
+	private Integer subjectId;
+	
+	private String subjectName;
+	
+	private Integer userId;
+	
+	private String username;
+	
+	private int trianingDays;
+	
+	private int trainingDurationSeconds;
+
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
+	public String getOrganName() {
+		return organName;
+	}
+
+	public void setOrganName(String organName) {
+		this.organName = organName;
+	}
+
+	public Integer getSubjectId() {
+		return subjectId;
+	}
+
+	public void setSubjectId(Integer subjectId) {
+		this.subjectId = subjectId;
+	}
+
+	public String getSubjectName() {
+		return subjectName;
+	}
+
+	public void setSubjectName(String subjectName) {
+		this.subjectName = subjectName;
+	}
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public int getTrianingDays() {
+		return trianingDays;
+	}
+
+	public void setTrianingDays(int trianingDays) {
+		this.trianingDays = trianingDays;
+	}
+
+	public int getTrainingDurationSeconds() {
+		return trainingDurationSeconds;
+	}
+
+	public void setTrainingDurationSeconds(int trainingDurationSeconds) {
+		this.trainingDurationSeconds = trainingDurationSeconds;
+	}
+}

+ 145 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleSw.java

@@ -0,0 +1,145 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(course_schedule_sw):
+ */
+public class CourseScheduleSw {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Integer teacherId;
+	
+	private String teacherName;
+	
+	/**  */
+	private String courseType;
+	
+	/**  */
+	private String courseName;
+	
+	/**  */
+	private String teachMode;
+	
+	private String courseStatus;
+	
+	/**  */
+	private java.util.Date classDate;
+	
+	/**  */
+	private String classTime;
+	
+	/**  */
+	private java.math.BigDecimal salary;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setTeacherId(Integer teacherId){
+		this.teacherId = teacherId;
+	}
+	
+	public Integer getTeacherId(){
+		return this.teacherId;
+	}
+			
+	public String getTeacherName() {
+		return teacherName;
+	}
+
+	public void setTeacherName(String teacherName) {
+		this.teacherName = teacherName;
+	}
+
+	public void setCourseType(String courseType){
+		this.courseType = courseType;
+	}
+	
+	public String getCourseType(){
+		return this.courseType;
+	}
+			
+	public void setCourseName(String courseName){
+		this.courseName = courseName;
+	}
+	
+	public String getCourseName(){
+		return this.courseName;
+	}
+			
+	public void setTeachMode(String teachMode){
+		this.teachMode = teachMode;
+	}
+	
+	public String getTeachMode(){
+		return this.teachMode;
+	}
+			
+	public String getCourseStatus() {
+		return courseStatus;
+	}
+
+	public void setCourseStatus(String courseStatus) {
+		this.courseStatus = courseStatus;
+	}
+
+	public void setClassDate(java.util.Date classDate){
+		this.classDate = classDate;
+	}
+	
+	public java.util.Date getClassDate(){
+		return this.classDate;
+	}
+			
+	public void setClassTime(String classTime){
+		this.classTime = classTime;
+	}
+	
+	public String getClassTime(){
+		return this.classTime;
+	}
+			
+	public void setSalary(java.math.BigDecimal salary){
+		this.salary = salary;
+	}
+	
+	public java.math.BigDecimal getSalary(){
+		return this.salary;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 124 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ExtensionOrder.java

@@ -0,0 +1,124 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(extension_order):
+ */
+public class ExtensionOrder {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private String orderNo;
+	
+	/**  */
+	private java.math.BigDecimal orderAmount;
+	
+	/**  */
+	private String orderType;
+	
+	/**  */
+	private String payTime;
+	
+	/**  */
+	private Integer extensionUserId;
+	
+	private String extensionUser;
+	
+	/**  */
+	private java.math.BigDecimal extensionFee;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setOrderNo(String orderNo){
+		this.orderNo = orderNo;
+	}
+	
+	public String getOrderNo(){
+		return this.orderNo;
+	}
+			
+	public void setOrderAmount(java.math.BigDecimal orderAmount){
+		this.orderAmount = orderAmount;
+	}
+	
+	public java.math.BigDecimal getOrderAmount(){
+		return this.orderAmount;
+	}
+			
+	public void setOrderType(String orderType){
+		this.orderType = orderType;
+	}
+	
+	public String getOrderType(){
+		return this.orderType;
+	}
+			
+	public void setPayTime(String payTime){
+		this.payTime = payTime;
+	}
+	
+	public String getPayTime(){
+		return this.payTime;
+	}
+			
+	public void setExtensionUserId(Integer extensionUserId){
+		this.extensionUserId = extensionUserId;
+	}
+	
+	public Integer getExtensionUserId(){
+		return this.extensionUserId;
+	}
+			
+	public String getExtensionUser() {
+		return extensionUser;
+	}
+
+	public void setExtensionUser(String extensionUser) {
+		this.extensionUser = extensionUser;
+	}
+
+	public void setExtensionFee(java.math.BigDecimal extensionFee){
+		this.extensionFee = extensionFee;
+	}
+	
+	public java.math.BigDecimal getExtensionFee(){
+		return this.extensionFee;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 13 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ImLiveBroadcastRoom.java

@@ -4,6 +4,7 @@ import java.util.Date;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.ym.mec.biz.dal.enums.LiveServiceProviderEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -82,6 +83,10 @@ public class ImLiveBroadcastRoom implements Serializable {
     @ApiModelProperty(value = "播出端-  pc网页端 移动端mobile")
     private String os = "pc";
 
+    @TableField("service_provider_")
+    @ApiModelProperty(value = "服务提供方 rongCloud tencentCloud")
+    private String serviceProvider;
+
     @TableField("created_by_")
     @ApiModelProperty(value = "创建人")
     private Integer createdBy;
@@ -100,6 +105,14 @@ public class ImLiveBroadcastRoom implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    public String getServiceProvider() {
+        return serviceProvider;
+    }
+
+    public void setServiceProvider(String serviceProvider) {
+        this.serviceProvider = serviceProvider;
+    }
+
     public Integer getId() {
         return id;
     }

+ 43 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/LiveServiceProviderEnum.java

@@ -0,0 +1,43 @@
+package com.ym.mec.biz.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+/**
+ * Description
+ *
+ * @author liujunchi
+ * @date 2023-02-28
+ */
+public enum LiveServiceProviderEnum  implements BaseEnum<String, LevelEnum> {
+    RONG_CLOUD("融云"),
+    TENCENT_CLOUD("腾讯云"),
+    ;
+
+    private String code;
+    private String msg;
+
+    LiveServiceProviderEnum(String msg) {
+        this.code = this.name();
+        this.msg = msg;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    @Override
+    public String getCode() {
+        return this.code;
+    }
+
+
+    public static LiveServiceProviderEnum getByName(String name) {
+        for (LiveServiceProviderEnum level : LiveServiceProviderEnum.values()) {
+            if (level.getMsg().equals(name)) {
+                return level;
+            }
+        }
+        return null;
+    }
+
+}

+ 70 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseScheduleSWQueryInfo.java

@@ -0,0 +1,70 @@
+package com.ym.mec.biz.dal.page;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+import com.ym.mec.common.page.QueryInfo;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/12/27
+ */
+public class CourseScheduleSWQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "教师编号")
+    private String teacherIdList;
+
+    @ApiModelProperty(value = "课程创建开始时间")
+    private Date createStartDate;
+    
+    @ApiModelProperty(value = "课程创建结束时间")
+    private Date createEndDate;
+
+    @ApiModelProperty(value = "课程状态")
+    private String courseStatus;
+
+    @ApiModelProperty(value = "上课模式")
+    private String teachMode;
+
+	public String getTeacherIdList() {
+		return teacherIdList;
+	}
+
+	public void setTeacherIdList(String teacherIdList) {
+		this.teacherIdList = teacherIdList;
+	}
+
+	public Date getCreateStartDate() {
+		return createStartDate;
+	}
+
+	public void setCreateStartDate(Date createStartDate) {
+		this.createStartDate = createStartDate;
+	}
+
+	public Date getCreateEndDate() {
+		return createEndDate;
+	}
+
+	public void setCreateEndDate(Date createEndDate) {
+		this.createEndDate = createEndDate;
+	}
+
+	public String getCourseStatus() {
+		return courseStatus;
+	}
+
+	public void setCourseStatus(String courseStatus) {
+		this.courseStatus = courseStatus;
+	}
+
+	public String getTeachMode() {
+		return teachMode;
+	}
+
+	public void setTeachMode(String teachMode) {
+		this.teachMode = teachMode;
+	}
+
+}

+ 35 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtensionSWQueryInfo.java

@@ -0,0 +1,35 @@
+package com.ym.mec.biz.dal.page;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import com.ym.mec.common.page.QueryInfo;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/12/27
+ */
+public class ExtensionSWQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "推广用户编号")
+    private Integer extensionUserId;
+
+    @ApiModelProperty(value = "订单编号")
+    private String orderNo;
+
+	public Integer getExtensionUserId() {
+		return extensionUserId;
+	}
+
+	public void setExtensionUserId(Integer extensionUserId) {
+		this.extensionUserId = extensionUserId;
+	}
+
+	public String getOrderNo() {
+		return orderNo;
+	}
+
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+
+}

+ 47 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloudTrainingQueryInfo.java

@@ -0,0 +1,47 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+
+public class TeacherCloudTrainingQueryInfo extends QueryInfo {
+
+    private Integer teacherId;
+
+    private String startTime;
+
+    private String endTime;
+
+    private String organIdList;
+
+    public String getOrganIdList() {
+		return organIdList;
+	}
+
+	public void setOrganIdList(String organIdList) {
+		this.organIdList = organIdList;
+	}
+
+	public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+}

+ 46 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomVo.java

@@ -1,6 +1,8 @@
 package com.ym.mec.biz.dal.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.microsvc.toolkit.middleware.live.message.LiveRoomConfig;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -92,6 +94,24 @@ public class ImLiveBroadcastRoomVo implements Serializable {
     @ApiModelProperty("预约人数")
     private Integer roomReservationNum;
 
+    @ApiModelProperty("直播间用户签名")
+    private String userSig;
+
+
+    @ApiModelProperty(value = "服务提供方 RONG_CLOUD TENCENT_CLOUD")
+    private String serviceProvider;
+
+    @ApiModelProperty("直播配置")
+    private LiveRoomConfig liveRoomConfig;
+
+    public String getServiceProvider() {
+        return serviceProvider;
+    }
+
+    public void setServiceProvider(String serviceProvider) {
+        this.serviceProvider = serviceProvider;
+    }
+
     public Integer getId() {
         return id;
     }
@@ -305,5 +325,31 @@ public class ImLiveBroadcastRoomVo implements Serializable {
     public void setPopularizeType(String popularizeType) {
         this.popularizeType = popularizeType;
     }
+
+    public String getUserSig() {
+        return userSig;
+    }
+
+    public void setUserSig(String userSig) {
+        this.userSig = userSig;
+    }
+
+    public LiveRoomConfig getLiveRoomConfig() {
+        return liveRoomConfig;
+    }
+
+    public void setLiveRoomConfig(LiveRoomConfig liveRoomConfig) {
+        this.liveRoomConfig = liveRoomConfig;
+    }
+
+    public ImLiveBroadcastRoomVo userSig(String userSig) {
+        this.userSig = userSig;
+        return this;
+    }
+
+    public ImLiveBroadcastRoomVo liveRoomConfig(LiveRoomConfig liveRoomConfig) {
+        this.liveRoomConfig = liveRoomConfig;
+        return this;
+    }
 }
 

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java

@@ -118,6 +118,13 @@ public interface ContractService {
 	 * @return
 	 */
 	void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType);
+	
+	/**
+	 * 传递产品协议
+	 * @param userId
+	 * @return
+	 */
+	void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType, Date currentDate);
 
 	/**
 	 * 查询产品协议

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

@@ -55,7 +55,7 @@ public interface CourseScheduleRewardsRulesService extends BaseService<Integer,
 	 * @param lastDayOfMonth
 	 * @return
 	 */
-    List<TaskRewardsRulesDto> queryVipGroupTeacherClassTimesByMonth(String firstDayOfMonth,String lastDayOfMonth);
+    List<TaskRewardsRulesDto> queryVipGroupTeacherClassTimesByMonth(String month);
 
 	/**
 	 * 根据主键列表获取数据

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleSwService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleSw;
+import com.ym.mec.common.service.BaseService;
+
+public interface CourseScheduleSwService extends BaseService<Long, CourseScheduleSw> {
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ExtensionOrderService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.ExtensionOrder;
+import com.ym.mec.common.service.BaseService;
+
+public interface ExtensionOrderService extends BaseService<Long, ExtensionOrder> {
+
+}

+ 13 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java

@@ -1,7 +1,17 @@
 package com.ym.mec.biz.service;
 
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Param;
+
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
-import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.dto.PageInfoOrder;
+import com.ym.mec.biz.dal.dto.SporadicChargeInfoDto;
+import com.ym.mec.biz.dal.dto.StudentPaymentOrderDto;
+import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto;
 import com.ym.mec.biz.dal.entity.ActivityUserMapper;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
@@ -19,12 +29,6 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 import com.ym.mec.thirdparty.adapay.entity.BaseResult;
 import com.ym.mec.thirdparty.adapay.entity.HfMerchantConfig;
-import org.apache.ibatis.annotations.Param;
-
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
 
 public interface StudentPaymentOrderService extends BaseService<Long, StudentPaymentOrder> {
 
@@ -60,6 +64,8 @@ public interface StudentPaymentOrderService extends BaseService<Long, StudentPay
      * @return
      */
     StudentPaymentOrder findOrderByOrderNo(String orderNo);
+    
+    List<StudentPaymentOrder> findOrderByOrderNos(List<String> orderNoList);
 
     /**
      * 根据批次号查询

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

@@ -17,6 +17,8 @@ public interface StudentStatisticsService extends BaseService<Integer, StudentSt
     //定时任务
     void updateStudentStatistics();
 
+    int countStatistics(StudentStatisticsQueryInfo queryInfo);
+
     //分页查询学员小课数据
     PageInfo<StudentStatisticsDto> queryStatisticsPage(StudentStatisticsQueryInfo queryInfo);
 

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

@@ -1,17 +1,19 @@
 package com.ym.mec.biz.service;
 
+import java.util.Map;
+
 import com.ym.mec.biz.dal.dao.SysMusicCompareRecordDao;
 import com.ym.mec.biz.dal.dto.CountStudentTrainDataDto;
 import com.ym.mec.biz.dal.dto.MusicCompareRankingDto;
 import com.ym.mec.biz.dal.dto.SoundCompareHelper;
 import com.ym.mec.biz.dal.dto.StatDto;
+import com.ym.mec.biz.dal.dto.TeacherCloudTrainingDto;
 import com.ym.mec.biz.dal.entity.SysMusicCompareRecord;
 import com.ym.mec.biz.dal.page.SysMusicCompareRecordQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloudTrainingQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
-import java.util.Map;
-
 public interface SysMusicCompareRecordService extends BaseService<Long, SysMusicCompareRecord> {
 
     SysMusicCompareRecordDao getDao();
@@ -97,4 +99,6 @@ public interface SysMusicCompareRecordService extends BaseService<Long, SysMusic
     int queryCurrentDatePlayTimeByUserId(Integer userId);
 
     void initSysMusicCompareDayData();
+    
+    PageInfo<TeacherCloudTrainingDto> queryTeacherTraining(TeacherCloudTrainingQueryInfo queryInfo);
 }

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

@@ -897,9 +897,14 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
+    public void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
+    	transferProduceContract(userId, musicGroupId, orderType, new Date());
+    }
+
+    @Override
     @Async
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW)
-    public void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
+	public void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType, Date currentDate) {
         SysUser user = studentDao.lockUserReturnInfo(userId);
 
         if (user == null) {
@@ -943,6 +948,12 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
         params.put("studentInfo", studentInfo);
 
         params.put("isShowVisualSeal", false);
+        
+        if(currentDate != null){
+        	params.put("currentDate", currentDate);
+        }else{
+        	params.put("currentDate", date);
+        }
 
         if (StringUtils.isBlank(musicGroupId)) {
             params.put("ownershipType", "OWN");
@@ -1041,7 +1052,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
         FileUtils.deleteQuietly(srcFile);
     }
 
-    @Override
+	@Override
     @Transactional(isolation = Isolation.READ_COMMITTED)
     public Map<String, Object> queryProductContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         // 合成freemarker

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

@@ -207,8 +207,8 @@ public class CourseScheduleRewardsRulesServiceImpl extends BaseServiceImpl<Integ
 	}
 
 	@Override
-	public List<TaskRewardsRulesDto> queryVipGroupTeacherClassTimesByMonth(String firstDayOfMonth, String lastDayOfMonth) {
-		return courseScheduleRewardsDao.queryVipGroupTeacherClassTimesByMonth(firstDayOfMonth,lastDayOfMonth);
+	public List<TaskRewardsRulesDto> queryVipGroupTeacherClassTimesByMonth(String month) {
+		return courseScheduleRewardsDao.queryVipGroupTeacherClassTimesByMonth(month);
 	}
 
 	@Override

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleSwServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.CourseScheduleSwDao;
+import com.ym.mec.biz.dal.entity.CourseScheduleSw;
+import com.ym.mec.biz.service.CourseScheduleSwService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class CourseScheduleSwServiceImpl extends BaseServiceImpl<Long, CourseScheduleSw>  implements CourseScheduleSwService {
+	
+	@Autowired
+	private CourseScheduleSwDao courseScheduleSwDao;
+
+	@Override
+	public BaseDAO<Long, CourseScheduleSw> getDAO() {
+		return courseScheduleSwDao;
+	}
+	
+}

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

@@ -104,6 +104,8 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
     @Lazy
     private PracticeGroupService practiceGroupService;
     @Autowired
+    private CloudTeacherFreeCourseDao cloudTeacherFreeCourseDao;
+    @Autowired
     private RedisTemplate redisTemplate;
 
     private static final Logger LOGGER = LoggerFactory
@@ -931,17 +933,15 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
         //扣除有异常考勤的课酬
         Map<String, Object> params = new HashMap<>();
         MapUtil.populateMap(params, queryInfo);
-        String firstDayOfMonth = DateUtil.format(DateUtil.getFirstDayOfMonth(queryInfo.getDate()),DateUtil.ISO_EXPANDED_DATE_FORMAT);
-        String lastDayOfMonth =  DateUtil.format(DateUtil.getLastDayOfMonth(queryInfo.getDate()),DateUtil.ISO_EXPANDED_DATE_FORMAT);
-        params.put("firstDayOfMonth",firstDayOfMonth);
-        params.put("lastDayOfMonth",lastDayOfMonth);
+        String month = DateUtil.format(DateUtil.getFirstDayOfMonth(queryInfo.getDate()),DateUtil.ISO_YEAR_MONTH_FORMAT);
+        params.put("month",month);
         List<ExportTeacherSalaryDto> exportTeacherSalaryDtos = new ArrayList<>();
         //乐团课
         exportTeacherSalaryDtos.addAll(courseScheduleTeacherSalaryDao.exportMusicTeacherSalary(params));
         //vip课
         List<ExportTeacherSalaryDto> exportVipTeacherSalaryDtos = courseScheduleTeacherSalaryDao.exportVipTeacherSalary(params);
         //获取有奖励的vip课  .collect(Collectors.toMap(Group::getId, group -> group));
-        List<TaskRewardsRulesDto> rewardsRulesDtos = courseScheduleRewardsRulesService.queryVipGroupTeacherClassTimesByMonth(firstDayOfMonth,lastDayOfMonth);
+        List<TaskRewardsRulesDto> rewardsRulesDtos = courseScheduleRewardsRulesService.queryVipGroupTeacherClassTimesByMonth(month);
         Map<Integer,Double> rewardMap = new HashMap<>(1000);
         Map<Integer,String> rewardNameMap = new HashMap<>(1000);
         if(rewardsRulesDtos != null && rewardsRulesDtos.size() > 0){
@@ -1034,11 +1034,14 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
         if(!CollectionUtils.isEmpty(allCourseIds)){
             List<CourseScheduleStudentPayment> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findByCourseScheduleIds(new ArrayList<>(allCourseIds));
             if(!CollectionUtils.isEmpty(courseScheduleStudentPayments)){
-                courseIncomeMap = courseScheduleStudentPayments.stream().collect(Collectors.groupingBy(CourseScheduleStudentPayment::getCourseScheduleId, Collectors.mapping(CourseScheduleStudentPayment::getExpectPrice, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
+                courseIncomeMap = courseScheduleStudentPayments.stream().collect(Collectors.groupingBy(CourseScheduleStudentPayment::getCourseScheduleId, Collectors.mapping(CourseScheduleStudentPayment::getActualPrice, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
             }
         }
+        Map<Long,BigDecimal> courseCast = MapUtil.convertIntegerMap(cloudTeacherFreeCourseDao.queryMapByClassDate(month));
 
         for (ExportTeacherSalaryDto exportTeacherSalaryDto : exportTeacherSalaryDtos) {
+            BigDecimal castOrDefault = courseCast.getOrDefault(exportTeacherSalaryDto.getCourseScheduleId(), BigDecimal.ZERO);
+            exportTeacherSalaryDto.setCloudReverse(castOrDefault);
             if(!courseIncomeMap.containsKey(exportTeacherSalaryDto.getCourseScheduleId())){
                 exportTeacherSalaryDto.setCourseIncome(BigDecimal.ZERO);
             }else{

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

@@ -187,6 +187,8 @@ public class ExportServiceImpl implements ExportService {
     private StudentStatisticsDao studentStatisticsDao;
     @Autowired
     private StudentTeacherMapperDao studentTeacherMapperDao;
+    @Autowired
+    private SchoolDao schoolDao;
 
     private static final ExecutorService exportExecutorService = Executors.newFixedThreadPool(10);
     @Autowired
@@ -1833,7 +1835,7 @@ public class ExportServiceImpl implements ExportService {
         long i = 1;
         Map<Integer, String> cooperationOrganMap = new HashMap<>();
         List<Integer> cooperationOrganIds = studentPaymentOrderExportDtos.stream()
-                .filter(e -> OUTORDER.equals(e.getType()))
+                .filter(e -> OUTORDER == e.getType() || GroupType.OUTORDER == e.getGroupType())
                 .filter(e -> e.getMusicGroupId() != null)
                 .map(e -> Integer.valueOf(e.getMusicGroupId()))
                 .distinct()
@@ -2215,7 +2217,7 @@ public class ExportServiceImpl implements ExportService {
                     row.setEduTeacher(cooperationOrgan.getLinkman() != null ? cooperationOrgan.getLinkman() : row.getEduTeacher());
                 }
             }
-            if (row.getType().equals(OUTORDER) && row.getMusicGroupId() != null) {
+            if ((row.getType() == OUTORDER || row.getGroupType() == GroupType.OUTORDER) && StringUtils.isNotEmpty(row.getMusicGroupId())) {
                 if (cooperationOrganMap.containsKey(Integer.valueOf(row.getMusicGroupId()))) {
                     row.setCooperationOrganName(cooperationOrganMap.get(Integer.valueOf(row.getMusicGroupId())));
                     CooperationOrgan cooperationOrganEduTeacher = musicGroupDao.findCooperationOrganEduTeacher(Integer.valueOf(row.getMusicGroupId()));
@@ -2863,7 +2865,7 @@ public class ExportServiceImpl implements ExportService {
                     new String[]{"studentBasicInfo.organName", "studentBasicInfo.userName", "studentBasicInfo.userId",
                             "studentBasicInfo.phone", "studentBasicInfo.subjectName", "studentBasicInfo.cooperationOrganName", "studentBasicInfo.grade",
                             "studentBasicInfo.studentStatus == null?'':studentBasicInfo.studentStatus == 'LOST' ? '流失':studentBasicInfo.studentStatus == 'NORMAL' ? " +
-                                    "'在读':studentBasicInfo.studentStatus == 'SLEEPY' ? '沉睡':studentBasicInfo.studentStatus == 'PAUSE' ? '暂停':'其他'",
+                                    "'在读':studentBasicInfo.studentStatus == 'SLEEPY' ? '沉睡':studentBasicInfo.studentStatus == 'PAUSE' ? '暂停':studentBasicInfo.studentStatus == 'HOLIDAY_COURSE' ? '假期上课':'其他'",
                             "noScheduleNum", "totalCourseNum", "overCourseNum", "subCourseNum",  "subTotalCourse", "preCourseFee", "firstCourseTime", "lastCourseTime","musicDirectorId", "musicDirectorName",
                             "studentBasicInfo.subjectTeacherId", "studentBasicInfo.subjectTeacherName", "latelyCourseConsumer", "visitNum",
                             "visitReason", "lastVisitTime"}, rows);

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtensionOrderServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.ExtensionOrderDao;
+import com.ym.mec.biz.dal.entity.ExtensionOrder;
+import com.ym.mec.biz.service.ExtensionOrderService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class ExtensionOrderServiceImpl extends BaseServiceImpl<Long, ExtensionOrder>  implements ExtensionOrderService {
+	
+	@Autowired
+	private ExtensionOrderDao extensionOrderDao;
+
+	@Override
+	public BaseDAO<Long, ExtensionOrder> getDAO() {
+		return extensionOrderDao;
+	}
+	
+}

+ 83 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java

@@ -8,6 +8,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.google.common.collect.Lists;
+import com.microsvc.toolkit.middleware.live.LivePluginContext;
+import com.microsvc.toolkit.middleware.live.LivePluginService;
+import com.microsvc.toolkit.middleware.live.impl.TencentCloudLivePlugin;
+import com.microsvc.toolkit.middleware.live.message.LiveRoomConfig;
+import com.microsvc.toolkit.middleware.live.message.LiveRoomUser;
+import com.microsvc.toolkit.middleware.live.message.RTCRoom;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ImLiveBroadcastRoomDao;
@@ -92,6 +98,11 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
     private ImLiveRoomReservationService imLiveRoomReservationService;
     @Autowired
     private ImLiveRoomBlackService imLiveRoomBlackService;
+    @Autowired
+    private TencentCloudLivePlugin tencentCloudLivePlugin;
+
+    @Autowired
+    private LivePluginContext livePluginContext;
 
     //待替换的变量
     public static final String USER_ID = "${userId}";
@@ -130,6 +141,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         SysUser sysUser = Optional.ofNullable(userId)
                 .map(this::getSysUser)
                 .orElseGet(this::getSysUser);
+        // 默认学生端查询
         osType = Optional.ofNullable(osType).orElse(1);
         if (osType == 1) {
             //学生端
@@ -138,6 +150,18 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             //老师端
             return teacherQueryRoomAndCheck(roomUid, sysUser);
         }
+
+        // 直播助手
+        if (osType == 3) {
+            // 校验直播间是否存在
+            ImLiveBroadcastRoomVo vo = Optional.ofNullable(roomUid).map(this::queryRoomInfo)
+                    .orElseThrow(() -> new BizException("直播间不存在"));
+
+            if (vo.getOs().equals("mobile")) {
+                throw new BizException("该直播间仅可在电脑端直播");
+            }
+        }
+
         return queryRoomAndCheck(roomUid, sysUser);
     }
 
@@ -160,7 +184,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         ImLiveBroadcastRoomVo vo = Optional.ofNullable(roomUid).map(this::queryRoomInfo)
                 .orElseThrow(() -> new BizException("直播间不存在"));
         if (vo.getOs().equals("pc")) {
-            throw new BizException("该直播间仅可在电脑端直播");
+            throw new BizException("该直播间仅可在移动端直播");
         }
         return queryRoomAndCheck(vo, sysUser);
     }
@@ -200,7 +224,21 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         if (count > 0) {
             room.setBlacklistFlag(1);
         }
-        return room;
+
+        // 直播房间配置信息
+        String userSig = "";
+        try {
+            userSig = tencentCloudLivePlugin.register(String.valueOf(sysUser.getId()), sysUser.getUsername(),
+                    sysUser.getAvatar());
+
+        } catch (Exception e) {
+            log.error("直播房间用户注册失败: userId={}", sysUser.getId(), e);
+        }
+
+        // 直播间配置信息
+        LiveRoomConfig liveRoomConfig = tencentCloudLivePlugin.getLiveRoomConfig();
+
+        return room.userSig(userSig).liveRoomConfig(liveRoomConfig);
     }
 
     /**
@@ -260,6 +298,9 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
                 continue;
             }
             record.setRoomReservationNum(imLiveBroadcastRoomVos.get(0).getRoomReservationNum());
+
+            // 设置直播间参数信息
+
         }
 
         return PageUtil.pageInfo(page);
@@ -447,7 +488,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         });
     }
 
-    private void destroyExpiredLiveRoom(Date now, ImLiveBroadcastRoom room, int expiredMinute) {
+    private void destroyExpiredLiveRoom(Date now, ImLiveBroadcastRoom room, int expiredMinute) throws Exception {
         log.error("roomDestroy destroyExpiredLiveRoom >>>> now {} roomInfo : {} expiredMinute:{}", now, JSONObject.toJSONString(room), expiredMinute);
         //过期时间 = LiveStartTime + expiredMinute
         Date expiredTime = DateUtil.addMinutes(room.getLiveStartTime(), expiredMinute);
@@ -460,7 +501,8 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         if (speakerCache.isExists()) {
             RoomSpeakerInfo speakerInfo = speakerCache.get();
             //查询用户是否在线
-            if (imFeignService.checkOnline(speakerInfo.getSpeakerId().toString())) {
+            LiveRoomUser liveRoomUser = livePluginContext.getPluginService(room.getServiceProvider()).chatRoomUserExist(room.getId().toString(),speakerInfo.getSpeakerId().toString());
+            if (Objects.nonNull(liveRoomUser) && StringUtils.equals(liveRoomUser.getStatus(),"1")) {
                 log.info("roomDestroy destroyExpiredLiveRoom  is online >>>> roomId:{} speakerId:{}", room.getId(), speakerInfo.getSpeakerId());
                 return;
             }
@@ -944,6 +986,22 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             //开始录制视频
             try {
                 imFeignService.startRecord(roomUid, videoResolution);
+
+                // 查询房间信息
+                ImLiveBroadcastRoomVo imLiveBroadcastRoomVo = getImLiveBroadcastRoomVo(roomUid);
+                if (Objects.isNull(imLiveBroadcastRoomVo)) {
+                    log.info("opsRoom>>>> startRecord error roomUid: {}", roomUid);
+                    return;
+                }
+                LivePluginService pluginService = livePluginContext.getPluginService(imLiveBroadcastRoomVo.getServiceProvider());
+                RTCRoom rtcRoom = pluginService.rtcRoomInfo(roomSpeakerInfo.getRoomUid());
+                if (rtcRoom == null) {
+                    log.info("startRecord>>>> rtcRoom is null");
+                    return;
+                }
+
+                pluginService.rtcRoomRecordStop(rtcRoom.getSessionId());
+                // pluginService.rtcRoomRecordStart(roomUid, videoResolution);
             } catch (Exception e) {
                 log.error("startRecord error: {}", e.getMessage());
             }
@@ -990,7 +1048,22 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         if (whetherVideoFlag && stateFlag) {
             try {
                 //停止录制视频
-                imFeignService.stopRecord(roomSpeakerInfo.getRoomUid());
+                // imFeignService.stopRecord(roomSpeakerInfo.getRoomUid());
+
+                // 查询房间信息
+                ImLiveBroadcastRoomVo imLiveBroadcastRoomVo = getImLiveBroadcastRoomVo(roomSpeakerInfo.getRoomUid());
+                if (imLiveBroadcastRoomVo == null) {
+                    log.warn("closeLive imLiveBroadcastRoomVo is null");
+                    return;
+                }
+                LivePluginService pluginService = livePluginContext.getPluginService(imLiveBroadcastRoomVo.getServiceProvider());
+                RTCRoom rtcRoom = pluginService.rtcRoomInfo(roomSpeakerInfo.getRoomUid());
+                if (rtcRoom == null) {
+                    log.warn("closeLive rtcRoom is null");
+                    return;
+                }
+
+                pluginService.rtcRoomRecordStop(rtcRoom.getSessionId());
             } catch (Exception e) {
                 log.error("stopRecord error: {}", e.getMessage());
             }
@@ -1092,11 +1165,14 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             SysUser sysUser = getSysUser(room.getSpeakerId());
             createSpeakerInfo(room, sysUser);
             //去融云创建房间
-            imFeignService.createLiveRoom(room.getRoomUid(), room.getRoomTitle());
+            LivePluginService pluginService = livePluginContext.getPluginService(room.getServiceProvider());
+            pluginService.chatRoomCreate(room.getRoomUid(),room.getRoomTitle(),sysUser.getId().toString());
+
+            // imFeignService.createLiveRoom(room.getRoomUid(), room.getRoomTitle());
             //推送预约直播间消息
             imLiveRoomReservationService.push(room);
             //推送直播开始消息
-            sendRoomLiveState(sysUser, room, MessageTypeEnum.JIGUANG_LIVE_STARTED);
+            this.sendRoomLiveState(sysUser, room, MessageTypeEnum.JIGUANG_LIVE_STARTED);
         } catch (Exception e) {
             log.error(">>>>>>>>>> createLiveRoom error roomUid:{} msg:{}", room.getRoomUid(), e.getMessage());
         }

+ 16 - 11
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -2190,23 +2190,29 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
 
         Date date = new Date();
+        
+        Boolean hasRole = employeePositionService.getDao().hasRole("一键退团",reqMusicGroupQuit.getOperatorId(),reqMusicGroupQuit.getTenantId());
 
         //如果发起退团申请的是乐团主管
         if (!currentOperatorRoleIds.contains(SysUserRoleEnum.ORGAN_MANAGER) && currentOperatorRoleIds.contains(SysUserRoleEnum.EDUCATION)) {
 
-            if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.EDUCATION.ordinal() + 1 + "")) {
-                throw new BizException("只有分部经理才能审核");
-            }
-
-            if (status == ApprovalStatus.APPROVED) {
-                throw new BizException("只能分部经理操作退团");
-            }
+        	if(hasRole == false) {
+	            if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.EDUCATION.ordinal() + 1 + "")) {
+	                throw new BizException("只有分部经理才能审核");
+	            }
+	
+	            if (status == ApprovalStatus.APPROVED) {
+	                throw new BizException("只能分部经理操作退团");
+	            }
+        	}
         }
 
         if (currentOperatorRoleIds.contains(SysUserRoleEnum.ORGAN_MANAGER) && !currentOperatorRoleIds.contains(SysUserRoleEnum.EDUCATION)) {
-            if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.ORGAN_MANAGER.ordinal() + 1 + "")) {
-                throw new BizException("先需乐团主管审核");
-            }
+        	if(hasRole == false) {
+	            if (!StringUtils.equals(musicGroupQuit.getCurrentApproveRole(), SysUserRoleEnum.ORGAN_MANAGER.ordinal() + 1 + "")) {
+	                throw new BizException("先需乐团主管审核");
+	            }
+        	}
         }
 
         String musicGroupId = musicGroupQuit.getMusicGroupId();
@@ -2239,7 +2245,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
         if(reqMusicGroupQuit.getStatus() != APPROVED){
             //是否是特定的可以一键退团的乐团主管
-            Boolean hasRole = employeePositionService.getDao().hasRole("一键退团",reqMusicGroupQuit.getOperatorId(),reqMusicGroupQuit.getTenantId());
             if(hasRole){
                 status = APPROVED;
             }

+ 7 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java

@@ -325,15 +325,14 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
 
                     //String platformAccount = sysConfigDao.findConfigValue(SysConfigService.PLATFORM_PAYEE_ACCOUNT);
 
-                    if (StringUtils.isBlank(platformAccount)) {
-                        throw new BizException("平台收款账户查询失败");
-                    }
+                    if (StringUtils.isNotBlank(platformAccount)) {
 
-                    Map<String, Object> divMember = new HashMap<>();
-                    divMember.put("member_id", platformAccount);
-                    divMember.put("amount", amount);
-                    divMember.put("fee_flag", "Y");
-                    divMemberList.add(divMember);
+                        Map<String, Object> divMember = new HashMap<>();
+                        divMember.put("member_id", platformAccount);
+                        divMember.put("amount", amount);
+                        divMember.put("fee_flag", "Y");
+                        divMemberList.add(divMember);
+                    }
                 }
 
                 Map<String, Object> divMember1 = new HashMap<>();

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

@@ -32,7 +32,6 @@ import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
 import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
 import com.ym.mec.biz.dal.entity.SysPaymentConfig;
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum;
 import com.ym.mec.biz.dal.enums.FeeTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
@@ -43,7 +42,6 @@ import com.ym.mec.biz.service.PayService;
 import com.ym.mec.biz.service.SellOrderService;
 import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
-import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysPaymentConfigService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.redis.service.RedisCache;

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

@@ -115,13 +115,27 @@ public class StudentManageServiceImpl implements StudentManageService {
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
 
+        List<StudentManageListDto> dataList = null;
+        
+        int jmCount = 0;
+        if(queryInfo.getTenantId() == 28){
+        	queryInfo.setOrganId(null);
+        	jmCount = studentManageDao.countStudentByOrganId(params);
+            params.put("offset", pageInfo.getOffset());
+        	dataList = studentManageDao.findStudentsByOrganId(params);
+        	
+        	queryInfo.setTenantId(1);
+        	params.clear();
+            MapUtil.populateMap(params, queryInfo);
+        }
+
         if(StringUtils.isNotEmpty(queryInfo.getOrganId())){
             String[] organIds = queryInfo.getOrganId().split(",");
             params.put("organIds", organIds);
         }
 
-        List<StudentManageListDto> dataList = null;
         int count = studentManageDao.countStudentByOrganId(params);
+        count = count + jmCount;
         if (queryInfo.getIsExport()) {
             if (count > 50000) {
                 throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
@@ -130,7 +144,11 @@ public class StudentManageServiceImpl implements StudentManageService {
         if (count > 0) {
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());
-            dataList = studentManageDao.findStudentsByOrganId(params);
+            if(dataList == null){
+            	dataList = studentManageDao.findStudentsByOrganId(params);
+            }else{
+            	dataList.addAll(studentManageDao.findStudentsByOrganId(params));
+            }
             Set<Integer> userIds = dataList.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
             List<Integer> organIds = dataList.stream().map(e -> e.getOrganId()).distinct().collect(Collectors.toList());
             List<Integer> courseTeacherIds = dataList.stream().map(e -> e.getCourseTeacher()).distinct().collect(Collectors.toList());

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

@@ -31,6 +31,7 @@ import com.ym.mec.thirdparty.adapay.entity.HfMerchantConfig;
 import com.ym.mec.thirdparty.yqpay.*;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -220,6 +221,11 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
     }
 
     @Override
+	public List<StudentPaymentOrder> findOrderByOrderNos(List<String> orderNoList) {
+        return studentPaymentOrderDao.findOrderByOrderNos(orderNoList);
+	}
+
+	@Override
     public List<StudentPaymentOrder> queryByBatchNo(Integer userId, String batchNo, DealStatusEnum status) {
         return studentPaymentOrderDao.queryByBatchNo(userId, batchNo, status);
     }
@@ -630,14 +636,36 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         MapUtil.populateMap(params, queryInfo);
 
         List<StudentPaymentOrderDto> dataList = new ArrayList<>();
+        
+        int jmCount = 0;
+        if(queryInfo.getTenantId() == 28){
+        	queryInfo.setOrganId(null);
+        	jmCount = findCount(params);
+            params.put("offset", pageInfo.getOffset());
+        	dataList = studentPaymentOrderDao.queryPageOrder(params);
+        	
+        	queryInfo.setTenantId(1);
+        	if(StringUtils.isBlank(queryInfo.getMerNos())){
+        		queryInfo.setMerNos("H004236");
+        	}
+        	params.clear();
+        	MapUtil.populateMap(params, queryInfo);
+        }
+        
         int count = this.findCount(params);
+        count = count + jmCount;
 
         BigDecimal totalUserBalance = sysUserCashAccountDao.getTotalUserBalance(params);
         pageInfo.setTotalUserBalance(totalUserBalance);
         if (count > 0) {
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());
-            dataList = studentPaymentOrderDao.queryPageOrder(params);
+            
+            if(dataList == null){
+            	dataList = studentPaymentOrderDao.queryPageOrder(params);
+            }else{
+            	dataList.addAll(studentPaymentOrderDao.queryPageOrder(params));
+            }
 
             StudentPaymentOrder orderMoneyAmount = studentPaymentOrderDao.getOrderMoneyAmount(params);
             BigDecimal totalExpectAmount = orderMoneyAmount.getExpectAmount() != null ? orderMoneyAmount.getExpectAmount() : BigDecimal.ZERO;

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java

@@ -86,6 +86,16 @@ public class StudentStatisticsServiceImpl extends BaseServiceImpl<Integer, Stude
 		redisTemplate.opsForValue().set("updateStudentStatisticsNum:",num);
 	}
 
+	public int countStatistics(StudentStatisticsQueryInfo queryInfo){
+		Map<String, Object> params = new HashMap<String, Object>();
+		MapUtil.populateMap(params, queryInfo);
+		if(StringUtils.isNotEmpty(queryInfo.getOrganId())){
+			List<Integer> organIdList = Arrays.stream(queryInfo.getOrganId().split(",")).map(id -> Integer.valueOf(id)).collect(Collectors.toList());
+			params.put("organIdList",organIdList);
+		}
+		return studentStatisticsDao.countStatistics(params);
+	}
+
 	@Override
 	public PageInfo<StudentStatisticsDto> queryStatisticsPage(StudentStatisticsQueryInfo queryInfo) {
 		PageInfo<StudentStatisticsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java

@@ -14,6 +14,7 @@ import com.ym.mec.biz.dal.enums.HeardLevelEnum;
 import com.ym.mec.biz.dal.enums.IndexDataType;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.page.SysMusicCompareRecordQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloudTrainingQueryInfo;
 import com.ym.mec.biz.service.*;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
@@ -481,4 +482,21 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 		sysMusicCompareRecordDao.deleteDayData(now);
 		sysMusicCompareRecordDao.init(now);
 	}
+
+	@Override
+	public PageInfo<TeacherCloudTrainingDto> queryTeacherTraining(TeacherCloudTrainingQueryInfo queryInfo) {
+		PageInfo<TeacherCloudTrainingDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+
+		List<TeacherCloudTrainingDto> dataList = null;
+		int count = sysMusicCompareRecordDao.queryTeacherTrainingCount(queryInfo);
+		if (count > 0) {
+			pageInfo.setTotal(count);
+			dataList = sysMusicCompareRecordDao.queryTeacherTrainingList(queryInfo);
+		}
+		if (count == 0) {
+			dataList = new ArrayList<>();
+		}
+		pageInfo.setRows(dataList);
+		return pageInfo;
+	}
 }

+ 2 - 2
mec-biz/src/main/resources/config/contracts/latest_contract_template.ftl

@@ -118,10 +118,10 @@
             </div>
         	<#else>
             <div class="sign">甲方签章:${companyName}
-                <span>日期:${.now?string("yyyy年MM月dd日")}</span>
+                <span>日期:${currentDate?string("yyyy年MM月dd日")}</span>
             </div>
             <div class="sign">乙方签章:
-                <span>日期:${.now?string("yyyy年MM月dd日")} </span>
+                <span>日期:${currentDate?string("yyyy年MM月dd日")} </span>
             </div>
         	</#if>
         </div>

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

@@ -442,9 +442,11 @@
 		<result property="subCourseNum" column="sub_course_num_"/>
 	</resultMap>
 	<select id="queryActivityStudentList" resultMap="ActivityUserDto">
-		SELECT aum.user_id_,su.avatar_,sj.id_ subject_id_,su.username_,su.phone_,sj.name_ subject_name_,SUM(aum.sub_course_num_) sub_course_num_
-		FROM (SELECT aum.id_,aum.user_id_,aum.sub_course_num_,
-		             aum.single_course_time_,case when category_id_ IS NULL THEN 'PRACTICE' ELSE 'VIP' END type_ from activity_user_mapper aum
+		SELECT aum.user_id_,su.avatar_,sj.id_ subject_id_,su.username_,su.phone_,sj.name_ subject_name_,aum.sub_course_num_
+		FROM (
+		select aum.id_,aum.user_id_,SUM(aum.sub_course_num_) sub_course_num_,aum.single_course_time_,aum.type_ from (
+		SELECT aum.id_,aum.user_id_,aum.sub_course_num_,
+		aum.single_course_time_,case when category_id_ IS NULL THEN 'PRACTICE' ELSE 'VIP' END type_ from activity_user_mapper aum
 		WHERE aum.sub_course_num_ > 0 AND aum.return_fee_ = 0
 		<if test="queryInfo.categoryId != null">
 			AND aum.category_id_ = #{queryInfo.categoryId}
@@ -454,7 +456,7 @@
 		</if>
 		UNION ALL
 		SELECT aum.id_,aum.user_id_,aum.sub_give_course_num_ sub_course_num_,
-		       aum.give_single_course_time_ single_course_time_,case when give_category_id_ IS NULL THEN 'PRACTICE' ELSE 'VIP' END type_ from activity_user_mapper aum
+		aum.give_single_course_time_ single_course_time_,case when give_category_id_ IS NULL THEN 'PRACTICE' ELSE 'VIP' END type_ from activity_user_mapper aum
 		WHERE aum.sub_give_course_num_ > 0 AND aum.return_fee_ = 0
 		<if test="queryInfo.categoryId != null">
 			AND aum.give_category_id_ = #{queryInfo.categoryId}
@@ -463,6 +465,8 @@
 			AND aum.give_category_id_ IS NULL
 		</if>
 		) aum
+		group by aum.user_id_
+		) aum
 		<if test="queryInfo.teacherId != null">
 			left join student_teacher_mapper stm ON stm.student_id_ = aum.user_id_
 		</if>

+ 0 - 6
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -374,9 +374,6 @@
             <if test="userId != null">
                 AND cgsm.user_id_ = #{userId}
             </if>
-            <if test="tenantId != null">
-                AND cgsm.tenant_id_ = #{tenantId}
-            </if>
             <if test="search != null and search != ''">
                 AND cg.name_ LIKE CONCAT('%',#{search},'%')
             </if>
@@ -394,9 +391,6 @@
             <if test="userId != null">
                 AND cgsm.user_id_ = #{userId}
             </if>
-            <if test="tenantId != null">
-                AND cgsm.tenant_id_ = #{tenantId}
-            </if>
             <if test="search != null and search != ''">
                 AND cg.name_ LIKE CONCAT('%',#{search},'%')
             </if>

+ 5 - 0
mec-biz/src/main/resources/config/mybatis/CloudTeacherFreeCourseMapper.xml

@@ -80,4 +80,9 @@
 			#{id}
 		</foreach>
 	</select>
+    <select id="queryMapByClassDate" resultType="java.util.Map">
+		select ctfc.course_id_ 'key',ctfc.cost_ 'value' from cloud_teacher_free_course  ctfc
+		left join course_schedule cs ON cs.id_ = ctfc.course_id_
+		where DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month}
+	</select>
 </mapper>

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/CourseConvertLogMapper.xml

@@ -66,8 +66,8 @@
 			<if test="musicGroupId != null and musicGroupId != ''">
 				AND ccl.music_group_id_ = #{musicGroupId}
 			</if>
-			<if test="operatorName != null and operatorName != ''">
-				AND operator_name_ LIKE CONCAT('%',#{operatorName},'%')
+			<if test="operator != null and operator != ''">
+				AND operator_name_ LIKE CONCAT('%',#{operator},'%')
 			</if>
 			<if test="operatorDate != null and operatorDate != ''">
 				AND DATE_FORMAT(ccl.create_time_,'%Y-%m-%d') = #{operatorDate}

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

@@ -157,7 +157,7 @@
 		LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
 		LEFT JOIN vip_group_activity vga ON vga.id_ = vg.vip_group_activity_id_
 		WHERE cs.group_type_ = 'VIP' AND csts.settlement_time_ IS NOT NULL
-		AND cs.class_date_ &gt;= #{firstDayOfMonth} AND cs.class_date_ &lt;= #{lastDayOfMonth}
+		AND DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month}
 		AND FIND_IN_SET(cs.actual_teacher_id_,csrr.teacher_id_)
 		AND FIND_IN_SET(cg.subject_id_list_,csrr.subject_id_)
 		AND csts.user_id_ = cs.actual_teacher_id_

+ 135 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleSwMapper.xml

@@ -0,0 +1,135 @@
+<?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="com.ym.mec.biz.dal.dao.CourseScheduleSwDao">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.CourseScheduleSw"
+		id="CourseScheduleSw">
+		<result column="id_" property="id" />
+		<result column="teacher_id_" property="teacherId" />
+		<result column="teacher_name_" property="teacherName" />
+		<result column="course_type_" property="courseType" />
+		<result column="course_name_" property="courseName" />
+		<result column="teach_mode_" property="teachMode" />
+		<result column="course_status_" property="courseStatus" />
+		<result column="class_date_" property="classDate" />
+		<result column="class_time_" property="classTime" />
+		<result column="salary_" property="salary" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="CourseScheduleSw">
+		SELECT * FROM course_schedule_sw WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="CourseScheduleSw">
+		SELECT * FROM course_schedule_sw ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleSw"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO course_schedule_sw
+		(id_,teacher_id_,course_type_,course_name_,teach_mode_,class_date_,class_time_,salary_,create_time_,update_time_,course_status_)
+		VALUES(#{id},#{teacherId},#{courseType},#{courseName},#{teachMode},#{classDate},#{classTime},#{salary},#{createTime},#{updateTime},#{courseStatus})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleSw">
+		UPDATE course_schedule_sw
+		<set>
+			<if test="classDate != null">
+				class_date_ = #{classDate},
+			</if>
+			<if test="classTime != null">
+				class_time_ = #{classTime},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="teacherId != null">
+				teacher_id_ = #{teacherId},
+			</if>
+			<if test="teachMode != null">
+				teach_mode_ = #{teachMode},
+			</if>
+			<if test="courseStatus != null">
+				course_status_ = #{courseStatus},
+			</if>
+			<if test="salary != null">
+				salary_ = #{salary},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="courseType != null">
+				course_type_ = #{courseType},
+			</if>
+			<if test="courseName != null">
+				course_name_ = #{courseName},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM course_schedule_sw WHERE id_ =
+		#{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="CourseScheduleSw"
+		parameterType="map">
+		SELECT cs.*,ifnull(u.real_name_,u.username_) teacher_name_ FROM course_schedule_sw cs left join sys_user u on cs.teacher_id_ = u.id_ 
+		<where>
+			<if test="teacherIdList != null">
+				and cs.teacher_id_ = #{teacherIdList}
+			</if>
+			<if test="courseStatus != null">
+				and cs.course_status_ = #{courseStatus}
+			</if>
+			<if test="teachMode != null">
+				and cs.teach_mode_ = #{teachMode}
+			</if>
+			<if test="createStartDate != null">
+				and class_date_ &gt;= #{createStartDate}
+			</if>
+			<if test="createEndDate != null">
+				and class_date_ &lt;= #{createEndDate}
+			</if>
+		</where>
+		ORDER BY cs.class_date_ desc
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM course_schedule_sw cs left join sys_user u on cs.teacher_id_ = u.id_
+		<where>
+			<if test="teacherIdList != null">
+				and cs.teacher_id_ = #{teacherIdList}
+			</if>
+			<if test="courseStatus != null">
+				and cs.course_status_ = #{courseStatus}
+			</if>
+			<if test="teachMode != null">
+				and cs.teach_mode_ = #{teachMode}
+			</if>
+			<if test="createStartDate != null">
+				and class_date_ &gt;= #{createStartDate}
+			</if>
+			<if test="createEndDate != null">
+				and class_date_ &lt;= #{createEndDate}
+			</if>
+		</where>
+	</select>
+</mapper>

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

@@ -758,7 +758,7 @@
 		LEFT JOIN music_group mg ON (mg.id_ = ts.music_group_id_ AND ts.group_type_ = 'MUSIC')
 		LEFT JOIN organization mgo ON mgo.id_ = mg.organ_id_
 		LEFT JOIN charge_type ct ON ct.id_ = mg.charge_type_id_
-		WHERE cs.class_date_ BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth} AND cs.`del_flag_` != 1 AND cs.group_type_ = 'MUSIC' AND ts.settlement_time_ IS NOT NULL
+		WHERE DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month} AND cs.`del_flag_` != 1 AND cs.group_type_ = 'MUSIC' AND ts.settlement_time_ IS NOT NULL
 		AND t.is_settlement_salary_ = 1 and ts.tenant_id_ = #{tenantId}
 		<if test="courseTypeList != null">
 			and cs.type_ in (#{courseTypeList})
@@ -798,7 +798,7 @@
 		LEFT JOIN vip_group_activity vga ON vg.vip_group_activity_id_ = vga.id_
 		LEFT JOIN organization vgo ON vgo.id_ = vg.organ_id_
 		left join vip_group_category vgc on vgc.id_ = vg.vip_group_category_id_
-		WHERE vg.organ_id_ != 41 AND cs.class_date_ BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth} AND cs.`del_flag_` != 1
+		WHERE vg.organ_id_ != 41 AND DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month} AND cs.`del_flag_` != 1
 		AND cs.group_type_ = 'VIP' AND ts.settlement_time_ IS NOT NULL
 		AND t.is_settlement_salary_ = 1 and ts.tenant_id_ = #{tenantId}
 		<if test="courseTypeList != null">
@@ -839,7 +839,7 @@
 		LEFT JOIN `student_attendance` sa ON sa.`course_schedule_id_` = ts.`course_schedule_id_`
 		LEFT JOIN practice_group pg ON (pg.id_ = ts.music_group_id_ AND ts.group_type_ = 'PRACTICE')
 		LEFT JOIN organization pgo ON pgo.id_ = pg.organ_id_
-		WHERE cs.class_date_ BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth} AND cs.`del_flag_` != 1 AND cs.group_type_ = 'PRACTICE' AND ts.settlement_time_ IS NOT NULL
+		WHERE DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month} AND cs.`del_flag_` != 1 AND cs.group_type_ = 'PRACTICE' AND ts.settlement_time_ IS NOT NULL
 		AND t.is_settlement_salary_ = 1 and ts.tenant_id_ = #{tenantId}
 		<if test="courseTypeList != null">
 			and cs.type_ in (#{courseTypeList})

+ 110 - 0
mec-biz/src/main/resources/config/mybatis/ExtensionOrderMapper.xml

@@ -0,0 +1,110 @@
+<?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="com.ym.mec.biz.dal.dao.ExtensionOrderDao">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.ExtensionOrder"
+		id="ExtensionOrder">
+		<result column="id_" property="id" />
+		<result column="order_no_" property="orderNo" />
+		<result column="order_amount_" property="orderAmount" />
+		<result column="order_type_" property="orderType" />
+		<result column="pay_time_" property="payTime" />
+		<result column="extension_user_id_" property="extensionUserId" />
+		<result column="extension_user_" property="extensionUser" />
+		<result column="extension_fee_" property="extensionFee" />
+		<result column="update_time_" property="updateTime" />
+		<result column="create_time_" property="createTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="ExtensionOrder">
+		SELECT * FROM extension_order WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="ExtensionOrder">
+		SELECT * FROM extension_order ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ExtensionOrder"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO extension_order
+		(id_,order_no_,order_amount_,order_type_,pay_time_,extension_user_id_,extension_fee_,update_time_,create_time_)
+		VALUES(#{id},#{orderNo},#{orderAmount},#{orderType},#{payTime},#{extensionUserId},#{extensionFee},#{updateTime},#{createTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.ExtensionOrder">
+		UPDATE extension_order
+		<set>
+			<if test="orderNo != null">
+				order_no_ = #{orderNo},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="orderAmount != null">
+				order_amount_ = #{orderAmount},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="extensionFee != null">
+				extension_fee_ = #{extensionFee},
+			</if>
+			<if test="orderType != null">
+				order_type_ = #{orderType},
+			</if>
+			<if test="extensionUserId != null">
+				extension_user_id_ = #{extensionUserId},
+			</if>
+			<if test="payTime != null">
+				pay_time_ = #{payTime},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM extension_order WHERE id_ = #{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="ExtensionOrder" parameterType="map">
+		SELECT eo.order_no_,eo.order_amount_, eo.order_type_,eo.pay_time_, ifnull(u.real_name_,u.username_) extension_user_,
+		eo.extension_fee_
+		FROM extension_order eo 
+		left join sys_user u on eo.extension_user_id_ = u.id_
+		<where>
+			<if test="extensionUserId != null">
+				and eo.extension_user_id_ = #{extensionUserId}
+			</if>
+			<if test="orderNo != null">
+				and eo.order_no_ = #{orderNo}
+			</if>
+		</where>
+		ORDER BY eo.order_no_ desc
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM extension_order eo
+		<where>
+			<if test="extensionUserId != null">
+				and eo.extension_user_id_ = #{extensionUserId}
+			</if>
+			<if test="orderNo != null">
+				and eo.order_no_ = #{orderNo}
+			</if>
+		</where>
+	</select>
+</mapper>

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

@@ -57,7 +57,8 @@
         a.pre_template_ AS preTemplate,
         a.room_config_ AS roomConfig,
         a.popularize_ AS popularize,
-        a.popularize_type_ AS popularizeType
+        a.popularize_type_ AS popularizeType,
+        a.service_provider_ as serviceProvider
         from im_live_broadcast_room as a
         left join tenant_info AS t on a.tenant_id_ = t.id_
         left join sys_user AS b on a.speaker_id_ = b.id_

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/MusicGroupCalenderRefundPeriodMapper.xml

@@ -108,10 +108,10 @@
 			mgpc.status_ IN ('OPEN','OVER','PAID')
 			<if test="errorType != null and errorType != ''">
 				<if test="errorType == 'COOPERATION_PAYMENT_ERROR'">
-					AND TIMESTAMPDIFF(DAY,crp.refund_date_,DATE_FORMAT(NOW(),'%Y-%m-%d')) >= 1
+					AND TIMESTAMPDIFF(DAY,crp.refund_date_,DATE_FORMAT(NOW(),'%Y-%m-%d')) >= 1 AND refund_flag_ = 0
 				</if>
 				<if test="errorType == 'COOPERATION_PAYMENT_ALERT'">
-					AND TIMESTAMPDIFF(DAY,crp.refund_date_,DATE_FORMAT(NOW(),'%Y-%m-%d')) BETWEEN -2 AND 0
+					AND TIMESTAMPDIFF(DAY,crp.refund_date_,DATE_FORMAT(NOW(),'%Y-%m-%d')) BETWEEN -2 AND 0 AND refund_flag_ = 0
 				</if>
 			</if>
 			<if test="organId != null and organId != ''">

+ 9 - 0
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -540,6 +540,15 @@
         FROM student_payment_order
         WHERE order_no_ = #{orderNo}
     </select>
+    
+    <select id="findOrderByOrderNos" resultMap="StudentPaymentOrder">
+        SELECT *
+        FROM student_payment_order
+        WHERE order_no_ in 
+        <foreach collection="orderNoList" item="orderNo" index="index" open="(" close=")" separator=",">
+            #{orderNo}
+        </foreach>
+    </select>
 
     <select id="queryByDealStatus" resultMap="StudentPaymentOrder" parameterType="map">
         SELECT *

+ 21 - 0
mec-biz/src/main/resources/config/mybatis/SysMusicCompareRecordMapper.xml

@@ -517,4 +517,25 @@
 			</if>
 		</where>
 	</select>
+	
+	<select id="queryTeacherTrainingList" resultType="com.ym.mec.biz.dal.dto.TeacherCloudTrainingDto">
+		select a.organName,a.username,a.trainingDurationSeconds,a.trianingDays,GROUP_CONCAT(distinct s.`name_`)  subjectName from 
+		(
+		SELECT o.`name_` organName,ifnull(u.`real_name_`,u.`username_` ) username,sum(cr.`play_time_`) trainingDurationSeconds,
+		count(DISTINCT(date(cr.`create_time_`)))  trianingDays ,t.subject_id_,cr.`user_id_` 
+		FROM `sys_music_compare_record` cr 
+		LEFT JOIN `teacher` t on t.`id_` = cr.`user_id_` and cr.`client_id_` = 'teacher'
+		LEFT JOIN `sys_user` u on u.`id_` = cr.`user_id_` 
+		LEFT JOIN `organization` o on o.`id_` = t.`organ_id_` 
+		WHERE cr.`client_id_` = 'teacher' and t.`organ_id_` in (${queryInfo.organIdList}) AND date(cr.`create_time_`) BETWEEN #{queryInfo.startTime} and #{queryInfo.endTime} and t.job_nature_ = 'FULL_TIME'
+		GROUP BY cr.`user_id_` 
+		) a LEFT JOIN `subject` s on find_in_set(s.`id_`,a.`subject_id_` ) 
+		group by a.user_id_
+	</select>
+	
+	<select id="queryTeacherTrainingCount" resultType="int">
+		SELECT count(distinct cr.user_id_) FROM `sys_music_compare_record` cr 
+		LEFT JOIN `teacher` t on t.`id_` = cr.`user_id_` and cr.`client_id_` = 'teacher'
+		WHERE cr.`client_id_` = 'teacher' and t.`organ_id_` in (${queryInfo.organIdList}) AND date(cr.`create_time_`) BETWEEN #{queryInfo.startTime} and #{queryInfo.endTime} and t.job_nature_ = 'FULL_TIME'
+	</select>
 </mapper>

+ 1 - 0
mec-eureka/pom.xml

@@ -42,6 +42,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-gateway/mec-gateway-admin/pom.xml

@@ -33,6 +33,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-gateway/mec-gateway-web/pom.xml

@@ -71,6 +71,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-im/pom.xml

@@ -123,6 +123,7 @@
             <plugin>
                 <groupId>com.spotify</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
+                <version>1.2.2</version>
             </plugin>
         </plugins>
     </build>

+ 1 - 0
mec-monitor/pom.xml

@@ -40,6 +40,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-student/pom.xml

@@ -77,6 +77,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-task/pom.xml

@@ -81,6 +81,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-teacher/pom.xml

@@ -75,6 +75,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 15 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherImLiveBroadcastRoomController.java

@@ -67,10 +67,23 @@ public class TeacherImLiveBroadcastRoomController extends BaseController {
     }
 
     @ApiOperation("查询房间信息并校验房间是否合规")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "roomUid", dataType = "String", value = "房间uid", required = true),
+            @ApiImplicitParam(name = "userId", dataType = "Integer", value = "用户id", required = true),
+            @ApiImplicitParam(name = "liveAssistant", dataType = "Boolean", value = "直播助手"),
+    })
     @GetMapping("/queryRoom")
     public HttpResponseResult<ImLiveBroadcastRoomVo> queryRoomAndCheck(@ApiParam(value = "房间uid", required = true) String roomUid,
-                                                                       @ApiParam(value = "用户id", required = true) Integer userId) {
-        return succeed(imLiveBroadcastRoomService.queryRoomAndCheck(roomUid, userId, 2));
+                                                                       @ApiParam(value = "用户id", required = true) Integer userId,
+                                                                       @RequestParam(defaultValue = "false") Boolean liveAssistant) {
+
+        // 请求来源业源
+        int osType = 2; // 老师端
+        if (Optional.ofNullable(liveAssistant).orElse(false)) {
+            osType = 3; // 直播助手
+        }
+
+        return succeed(imLiveBroadcastRoomService.queryRoomAndCheck(roomUid, userId, osType));
     }
 
     @ApiOperation("关闭直播间")

+ 1 - 1
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/adapay/SettleAccountService.java

@@ -32,7 +32,7 @@ public class SettleAccountService {
 		settleCountParams.put("member_id", accountInfo.getMemberId());
 		settleCountParams.put("app_id", appId);
 		settleCountParams.put("channel", "bank_account");
-		settleCountParams.put("account_info", accountInfo);
+		settleCountParams.put("account_info", accountInfoMap);
 		try {
 			Map<String, Object> resp = com.huifu.adapay.model.SettleAccount.create(settleCountParams, merchantKey);
 			if (StringUtils.equals("succeeded", resp.get("status").toString())) {

+ 2 - 2
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/provider/TsignPlugin.java

@@ -63,12 +63,12 @@ public class TsignPlugin implements ESealPlugin, InitializingBean, DisposableBea
         projectconfig.setItsmApiUrl(apisUrl);
         Result result = ServiceClientManager.registClient(projectconfig, null, null);
         if (result.getErrCode() != 0) {
-            //throw new ThirdpartyException("e签宝客户端注册失败:{}", result.getMsg());
+            throw new ThirdpartyException("e签宝客户端注册失败:{}", result.getMsg());
         }
 
         serviceClient = ServiceClientManager.get(projectId);
         if (serviceClient == null) {
-            //throw new ThirdpartyException("获取e签宝客户端失败");
+            throw new ThirdpartyException("获取e签宝客户端失败");
         }
     }
 

+ 1 - 0
mec-web/pom.xml

@@ -81,6 +81,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 39 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -142,6 +142,9 @@ public class ExportController extends BaseController {
     
     @Autowired
     private ImLiveBroadcastRoomMemberService imLiveBroadcastRoomMemberService;
+    
+    @Autowired
+    private SysMusicCompareRecordService sysMusicCompareRecordService;
 
     @ApiOperation(value = "获取可导出字段")
     @RequestMapping("export/getFields")
@@ -2912,4 +2915,40 @@ public class ExportController extends BaseController {
             }
         }
     }
+    
+    @ApiOperation(value = "全职老师云教练训练列表")
+    @PostMapping("export/teacherCloudTrainingList")
+    @PreAuthorize("@pcs.hasPermissions('export/teacherCloudTrainingList')")
+    public void exportTeacherCloudTrainingList(HttpServletResponse response, TeacherCloudTrainingQueryInfo queryInfo) throws IOException {
+        queryInfo.setPage(1);
+        queryInfo.setRows(49999);
+        
+        List<TeacherCloudTrainingDto> rows = sysMusicCompareRecordService.queryTeacherTraining(queryInfo).getRows();
+        if (rows.size() < 1) {
+            throw new BizException("没有可导出数据");
+        }
+        OutputStream outputStream = response.getOutputStream();
+        try {
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "姓名", "声部", "总练习时长(秒)",
+                    "训练天数"}, new String[]{
+                    "organName", "username", "subjectName", "trainingDurationSeconds", "trianingDays"}, rows);
+            response.setContentType("application/octet-stream");
+            response.setHeader("Content-Disposition", "attac:wq" +
+                    "hment;filename=teacherCloudTrainingList-" + DateUtil.getDate(new Date()) + ".xls");
+
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
 }

+ 1 - 0
mec-web/src/main/java/com/ym/mec/web/controller/IndexController.java

@@ -110,6 +110,7 @@ public class IndexController extends BaseController {
 		queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
 		return succeed(indexService.getIndexBaseData(queryInfo));
 	}
+
 	@GetMapping("/indexCoop")
 	public HttpResponseResult<List<DecimalMapDto>> indexCoop(String organId, String startTime, String endTime){
 		return succeed(indexService.indexCoop(organId,startTime,endTime));

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

@@ -107,8 +107,8 @@ public class StudentStatisticsController extends BaseController {
     public HttpResponseResult exportStudentSmallClassStatisticsSum(StudentStatisticsQueryInfo queryInfo) throws IOException {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
-        PageInfo<StudentStatisticsDto> pageList = studentStatisticsService.queryStatisticsPage(queryInfo);
-        if (pageList.getTotal() <= 0) {
+        int countStatistics = studentStatisticsService.countStatistics(queryInfo);
+        if (countStatistics <= 0) {
             throw new BizException("没有可导出的记录");
         }
         ManagerDownload managerDownload = exportService.saveManagerDownload(ExportTypeEnum.STUDENT_SMALL_CLASS_STATISTICS,sysUser.getId());

+ 77 - 0
mec-web/src/main/java/com/ym/mec/web/controller/SwTempJcController.java

@@ -0,0 +1,77 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.ApiOperation;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.biz.dal.entity.ExtensionOrder;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
+import com.ym.mec.biz.dal.page.CourseScheduleSWQueryInfo;
+import com.ym.mec.biz.dal.page.ExtensionSWQueryInfo;
+import com.ym.mec.biz.service.CourseScheduleSwService;
+import com.ym.mec.biz.service.ExtensionOrderService;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.PageInfo;
+
+@RequestMapping("swTempJc")
+@RestController
+public class SwTempJcController extends BaseController {
+
+	@Autowired
+	private CourseScheduleSwService courseScheduleSwService;
+	
+	@Autowired
+	private ExtensionOrderService extensionOrderService;
+	
+	@Autowired
+	private StudentPaymentOrderService studentPaymentOrderService;
+	
+	private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+    @ApiOperation(value = "课表查询")
+    @GetMapping("/queryPageForCourseSchedule")
+    @PreAuthorize("@pcs.hasPermissions('swTempJc/queryPageForCourseSchedule')")
+    public Object queryPageForCourseSchedule(CourseScheduleSWQueryInfo queryInfo){
+        return succeed(courseScheduleSwService.queryPage(queryInfo));
+    }
+
+    @ApiOperation(value = "推广订单查询")
+    @GetMapping("/queryPageForExtensionOrder")
+    @PreAuthorize("@pcs.hasPermissions('swTempJc/queryPageForExtensionOrder')")
+    public Object queryPageForExtensionOrder(ExtensionSWQueryInfo queryInfo){
+    	
+    	PageInfo<ExtensionOrder> pageInfo = extensionOrderService.queryPage(queryInfo);
+    	
+    	List<ExtensionOrder> extensionOrderList = pageInfo.getRows();
+    	
+    	List<String> orderNoList = extensionOrderList.stream().map(t -> t.getOrderNo()).collect(Collectors.toList());
+    	
+    	if(orderNoList != null && orderNoList.size() > 0){
+    		
+    		Map<String,StudentPaymentOrder> map = studentPaymentOrderService.findOrderByOrderNos(orderNoList).stream().collect(Collectors.toMap(StudentPaymentOrder :: getOrderNo, Function.identity()));
+
+    		StudentPaymentOrder spo = null;
+        	for(ExtensionOrder eo : extensionOrderList){
+        		spo = map.get(eo.getOrderNo());
+        		if(spo == null){
+        			continue;
+        		}
+        		eo.setOrderAmount(spo.getExpectAmount());
+        		eo.setPayTime(sdf.format(spo.getPayTime()));
+        	}
+    	}
+    	
+        return succeed(pageInfo);
+    }
+}

+ 4 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java

@@ -55,6 +55,10 @@ public class TeacherController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('teacher/queryPage')")
     public HttpResponseResult<PageInfo<Teacher>> queryPage(TeacherQueryInfo queryInfo) {
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
+        if(queryInfo.getTenantId() == 28){
+        	queryInfo.setTenantId(1);
+        	queryInfo.setOrganId(null);
+        }
         return succeed(teacherService.queryPageDetail(queryInfo));
     }
 

+ 14 - 1
mec-web/src/main/java/com/ym/mec/web/controller/TempController.java

@@ -4,11 +4,11 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.TempTestService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.util.excel.POIUtil;
@@ -26,6 +28,9 @@ public class TempController extends BaseController {
 	
 	@Autowired
 	private TempTestService tempTestService;
+	
+	@Autowired
+	private ContractService contractService;
 
 	@PostMapping(value = "/queryOrganMusicInfos")
 	public Object queryOrganMusicInfos(@RequestParam("multipartFile") MultipartFile multipartFile) {
@@ -61,4 +66,12 @@ public class TempController extends BaseController {
 
 		return succeed();
 	}
+
+	@PostMapping(value = "/generateContract")
+	public Object generateContract(Integer userId, String musicGroupId, OrderTypeEnum orderType, Date currentDate) {
+
+		contractService.transferProduceContract(userId, musicGroupId, orderType, currentDate);
+
+		return succeed();
+	}
 }

+ 1 - 1
mec-web/src/main/resources/bootstrap-local.properties

@@ -3,7 +3,7 @@
 #\u670d\u52a1\u5668\u5730\u5740
 spring.cloud.nacos.config.server-addr=47.114.176.40:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=6488ff54-d97a-43ea-8c7b-d1d25bb54622
+spring.cloud.nacos.config.namespace=763c3d7e-d071-41e3-885a-170b91e6376c
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 spring.cloud.nacos.config.group=DEFAULT_GROUP
 #\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}

+ 2 - 2
mec-web/src/main/resources/exportColumnMapper.ini

@@ -67,8 +67,8 @@ headColumns = ["交易流水号", "订单号", "订单日期", "交易类型", "
 fieldColumns = ["transNo", "orderNo", "createTime", "type.desc", "expectAmount", "actualAmount", "user.username", "user.phone", "paymentChannel", "merNos", "status.msg", "memo", "paymentChannel.desc"]
 
 [导出老师课酬]
-headColumns = ["课时编号", "老师编号", "老师姓名", "老师分部", "工作类别","课程分部", "课程组编号", "课程班名称", "乐团模式", "vip活动名称", "Vip课程类型", "阶梯奖励名称", "线上课/线下课", "线上课单价", "线下课单价","课程类别", "课时时长", "实际上课时长", "上课日期","上课时间", "教师签到状态", "教师签退状态", "教师签到时间", "教师签退时间", "考勤申诉处理状态", "处理意见","主辅", "上课地点", "应到学员", "学员签到时间", "学员签退时间", "课时课酬", "阶梯奖励", "扣款原因", "收入"]
-fieldColumns = ["courseScheduleId", "teacherId", "teacherName", "teacherOrganName", "jobType", "courseScheduleOrganName", "groupId", "groupName", "changeType", "vipActiveName", "vipCategoryName", "activeName", "teachMode", "onlineClassesUnitPrice", "offlineClassesUnitPrice", "courseScheduleType", "signCourseScheduleTime", "currentTime", "classDate", "courseScheduleStartTime", "signInStatus", "signOutStatus", "signInTime", "signOutTime", "complaintsStatus", "disposeContent", "teacherRole", "address", "studentNum", "studentSignInTime", "studentSignOutTime", "price", "rewards", "deductionReason", "courseIncome"]
+headColumns = ["课时编号", "老师编号", "老师姓名", "老师分部", "工作类别","课程分部", "课程组编号", "课程班名称", "乐团模式", "vip活动名称", "Vip课程类型", "阶梯奖励名称", "线上课/线下课", "线上课单价", "线下课单价","课程类别", "课时时长", "实际上课时长", "上课日期","上课时间", "教师签到状态", "教师签退状态", "教师签到时间", "教师签退时间", "考勤申诉处理状态", "处理意见","主辅", "上课地点", "应到学员", "学员签到时间", "学员签退时间", "课时课酬", "阶梯奖励", "扣款原因", "收入", "云教练转结"]
+fieldColumns = ["courseScheduleId", "teacherId", "teacherName", "teacherOrganName", "jobType", "courseScheduleOrganName", "groupId", "groupName", "changeType", "vipActiveName", "vipCategoryName", "activeName", "teachMode", "onlineClassesUnitPrice", "offlineClassesUnitPrice", "courseScheduleType", "signCourseScheduleTime", "currentTime", "classDate", "courseScheduleStartTime", "signInStatus", "signOutStatus", "signInTime", "signOutTime", "complaintsStatus", "disposeContent", "teacherRole", "address", "studentNum", "studentSignInTime", "studentSignOutTime", "price", "rewards", "deductionReason", "courseIncome", "cloudReverse"]
 
 [导出老师结转奖励]
 headColumns = ["课程组编号", "课程组名称", "分部", "指导老师", "是否结转", "结转金额", "结转日期", "备注"]

+ 1 - 0
mec-websocket/pom.xml

@@ -82,6 +82,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 1 - 0
mec-zipkin/pom.xml

@@ -77,6 +77,7 @@
 			<plugin>
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
 			</plugin>
 		</plugins>
 	</build>

+ 23 - 2
pom.xml

@@ -15,6 +15,7 @@
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 		<maven.compiler.source>1.8</maven.compiler.source>
 		<maven.compiler.target>1.8</maven.compiler.target>
+		<maven.test.skip>true</maven.test.skip>
 		<spring-boot.version>2.1.6.RELEASE</spring-boot.version>
 		<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
 		<zipkin.version>2.12.2</zipkin.version>
@@ -191,11 +192,11 @@
 				<version>1.3.2</version>
 			</dependency>
 
-			<dependency>
+			<!--<dependency>
 				<groupId>org.springframework.social</groupId>
 				<artifactId>spring-social-security</artifactId>
 				<version>1.1.6.RELEASE</version>
-			</dependency>
+			</dependency>-->
 
 			<dependency>
 				<groupId>commons-beanutils</groupId>
@@ -221,11 +222,29 @@
 				<version>5.1.1</version>
 			</dependency>
 
+			<!--maven compile plugins-->
+			<dependency>
+				<groupId>com.spotify</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
+			</dependency>
+
 		</dependencies>
 	</dependencyManagement>
 
 	<repositories>
 		<repository>
+			<id>anigiomaven</id>
+			<name>AnigioMaven</name>
+			<url>https://mvn.dayaedu.com/repository/maven-public/</url>
+		</repository>
+		<repository>
+			<id>alimaven</id>
+			<name>aliyun maven</name>
+			<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
+		</repository>
+
+		<repository>
 			<id>spring-milestones</id>
 			<name>Spring Milestones</name>
 			<url>https://repo.spring.io/libs-milestone</url>
@@ -363,6 +382,7 @@
 		</pluginManagement>
 		<plugins>
 			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
 				<version>3.8.0</version>
 				<configuration>
@@ -379,6 +399,7 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.6</version>
 				<configuration>
 					<encoding>UTF-8</encoding>
 					<!-- 过滤后缀为pem、pfx的证书文件 -->