|
@@ -249,7 +249,7 @@
|
|
|
and a.id=#{id}
|
|
|
</select>
|
|
|
<select id="findOrgRole" resultType="com.huaxu.model.ProgramItem">
|
|
|
- select d.ORG_ID orgId,c.ORG_TYPE from uims_user_role b
|
|
|
+ select d.ORG_ID orgId,c.ORG_TYPE newType from uims_user_role b
|
|
|
|
|
|
join uims_role_org d on b.ROLE_ID=d.ROLE_ID join uims_org c
|
|
|
on c.id=d.ORG_ID
|
|
@@ -284,4 +284,36 @@
|
|
|
insert into uims_user_register( ID, USERNAME, PHONE, USER_TYPE, REMARK, STATUS, CREATE_BY,DATE_CREATE,UPDATE_BY,DATE_UPDATE)
|
|
|
values ( #{id}, #{username}, #{phone}, #{userType}, #{remark}, 1, #{createBy}, #{dateCreate}, #{updateBy}, #{dateUpdate})
|
|
|
</insert>
|
|
|
+ <select id="findUserFirstMenu" resultType="com.huaxu.entity.MenuEntity">
|
|
|
+ SELECT
|
|
|
+ a.id as "id" ,
|
|
|
+ a.parent_menu_id as "parentMenuId" ,
|
|
|
+ b.MENU_NAME as "name" ,
|
|
|
+ b.MENU_IMAGE as "menuImage" ,
|
|
|
+ a.permission_flag as "permissionFlag" ,
|
|
|
+ b.LINK_PATH as "linkPath" ,
|
|
|
+ b.MENU_SEQ as "seq" ,
|
|
|
+ a.show_state as "showState" ,
|
|
|
+ b.remark as "remark" ,
|
|
|
+ b.date_create as "dateCreate" ,
|
|
|
+ b.create_by as "createBy" ,
|
|
|
+ b.date_update as "dateUpdate" ,
|
|
|
+ b.update_by as "updateBy" ,
|
|
|
+ b.status as "status"
|
|
|
+ from uims_user_role userrole
|
|
|
+ inner join uims_role_menu rolemenu on rolemenu.ROLE_ID=userrole.ROLE_ID and rolemenu.status=1
|
|
|
+ inner join uims_menu a on a.id=rolemenu.MENU_ID and a.STATUS=1
|
|
|
+ inner join uims_tenant_menu b on a.id= b.MENU_ID and b.status=1
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ and b.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
+ <where>
|
|
|
+ userrole.status=1 and a.PARENT_MENU_ID=0 and a.SHOW_STATE=1 and a.is_tenant=1
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and userrole.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </where>
|
|
|
+ order by b.MENU_SEQ
|
|
|
+ </select>
|
|
|
</mapper>
|