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

Commit 768a539f authored by GaoHu's avatar GaoHu

用户列表条件搜索

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