|
@@ -7,30 +7,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<resultMap type="SysMember" id="SysMemberResult">
|
|
<resultMap type="SysMember" id="SysMemberResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="username" column="username" />
|
|
<result property="username" column="username" />
|
|
- <result property="password" column="password" />
|
|
|
|
- <result property="realName" column="real_name" />
|
|
|
|
<result property="mobile" column="mobile" />
|
|
<result property="mobile" column="mobile" />
|
|
- <result property="loginDate" column="login_date" />
|
|
|
|
- <result property="loginIp" column="login_ip" />
|
|
|
|
- <result property="registerIp" column="register_ip" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="integral" column="integral" />
|
|
<result property="integral" column="integral" />
|
|
- <result property="wxProfile" column="wx_profile" />
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="openId" column="open_id" />
|
|
<result property="openId" column="open_id" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectSysMemberVo">
|
|
<sql id="selectSysMemberVo">
|
|
- select id, username, password, real_name, mobile, login_date, login_ip, register_ip, create_by, create_time, update_by, update_time, integral, wx_profile, del_flag, open_id from sys_member
|
|
|
|
|
|
+ select id, username, mobile, create_by, create_time, update_by, update_time, integral, del_flag, open_id from sys_member
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectSysMemberList" parameterType="SysMember" resultMap="SysMemberResult">
|
|
<select id="selectSysMemberList" parameterType="SysMember" resultMap="SysMemberResult">
|
|
<include refid="selectSysMemberVo"/>
|
|
<include refid="selectSysMemberVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
|
|
|
|
|
|
+ <if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
|
|
<if test="mobile != null and mobile != ''"> and mobile like concat('%', #{mobile}, '%')</if>
|
|
<if test="mobile != null and mobile != ''"> and mobile like concat('%', #{mobile}, '%')</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -44,35 +38,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
insert into sys_member
|
|
insert into sys_member
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="username != null">username,</if>
|
|
<if test="username != null">username,</if>
|
|
- <if test="password != null">password,</if>
|
|
|
|
- <if test="realName != null">real_name,</if>
|
|
|
|
<if test="mobile != null">mobile,</if>
|
|
<if test="mobile != null">mobile,</if>
|
|
- <if test="loginDate != null">login_date,</if>
|
|
|
|
- <if test="loginIp != null">login_ip,</if>
|
|
|
|
- <if test="registerIp != null">register_ip,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="integral != null">integral,</if>
|
|
<if test="integral != null">integral,</if>
|
|
- <if test="wxProfile != null">wx_profile,</if>
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
<if test="openId != null">open_id,</if>
|
|
<if test="openId != null">open_id,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="username != null">#{username},</if>
|
|
<if test="username != null">#{username},</if>
|
|
- <if test="password != null">#{password},</if>
|
|
|
|
- <if test="realName != null">#{realName},</if>
|
|
|
|
<if test="mobile != null">#{mobile},</if>
|
|
<if test="mobile != null">#{mobile},</if>
|
|
- <if test="loginDate != null">#{loginDate},</if>
|
|
|
|
- <if test="loginIp != null">#{loginIp},</if>
|
|
|
|
- <if test="registerIp != null">#{registerIp},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="integral != null">#{integral},</if>
|
|
<if test="integral != null">#{integral},</if>
|
|
- <if test="wxProfile != null">#{wxProfile},</if>
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
<if test="openId != null">#{openId},</if>
|
|
<if test="openId != null">#{openId},</if>
|
|
</trim>
|
|
</trim>
|
|
@@ -82,18 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
update sys_member
|
|
update sys_member
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="username != null">username = #{username},</if>
|
|
<if test="username != null">username = #{username},</if>
|
|
- <if test="password != null">password = #{password},</if>
|
|
|
|
- <if test="realName != null">real_name = #{realName},</if>
|
|
|
|
<if test="mobile != null">mobile = #{mobile},</if>
|
|
<if test="mobile != null">mobile = #{mobile},</if>
|
|
- <if test="loginDate != null">login_date = #{loginDate},</if>
|
|
|
|
- <if test="loginIp != null">login_ip = #{loginIp},</if>
|
|
|
|
- <if test="registerIp != null">register_ip = #{registerIp},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="integral != null">integral = #{integral},</if>
|
|
<if test="integral != null">integral = #{integral},</if>
|
|
- <if test="wxProfile != null">wx_profile = #{wxProfile},</if>
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
<if test="openId != null">open_id = #{openId},</if>
|
|
<if test="openId != null">open_id = #{openId},</if>
|
|
</trim>
|
|
</trim>
|
|
@@ -114,4 +90,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<include refid="selectSysMemberVo"/>
|
|
<include refid="selectSysMemberVo"/>
|
|
where mobile = #{mobile} and del_flag = 0
|
|
where mobile = #{mobile} and del_flag = 0
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <insert id="createUserIfAbsent" parameterType="SysMember" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
+ insert into sys_member
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="username != null">username,</if>
|
|
|
|
+ <if test="mobile != null">mobile,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="integral != null">integral,</if>
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
+ <if test="openId != null">open_id,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="username != null">#{username},</if>
|
|
|
|
+ <if test="mobile != null">#{mobile},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="integral != null">#{integral},</if>
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
+ <if test="openId != null">#{openId},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
</mapper>
|
|
</mapper>
|