feat: 兼容Oracle
1.調整union裡帶有order by異常 2.移除saveBatch refs: #
This commit is contained in:
parent
2a3fc7942d
commit
7619fc7d14
@ -223,8 +223,8 @@ public class QmsInspecJobServiceImpl extends ServiceImpl<QmsInspecJobMapper, Qms
|
||||
|
||||
saveOrUpdate(qmsInspecJob);
|
||||
removeDetails(inspecJobBo);
|
||||
qmsInspecDetailService.saveBatch(qmsInspecDetails);
|
||||
qmsInspecFactorService.saveBatch(qmsInspecFactors);
|
||||
qmsInspecDetails.forEach(qmsInspecDetailService::save);
|
||||
qmsInspecFactors.forEach(qmsInspecFactorService::save);
|
||||
return qmsInspecJob;
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
top 1
|
||||
</if>
|
||||
ITEM
|
||||
from ((select
|
||||
from (( select * from (select
|
||||
<if test=" _databaseId == 'mssql'">
|
||||
top 1
|
||||
</if>
|
||||
@ -73,6 +73,7 @@
|
||||
join item d on b.ITEM_BO = d.HANDLE
|
||||
where b.SITE = #{site}
|
||||
and a.STATUS = 'R'
|
||||
and c.RESRCE = #{resource}
|
||||
<if test=" _databaseId == 'oracle'">
|
||||
and rownum = 1
|
||||
</if>
|
||||
@ -80,9 +81,9 @@
|
||||
<if test=" _databaseId == 'mysql'">
|
||||
limit 1
|
||||
</if>
|
||||
)
|
||||
) a1 )
|
||||
union all
|
||||
(select
|
||||
( select * from (select
|
||||
<if test=" _databaseId == 'mssql'">
|
||||
top 1
|
||||
</if>
|
||||
@ -100,7 +101,7 @@
|
||||
<if test=" _databaseId == 'mysql'">
|
||||
limit 1
|
||||
</if>
|
||||
)) a
|
||||
) a2 )) a
|
||||
<if test=" _databaseId == 'oracle'">
|
||||
where rownum = 1
|
||||
</if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user