insert into book_car_detail(ma_id, order_status, order_company, order_user, address, creater, create_time)
values(#{maId}, 0, #{orderCompany}, #{orderUser}, #{address}, #{creater}, now())
delete from book_car_detail where id = #{id}
delete from book_car_detail where id in
#{id}
SELECT
bcd.id as id,
d.ma_id as maId,
d.code as code,
d.device_name as deviceName,
d.device_count as deviceCount,
d.type_id as typeId,
d.ma_status as maStatus,
d.brand as brand,
mt.type_name as typeName,
mt.manage_type as manageType,
d.production_date as productionDate,
d.working_hours as workingHours,
d.person as person,
d.person_phone as personPhone,
c.company_name as companyName,
c.company_id as companyId,
c.operate_address as operateAddress,
d.create_time as createTime,
bcd.order_user as orderUser,
bcd.address as address
FROM ma_dev_info d
LEFT JOIN bm_company_info c ON d.on_company = c.company_id
LEFT JOIN book_car_detail bcd ON d.ma_id = bcd.ma_id
LEFT JOIN ma_type mt ON d.type_id = mt.type_id and mt.del_flag = '0'
where d.is_active = '1' and bcd.order_status = '0'
and bcd.ma_id = #{maId}
and bcd.order_user = #{orderUser}
SELECT ma_id as maId,
order_user as orderUser
from book_car_detail
where ma_id = #{maId} and order_user = #{userId} and order_status = '0'