|
@@ -13,7 +13,7 @@
|
|
<result column="company_id" property="companyId" />
|
|
<result column="company_id" property="companyId" />
|
|
<result column="parent_id" property="parentId" />
|
|
<result column="parent_id" property="parentId" />
|
|
<result column="sex" property="sex" />
|
|
<result column="sex" property="sex" />
|
|
- <result column="dep_no" property="depNo" />
|
|
|
|
|
|
+ <result column="role_name" property="roleName" />
|
|
<result column="work_state" property="workState" />
|
|
<result column="work_state" property="workState" />
|
|
<result column="is_disable" property="isDisable" />
|
|
<result column="is_disable" property="isDisable" />
|
|
<result column="indate" property="indate" />
|
|
<result column="indate" property="indate" />
|
|
@@ -21,6 +21,12 @@
|
|
<result column="team_name" property="teamName" />
|
|
<result column="team_name" property="teamName" />
|
|
<result column="subordinate_type" property="subordinateType" />
|
|
<result column="subordinate_type" property="subordinateType" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
+
|
|
|
|
+ <!-- 通用查询结果列 -->
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ id, account, username, password, mobile, role_type, company_id, parent_id, sex, role_name, work_state, is_disable, indate, head_imgurl, team_name, subordinate_type
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
<resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.UserVO">
|
|
<resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.UserVO">
|
|
<id column="id" property="id" />
|
|
<id column="id" property="id" />
|
|
<result column="account" property="account" />
|
|
<result column="account" property="account" />
|
|
@@ -33,7 +39,7 @@
|
|
<result column="company_name" property="companyName"/>
|
|
<result column="company_name" property="companyName"/>
|
|
<result column="parent_id" property="parentId" />
|
|
<result column="parent_id" property="parentId" />
|
|
<result column="sex" property="sex" />
|
|
<result column="sex" property="sex" />
|
|
- <result column="dep_no" property="depNo" />
|
|
|
|
|
|
+ <result column="role_name" property="roleName" />
|
|
<result column="work_state" property="workState" />
|
|
<result column="work_state" property="workState" />
|
|
<result column="is_disable" property="isDisable" />
|
|
<result column="is_disable" property="isDisable" />
|
|
<result column="indate" property="indate" />
|
|
<result column="indate" property="indate" />
|
|
@@ -42,19 +48,14 @@
|
|
<result column="subordinate_type" property="subordinateType" />
|
|
<result column="subordinate_type" property="subordinateType" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
- <!-- 通用查询结果列 -->
|
|
|
|
- <sql id="Base_Column_List">
|
|
|
|
- id, account, username, password, mobile, role_type, company_id, parent_id, sex, dep_no, work_state, is_disable, indate, head_imgurl, team_name, subordinate_type
|
|
|
|
- </sql>
|
|
|
|
-
|
|
|
|
<select id="selectListByCondition" resultMap="BaseResultMapVO">
|
|
<select id="selectListByCondition" resultMap="BaseResultMapVO">
|
|
SELECT
|
|
SELECT
|
|
- u.id id, u.account account, u.username username, u.password password, u.mobile mobile, u.role_type role_type, u.company_id company_id, c.`company_name` company_name,
|
|
|
|
- r.role_name role_name,u.parent_id parent_id, u.sex sex, u.dep_no dep_no, u.work_state work_state, u.is_disable is_disable,
|
|
|
|
- u.indate indate, u.head_imgurl head_imgurl, u.team_name team_name, u.subordinate_type subordinate_type
|
|
|
|
|
|
+ u.id id, u.account account, u.username username, u.password password, u.mobile mobile, u.role_type role_type, u.company_id company_id, c.`company_name` company_name,
|
|
|
|
+ r.role_name role_name,u.parent_id parent_id, u.sex sex,u.work_state work_state, u.is_disable is_disable,
|
|
|
|
+ u.indate indate, u.head_imgurl head_imgurl, u.team_name team_name, u.role_name role_name,u.subordinate_type subordinate_type
|
|
FROM
|
|
FROM
|
|
- tb_user AS u
|
|
|
|
- LEFT JOIN tb_company c
|
|
|
|
|
|
+ tb_user AS u
|
|
|
|
+ LEFT JOIN tb_company c
|
|
ON u.company_id = c.`id`
|
|
ON u.company_id = c.`id`
|
|
LEFT JOIN tb_role r
|
|
LEFT JOIN tb_role r
|
|
ON r.`id` = u.`role_type`
|
|
ON r.`id` = u.`role_type`
|
|
@@ -64,19 +65,18 @@
|
|
AND u.parent_id = #{user.id}
|
|
AND u.parent_id = #{user.id}
|
|
</if>
|
|
</if>
|
|
<if test="flag==0 and keyName != '' and keyName !=null">
|
|
<if test="flag==0 and keyName != '' and keyName !=null">
|
|
- AND u.username like concat('%',#{keyName},'%')
|
|
|
|
|
|
+ AND u.username like concat('%',#{keyName},'%')
|
|
</if>
|
|
</if>
|
|
<if test="flag==1 and keyName != '' and keyName !=null">
|
|
<if test="flag==1 and keyName != '' and keyName !=null">
|
|
- AND u.account like concat('%',#{keyName},'%')
|
|
|
|
|
|
+ AND u.account like concat('%',#{keyName},'%')
|
|
</if>
|
|
</if>
|
|
<if test="roleType != -2">
|
|
<if test="roleType != -2">
|
|
- AND u.role_type = #{roleType}
|
|
|
|
|
|
+ AND u.role_type = #{roleType}
|
|
</if>
|
|
</if>
|
|
<if test="companyId != -1">
|
|
<if test="companyId != -1">
|
|
- AND u.company_id = #{companyId}
|
|
|
|
|
|
+ AND u.company_id = #{companyId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
Order by u.id desc
|
|
Order by u.id desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|