qin před 1 rokem
rodič
revize
985f3b67b1

+ 2 - 3
src/main/resources/mapper/statistics/OrderMapper.xml

@@ -61,9 +61,8 @@
     </select>
 
     <select id="areaList" resultType="com.poteviohealth.cgp.common.integrated.partner.model.AreaDTO">
-        select id,parent as parentId,name,tree_path,
-               case when LENGTH(region_area_code)&gt;9 then LEFT(region_area_code,9) else region_area_code end as region_area_code,
-               (LENGTH(tree_path) - LENGTH(replace(tree_path,',',''))) as `level`
+        select id,parent as parentId,name,tree_path, region_area_code,
+               (LENGTH(tree_path) - LENGTH(replace(tree_path,',','')))-1 as `level`
         from ${dbName}_common.f_area
         where yn = 0
         and parent is not null