fetch:解决循环依赖

This commit is contained in:
root
2021-07-01 14:05:27 +08:00
parent 03162b8e85
commit af2bf00713
3 changed files with 6 additions and 0 deletions
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -29,6 +30,7 @@ import java.util.*;
@Service
public class SarUserPersonalMenuServiceImpl extends ServiceImpl<SarUserPersonalMenuDao, SarUserPersonalMenu> implements ISarUserPersonalMenuService {
@Autowired
@Lazy
private TsUserServiceImpl tsUserService;
@Override
@@ -16,6 +16,7 @@ import com.adc.da.utils.util.ListUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -39,6 +40,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
@Autowired
private ISarMenuService sarMenuService;
@Autowired
@Lazy
private ISarUserPersonalMenuService sarUserPersonalMenuService;
/**
* 查询所有角色
@@ -17,6 +17,7 @@ import com.adc.da.sys.entity.UserEO;
import com.adc.da.utils.util.ListUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -38,6 +39,7 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
@Autowired
private ITsPositionService tsPositionService;
@Autowired
@Lazy
private ITsRoleService tsRoleService;
@Autowired
private ISarMenuService sarMenuService;