|
@@ -175,24 +175,27 @@
|
|
|
where mobile = #{mobile,jdbcType=VARCHAR}
|
|
where mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <select id= "findAdminListByPage" parameterType="java.lang.String" resultMap="BaseResultMap" >
|
|
|
|
|
- select
|
|
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
|
- from admin
|
|
|
|
|
- where id <![CDATA[ <> ]]> '1'
|
|
|
|
|
- <if test = "province != null">
|
|
|
|
|
- and province = #{province,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ <select id= "findAdminListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo" >
|
|
|
|
|
+ select
|
|
|
|
|
+ a.number, a.mobile, a.name,
|
|
|
|
|
+ a.position, a.email, a.id,
|
|
|
|
|
+ a.create_time as createTime, GROUP_CONCAT(DISTINCT(al.province)) AS province,
|
|
|
|
|
+ aa.name as superior
|
|
|
|
|
+ from admin a
|
|
|
|
|
+ left join admin_location al on a.id = al.admin_id
|
|
|
|
|
+ left join admin aa on aa.id = a.superior_id
|
|
|
|
|
+ where a.id <![CDATA[ <> ]]> '1'
|
|
|
<if test = "mobile != null">
|
|
<if test = "mobile != null">
|
|
|
- and mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ and a.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
|
<if test = "name != null">
|
|
<if test = "name != null">
|
|
|
- and name = #{name,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
|
<if test = "number != null">
|
|
<if test = "number != null">
|
|
|
- and number = #{number,jdbcType=INTEGER}
|
|
|
|
|
|
|
+ and a.number = #{number,jdbcType=INTEGER}
|
|
|
</if>
|
|
</if>
|
|
|
- order by number
|
|
|
|
|
|
|
+ group by a.id
|
|
|
|
|
+ order by a.number
|
|
|
<if test="page_sql!=null">
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
${page_sql}
|
|
|
</if>
|
|
</if>
|
|
@@ -201,9 +204,6 @@
|
|
|
<select id = "findAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
<select id = "findAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
select count(1) from admin
|
|
select count(1) from admin
|
|
|
where id <![CDATA[ <> ]]> '1'
|
|
where id <![CDATA[ <> ]]> '1'
|
|
|
- <if test = "province != null">
|
|
|
|
|
- and province = #{province,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
<if test = "mobile != null">
|
|
<if test = "mobile != null">
|
|
|
and mobile = #{mobile,jdbcType=VARCHAR}
|
|
and mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
@@ -314,4 +314,39 @@
|
|
|
INNER JOIN user_role ur on a.id = ur.uid
|
|
INNER JOIN user_role ur on a.id = ur.uid
|
|
|
where ur.rid = 7
|
|
where ur.rid = 7
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="listAdminSelectBySuperAdmin" resultMap="BaseResultMap">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
|
+ from admin
|
|
|
|
|
+ where id <![CDATA[ <> ]]> '1'
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="listAdminSelectByAreaAdmin" parameterType="Map" resultMap="BaseResultMap">
|
|
|
|
|
+ select
|
|
|
|
|
+ a.id, a.name, a.mobile,
|
|
|
|
|
+ a.create_time as createTime, a.number, aa.name as superior
|
|
|
|
|
+ from admin a
|
|
|
|
|
+ left join admin_location al on al.admin_id = a.id
|
|
|
|
|
+ left join admin aa on aa.id = a.superior_id
|
|
|
|
|
+ where 1 = 1
|
|
|
|
|
+ <if test="provinceList != null">
|
|
|
|
|
+ and al.province in
|
|
|
|
|
+ <foreach collection="provinceList" item="plist" open="(" separator="," close=")">
|
|
|
|
|
+ #{plist}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test = "provinceList != null && cityList != null">
|
|
|
|
|
+ or
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cityList != null">
|
|
|
|
|
+ <if test="provinceList == null">
|
|
|
|
|
+ and
|
|
|
|
|
+ </if>
|
|
|
|
|
+ al.city in
|
|
|
|
|
+ <foreach collection="cityList" item="clist" open="(" separator="," close=")">
|
|
|
|
|
+ #{clist}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|