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