Commit 4f9620d1 authored by unset's avatar unset

新增违章查询接口

parent 6b82b4d8
...@@ -74,6 +74,11 @@ public class AppUserManageDTO { ...@@ -74,6 +74,11 @@ public class AppUserManageDTO {
*/ */
private String realName; private String realName;
/**
* 昵称
*/
private String nickname;
/** /**
* 注册来源 * 注册来源
......
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
<!-- 获取用户信息 --> <!-- 获取用户信息 -->
<select id="getUserInfo" resultMap="AppUserVoMap"> <select id="getUserInfo" resultMap="AppUserVoMap">
select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.* from app_user_login l select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.*
from app_user_login l
left join app_user_detail d left join app_user_detail d
on d.userid = l.id on d.userid = l.id
where d.userid = #{userId} limit 1 where d.userid = #{userId} limit 1
...@@ -149,7 +150,7 @@ ...@@ -149,7 +150,7 @@
<update id="updateUserMemberStatusByUserId"> <update id="updateUserMemberStatusByUserId">
update `app_user_detail` set `is_member`={status} where `userid`=#{userId} update `app_user_detail` set `is_member`={status} where `userid`=#{userId}
</update> </update>
<update id="updateUserPositionByUserId"> <update id="updateUserPositionByUserId">
update `app_user_detail` set `position_id`=#{positionId} where `userid`=#{userId} update `app_user_detail` set `position_id`=#{positionId} where `userid`=#{userId}
</update> </update>
...@@ -162,6 +163,7 @@ ...@@ -162,6 +163,7 @@
d.register_source, d.register_source,
d.source, d.source,
d.realname, d.realname,
d.nickname,
z.mark_name AS markName, z.mark_name AS markName,
ml. NAME AS memberName, ml. NAME AS memberName,
aup. NAME AS positionName, aup. NAME AS positionName,
...@@ -215,6 +217,7 @@ ...@@ -215,6 +217,7 @@
<if test="memberLevel == -1"> <if test="memberLevel == -1">
and m.member_level in (select level from base_user_member_level) and m.member_level in (select level from base_user_member_level)
</if> </if>
<if test="registrationTimeBegin !=null "> <if test="registrationTimeBegin !=null ">
and l.createtime &gt;= #{registrationTimeBegin} and l.createtime &gt;= #{registrationTimeBegin}
</if> </if>
...@@ -240,6 +243,9 @@ ...@@ -240,6 +243,9 @@
<if test="realName !=null and realName != ''"> <if test="realName !=null and realName != ''">
and d.realname like CONCAT('%',#{realName},'%') and d.realname like CONCAT('%',#{realName},'%')
</if> </if>
<if test="nickname !=null and nickname != ''">
and d.nickname, like CONCAT('%',#{nickname},'%')
</if>
<if test="citySet != null and citySet.size > 0 "> <if test="citySet != null and citySet.size > 0 ">
and d.city_code in and d.city_code in
<foreach collection="citySet" item="item" index="index" open="(" separator="," close=")"> <foreach collection="citySet" item="item" index="index" open="(" separator="," close=")">
...@@ -251,8 +257,10 @@ ...@@ -251,8 +257,10 @@
<!--查询非普通用户--> <!--查询非普通用户-->
<select id="selectAllStaffs" resultType="com.github.wxiaoqi.security.admin.bo.UserStaffBo"> <select id="selectAllStaffs" resultType="com.github.wxiaoqi.security.admin.bo.UserStaffBo">
select aud.userid as `userId`,aud.realname as `realName`,aud.nickname as `nickName`,aul.username as `phone`,aud.position_id as `postionId`,aup.name as `postionName`,aupt.company_id as `companyId`,aupt.company_name as `companyName` select aud.userid as `userId`,aud.realname as `realName`,aud.nickname as `nickName`,aul.username as
from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=aud.userid `phone`,aud.position_id as `postionId`,aup.name as `postionName`,aupt.company_id as
`companyId`,aupt.company_name as `companyName`
from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=aud.userid
left join `app_user_position_temp` as `aupt` on aupt.user_id=aul.id left join `app_user_position_temp` as `aupt` on aupt.user_id=aul.id
left join `app_user_position` as `aup` on aup.id=aud.position_id left join `app_user_position` as `aup` on aup.id=aud.position_id
where <![CDATA[aud.position_id<>6]]> and aud.isdel=0 where <![CDATA[aud.position_id<>6]]> and aud.isdel=0
...@@ -342,29 +350,35 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id= ...@@ -342,29 +350,35 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=
order by sell.sellAmount desc order by sell.sellAmount desc
</select> </select>
<select id="getUser" resultMap="AppUserVoMap"> <select id="getUser" resultMap="AppUserVoMap">
select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.* from app_user_login l select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.*
from app_user_login l
left join app_user_detail d left join app_user_detail d
on d.userid = l.id on d.userid = l.id
where l.id = #{userId} limit 1 where l.id = #{userId} limit 1
</select> </select>
<select id="findUserBosByPhones" resultType="com.github.wxiaoqi.security.admin.bo.UserBo"> <select id="findUserBosByPhones" resultType="com.github.wxiaoqi.security.admin.bo.UserBo">
select aul.id as `userId`,aul.username as `phone`,IFNULL(aud.realname,aud.nickname) as `name` from (select `id`,`username` from `app_user_login` select aul.id as `userId`,aul.username as `phone`,IFNULL(aud.realname,aud.nickname) as `name` from (select
`id`,`username` from `app_user_login`
<if test="phones!=null and phones.size()>0"> <if test="phones!=null and phones.size()>0">
where username in where username in
<foreach collection="phones" item="phone" open="(" close=")" separator=","> <foreach collection="phones" item="phone" open="(" close=")" separator=",">
#{phone} #{phone}
</foreach> </foreach>
</if>) as aul inner join `app_user_detail` as aud on aud.userid=aul.id </if>
) as aul inner join `app_user_detail` as aud on aud.userid=aul.id
</select> </select>
<select id="selectAllWithNoProviinceCode" <select id="selectAllWithNoProviinceCode"
resultType="com.github.wxiaoqi.security.admin.entity.AppUserDetail"> resultType="com.github.wxiaoqi.security.admin.entity.AppUserDetail">
select `id`,`crt_host` from `app_user_detail` where crt_host is not null and ( province_code = 0 or province_code is null) select `id`,`crt_host` from `app_user_detail` where crt_host is not null and ( province_code = 0 or
province_code is null)
</select> </select>
<select id="selectUserByUserIds" resultType="com.github.wxiaoqi.security.admin.bo.UserBo"> <select id="selectUserByUserIds" resultType="com.github.wxiaoqi.security.admin.bo.UserBo">
select aud.userid as `userId`,case when length(aud.realname)>0 then aud.realname else aud.nickname end as `name`,aul.username as `phone` from `app_user_detail` as aud left join `app_user_login` as aul on aul.id=aud.userid select aud.userid as `userId`,case when length(aud.realname)>0 then aud.realname else aud.nickname end as
`name`,aul.username as `phone` from `app_user_detail` as aud left join `app_user_login` as aul on
aul.id=aud.userid
<where> <where>
<if test="userIds != null and userIds.size() != 0"> <if test="userIds != null and userIds.size() != 0">
userid in userid in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment