瀏覽代碼

修复点号规则为空时,查询可能异常的问题

欧阳劲驰 1 月之前
父節點
當前提交
1506ea0b1b
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main/resources/mapper/GisSurveyJobInfoMapper.xml

+ 4 - 1
src/main/resources/mapper/GisSurveyJobInfoMapper.xml

@@ -14,7 +14,10 @@
         (rf->>'ordering')::int2 as ordering
         from
         v_k3_gis_survey_job_info,
-        jsonb_array_elements(rule_format::jsonb) as rf
+        jsonb_array_elements(coalesce(
+        nullif(rule_format, '')::jsonb,
+        '[]'::jsonb
+        )) as rf
         where uid = #{uid,jdbcType=VARCHAR};
     </select>