修改同步接口

master
xiaoCJ 8 months ago
parent 705b59fc8f
commit f58ad542eb

@ -231,7 +231,7 @@ public class UserController {
StuUserExample example = new StuUserExample(); StuUserExample example = new StuUserExample();
example.createCriteria().andZyUseridEqualTo(zyUserId).andSystemOnwerEqualTo(systemOwner); example.createCriteria().andZyUseridEqualTo(zyUserId).andSystemOnwerEqualTo(systemOwner);
List<StuUser> list = stuUserMapper.selectByExample(example); List<StuUser> list = stuUserMapper.selectByExample(example);
if (list != null || !list.isEmpty()) { if (!list.isEmpty()) {
continue; continue;
} }
StuUser stuUser = new StuUser(); StuUser stuUser = new StuUser();

@ -1,424 +1,430 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.financial_bigdata.mapper.StuUserMapper"> <mapper namespace="com.sztzjy.financial_bigdata.mapper.StuUserMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.StuUser"> <resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.StuUser">
<id column="userid" jdbcType="VARCHAR" property="userid" /> <id column="userid" jdbcType="VARCHAR" property="userid"/>
<result column="zy_userid" jdbcType="INTEGER" property="zyUserid" /> <result column="zy_userid" jdbcType="INTEGER" property="zyUserid"/>
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name"/>
<result column="student_id" jdbcType="VARCHAR" property="studentId" /> <result column="student_id" jdbcType="VARCHAR" property="studentId"/>
<result column="class_id" jdbcType="VARCHAR" property="classId" /> <result column="class_id" jdbcType="VARCHAR" property="classId"/>
<result column="username" jdbcType="VARCHAR" property="username" /> <result column="username" jdbcType="VARCHAR" property="username"/>
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="password" jdbcType="VARCHAR" property="password"/>
<result column="phone" jdbcType="VARCHAR" property="phone" /> <result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="email" jdbcType="VARCHAR" property="email" /> <result column="email" jdbcType="VARCHAR" property="email"/>
<result column="major" jdbcType="VARCHAR" property="major" /> <result column="major" jdbcType="VARCHAR" property="major"/>
<result column="role_id" jdbcType="INTEGER" property="roleId" /> <result column="role_id" jdbcType="INTEGER" property="roleId"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="school_id" jdbcType="VARCHAR" property="schoolId" /> <result column="school_id" jdbcType="VARCHAR" property="schoolId"/>
<result column="school_name" jdbcType="VARCHAR" property="schoolName" /> <result column="school_name" jdbcType="VARCHAR" property="schoolName"/>
<result column="status" jdbcType="INTEGER" property="status" /> <result column="status" jdbcType="INTEGER" property="status"/>
<result column="exam_status" jdbcType="VARCHAR" property="examStatus" /> <result column="exam_status" jdbcType="VARCHAR" property="examStatus"/>
<result column="system_onwer" jdbcType="VARCHAR" property="systemOnwer" /> <result column="system_onwer" jdbcType="VARCHAR" property="systemOnwer"/>
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="("
#{listItem} separator=",">
</foreach> #{listItem}
</when> </foreach>
</choose> </when>
</choose>
</foreach>
</trim>
</if>
</foreach> </foreach>
</trim> </where>
</if> </sql>
</foreach> <sql id="Update_By_Example_Where_Clause">
</where> <where>
</sql> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<sql id="Update_By_Example_Where_Clause"> <if test="criteria.valid">
<where> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="criteria.criteria" item="criterion">
<if test="criteria.valid"> <choose>
<trim prefix="(" prefixOverrides="and" suffix=")"> <when test="criterion.noValue">
<foreach collection="criteria.criteria" item="criterion"> and ${criterion.condition}
<choose> </when>
<when test="criterion.noValue"> <when test="criterion.singleValue">
and ${criterion.condition} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.listValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition}
</when> <foreach close=")" collection="criterion.value" item="listItem" open="("
<when test="criterion.listValue"> separator=",">
and ${criterion.condition} #{listItem}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </foreach>
#{listItem} </when>
</foreach> </choose>
</when> </foreach>
</choose> </trim>
</if>
</foreach> </foreach>
</trim> </where>
</if> </sql>
</foreach> <sql id="Base_Column_List">
</where> userid
</sql> , zy_userid, name, student_id, class_id, username, password, phone, email,
<sql id="Base_Column_List">
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 major, role_id, create_time, school_id, school_name, status, exam_status, system_onwer
</sql> </sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample"
select resultMap="BaseResultMap">
<if test="distinct"> select
distinct <if test="distinct">
</if> distinct
<include refid="Base_Column_List" /> </if>
from stu_userinfo <include refid="Base_Column_List"/>
<if test="_parameter != null"> from stu_userinfo
<include refid="Example_Where_Clause" /> <if test="_parameter != null">
</if> <include refid="Example_Where_Clause"/>
<if test="orderByClause != null"> </if>
order by ${orderByClause} <if test="orderByClause != null">
</if> order by ${orderByClause}
</select> </if>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> </select>
select <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<include refid="Base_Column_List" /> select
from stu_userinfo <include refid="Base_Column_List"/>
where userid = #{userid,jdbcType=VARCHAR} from stu_userinfo
</select> where userid = #{userid,jdbcType=VARCHAR}
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> </select>
delete from stu_userinfo <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
where userid = #{userid,jdbcType=VARCHAR} delete
</delete> from stu_userinfo
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample"> where userid = #{userid,jdbcType=VARCHAR}
delete from stu_userinfo </delete>
<if test="_parameter != null"> <delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample">
<include refid="Example_Where_Clause" /> delete from stu_userinfo
</if> <if test="_parameter != null">
</delete> <include refid="Example_Where_Clause"/>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.StuUser"> </if>
insert into stu_userinfo (userid, zy_userid, name, </delete>
student_id, class_id, username, <insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
password, phone, email, insert into stu_userinfo (userid, zy_userid, name,
major, role_id, create_time, student_id, class_id, username,
school_id, school_name, status, password, phone, email,
exam_status, system_onwer) major, role_id, create_time,
values (#{userid,jdbcType=VARCHAR}, #{zyUserid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, school_id, school_name, status,
#{studentId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, exam_status, system_onwer)
#{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, values (#{userid,jdbcType=VARCHAR}, #{zyUserid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{major,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{studentId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{examStatus,jdbcType=VARCHAR}, #{systemOnwer,jdbcType=VARCHAR}) #{major,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
</insert> #{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.StuUser"> #{examStatus,jdbcType=VARCHAR}, #{systemOnwer,jdbcType=VARCHAR})
insert into stu_userinfo </insert>
<trim prefix="(" suffix=")" suffixOverrides=","> <insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
<if test="userid != null"> insert into stu_userinfo
userid, <trim prefix="(" suffix=")" suffixOverrides=",">
</if> <if test="userid != null">
<if test="zyUserid != null"> userid,
zy_userid, </if>
</if> <if test="zyUserid != null">
<if test="name != null"> zy_userid,
name, </if>
</if> <if test="name != null">
<if test="studentId != null"> name,
student_id, </if>
</if> <if test="studentId != null">
<if test="classId != null"> student_id,
class_id, </if>
</if> <if test="classId != null">
<if test="username != null"> class_id,
username, </if>
</if> <if test="username != null">
<if test="password != null"> username,
password, </if>
</if> <if test="password != null">
<if test="phone != null"> password,
phone, </if>
</if> <if test="phone != null">
<if test="email != null"> phone,
email, </if>
</if> <if test="email != null">
<if test="major != null"> email,
major, </if>
</if> <if test="major != null">
<if test="roleId != null"> major,
role_id, </if>
</if> <if test="roleId != null">
<if test="createTime != null"> role_id,
create_time, </if>
</if> <if test="createTime != null">
<if test="schoolId != null"> create_time,
school_id, </if>
</if> <if test="schoolId != null">
<if test="schoolName != null"> school_id,
school_name, </if>
</if> <if test="schoolName != null">
<if test="status != null"> school_name,
status, </if>
</if> <if test="status != null">
<if test="examStatus != null"> status,
exam_status, </if>
</if> <if test="examStatus != null">
<if test="systemOnwer != null"> exam_status,
system_onwer, </if>
</if> <if test="systemOnwer != null">
</trim> system_onwer,
<trim prefix="values (" suffix=")" suffixOverrides=","> </if>
<if test="userid != null"> </trim>
#{userid,jdbcType=VARCHAR}, <trim prefix="values (" suffix=")" suffixOverrides=",">
</if> <if test="userid != null">
<if test="zyUserid != null"> #{userid,jdbcType=VARCHAR},
#{zyUserid,jdbcType=INTEGER}, </if>
</if> <if test="zyUserid != null">
<if test="name != null"> #{zyUserid,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, </if>
</if> <if test="name != null">
<if test="studentId != null"> #{name,jdbcType=VARCHAR},
#{studentId,jdbcType=VARCHAR}, </if>
</if> <if test="studentId != null">
<if test="classId != null"> #{studentId,jdbcType=VARCHAR},
#{classId,jdbcType=VARCHAR}, </if>
</if> <if test="classId != null">
<if test="username != null"> #{classId,jdbcType=VARCHAR},
#{username,jdbcType=VARCHAR}, </if>
</if> <if test="username != null">
<if test="password != null"> #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, </if>
</if> <if test="password != null">
<if test="phone != null"> #{password,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, </if>
</if> <if test="phone != null">
<if test="email != null"> #{phone,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, </if>
</if> <if test="email != null">
<if test="major != null"> #{email,jdbcType=VARCHAR},
#{major,jdbcType=VARCHAR}, </if>
</if> <if test="major != null">
<if test="roleId != null"> #{major,jdbcType=VARCHAR},
#{roleId,jdbcType=INTEGER}, </if>
</if> <if test="roleId != null">
<if test="createTime != null"> #{roleId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, </if>
</if> <if test="createTime != null">
<if test="schoolId != null"> #{createTime,jdbcType=TIMESTAMP},
#{schoolId,jdbcType=VARCHAR}, </if>
</if> <if test="schoolId != null">
<if test="schoolName != null"> #{schoolId,jdbcType=VARCHAR},
#{schoolName,jdbcType=VARCHAR}, </if>
</if> <if test="schoolName != null">
<if test="status != null"> #{schoolName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, </if>
</if> <if test="status != null">
<if test="examStatus != null"> #{status,jdbcType=INTEGER},
#{examStatus,jdbcType=VARCHAR}, </if>
</if> <if test="examStatus != null">
<if test="systemOnwer != null"> #{examStatus,jdbcType=VARCHAR},
#{systemOnwer,jdbcType=VARCHAR}, </if>
</if> <if test="systemOnwer != null">
</trim> #{systemOnwer,jdbcType=VARCHAR},
</insert> </if>
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample" resultType="java.lang.Long"> </trim>
select count(*) from stu_userinfo </insert>
<if test="_parameter != null"> <select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample"
<include refid="Example_Where_Clause" /> resultType="java.lang.Long">
</if> select count(*) from stu_userinfo
</select> <if test="_parameter != null">
<update id="updateByExampleSelective" parameterType="map"> <include refid="Example_Where_Clause"/>
update stu_userinfo </if>
<set> </select>
<if test="record.userid != null"> <update id="updateByExampleSelective" parameterType="map">
userid = #{record.userid,jdbcType=VARCHAR}, update stu_userinfo
</if> <set>
<if test="record.zyUserid != null"> <if test="record.userid != null">
userid = #{record.userid,jdbcType=VARCHAR},
</if>
<if test="record.zyUserid != null">
zy_userid = #{record.zyUserid,jdbcType=INTEGER},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.studentId != null">
student_id = #{record.studentId,jdbcType=VARCHAR},
</if>
<if test="record.classId != null">
class_id = #{record.classId,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.phone != null">
phone = #{record.phone,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.major != null">
major = #{record.major,jdbcType=VARCHAR},
</if>
<if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=VARCHAR},
</if>
<if test="record.schoolName != null">
school_name = #{record.schoolName,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.examStatus != null">
exam_status = #{record.examStatus,jdbcType=VARCHAR},
</if>
<if test="record.systemOnwer != null">
system_onwer = #{record.systemOnwer,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_userinfo
set userid = #{record.userid,jdbcType=VARCHAR},
zy_userid = #{record.zyUserid,jdbcType=INTEGER}, zy_userid = #{record.zyUserid,jdbcType=INTEGER},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.studentId != null">
student_id = #{record.studentId,jdbcType=VARCHAR}, student_id = #{record.studentId,jdbcType=VARCHAR},
</if>
<if test="record.classId != null">
class_id = #{record.classId,jdbcType=VARCHAR}, class_id = #{record.classId,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR}, username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR}, password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.phone != null">
phone = #{record.phone,jdbcType=VARCHAR}, phone = #{record.phone,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR}, email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.major != null">
major = #{record.major,jdbcType=VARCHAR}, major = #{record.major,jdbcType=VARCHAR},
</if>
<if test="record.roleId != null">
role_id = #{record.roleId,jdbcType=INTEGER}, role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=VARCHAR}, school_id = #{record.schoolId,jdbcType=VARCHAR},
</if>
<if test="record.schoolName != null">
school_name = #{record.schoolName,jdbcType=VARCHAR}, school_name = #{record.schoolName,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER}, status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.examStatus != null">
exam_status = #{record.examStatus,jdbcType=VARCHAR}, exam_status = #{record.examStatus,jdbcType=VARCHAR},
</if> system_onwer = #{record.systemOnwer,jdbcType=VARCHAR}
<if test="record.systemOnwer != null"> <if test="_parameter != null">
system_onwer = #{record.systemOnwer,jdbcType=VARCHAR}, <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</set> </update>
<if test="_parameter != null"> <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
<include refid="Update_By_Example_Where_Clause" /> update stu_userinfo
</if> <set>
</update> <if test="zyUserid != null">
<update id="updateByExample" parameterType="map"> zy_userid = #{zyUserid,jdbcType=INTEGER},
update stu_userinfo </if>
set userid = #{record.userid,jdbcType=VARCHAR}, <if test="name != null">
zy_userid = #{record.zyUserid,jdbcType=INTEGER}, name = #{name,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}, </if>
student_id = #{record.studentId,jdbcType=VARCHAR}, <if test="studentId != null">
class_id = #{record.classId,jdbcType=VARCHAR}, student_id = #{studentId,jdbcType=VARCHAR},
username = #{record.username,jdbcType=VARCHAR}, </if>
password = #{record.password,jdbcType=VARCHAR}, <if test="classId != null">
phone = #{record.phone,jdbcType=VARCHAR}, class_id = #{classId,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR}, </if>
major = #{record.major,jdbcType=VARCHAR}, <if test="username != null">
role_id = #{record.roleId,jdbcType=INTEGER}, username = #{username,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if>
school_id = #{record.schoolId,jdbcType=VARCHAR}, <if test="password != null">
school_name = #{record.schoolName,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER}, </if>
exam_status = #{record.examStatus,jdbcType=VARCHAR}, <if test="phone != null">
system_onwer = #{record.systemOnwer,jdbcType=VARCHAR} phone = #{phone,jdbcType=VARCHAR},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> <if test="email != null">
</if> email = #{email,jdbcType=VARCHAR},
</update> </if>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.StuUser"> <if test="major != null">
update stu_userinfo major = #{major,jdbcType=VARCHAR},
<set> </if>
<if test="zyUserid != null"> <if test="roleId != null">
zy_userid = #{zyUserid,jdbcType=INTEGER}, role_id = #{roleId,jdbcType=INTEGER},
</if> </if>
<if test="name != null"> <if test="createTime != null">
name = #{name,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="studentId != null"> <if test="schoolId != null">
student_id = #{studentId,jdbcType=VARCHAR}, school_id = #{schoolId,jdbcType=VARCHAR},
</if> </if>
<if test="classId != null"> <if test="schoolName != null">
class_id = #{classId,jdbcType=VARCHAR}, school_name = #{schoolName,jdbcType=VARCHAR},
</if> </if>
<if test="username != null"> <if test="status != null">
username = #{username,jdbcType=VARCHAR}, status = #{status,jdbcType=INTEGER},
</if> </if>
<if test="password != null"> <if test="examStatus != null">
password = #{password,jdbcType=VARCHAR}, exam_status = #{examStatus,jdbcType=VARCHAR},
</if> </if>
<if test="phone != null"> <if test="systemOnwer != null">
phone = #{phone,jdbcType=VARCHAR}, system_onwer = #{systemOnwer,jdbcType=VARCHAR},
</if> </if>
<if test="email != null"> </set>
email = #{email,jdbcType=VARCHAR}, where userid = #{userid,jdbcType=VARCHAR}
</if> </update>
<if test="major != null"> <update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
major = #{major,jdbcType=VARCHAR}, update stu_userinfo
</if> set zy_userid = #{zyUserid,jdbcType=INTEGER},
<if test="roleId != null"> name = #{name,jdbcType=VARCHAR},
role_id = #{roleId,jdbcType=INTEGER}, student_id = #{studentId,jdbcType=VARCHAR},
</if> class_id = #{classId,jdbcType=VARCHAR},
<if test="createTime != null"> username = #{username,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, password = #{password,jdbcType=VARCHAR},
</if> phone = #{phone,jdbcType=VARCHAR},
<if test="schoolId != null"> email = #{email,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=VARCHAR}, major = #{major,jdbcType=VARCHAR},
</if> role_id = #{roleId,jdbcType=INTEGER},
<if test="schoolName != null"> create_time = #{createTime,jdbcType=TIMESTAMP},
school_name = #{schoolName,jdbcType=VARCHAR}, school_id = #{schoolId,jdbcType=VARCHAR},
</if> school_name = #{schoolName,jdbcType=VARCHAR},
<if test="status != null"> status = #{status,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, exam_status = #{examStatus,jdbcType=VARCHAR},
</if> system_onwer = #{systemOnwer,jdbcType=VARCHAR}
<if test="examStatus != null"> where userid = #{userid,jdbcType=VARCHAR}
exam_status = #{examStatus,jdbcType=VARCHAR}, </update>
</if>
<if test="systemOnwer != null">
system_onwer = #{systemOnwer,jdbcType=VARCHAR},
</if>
</set>
where userid = #{userid,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
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}
</update>
<insert id="batchInsertStudents" parameterType="java.util.List"> <insert id="batchInsertStudents" parameterType="java.util.List">
INSERT INTO stu_userinfo (userid, name, student_id, class_id, username, password, phone, 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 role_id,create_time,school_id,school_name,status) VALUES
<foreach collection="list" item="student" separator=","> <foreach collection="list" item="student" separator=",">
(#{student.userid}, #{student.name}, #{student.studentId}, #{student.classId}, #{student.username}, (#{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}) #{student.createTime},#{student.schoolId},#{student.schoolName},#{student.status})
</foreach> </foreach>
</insert> </insert>
<resultMap id="UserDtoMap" type="com.sztzjy.financial_bigdata.entity.stu_dto.StuUserDto"> <resultMap id="UserDtoMap" type="com.sztzjy.financial_bigdata.entity.stu_dto.StuUserDto">
<result column="school_name" jdbcType="VARCHAR" property="schoolName" /> <result column="school_name" jdbcType="VARCHAR" property="schoolName"/>
<result column="class_name" jdbcType="VARCHAR" property="className" /> <result column="class_name" jdbcType="VARCHAR" property="className"/>
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name"/>
<result column="student_id" jdbcType="VARCHAR" property="studentId" /> <result column="student_id" jdbcType="VARCHAR" property="studentId"/>
<result column="phone" jdbcType="VARCHAR" property="phone" /> <result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="email" jdbcType="VARCHAR" property="email" /> <result column="email" jdbcType="VARCHAR" property="email"/>
<result column="score" jdbcType="VARCHAR" property="score" /> <result column="score" jdbcType="VARCHAR" property="score"/>
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName" /> <result column="chapter_name" jdbcType="VARCHAR" property="chapterName"/>
<result column="report_id" jdbcType="VARCHAR" property="reportId" /> <result column="report_id" jdbcType="VARCHAR" property="reportId"/>
</resultMap> </resultMap>
<select id="selectByCondition" resultMap="UserDtoMap"> <select id="selectByCondition" resultMap="UserDtoMap">

Loading…
Cancel
Save