修改同步接口

master
xiaoCJ 8 months ago
parent 705b59fc8f
commit f58ad542eb

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

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

Loading…
Cancel
Save