Explorar o código

1、修改查询主从部门和员工的方法

zhoux %!s(int64=2) %!d(string=hai) anos
pai
achega
ba2aeb78ca
Modificáronse 1 ficheiros con 8 adicións e 2 borrados
  1. 8 2
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

+ 8 - 2
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -1310,7 +1310,10 @@
                                                 on tpo.order_id = tpmo.order_id
                             where tpmo.flg_valid
                               and tpmo.owner_type = any (array ['归属类型-主部门' , '归属类型-从部门'])
-                              and tpo.order_id = #{orderId}) mo
+        <if test="orderId!=null and orderId!='' ">
+            and tpo.order_id = #{orderId} ::uuid
+        </if>
+        ) mo
                            on mo.owner_id = t.org_id
         where t.flg_valid
 
@@ -1342,7 +1345,10 @@
                                                 on tpo.order_id = tpmo.order_id
                             where tpmo.flg_valid
                               and tpmo.owner_type = any (array ['归属类型-主员工' , '归属类型-从员工'])
-                              and tpo.order_id = #{orderId}) mo
+        <if test="orderId!=null and orderId!='' ">
+            and tpo.order_id = #{orderId} ::uuid
+        </if>
+                     ) mo
                            on mo.owner_id = t.staff_id
         where t.flg_valid