|
@@ -29,21 +29,24 @@
|
|
<result column="dept_name_his" jdbcType="VARCHAR" property="deptNameHis"/>
|
|
<result column="dept_name_his" jdbcType="VARCHAR" property="deptNameHis"/>
|
|
<result column="personal_share" jdbcType="VARCHAR" property="personalShare"/>
|
|
<result column="personal_share" jdbcType="VARCHAR" property="personalShare"/>
|
|
<result column="qualifier_pic_path" jdbcType="VARCHAR" property="qualifierPicPath"/>
|
|
<result column="qualifier_pic_path" jdbcType="VARCHAR" property="qualifierPicPath"/>
|
|
|
|
+ <result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
|
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="lazyLoadRoles" type="com.jiuzhekan.cbkj.beans.sysBeans.AdminInfo" extends="BaseResultMap">
|
|
<resultMap id="lazyLoadRoles" type="com.jiuzhekan.cbkj.beans.sysBeans.AdminInfo" extends="BaseResultMap">
|
|
<collection property="roles" ofType="com.jiuzhekan.cbkj.beans.sysBeans.AdminRule" select="getRolesByAdminId"
|
|
<collection property="roles" ofType="com.jiuzhekan.cbkj.beans.sysBeans.AdminRule" select="getRolesByAdminId"
|
|
- column="id">
|
|
|
|
|
|
+ column="user_id">
|
|
</collection>
|
|
</collection>
|
|
</resultMap>
|
|
</resultMap>
|
|
<select id="getRolesByAdminId" resultType="AdminRule">
|
|
<select id="getRolesByAdminId" resultType="AdminRule">
|
|
- select r.role_id, r.role_name, r.role_desc, r.create_date, r.create_user adminId, r.rname_zh,r.index_url indexUrl from
|
|
|
|
|
|
+ select r.role_id roleId,r.obj_id objId, r.role_name roleName , r.role_desc roleDesc, r.create_date createDate, r.create_user createUser, r.rname_zh rnameZh ,r.index_url indexUrl from
|
|
sys_admin_info_rule ar,sys_admin_rule r where ar.role_id = r.role_id AND ar.user_id=#{id}
|
|
sys_admin_info_rule ar,sys_admin_rule r where ar.role_id = r.role_id AND ar.user_id=#{id}
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- user_id,user_name,password,sex,status,create_date,CREATE_USER,last_ip,phone,address,name_zh,user_heand,email,APP_ID,INS_CODE,dept_id,dept_name,EXPIRE_DATE,create_user_name,is_qualifier,dept_id_his,dept_name_his,qualifier_pic_path,personal_share
|
|
|
|
|
|
+ user_id,user_name,password,sex,status,create_date,CREATE_USER,last_ip,phone,address,name_zh,user_heand,email,APP_ID,INS_CODE,dept_id,dept_name,EXPIRE_DATE,create_user_name,is_qualifier,dept_id_his,dept_name_his,qualifier_pic_path,personal_share,
|
|
|
|
+update_user,update_time,professional
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectAdminRoleById" parameterType="java.lang.String" resultMap="lazyLoadRoles">
|
|
<select id="selectAdminRoleById" parameterType="java.lang.String" resultMap="lazyLoadRoles">
|
|
@@ -153,10 +156,6 @@
|
|
<if test="email != null">
|
|
<if test="email != null">
|
|
,#{email}
|
|
,#{email}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
- <if test="originDoctorId != null">
|
|
|
|
- ,#{originDoctorId}
|
|
|
|
- </if>
|
|
|
|
<if test="expireDate != null">
|
|
<if test="expireDate != null">
|
|
,#{expireDate}
|
|
,#{expireDate}
|
|
</if>
|
|
</if>
|
|
@@ -353,6 +352,16 @@
|
|
CREATE_USER = #{createUser,jdbcType=VARCHAR},
|
|
CREATE_USER = #{createUser,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
|
+ update_user = #{updateUser,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="professional != null">
|
|
|
|
+ professional = #{professional,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -427,9 +436,13 @@
|
|
DATE_FORMAT(
|
|
DATE_FORMAT(
|
|
a.create_date,
|
|
a.create_date,
|
|
'%Y-%m-%d %H:%i:%s'
|
|
'%Y-%m-%d %H:%i:%s'
|
|
- ) create_date as createDate,
|
|
|
|
|
|
+ ) createDate ,
|
|
a.CREATE_USER createUser,
|
|
a.CREATE_USER createUser,
|
|
-
|
|
|
|
|
|
+ a.update_user updateUser,
|
|
|
|
+ DATE_FORMAT(
|
|
|
|
+ a.update_time,
|
|
|
|
+ '%Y-%m-%d %H:%i:%s'
|
|
|
|
+ ) updateTime,
|
|
a.last_ip as lastIp,
|
|
a.last_ip as lastIp,
|
|
a.phone,
|
|
a.phone,
|
|
a.address,
|
|
a.address,
|
|
@@ -442,15 +455,19 @@
|
|
a.dept_id_his deptIdHis,
|
|
a.dept_id_his deptIdHis,
|
|
a.dept_name_his deptNameHis,
|
|
a.dept_name_his deptNameHis,
|
|
group_concat(r.rname_zh) rnamess,
|
|
group_concat(r.rname_zh) rnamess,
|
|
- c.create_user_name createName
|
|
|
|
|
|
+ group_concat(i.ins_name) insNames,
|
|
|
|
+ c.user_name createUserName,
|
|
|
|
+ c2.user_name updateUserName
|
|
|
|
+
|
|
FROM `sys_admin_info` a
|
|
FROM `sys_admin_info` a
|
|
left join sys_admin_info_rule ar on a.user_id = ar.user_id
|
|
left join sys_admin_info_rule ar on a.user_id = ar.user_id
|
|
left join sys_admin_rule r on ar.role_id = r.role_id
|
|
left join sys_admin_rule r on ar.role_id = r.role_id
|
|
left join sys_admin_info c on c.user_id = a.CREATE_USER
|
|
left join sys_admin_info c on c.user_id = a.CREATE_USER
|
|
|
|
+ left join sys_admin_info c2 on c2.user_id = a.update_user
|
|
LEFT JOIN sys_doctor_multipoint ap ON ap.user_id = a.user_id
|
|
LEFT JOIN sys_doctor_multipoint ap ON ap.user_id = a.user_id
|
|
left join sys_app p on ap.app_id = p.app_id
|
|
left join sys_app p on ap.app_id = p.app_id
|
|
left join sys_institution i on ap.app_id = i.APP_ID and ap.ins_code = i.INS_CODE
|
|
left join sys_institution i on ap.app_id = i.APP_ID and ap.ins_code = i.INS_CODE
|
|
- WHERE a.status = '1'
|
|
|
|
|
|
+ WHERE a.status in ('1','2','3')
|
|
<if test="userName != null and userName != ''">
|
|
<if test="userName != null and userName != ''">
|
|
and (a.user_name like concat('%',trim(#{userName}),'%') or a.name_zh like concat('%',trim(#{userName}),'%')
|
|
and (a.user_name like concat('%',trim(#{userName}),'%') or a.name_zh like concat('%',trim(#{userName}),'%')
|
|
)
|
|
)
|
|
@@ -467,6 +484,9 @@
|
|
<if test="deptName != null and deptName != ''">
|
|
<if test="deptName != null and deptName != ''">
|
|
and ap.dept_name like concat('%',#{deptName},'%')
|
|
and ap.dept_name like concat('%',#{deptName},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="roleName != null and roleName != ''">
|
|
|
|
+ and r.role_name like concat('%',#{roleName},'%')
|
|
|
|
+ </if>
|
|
<if test="sex != null and sex != ''">
|
|
<if test="sex != null and sex != ''">
|
|
and a.sex = #{sex}
|
|
and a.sex = #{sex}
|
|
</if>
|
|
</if>
|
|
@@ -553,7 +573,7 @@
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<delete id="deleteAdminInfoRuleByAdminId" parameterType="String">
|
|
<delete id="deleteAdminInfoRuleByAdminId" parameterType="String">
|
|
- delete from sys_admin_info_rule where admin_id = #{id}
|
|
|
|
|
|
+ delete from sys_admin_info_rule where user_id = #{id}
|
|
|
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
@@ -592,7 +612,7 @@
|
|
AND a.INS_CODE = #{insCode}
|
|
AND a.INS_CODE = #{insCode}
|
|
</if>
|
|
</if>
|
|
<if test="id != null and id != ''">
|
|
<if test="id != null and id != ''">
|
|
- AND a.id != #{id}
|
|
|
|
|
|
+ AND a.user_id != #{id}
|
|
</if>
|
|
</if>
|
|
|
|
|
|
</where>
|
|
</where>
|