|
|
|
@ -2,22 +2,22 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.sztzjy.fund_investment.mapper.UserMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.User">
|
|
|
|
|
<id column="userid" jdbcType="VARCHAR" property="userid" />
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
|
|
<result column="student_id" jdbcType="VARCHAR" property="studentId" />
|
|
|
|
|
<result column="class_name" jdbcType="VARCHAR" property="className" />
|
|
|
|
|
<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="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="un" jdbcType="VARCHAR" property="un" />
|
|
|
|
|
<result column="dis" jdbcType="VARCHAR" property="dis" />
|
|
|
|
|
<result column="access_token" jdbcType="VARCHAR" property="accessToken" />
|
|
|
|
|
<result column="login_type" jdbcType="INTEGER" property="loginType" />
|
|
|
|
|
<id column="userid" jdbcType="VARCHAR" property="userid"/>
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
|
|
<result column="student_id" jdbcType="VARCHAR" property="studentId"/>
|
|
|
|
|
<result column="class_name" jdbcType="VARCHAR" property="className"/>
|
|
|
|
|
<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="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="un" jdbcType="VARCHAR" property="un"/>
|
|
|
|
|
<result column="dis" jdbcType="VARCHAR" property="dis"/>
|
|
|
|
|
<result column="access_token" jdbcType="VARCHAR" property="accessToken"/>
|
|
|
|
|
<result column="login_type" jdbcType="INTEGER" property="loginType"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
@ -37,7 +37,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -66,7 +67,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -78,26 +80,28 @@
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
userid, name, student_id, class_name, class_id, username, password, phone, role_id,
|
|
|
|
|
userid
|
|
|
|
|
, name, student_id, class_name, class_id, username, password, phone, role_id,
|
|
|
|
|
create_time, school_id, school_name, un, dis, access_token, login_type
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectByUn" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from wx_user
|
|
|
|
|
where un = #{un,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample" resultMap="BaseResultMap">
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample"
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from wx_user
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
@ -105,18 +109,19 @@
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from wx_user
|
|
|
|
|
where userid = #{userid,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete from wx_user
|
|
|
|
|
delete
|
|
|
|
|
from wx_user
|
|
|
|
|
where userid = #{userid,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample">
|
|
|
|
|
delete from wx_user
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.User">
|
|
|
|
@ -236,10 +241,11 @@
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample" resultType="java.lang.Long">
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.UserExample"
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
select count(*) from wx_user
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
@ -295,7 +301,7 @@
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
@ -317,7 +323,7 @@
|
|
|
|
|
access_token = #{record.accessToken,jdbcType=VARCHAR},
|
|
|
|
|
login_type = #{record.loginType,jdbcType=INTEGER}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.User">
|
|
|
|
@ -431,4 +437,17 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsertStudents" parameterType="java.util.List">
|
|
|
|
|
insert into wx_user (userid, name, student_id,
|
|
|
|
|
class_name, class_id, username,
|
|
|
|
|
password, phone, role_id,
|
|
|
|
|
create_time, school_id, school_name)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="list" item="student" separator=",">
|
|
|
|
|
(#{student.userid,jdbcType=VARCHAR}, #{student.name,jdbcType=VARCHAR}, #{student.studentId,jdbcType=VARCHAR},
|
|
|
|
|
#{student.className,jdbcType=VARCHAR}, #{student.classId,jdbcType=VARCHAR}, #{student.username,jdbcType=VARCHAR},
|
|
|
|
|
#{student.password,jdbcType=VARCHAR}, #{student.phone,jdbcType=VARCHAR}, #{student.roleId,jdbcType=INTEGER},
|
|
|
|
|
#{student.createTime,jdbcType=TIMESTAMP}, #{student.schoolId,jdbcType=VARCHAR}, #{student.schoolName,jdbcType=VARCHAR})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|