package com.dy.pipIrrDemo.auth;
|
|
|
import com.dy.pipIrrGlobal.daoDemo.DemoAuthMapper;
|
import com.dy.pipIrrGlobal.pojoDemo.DemoAddress;
|
import com.dy.pipIrrGlobal.pojoDemo.DemoAuth;
|
import com.dy.pipIrrGlobal.pojoDemo.DemoRole;
|
import com.dy.pipIrrGlobal.pojoDemo.DemoUser;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.Date;
|
import java.util.List;
|
|
@Service
|
public class AuthSv {
|
@Autowired
|
private DemoAuthMapper demoAuthMapper ;
|
|
public List<DemoAuth> selectAll() {
|
List<DemoAuth> list = this.demoAuthMapper.selectAll() ;
|
for(DemoAuth po : list){
|
po.date = new Date() ;
|
List<DemoRole> roleList = po.getRoleList() ;
|
if(roleList != null){
|
for(DemoRole rpo : roleList){
|
List<DemoUser> userList = rpo.getUserList() ;
|
if(userList != null){
|
for(DemoUser upo : userList){
|
DemoAddress dPo = upo.getAddress() ;
|
if(dPo != null){
|
System.out.println(dPo.name);
|
}
|
}
|
}
|
}
|
}
|
}
|
return list ;
|
}
|
}
|