wks hace 3 años
padre
commit
68646a45f0

+ 3 - 4
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -7,7 +7,7 @@ import com.ydtech.modules.order.dao.InsAreaCompanyMapper;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
@@ -21,10 +21,9 @@ import org.springframework.util.ObjectUtils;
 public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper, InsAreaCompany>
         implements InsAreaCompanyService {
 
-    private InsOrdersService insOrdersService;
+    private final InsOrdersService insOrdersService;
 
-    @Autowired
-    public void setInsOrdersService(InsOrdersService insOrdersService) {
+    public InsAreaCompanyServiceImpl(@Lazy InsOrdersService insOrdersService) {
         this.insOrdersService = insOrdersService;
     }
 

+ 2 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -39,6 +39,7 @@ import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
 import com.ydtech.modules.protocol.service.PtlAgreementService;
 import com.ydtech.utils.idgen.IdGenerate;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.util.ObjectUtils;
@@ -74,7 +75,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
     private final PtlAgreementService ptlAgreementService;
 
-    public InsOrdersServiceImpl(OrderComponents orderComponents, SysUserService sysUserService, SysDeptService sysDeptService, StringRedisTemplate redisTemplate, InsAreaCompanyService insAreaCompanyService, PtlAgreementService ptlAgreementService) {
+    public InsOrdersServiceImpl(OrderComponents orderComponents, SysUserService sysUserService, SysDeptService sysDeptService, StringRedisTemplate redisTemplate, @Lazy InsAreaCompanyService insAreaCompanyService, PtlAgreementService ptlAgreementService) {
         this.orderComponents = orderComponents;
         this.sysUserService = sysUserService;
         this.sysDeptService = sysDeptService;