diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml index 0f128794..089f29fb 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml @@ -22,10 +22,10 @@ - and (res.iteration_id is null or res.iteration_id ='') - and ( res.iteration_id is not null and res.iteration_id !='' ) + and (res.iteration_id is null ) + and ( res.iteration_id is not null ) and res.iteration_id=#{filterIterationId} - and res.iteration_id!=#{filterIterationId} + and (res.iteration_id!=#{filterIterationId} or res.iteration_id is null) @@ -42,12 +42,12 @@ and res.menu_name like #{key} - and (res.pmenu_id is null or res.pmenu_id = '') + and (res.pmenu_id is null ) and exists (select 1 from xm_product_project_link link where link.product_id=res.product_id and link.project_id=#{linkProjectId}) and - exists (select 1 from xm_iteration_link link where link.pro_id=res.product_id and link.iteration_id=#{linkIterationId}) + exists (select 1 from xm_iteration_link link where link.pro_id=res.product_id and link.iteration_id=#{linkIterationId} and link.ltype='1') @@ -188,7 +188,7 @@ - select (select sum(1) from xm_task t where t.parent_taskid=res.id) as children_cnt, res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state - from xm_task res left join xm_task_process_approva pa on res.id=pa.xm_task_id and res.biz_proc_inst_id=pa.proc_inst_id - left join xm_project p on p.id=res.project_id + select (select sum(1) from xm_task t where t.parent_taskid=res.id) as children_cnt, res.* + from xm_task res