自己写的,完全没问题

<?php
$data = [
    0=>[
   //id为主键
'id'=>1, 'type'=>3 ], 1=>[ 'id'=>2, 'type'=>3 ] ]; $OrderModel = new OrderModel(); $OrderModel->startTrans(); try{ $OrderModel->allowField(true)->isUpdate(true)->saveAll($data); }catch (\Exception $e){ $OrderModel->rollback(); return; } OrderModel->commit();

 

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-12-01
  • 2021-07-20
  • 2021-04-16
  • 2021-08-28
相关资源
相似解决方案