记得上下班打卡 | git大法好,push需谨慎

Commit 768a539f authored by GaoHu's avatar GaoHu

用户列表条件搜索

parent 3142cf53
...@@ -17,9 +17,21 @@ public class SmileUserParam { ...@@ -17,9 +17,21 @@ public class SmileUserParam {
@ApiModelProperty(value = "手机号", example = "") @ApiModelProperty(value = "手机号", example = "")
private String phone; private String phone;
@ApiModelProperty(value = "代理类型", example = "") @ApiModelProperty(value = "代理类型(1:总代,2:普代)", example = "")
private Integer type; private Integer type;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "性别 1:男,2女")
private Integer sex;
@ApiModelProperty(value = "身份(1:在校学生(默认),2已毕业)")
private Integer identity;
@ApiModelProperty(value = "学校id")
private String schoolId;
@ApiModelProperty(value = "用户状态0:正常,1:黑名单", example = "") @ApiModelProperty(value = "用户状态0:正常,1:黑名单", example = "")
private Integer state; private Integer state;
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
<select id="strip" resultType="Integer"> <select id="strip" resultType="Integer">
select count(*) select count(*)
from smile_user from smile_user
where org_id = #{orgId} AND del_tag = 0; where org_id = #{orgId}
AND del_tag = 0;
</select> </select>
<select id="selectUserNameById" resultType="String"> <select id="selectUserNameById" resultType="String">
...@@ -44,51 +45,63 @@ ...@@ -44,51 +45,63 @@
<select id="selectUserList" parameterType="java.util.Map" resultType="com.liquidnet.service.smile.entity.SmileUser"> <select id="selectUserList" parameterType="java.util.Map" resultType="com.liquidnet.service.smile.entity.SmileUser">
select * from smile_user select * from smile_user
<where> <where>
del_tag = 0 AND type != 0 AND type != 3 AND type != 4 del_tag = 0 AND type != 0 AND type != 3 AND type != 4
<if test="phone!='' and phone !=null"> <if test="phone!='' and phone !=null">
AND phone Like concat('%',#{phone},'%') AND phone Like concat('%',#{phone},'%')
</if> </if>
<if test="type!=null and type != ''">
AND `type` = #{type}
</if>
<if test="sex!=null and sex != ''">
AND sex = #{sex}
</if>
<if test="identity!='' and identity!=null">
AND `identity` = #{identity}
</if>
<if test="schoolId!='' and schoolId!=null">
AND school_id = #{schoolId}
</if>
</where> </where>
ORDER BY id desc ORDER BY id desc
</select> </select>
<select id="pageUser" parameterType="int" resultType="com.liquidnet.service.smile.entity.SmileUser"> <select id="pageUser" parameterType="int" resultType="com.liquidnet.service.smile.entity.SmileUser">
select * from smile_user select * from smile_user
<where> <where>
del_tag = 0 AND type != 0 AND type != 3 AND type != 4 del_tag = 0 AND type != 0 AND type != 3 AND type != 4
</where> </where>
limit #{offest},#{size} limit #{offest},#{size}
</select> </select>
<select id="getCount" resultType="int"> <select id="getCount" resultType="int">
select count(1) from smile_user select count(1) from smile_user
<where> <where>
del_tag = 0 AND type != 0 AND type != 3 AND type != 4 del_tag = 0 AND type != 0 AND type != 3 AND type != 4
</where> </where>
</select> </select>
<select id="selectUserCheck" parameterType="java.util.Map" resultMap="smileUserCheckDao"> <select id="selectUserCheck" parameterType="java.util.Map" resultMap="smileUserCheckDao">
SELECT SELECT
id, id,
uid, uid,
img, img,
`NAME`, `NAME`,
birthday, birthday,
sex, sex,
phone, phone,
`identity`, `identity`,
school_name, school_name,
province_id, province_id,
province, province,
city_id, city_id,
city, city,
area_id, area_id,
area, area,
address, address,
type, type,
error_reason error_reason
FROM FROM
smile_user smile_user
<where> <where>
del_tag = 0 AND del_tag = 0 AND
`type` != 1 AND `type` != 2 `type` != 1 AND `type` != 2
<if test="phone!=''"> <if test="phone!=''">
AND phone like concat('%',#{phone},'%') AND phone like concat('%',#{phone},'%')
...@@ -112,11 +125,11 @@ ...@@ -112,11 +125,11 @@
<update id="updateUserByUid"> <update id="updateUserByUid">
update smile_user update smile_user
set org_id = #{orgId}, set org_id = #{orgId},
type = #{type}, type = #{type},
agent = 1, agent = 1,
agent_id = #{agentId}, agent_id = #{agentId},
`state` = 0 `state` = 0
where uid = #{uid} where uid = #{uid}
</update> </update>
...@@ -127,28 +140,29 @@ ...@@ -127,28 +140,29 @@
</update> </update>
<update id="updateUserCheckByUid"> <update id="updateUserCheckByUid">
update smile_user set `type` = #{type},error_reason = #{reason},`state` = 0 update smile_user
set `type` = #{type},
error_reason = #{reason},
`state` = 0
where uid = #{uid} where uid = #{uid}
</update> </update>
<select id="getAllUidByPerId" parameterType="java.util.Map" resultType="com.liquidnet.service.smile.entity.SmileUser"> <select id="getAllUidByPerId" parameterType="java.util.Map"
SELECT resultType="com.liquidnet.service.smile.entity.SmileUser">
uid, SELECT uid,
`name`, `name`,
`type`, `type`,
province_id, province_id,
province, province,
city_id, city_id,
city, city,
area_id, area_id,
area, area,
address address
FROM FROM smile_user su
smile_user su LEFT JOIN kylin_order_ticket_relations AS kotr ON kotr.agent_id = su.uid
LEFT JOIN kylin_order_ticket_relations AS kotr ON kotr.agent_id = su.uid WHERE kotr.performance_id = #{performancesId}
WHERE
kotr.performance_id = #{performancesId}
group by uid group by uid
</select> </select>
</mapper> </mapper>
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