fetch:通过name查询角色

This commit is contained in:
赵肖云
2021-06-22 17:17:07 +08:00
parent 907a54c3a9
commit 7fa56b9905
9 changed files with 283 additions and 2 deletions
@@ -11,7 +11,7 @@ import java.util.List;
* 服务类
* </p>
*
* @author zyl
* @author zxy
* @since 2021-06-22
*/
public interface ITsInstitutionService extends IService<TsInstitution> {
@@ -51,6 +51,7 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
private List<TsInstitution> recursionGetInstitution(TsInstitution tsInstitution){
QueryWrapper<TsInstitution> institutionQueryWrapper=new QueryWrapper<>();
institutionQueryWrapper.eq("parent_id",tsInstitution.getId());
institutionQueryWrapper.eq("level",tsInstitution.getLevel()+1);
List<TsInstitution> tsInstitutions=tsInstitutionDao.selectList(institutionQueryWrapper);
for(TsInstitution tsInstitutionNode:tsInstitutions){
tsInstitutionNode.setChildren(recursionGetInstitution(tsInstitutionNode));