diff --git a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java index 3997bc4..a3ed4d6 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java +++ b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java @@ -231,7 +231,7 @@ public class UserController { StuUserExample example = new StuUserExample(); example.createCriteria().andZyUseridEqualTo(zyUserId).andSystemOnwerEqualTo(systemOwner); List list = stuUserMapper.selectByExample(example); - if (list != null || !list.isEmpty()) { + if (!list.isEmpty()) { continue; } StuUser stuUser = new StuUser(); diff --git a/src/main/resources/mapper/StuUserMapper.xml b/src/main/resources/mapper/StuUserMapper.xml index 7d4c9c1..18cf150 100644 --- a/src/main/resources/mapper/StuUserMapper.xml +++ b/src/main/resources/mapper/StuUserMapper.xml @@ -1,424 +1,430 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - - - - - - - userid, zy_userid, name, student_id, class_id, username, password, phone, email, + + + + userid + , zy_userid, name, student_id, class_id, username, password, phone, email, major, role_id, create_time, school_id, school_name, status, exam_status, system_onwer - - - - - delete from stu_userinfo - where userid = #{userid,jdbcType=VARCHAR} - - - delete from stu_userinfo - - - - - - insert into stu_userinfo (userid, zy_userid, name, - student_id, class_id, username, - password, phone, email, - major, role_id, create_time, - school_id, school_name, status, - exam_status, system_onwer) - values (#{userid,jdbcType=VARCHAR}, #{zyUserid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, - #{studentId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, - #{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, - #{major,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, - #{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, - #{examStatus,jdbcType=VARCHAR}, #{systemOnwer,jdbcType=VARCHAR}) - - - insert into stu_userinfo - - - userid, - - - zy_userid, - - - name, - - - student_id, - - - class_id, - - - username, - - - password, - - - phone, - - - email, - - - major, - - - role_id, - - - create_time, - - - school_id, - - - school_name, - - - status, - - - exam_status, - - - system_onwer, - - - - - #{userid,jdbcType=VARCHAR}, - - - #{zyUserid,jdbcType=INTEGER}, - - - #{name,jdbcType=VARCHAR}, - - - #{studentId,jdbcType=VARCHAR}, - - - #{classId,jdbcType=VARCHAR}, - - - #{username,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - #{phone,jdbcType=VARCHAR}, - - - #{email,jdbcType=VARCHAR}, - - - #{major,jdbcType=VARCHAR}, - - - #{roleId,jdbcType=INTEGER}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{schoolId,jdbcType=VARCHAR}, - - - #{schoolName,jdbcType=VARCHAR}, - - - #{status,jdbcType=INTEGER}, - - - #{examStatus,jdbcType=VARCHAR}, - - - #{systemOnwer,jdbcType=VARCHAR}, - - - - - - update stu_userinfo - - - userid = #{record.userid,jdbcType=VARCHAR}, - - + + + + + delete + from stu_userinfo + where userid = #{userid,jdbcType=VARCHAR} + + + delete from stu_userinfo + + + + + + insert into stu_userinfo (userid, zy_userid, name, + student_id, class_id, username, + password, phone, email, + major, role_id, create_time, + school_id, school_name, status, + exam_status, system_onwer) + values (#{userid,jdbcType=VARCHAR}, #{zyUserid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, + #{studentId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, + #{major,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, + #{examStatus,jdbcType=VARCHAR}, #{systemOnwer,jdbcType=VARCHAR}) + + + insert into stu_userinfo + + + userid, + + + zy_userid, + + + name, + + + student_id, + + + class_id, + + + username, + + + password, + + + phone, + + + email, + + + major, + + + role_id, + + + create_time, + + + school_id, + + + school_name, + + + status, + + + exam_status, + + + system_onwer, + + + + + #{userid,jdbcType=VARCHAR}, + + + #{zyUserid,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{studentId,jdbcType=VARCHAR}, + + + #{classId,jdbcType=VARCHAR}, + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{major,jdbcType=VARCHAR}, + + + #{roleId,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{schoolId,jdbcType=VARCHAR}, + + + #{schoolName,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{examStatus,jdbcType=VARCHAR}, + + + #{systemOnwer,jdbcType=VARCHAR}, + + + + + + update stu_userinfo + + + userid = #{record.userid,jdbcType=VARCHAR}, + + + zy_userid = #{record.zyUserid,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + student_id = #{record.studentId,jdbcType=VARCHAR}, + + + class_id = #{record.classId,jdbcType=VARCHAR}, + + + username = #{record.username,jdbcType=VARCHAR}, + + + password = #{record.password,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + email = #{record.email,jdbcType=VARCHAR}, + + + major = #{record.major,jdbcType=VARCHAR}, + + + role_id = #{record.roleId,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + school_id = #{record.schoolId,jdbcType=VARCHAR}, + + + school_name = #{record.schoolName,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=INTEGER}, + + + exam_status = #{record.examStatus,jdbcType=VARCHAR}, + + + system_onwer = #{record.systemOnwer,jdbcType=VARCHAR}, + + + + + + + + update stu_userinfo + set userid = #{record.userid,jdbcType=VARCHAR}, zy_userid = #{record.zyUserid,jdbcType=INTEGER}, - - name = #{record.name,jdbcType=VARCHAR}, - - student_id = #{record.studentId,jdbcType=VARCHAR}, - - class_id = #{record.classId,jdbcType=VARCHAR}, - - username = #{record.username,jdbcType=VARCHAR}, - - password = #{record.password,jdbcType=VARCHAR}, - - phone = #{record.phone,jdbcType=VARCHAR}, - - email = #{record.email,jdbcType=VARCHAR}, - - major = #{record.major,jdbcType=VARCHAR}, - - role_id = #{record.roleId,jdbcType=INTEGER}, - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - - school_id = #{record.schoolId,jdbcType=VARCHAR}, - - school_name = #{record.schoolName,jdbcType=VARCHAR}, - - status = #{record.status,jdbcType=INTEGER}, - - exam_status = #{record.examStatus,jdbcType=VARCHAR}, - - - system_onwer = #{record.systemOnwer,jdbcType=VARCHAR}, - - - - - - - - update stu_userinfo - set userid = #{record.userid,jdbcType=VARCHAR}, - zy_userid = #{record.zyUserid,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - student_id = #{record.studentId,jdbcType=VARCHAR}, - class_id = #{record.classId,jdbcType=VARCHAR}, - username = #{record.username,jdbcType=VARCHAR}, - password = #{record.password,jdbcType=VARCHAR}, - phone = #{record.phone,jdbcType=VARCHAR}, - email = #{record.email,jdbcType=VARCHAR}, - major = #{record.major,jdbcType=VARCHAR}, - role_id = #{record.roleId,jdbcType=INTEGER}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - school_id = #{record.schoolId,jdbcType=VARCHAR}, - school_name = #{record.schoolName,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - exam_status = #{record.examStatus,jdbcType=VARCHAR}, - system_onwer = #{record.systemOnwer,jdbcType=VARCHAR} - - - - - - update stu_userinfo - - - zy_userid = #{zyUserid,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - student_id = #{studentId,jdbcType=VARCHAR}, - - - class_id = #{classId,jdbcType=VARCHAR}, - - - username = #{username,jdbcType=VARCHAR}, - - - password = #{password,jdbcType=VARCHAR}, - - - phone = #{phone,jdbcType=VARCHAR}, - - - email = #{email,jdbcType=VARCHAR}, - - - major = #{major,jdbcType=VARCHAR}, - - - role_id = #{roleId,jdbcType=INTEGER}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - school_id = #{schoolId,jdbcType=VARCHAR}, - - - school_name = #{schoolName,jdbcType=VARCHAR}, - - - status = #{status,jdbcType=INTEGER}, - - - exam_status = #{examStatus,jdbcType=VARCHAR}, - - - system_onwer = #{systemOnwer,jdbcType=VARCHAR}, - - - where userid = #{userid,jdbcType=VARCHAR} - - - update stu_userinfo - set zy_userid = #{zyUserid,jdbcType=INTEGER}, - name = #{name,jdbcType=VARCHAR}, - student_id = #{studentId,jdbcType=VARCHAR}, - class_id = #{classId,jdbcType=VARCHAR}, - username = #{username,jdbcType=VARCHAR}, - password = #{password,jdbcType=VARCHAR}, - phone = #{phone,jdbcType=VARCHAR}, - email = #{email,jdbcType=VARCHAR}, - major = #{major,jdbcType=VARCHAR}, - role_id = #{roleId,jdbcType=INTEGER}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - school_id = #{schoolId,jdbcType=VARCHAR}, - school_name = #{schoolName,jdbcType=VARCHAR}, - status = #{status,jdbcType=INTEGER}, - exam_status = #{examStatus,jdbcType=VARCHAR}, - system_onwer = #{systemOnwer,jdbcType=VARCHAR} - where userid = #{userid,jdbcType=VARCHAR} - + system_onwer = #{record.systemOnwer,jdbcType=VARCHAR} + + + + + + update stu_userinfo + + + zy_userid = #{zyUserid,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + student_id = #{studentId,jdbcType=VARCHAR}, + + + class_id = #{classId,jdbcType=VARCHAR}, + + + username = #{username,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + major = #{major,jdbcType=VARCHAR}, + + + role_id = #{roleId,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + school_id = #{schoolId,jdbcType=VARCHAR}, + + + school_name = #{schoolName,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=INTEGER}, + + + exam_status = #{examStatus,jdbcType=VARCHAR}, + + + system_onwer = #{systemOnwer,jdbcType=VARCHAR}, + + + where userid = #{userid,jdbcType=VARCHAR} + + + update stu_userinfo + set zy_userid = #{zyUserid,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + student_id = #{studentId,jdbcType=VARCHAR}, + class_id = #{classId,jdbcType=VARCHAR}, + username = #{username,jdbcType=VARCHAR}, + password = #{password,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + major = #{major,jdbcType=VARCHAR}, + role_id = #{roleId,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + school_id = #{schoolId,jdbcType=VARCHAR}, + school_name = #{schoolName,jdbcType=VARCHAR}, + status = #{status,jdbcType=INTEGER}, + exam_status = #{examStatus,jdbcType=VARCHAR}, + system_onwer = #{systemOnwer,jdbcType=VARCHAR} + where userid = #{userid,jdbcType=VARCHAR} + INSERT INTO stu_userinfo (userid, name, student_id, class_id, username, password, phone, - email,major, + email,major,zy_userid,system_onwer, role_id,create_time,school_id,school_name,status) VALUES (#{student.userid}, #{student.name}, #{student.studentId}, #{student.classId}, #{student.username}, - #{student.password}, #{student.phone}, #{student.email},#{student.major},#{student.roleId}, + #{student.password}, #{student.phone}, #{student.email},#{student.major},#{student.zyUserid},#{student.systemOnwer},#{student.roleId}, #{student.createTime},#{student.schoolId},#{student.schoolName},#{student.status}) - - - - - - - - - + + + + + + + + +