Explorar el Código

Merge remote-tracking branch 'origin/saas' into saas

zouxuan hace 3 años
padre
commit
c4f2cec921

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

@@ -101,6 +101,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     private GoodsService goodsService;
 
     @Autowired
+    @Lazy
     private MusicGroupService musicGroupService;
 
     @Autowired

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -32,20 +32,24 @@ import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.http.HttpUtil;
 import com.ym.mec.util.json.JsonUtil;
+
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
+
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
+
 import static com.ym.mec.biz.dal.entity.ApprovalStatus.PROCESSING;
 import static com.ym.mec.biz.dal.enums.DealStatusEnum.SUCCESS;
 import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.*;
@@ -166,6 +170,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     @Autowired
     private GoodsDao goodsDao;
     @Autowired
+    @Lazy
     private ContractService contractService;
     @Autowired
     private StudentPreRegistrationDao studentPreRegistrationDao;

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

@@ -336,7 +336,7 @@
                cto.time_ as time,
                sj.id_ as subject,
                sj.name_ as subjectName,
-               u.tenant_id_ as tenantId,
+               cto.tenant_id_ as tenantId,
                u.username_ as name,
                u.phone_ as phone
         from cloud_teacher_order cto

+ 4 - 1
mec-common/common-core/src/main/java/com/ym/mec/common/redis/config/RedisConfig.java

@@ -1,5 +1,6 @@
 package com.ym.mec.common.redis.config;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -33,7 +34,9 @@ public class RedisConfig {
 		RedisStandaloneConfiguration config = new RedisStandaloneConfiguration();
 		config.setHostName(host);
 		config.setPort(port);
-		config.setPassword(RedisPassword.of(password));
+		if (StringUtils.isNotBlank(password)) {
+			config.setPassword(RedisPassword.of(password));
+		}
 		config.setDatabase(database);
 
 		JedisConnectionFactory factory = new JedisConnectionFactory(config);