自动生成配置文件和mapper xml

newBigdata
xiaoCJ 11 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);
if (roleId == 4) {
stuClass.setClassId(zyUserInfo.getClassId().toString()); stuClass.setClassId(zyUserInfo.getClassId().toString());
stuClass.setClassName(zyUserInfo.getClassName()); stuClass.setClassName(zyUserInfo.getClassName());
stuClass.setSchoolName(zyUserInfo.getSchoolName()); stuClass.setSchoolName(zyUserInfo.getSchoolName());
stuClass.setCreateTime(new Date()); stuClass.setCreateTime(new Date());
map.put(zyUserInfo.getClassId().toString(), stuClass); map.put(zyUserInfo.getClassId().toString(), stuClass);
} }
}
if (!map.isEmpty()) {
for (Map.Entry<String, StuClass> stringStuClassEntry : map.entrySet()) { for (Map.Entry<String, StuClass> stringStuClassEntry : map.entrySet()) {
StuClass stuClass = stringStuClassEntry.getValue(); StuClass stuClass = stringStuClassEntry.getValue();
classMapper.insert(stuClass); classMapper.insert(stuClass);
} }
}
if (users.isEmpty()) { if (users.isEmpty()) {
return "账号已全部存在"; return "账号已全部存在";
} }

Loading…
Cancel
Save