修改更新逻辑

ljl-dsPurchaseOrder^2^2
wangchaoxu 1 year ago
parent aa1b5bb8c1
commit 692a225097

@ -447,7 +447,15 @@ public class OpOrderServiceImpl implements OpOrderService {
OpOrder insertOrderData = BeanUtil.toBean(orderInfo, OpOrder.class);
log.info("start insertUpdateOpOrder {}", insertOrderData);
opOrderMapper.insertOrUpdate(insertOrderData);
OpOrder orderObj = opOrderMapper.selectByOrderId(order.getOrderId());
if (orderObj == null) {
opOrderMapper.insertSelective(insertOrderData);
} else {
OpOrder updateOrderData = insertOrderData;
updateOrderData.setGmtCreate(null);
updateOrderData.setOpOrderId(orderObj.getOpOrderId());
opOrderMapper.updateByPrimaryKeySelective(updateOrderData);
}
// TODO: 2023/8/31 op_order_user_open_id
// log.info("start saveOpOrderUserOpenId ");

Loading…
Cancel
Save