mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update 批量插入数据库
This commit is contained in:
@@ -31,6 +31,8 @@ public interface AdapayUnsplitRecordMapper {
|
||||
|
||||
int batchInsert(@Param("list") List<AdapayUnsplitRecord> list);
|
||||
|
||||
int batchInsertOrUpdateSelective(@Param("list") List<AdapayUnsplitRecord> list);
|
||||
|
||||
List<AdapayUnsplitRecord> queryUnsplitOrders(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
List<AdapayUnsplitRecordVO> queryList();
|
||||
|
||||
@@ -28,6 +28,8 @@ public interface AdapayUnsplitRecordService{
|
||||
|
||||
int batchInsert(List<AdapayUnsplitRecord> list);
|
||||
|
||||
int batchInsertOrUpdateSelective(List<AdapayUnsplitRecord> list);
|
||||
|
||||
List<AdapayUnsplitRecord> queryUnsplitOrders(String startTime, String endTime);
|
||||
|
||||
List<AdapayUnsplitRecordVO> queryList();
|
||||
|
||||
@@ -69,6 +69,11 @@ public class AdapayUnsplitRecordServiceImpl implements AdapayUnsplitRecordServic
|
||||
return adapayUnsplitRecordMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsertOrUpdateSelective(List<AdapayUnsplitRecord> list) {
|
||||
return adapayUnsplitRecordMapper.batchInsertOrUpdateSelective(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdapayUnsplitRecord> queryUnsplitOrders(String startTime, String endTime) {
|
||||
return adapayUnsplitRecordMapper.queryUnsplitOrders(startTime, endTime);
|
||||
|
||||
@@ -447,6 +447,32 @@
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
insert into adapay_unsplit_record
|
||||
(merchant_code, pay_time, payment_id, order_no, pay_amount, confirmed_split_amount,
|
||||
refund_amount, payment_revoke_amount, remaining_split_amount, order_code, pile_type,
|
||||
due_refund_amount, settle_amount, refund_flag, split_flag, update_time)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.merchantCode,jdbcType=VARCHAR}, #{item.payTime,jdbcType=TIMESTAMP}, #{item.paymentId,jdbcType=VARCHAR},
|
||||
#{item.orderNo,jdbcType=VARCHAR}, #{item.payAmount,jdbcType=DECIMAL}, #{item.confirmedSplitAmount,jdbcType=DECIMAL},
|
||||
#{item.refundAmount,jdbcType=DECIMAL}, #{item.paymentRevokeAmount,jdbcType=DECIMAL},
|
||||
#{item.remainingSplitAmount,jdbcType=DECIMAL}, #{item.orderCode,jdbcType=VARCHAR},
|
||||
#{item.pileType,jdbcType=VARCHAR}, #{item.dueRefundAmount,jdbcType=DECIMAL}, #{item.settleAmount,jdbcType=DECIMAL},
|
||||
#{item.refundFlag,jdbcType=VARCHAR}, #{item.splitFlag,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
merchant_code = values(merchant_code),
|
||||
pay_time = values(pay_time),
|
||||
order_no = values(order_no),
|
||||
pay_amount = values(pay_amount),
|
||||
confirmed_split_amount = values(confirmed_split_amount),
|
||||
refund_amount = values(refund_amount),
|
||||
payment_revoke_amount = values(payment_revoke_amount),
|
||||
remaining_split_amount = values(remaining_split_amount),
|
||||
order_code = values(order_code),
|
||||
update_time = values(update_time)
|
||||
</insert>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into adapay_unsplit_record
|
||||
|
||||
Reference in New Issue
Block a user