| | |
| | | wayline_job j ON a.wayline_job_id = j.job_id::VARCHAR |
| | | WHERE |
| | | ( |
| | | FIND_IN_SET(#{lotInfoId}, j.lot_info_id) > 0 |
| | | #{lotInfoId} = ANY(string_to_array(j.lot_info_id, ',')::bigint[]) |
| | | OR j.lot_info_id = #{lotInfoId} |
| | | ) |
| | | AND a.result_type = 0 -- 根据您的需求,只查询成果类型为 0 (图片) 的数据 |
| | |
| | | <if test="param2.areaTypeKeyList != null and param2.areaTypeKeyList.size > 0"> |
| | | and ( |
| | | <foreach collection="param2.areaTypeKeyList" item="key" separator=" or "> |
| | | find_in_set(#{key}, ad.area_type_keys) |
| | | ARRAY_POSITION(string_to_array(ad.area_type_keys, ','), #{key}) IS NOT NULL |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | <if test="isSetSceneManage != null and isSetSceneManage == 1 and flyTime != null"> |
| | |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | and (dsm.effective_date_start is null or dsm.effective_date_start <= #{flyTime}) |
| | | and (dsm.effective_date_end is null or dsm.effective_date_end >= #{flyTime}) |
| | | ) |
| | |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | <if test="sceneId != null"> |
| | | or exists ( |
| | |
| | | and ds.id = #{sceneId} |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | ) |
| | |
| | | and ds.id = #{sceneId} |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | <if test="areaTypeKeyList != null and areaTypeKeyList.size > 0"> |
| | | and ( |
| | | <foreach collection="areaTypeKeyList" item="key" separator=" or "> |
| | | find_in_set(#{key}, ad.area_type_keys) |
| | | ARRAY_POSITION(string_to_array(ad.area_type_keys, ','), #{key}) IS NOT NULL |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | <if test="deviceIds != null and deviceIds.size > 0"> |
| | | and ( |
| | | <foreach collection="deviceIds" item="deviceId" separator=" or "> |
| | | find_in_set(#{deviceId}, replace(ad.device_ids, ' ', '')) |
| | | #{deviceId} = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | <if test="areaIds != null and areaIds.size > 0"> |
| | | and ( |
| | | <foreach collection="areaIds" item="areaId" separator=" or "> |
| | | find_in_set(#{areaId}, replace(ds.area_divide_ids, ' ', '')) |
| | | #{areaId} = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | ad.is_deleted = 0 |
| | | and ad.device_ids is not null |
| | | and ad.device_ids != '' |
| | | and find_in_set(#{deviceId}, replace(ad.device_ids, ' ', '')) |
| | | and #{deviceId} = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | from ja_fw_defense_scene ds |
| | | join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id::VARCHAR and dsm.is_deleted = 0 |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | ) as scene_name, |
| | | ( |
| | | select group_concat(distinct ds.scene_type) |
| | | select string_agg(distinct ds.scene_type, ',') |
| | | from ja_fw_defense_scene ds |
| | | join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id::VARCHAR and dsm.is_deleted = 0 |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | ) as scene_type, |
| | | case |
| | | when ad.device_ids is null or trim(ad.device_ids) = '' then 0 |
| | |
| | | from ja_fw_drone_alarm_record ar |
| | | join ja_fw_device d on d.id = ar.device_id::VARCHAR and d.is_deleted = 0 |
| | | where ar.is_deleted = 0 |
| | | and find_in_set(d.id, replace(ad.device_ids, ' ', '')) |
| | | and d.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | end as alarm_count, |
| | | case |
| | |
| | | from ja_fw_effect_eval ee |
| | | join ja_fw_device d on d.id = ee.device_id::VARCHAR and d.is_deleted = 0 |
| | | where ee.is_deleted = 0 |
| | | and find_in_set(d.id, replace(ad.device_ids, ' ', '')) |
| | | and d.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | end as counter_count, |
| | | case |
| | |
| | | join ja_fw_device d on d.id = ee.device_id::VARCHAR and d.is_deleted = 0 |
| | | where ee.is_deleted = 0 |
| | | and ee.counter_effect = '1' |
| | | and find_in_set(d.id, replace(ad.device_ids, ' ', '')) |
| | | and d.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | end as counter_success_count |
| | | from ja_fw_area_divide ad |
| | |
| | | from ja_fw_defense_scene ds |
| | | join ja_fw_defense_scene_manage dsm on dsm.defense_scene_id = ds.id::VARCHAR and dsm.is_deleted = 0 |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | ) |
| | | <if test="param2.id != null and param2.id != ''"> |
| | | and ad.id = #{param2.id} |
| | |
| | | select 1 |
| | | from ja_fw_defense_scene ds |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | and ds.scene_type = #{param2.sceneType} |
| | | ) |
| | | </if> |
| | |
| | | <if test="param2.areaTypeKeyList != null and param2.areaTypeKeyList.size > 0"> |
| | | and ( |
| | | <foreach collection="param2.areaTypeKeyList" item="key" separator=" or "> |
| | | find_in_set(#{key}, ad.area_type_keys) |
| | | ARRAY_POSITION(string_to_array(ad.area_type_keys, ','), #{key}) IS NOT NULL |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | ad.area_name, |
| | | ad.area_type_keys, |
| | | ( |
| | | select group_concat(distinct ds.scene_name) |
| | | select string_agg(distinct ds.scene_name, ',') |
| | | from ja_fw_defense_scene ds |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | ) as scene_name, |
| | | ( |
| | | select group_concat(distinct ds.scene_type) |
| | | select string_agg(distinct ds.scene_type, ',') |
| | | from ja_fw_defense_scene ds |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | ) as scene_type, |
| | | case |
| | | when ad.device_ids is null or trim(ad.device_ids) = '' then 0 |
| | |
| | | from ja_fw_drone_alarm_record ar |
| | | join ja_fw_device d on d.id = ar.device_id::VARCHAR and d.is_deleted = 0 |
| | | where ar.is_deleted = 0 |
| | | and find_in_set(d.id, replace(ad.device_ids, ' ', '')) |
| | | and d.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | end as alarm_count, |
| | | case |
| | |
| | | from ja_fw_effect_eval ee |
| | | join ja_fw_device d on d.id = ee.device_id::VARCHAR and d.is_deleted = 0 |
| | | where ee.is_deleted = 0 |
| | | and find_in_set(d.id, replace(ad.device_ids, ' ', '')) |
| | | and d.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | end as counter_count, |
| | | case |
| | |
| | | join ja_fw_device d on d.id = ee.device_id::VARCHAR and d.is_deleted = 0 |
| | | where ee.is_deleted = 0 |
| | | and ee.counter_effect = 'success' |
| | | and find_in_set(d.id, replace(ad.device_ids, ' ', '')) |
| | | and d.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | end as counter_success_count |
| | | from ja_fw_area_divide ad |
| | |
| | | </if> |
| | | GROUP BY |
| | | d.id |
| | | ) dd on find_in_set(dd.id, ad.device_ids) |
| | | ) dd on dd.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | <where> |
| | | ad.is_deleted = 0 |
| | | <if test="isSetSceneManage != null and isSetSceneManage == 1"> |
| | |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | <if test="isSetSceneManage != null and isSetSceneManage == 1 and flyTime != null"> |
| | |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | and (dsm.effective_date_start is null or dsm.effective_date_start <= #{flyTime}) |
| | | and (dsm.effective_date_end is null or dsm.effective_date_end >= #{flyTime}) |
| | | ) |
| | |
| | | where ds.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | <if test="sceneId != null"> |
| | | or exists ( |
| | |
| | | and ds.id = #{sceneId} |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | ) |
| | |
| | | and ds.id = #{sceneId} |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | <if test="areaTypeKeyList != null and areaTypeKeyList.size > 0"> |
| | | and ( |
| | | <foreach collection="areaTypeKeyList" item="key" separator=" or "> |
| | | find_in_set(#{key}, ad.area_type_keys) |
| | | ARRAY_POSITION(string_to_array(ad.area_type_keys, ','), #{key}) IS NOT NULL |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | from ja_fw_defense_scene_manage dsm |
| | | left join ja_fw_defense_scene ds on ds.id = dsm.defense_scene_id::VARCHAR and ds.is_deleted = 0 |
| | | where ds.is_deleted = 0 |
| | | and find_in_set(#{areaId}, ds.area_divide_ids) |
| | | and #{areaId} = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | and dsm.is_deleted = 0 |
| | | </select> |
| | | |
| | |
| | | ), 0) |
| | | from ja_fw_area_divide ad |
| | | where ad.is_deleted = 0 |
| | | and find_in_set(ad.id, ds.area_divide_ids) > 0 |
| | | and ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) |
| | | ) as device_count |
| | | from ja_fw_defense_scene_manage dsm |
| | | left join ja_fw_defense_scene ds on ds.id = dsm.defense_scene_id::VARCHAR and ds.is_deleted = 0 |
| | |
| | | ad.device_ids |
| | | FROM ja_fw_defense_scene_manage dsm |
| | | LEFT JOIN ja_fw_defense_scene ds ON ds.id = dsm.defense_scene_id::VARCHAR AND ds.is_deleted = 0 |
| | | LEFT JOIN ja_fw_area_divide ad ON FIND_IN_SET(ad.id, ds.area_divide_ids) > 0 AND ad.is_deleted = 0 |
| | | LEFT JOIN ja_fw_area_divide ad ON ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) AND ad.is_deleted = 0 |
| | | WHERE dsm.id = #{id} |
| | | ) ad ON CHAR_LENGTH(ad.device_ids) - CHAR_LENGTH(REPLACE(ad.device_ids, ',', '')) >= numbers.n - 1 |
| | | WHERE ad.device_ids IS NOT NULL AND ad.device_ids != '' |
| | |
| | | ds.scene_name as defense_scene_name |
| | | from ja_fw_defense_scene_manage dsm |
| | | left join ja_fw_defense_scene ds on ds.id = dsm.defense_scene_id::VARCHAR and ds.is_deleted = 0 |
| | | left join ja_fw_area_divide ad on FIND_IN_SET(ad.id, ds.area_divide_ids) > 0 and ad.is_deleted = 0 |
| | | left join ja_fw_area_divide ad on ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) and ad.is_deleted = 0 |
| | | inner join ( |
| | | SELECT |
| | | d.id |
| | |
| | | </if> |
| | | GROUP BY |
| | | d.id |
| | | ) dd on find_in_set(dd.id, ad.device_ids) |
| | | ) dd on dd.id = ANY(string_to_array(replace(ad.device_ids, ' ', ''), ',')::bigint[]) |
| | | <where> |
| | | dsm.is_deleted = 0 |
| | | <if test="time != null"> |
| | |
| | | where dz.is_deleted = 0 |
| | | and dz.defense_scene_ids is not null |
| | | and dz.defense_scene_ids != '' |
| | | and find_in_set(ds.id, dz.defense_scene_ids) |
| | | and ds.id = ANY(string_to_array(dz.defense_scene_ids, ',')::bigint[]) |
| | | ) |
| | | <if test="zoneId != null"> |
| | | or exists ( |
| | |
| | | and dz.id = #{zoneId} |
| | | and dz.defense_scene_ids is not null |
| | | and dz.defense_scene_ids != '' |
| | | and find_in_set(ds.id, dz.defense_scene_ids) |
| | | and ds.id = ANY(string_to_array(dz.defense_scene_ids, ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | ) |
| | |
| | | <if test="areaId != null and (filterSelected == null or filterSelected != 1)"> |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(#{areaId}, replace(ds.area_divide_ids, ' ', '')) |
| | | and #{areaId} = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | and dz.id = #{zoneId} |
| | | and dz.defense_scene_ids is not null |
| | | and dz.defense_scene_ids != '' |
| | | and find_in_set(ds.id, replace(dz.defense_scene_ids, ' ', '')) |
| | | and ds.id = ANY(string_to_array(replace(dz.defense_scene_ids, ' ', ''), ',')::bigint[]) |
| | | join ja_fw_area_divide ad on ad.is_deleted = 0 |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', '')) |
| | | and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | left join ja_fw_police_station ps on ps.id = ad.police_station_id::VARCHAR and ps.is_deleted = 0 |
| | | </select> |
| | | |
| | |
| | | <select id="selectFwEffectEvalPage" resultMap="fwEffectEvalResultMap"> |
| | | select |
| | | ee.*, |
| | | group_concat(distinct ad.area_name separator ',') as area_name, |
| | | group_concat(distinct ds.scene_name separator ',') as scene_name |
| | | string_agg(distinct ad.area_name, ',') as area_name, |
| | | string_agg(distinct ds.scene_name, ',') as scene_name |
| | | from ja_fw_effect_eval ee |
| | | left join ja_fw_area_divide ad on find_in_set(ee.device_id, ad.device_ids) and ad.is_deleted = 0 |
| | | left join ja_fw_defense_scene ds on find_in_set(ad.id, ds.area_divide_ids) and ds.is_deleted = 0 |
| | | left join ja_fw_area_divide ad on ee.device_id = ANY(string_to_array(ad.device_ids, ',')::bigint[]) and ad.is_deleted = 0 |
| | | left join ja_fw_defense_scene ds on ad.id = ANY(string_to_array(ds.area_divide_ids, ',')::bigint[]) and ds.is_deleted = 0 |
| | | <where> |
| | | ee.is_deleted = 0 |
| | | <if test="param2.deviceName != null and param2.deviceName != ''"> |
| | |
| | | ja_fw_defense_zone dz on dz.is_deleted = 0 |
| | | and dz.defense_scene_ids is not null |
| | | and dz.defense_scene_ids != '' |
| | | and find_in_set(dsm.id, replace(dz.defense_scene_ids, ' ', '')) |
| | | and dsm.id = ANY(string_to_array(replace(dz.defense_scene_ids, ' ', ''), ',')::bigint[]) |
| | | <where> |
| | | ts.is_deleted = 0 |
| | | <if test="param2.deviceName != null and param2.deviceName != ''"> |
| | |
| | | left join sys_config sc on sc.dept_id = bd.id::VARCHAR and sc.is_deleted = 0 |
| | | where bd.is_deleted = 0 |
| | | and ( |
| | | bd.id = #{deptId} |
| | | bd.id = #{deptId}::bigint |
| | | or bd.ancestors like concat('%',#{deptId},'%') |
| | | ) |
| | | and bd.dept_category = 1 |
| | |
| | | select |
| | | bm.* |
| | | from manage_device_per_share mdps |
| | | left join manage_device_per_menu mdpm on FIND_IN_SET(mdpm.id, mdps.device_per_menu_id) |
| | | left join blade_menu bm on FIND_IN_SET(bm.id, mdpm.menu_id) and mdpm.is_deleted = 0 |
| | | left join manage_device_per_menu mdpm on mdpm.id = ANY(string_to_array(mdps.device_per_menu_id, ',')::bigint[]) |
| | | left join blade_menu bm on bm.id = ANY(string_to_array(mdpm.menu_id, ',')::bigint[]) and mdpm.is_deleted = 0 |
| | | where |
| | | bm.is_deleted = 0 |
| | | AND category = 2 |
| | |
| | | |
| | | <!--角色查询--> |
| | | <select id="getRoleList" resultType="org.sxkj.system.entity.Role"> |
| | | WITH RECURSIVE role_tree AS ( |
| | | SELECT id, parent_id, role_name, role_alias |
| | | FROM blade_role |
| | | WHERE id = #{roleParam.roleId} AND is_deleted = 0 |
| | | UNION ALL |
| | | SELECT br.id, br.parent_id, br.role_name, br.role_alias |
| | | FROM blade_role br |
| | | INNER JOIN role_tree rt ON br.parent_id = rt.id |
| | | WHERE br.is_deleted = 0 AND br.id != 1123598816738675201 |
| | | ) |
| | | SELECT br.* FROM blade_role br |
| | | inner join ( |
| | | SELECT * FROM |
| | | ( |
| | | SELECT t1.*,IF( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), 0 ) AS ischild FROM |
| | | ( SELECT id, parent_id,role_name,role_alias FROM blade_role t where is_deleted =0 ORDER BY parent_id, id ) t1, |
| | | ( SELECT @pids := #{roleParam.roleId} ) t2 |
| | | ) t3 |
| | | WHERE id != 1123598816738675201 |
| | | INNER JOIN role_tree rt ON br.id = rt.id |
| | | <if test="roleParam.roleName!=null and roleParam.roleName!=''"> |
| | | and role_name like concat('%',#{roleParam.roleName},'%') |
| | | WHERE br.role_name like concat('%',#{roleParam.roleName},'%') |
| | | </if> |
| | | <if test="roleParam.roleAlias!=null and roleParam.roleAlias!=''"> |
| | | and role_alias like concat('%',#{roleParam.roleAlias},'%') |
| | | <choose> |
| | | <when test="roleParam.roleName!=null and roleParam.roleName!=''"> |
| | | AND br.role_alias like concat('%',#{roleParam.roleAlias},'%') |
| | | </when> |
| | | <otherwise> |
| | | WHERE br.role_alias like concat('%',#{roleParam.roleAlias},'%') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | ) t4 on br.id = t4.id::VARCHAR |
| | | <if test="roleParam.isNowLevel==0"> |
| | | union all |
| | | ( |
| | | SELECT * FROM blade_role where id = #{roleParam.roleId} |
| | | ) |
| | | UNION ALL |
| | | SELECT * FROM blade_role WHERE id = #{roleParam.roleId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | #数据源配置 |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.kingbase8.Driver |
| | | url: ${blade.datasource.dev.url} |
| | | username: ${blade.datasource.dev.username} |
| | | password: ${blade.datasource.dev.password} |
| | |
| | | </if> |
| | | <if test="lotInfoId != null and lotInfoId != ''"> |
| | | AND ( |
| | | FIND_IN_SET(#{lotInfoId}, wj.lot_info_id) > 0 |
| | | #{lotInfoId} = ANY(string_to_array(wj.lot_info_id, ',')::bigint[]) |
| | | OR wj.lot_info_id = #{lotInfoId} |
| | | ) |
| | | </if> |