Commit 8ed81495 by 傅伟强-富德

Update test.txt

1 parent d885700e
Showing with 39 additions and 1 deletions
......@@ -197,7 +197,45 @@
testSearch(policyNolist);
grasPolicyGeo.setCreatedUser(MyConstant.SYS_USER);
grasPolicyGeo.setUpdatedUser(MyConstant.SYS_USER);
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
MERGE INTO GRAS_POLICY_GEO T
USING (
<foreach collection="list" item="item" index="index" separator="union">
(SELECT
#{item.policyNo} AS POLICY_NO,
#{item.lon} AS LON,
#{item.lat} AS LAT,
#{item.createdUser} AS CREATED_USER,
#{item.updatedUser} AS UPDATED_USER
FROM dual)
</foreach>) T1
ON(T1.POLICY_NO = T.POLICY_NO)
WHEN MATCHED THEN
UPDATE SET
T.LON=T1.LON,
T.LAT=T1.LAT,
T.UPDATED_USER=T1.UPDATED_USER
WHEN NOT MATCHED THEN
INSERT
(
T.POLICY_NO,
T.LON,
T.LAT,
T.CREATED_USER,
T.UPDATED_USER
)
VALUES
(
T1.POLICY_NO,
T1.LON,
T1.LAT,
T1.CREATED_USER,
T1.UPDATED_USER
)
</insert>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!