|
|
|
@ -130,13 +130,20 @@ public class StuUserServiceImpl implements StuUserService {
|
|
|
|
|
tchModuleWeithExample.createCriteria().andSchoolIdEqualTo(schoolId);
|
|
|
|
|
List<TchModuleWeith> tchModuleWeithList = tchModuleWeithMapper.selectByExample(tchModuleWeithExample);
|
|
|
|
|
|
|
|
|
|
if (tchModuleWeithList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
TchModuleWeith tchModuleWeith = new TchModuleWeith(schoolId);
|
|
|
|
|
tchModuleWeithMapper.insertSelective(tchModuleWeith);
|
|
|
|
|
tchModuleWeithList.add(tchModuleWeith);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StuUserExample example = new StuUserExample();
|
|
|
|
|
StuUserExample.Criteria criteria = example.createCriteria();
|
|
|
|
|
criteria.andSchoolIdEqualTo(schoolId);
|
|
|
|
|
List<StuUser> stuUsers = userMapper.selectByExample(example);
|
|
|
|
|
List<StuUser> list = new ArrayList();
|
|
|
|
|
for (int i = 0; i < stuUsers.size(); i++) {
|
|
|
|
|
System.out.println(stuUsers.get(i).getUserId());
|
|
|
|
|
//System.out.println(stuUsers.get(i).getUserId());
|
|
|
|
|
StuUser stuUser=new StuUser(stuUsers.get(i),tchModuleWeithList.get(0));
|
|
|
|
|
list.add(stuUser);
|
|
|
|
|
}
|
|
|
|
|