记得上下班打卡 | 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">
...@@ -48,6 +49,18 @@ ...@@ -48,6 +49,18 @@
<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>
...@@ -127,13 +140,16 @@ ...@@ -127,13 +140,16 @@
</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,
...@@ -144,11 +160,9 @@ ...@@ -144,11 +160,9 @@
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 WHERE kotr.performance_id = #{performancesId}
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