|
|
@@ -1189,5 +1189,57 @@
|
|
|
<select id="getAllUser" resultMap="regUserMap">
|
|
|
select id from user where status = 0 and source = 0
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 获得用户数据 -->
|
|
|
+ <select id="getUserInfoList" parameterType="Map" resultType="com.goafanti.common.model.User">
|
|
|
+ select
|
|
|
+ id, mobile, nickname, email, type,
|
|
|
+ source, username, create_time as createTime
|
|
|
+ from `user`
|
|
|
+ where 1 = 1
|
|
|
+ <if test="user.status != null">
|
|
|
+ and status = #{user.status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="user.source != null">
|
|
|
+ and source = #{user.source,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="user.type != null">
|
|
|
+ and `type` = #{user.type,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="user.mobile != null">
|
|
|
+ <bind name="m" value="'%' + user.mobile + '%'"/>
|
|
|
+ and mobile like #{m,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="user.username != null">
|
|
|
+ <bind name="u" value="'%' + user.username + '%'"/>
|
|
|
+ and username like #{u,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by create_time desc
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getUserInfoCount" parameterType="Map" resultType="java.lang.Integer">
|
|
|
+ select count(0)
|
|
|
+ from `user`
|
|
|
+ where 1 = 1
|
|
|
+ <if test="user.status != null">
|
|
|
+ and status = #{user.status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="user.source != null">
|
|
|
+ and source = #{user.source,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="user.type != null">
|
|
|
+ and `type` = #{user.type,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="user.mobile != null">
|
|
|
+ <bind name="m" value="'%' + user.mobile + '%'"/>
|
|
|
+ and mobile like #{m,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="user.username != null">
|
|
|
+ <bind name="u" value="'%' + user.username + '%'"/>
|
|
|
+ and username like #{u,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|