自动生成配置文件和mapper xml

newBigdata
xiaoCJ 10 months ago
parent 9e163b93b0
commit 3c274bd529

@ -223,17 +223,20 @@ public class UserController {
stuUser.setCreateTime(new Date()); stuUser.setCreateTime(new Date());
users.add(stuUser); users.add(stuUser);
stuClass.setClassId(zyUserInfo.getClassId().toString()); if (roleId == 4) {
stuClass.setClassName(zyUserInfo.getClassName()); stuClass.setClassId(zyUserInfo.getClassId().toString());
stuClass.setSchoolName(zyUserInfo.getSchoolName()); stuClass.setClassName(zyUserInfo.getClassName());
stuClass.setCreateTime(new Date()); stuClass.setSchoolName(zyUserInfo.getSchoolName());
map.put(zyUserInfo.getClassId().toString(), stuClass); stuClass.setCreateTime(new Date());
map.put(zyUserInfo.getClassId().toString(), stuClass);
}
} }
for (Map.Entry<String, StuClass> stringStuClassEntry : map.entrySet()) { if (!map.isEmpty()) {
StuClass stuClass = stringStuClassEntry.getValue(); for (Map.Entry<String, StuClass> stringStuClassEntry : map.entrySet()) {
classMapper.insert(stuClass); StuClass stuClass = stringStuClassEntry.getValue();
classMapper.insert(stuClass);
}
} }
if (users.isEmpty()) { if (users.isEmpty()) {
return "账号已全部存在"; return "账号已全部存在";
} }

Loading…
Cancel
Save