|
@@ -371,5 +371,59 @@
|
371
|
371
|
order by view_num
|
372
|
372
|
</select>
|
373
|
373
|
|
|
374
|
+ <select id="selectUserMobileAuthMenuList" resultType="com.oqpo.api.entity.oper.MenuEntity">
|
|
375
|
+ with recursive tree_menu_list /* selectUserMobileAuthMenuList */
|
|
376
|
+ as
|
|
377
|
+ (
|
|
378
|
+ select 1 level
|
|
379
|
+ , menu_no
|
|
380
|
+ , top_menu_no
|
|
381
|
+ , menu_nm
|
|
382
|
+ , view_num
|
|
383
|
+ , open_cd
|
|
384
|
+ , conn_url
|
|
385
|
+ , cast(menu_no as char(100) character set utf8) id_path
|
|
386
|
+ , use_yn
|
|
387
|
+ , fn_code_nm('USE_YN', use_yn) as use_yn_nm
|
|
388
|
+ , menu_id
|
|
389
|
+ from np_sys_menu
|
|
390
|
+ where top_menu_no = 10
|
|
391
|
+ union all
|
|
392
|
+ select c.level + 1
|
|
393
|
+ , b.menu_no
|
|
394
|
+ , b.top_menu_no
|
|
395
|
+ , b.menu_nm
|
|
396
|
+ , b.view_num
|
|
397
|
+ , b.open_cd
|
|
398
|
+ , b.conn_url
|
|
399
|
+ , concat(c.id_path, '->', case when b.view_num <![CDATA[ < ]]> 10 then concat('0',b.view_num) else b.view_num end ,'->', b.menu_no) as id_path
|
|
400
|
+ , b.use_yn
|
|
401
|
+ , fn_code_nm('USE_YN', b.use_yn) as use_yn_nm
|
|
402
|
+ , b.menu_id
|
|
403
|
+ from np_sys_menu b, tree_menu_list c
|
|
404
|
+ where c.menu_no = b.top_menu_no
|
|
405
|
+ and b.sys_type_cd = 'M'
|
|
406
|
+ )
|
|
407
|
+ select tlist.menu_no, tlist.top_menu_no, fn_get_menu_nm(tlist.top_menu_no) as top_menu_nm, tlist.menu_nm, tlist.view_num, tlist.level , tlist.use_yn, tlist.use_yn_nm
|
|
408
|
+ , tlist.open_cd, case when tlist.open_cd != 'C' then (select count(*) from np_sys_menu where top_menu_no = tlist.menu_no ) else 0 end as b_menu_cnt
|
|
409
|
+ , tlist.conn_url, tlist.menu_id
|
|
410
|
+ from tree_menu_list tlist
|
|
411
|
+ <if test="systemAdminYn neq 'Y'.toString() ">
|
|
412
|
+ join ( select 100 as top_menu_no, top_menu_no as menu_no, 'Y' as wr_yn
|
|
413
|
+ from np_user_auth uauth
|
|
414
|
+ join np_auth_info ainfo on uauth.auth_no = ainfo.auth_no and ainfo.use_yn = 'Y'
|
|
415
|
+ where uauth.user_id = #{userId}
|
|
416
|
+ union all
|
|
417
|
+ select ainfo.top_menu_no, adtl.menu_no, adtl.wr_yn
|
|
418
|
+ from np_user_auth uauth
|
|
419
|
+ join np_auth_info ainfo on uauth.auth_no = ainfo.auth_no and ainfo.use_yn = 'Y'
|
|
420
|
+ join np_auth_dtl adtl on uauth.auth_no = adtl.auth_no and adtl.use_yn = 'Y'
|
|
421
|
+ where uauth.user_id = #{userId} ) umenu
|
|
422
|
+ on tlist.top_menu_no = umenu.top_menu_no and tlist.menu_no = umenu.menu_no
|
|
423
|
+ </if>
|
|
424
|
+ where tlist.use_yn = 'Y'
|
|
425
|
+ and tlist.open_cd in ('T','C')
|
|
426
|
+ order by id_path
|
|
427
|
+ </select>
|
374
|
428
|
|
375
|
429
|
</mapper>
|