|
|
@@ -370,4 +370,81 @@
|
|
|
<select id="listAdminByName" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select id,name from admin where name like concat('%',#{name},'%')
|
|
|
</select>
|
|
|
+ <!--*************************************************************************-->
|
|
|
+ <select id= "selectAdminListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo" >
|
|
|
+ select
|
|
|
+ a.user_no as userNo, a.mobile, a.name,
|
|
|
+ a.position, a.email, a.id,
|
|
|
+ a.province,
|
|
|
+ a.city,
|
|
|
+ a.create_time as createTime,
|
|
|
+ aa.name as superior,
|
|
|
+ a.superior_id as superiorId,
|
|
|
+ a.department_id as departmentId,
|
|
|
+ dm.name as departmentName,
|
|
|
+ a.duty,a.status
|
|
|
+ from admin a
|
|
|
+ left join admin_location al on a.id = al.admin_id
|
|
|
+ left join admin aa on aa.id = a.superior_id
|
|
|
+ left join department_management dm on a.department_id = dm.id
|
|
|
+ left join user_role ur on a.id=ur.uid
|
|
|
+ where a.id <![CDATA[ <> ]]> '1'
|
|
|
+ <if test = "name != null">
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "departmentId != null">
|
|
|
+ and a.department_id = #{departmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "rid != null">
|
|
|
+ and ur.rid = #{rid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "duty != null">
|
|
|
+ and a.duty = #{duty,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "position != null">
|
|
|
+ and a.position = #{position,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "status != null">
|
|
|
+ and a.status = #{status,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "mobile != null">
|
|
|
+ and a.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "superiorId != null">
|
|
|
+ and a.superior_id = #{superiorId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by a.number
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id = "selectAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
+ select count(1) from admin a
|
|
|
+ left join user_role ur on a.id=ur.uid
|
|
|
+ where id <![CDATA[ <> ]]> '1'
|
|
|
+ <if test = "name != null">
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "departmentId != null">
|
|
|
+ and a.department_id = #{departmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "rid != null">
|
|
|
+ and ur.rid = #{rid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "duty != null">
|
|
|
+ and a.duty = #{duty,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "position != null">
|
|
|
+ and a.position = #{position,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "status != null">
|
|
|
+ and a.status = #{status,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "mobile != null">
|
|
|
+ and a.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test = "superiorId != null">
|
|
|
+ and a.superior_id = #{superiorId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|