select ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number,
pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time,
creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by
from ma_dev_info
insert into ma_dev_info
device_name,
device_weight,
device_type,
device_count,
code,
identify_code,
type_id,
ma_status,
lease_scope,
location,
province_id,
city_id,
area_id,
brand,
model_name,
production_date,
working_hours,
serial_number,
pic_url,
js_month_price,
js_day_price,
`description`,
gps_code,
own_co,
person,
person_phone,
create_time,
creator,
update_time,
update_by,
specification,
deposit,
is_operator,
is_active,
update_by,
own_id,
check_date,
check_cycle,
is_zone,
zone_id,
buy_price,
item_type_model,
#{deviceName},
#{deviceWeight},
#{deviceType},
#{deviceCount},
#{code},
#{identifyCode},
#{typeId},
#{maStatus},
#{leaseScope},
#{location},
#{provinceId},
#{cityId},
#{areaId},
#{brand},
#{modelName},
#{productionDate},
#{workingHours},
#{serialNumber},
#{picUrl},
#{jsMonthPrice},
#{jsDayPrice},
#{description},
#{gpsCode},
#{companyId},
#{person},
#{personPhone},
now(),
#{creator},
now(),
#{update_by},
#{specification},
#{deposit},
#{isOperator},
#{isActive},
#{updateBy},
#{ownId},
#{checkDate},
#{checkCycle},
#{isZone},
#{zoneId},
#{buyPrice},
#{itemTypeModel},
insert into gps_real_info
gps_code,
lon,
lat,
#{dto.gpsCode},
#{dto.lon},
#{dto.lat},
update ma_dev_info
code = #{code},
identify_code = #{identifyCode},
device_name = #{deviceName},
device_weight = #{deviceWeight},
device_count = #{deviceCount},
type_id = #{typeId},
ma_status = #{maStatus},
lease_scope = #{leaseScope},
location = #{location},
province_id = #{provinceId},
city_id = #{cityId},
area_id = #{areaId},
brand = #{brand},
model_name = #{modelName},
production_date = #{productionDate},
working_hours = #{workingHours},
serial_number = #{serialNumber},
pic_url = #{picUrl},
js_month_price = #{jsMonthPrice},
js_day_price = #{jsDayPrice},
`description` = #{description},
gps_code = #{gpsCode},
own_co = #{companyId},
person = #{person},
person_phone = #{personPhone},
specification = #{specification},
deposit = #{deposit},
is_active = #{isOperator},
check_date = #{checkDate},
check_cycle = #{checkCycle},
is_zone = #{isZone},
zone_id = #{zoneId},
buy_price = #{buyPrice},
item_type_model = #{itemTypeModel},
update_time = now()
where ma_id = #{maId}
update ma_dev_info set is_active = '0'
where ma_id = #{maId,jdbcType=BIGINT} and is_active = '1' and ma_status != #{statusCode,jdbcType=INTEGER}
update ma_dev_info set is_active='0' where ma_id in
#{maId}
INSERT INTO ma_hot_search (ma_id, search_num, create_time)
VALUES (#{maId}, 1, now())
update ma_hot_search
set search_num = search_num + 1,
update_time = now()
where ma_id = #{maId}
update ma_dev_info
set ma_status = #{maStatus} ,update_time = now()
where ma_id = #{maIds[0]}
update ma_dev_info
set ma_status = #{maStatus},update_time = now()
where ma_id in
#{maId}
update ma_dev_info set ma_status = #{maStatus} where ma_id = #{maId} and is_active = 1
update ma_dev_info set is_qc = 1 where ma_id = #{maId} and is_active = 1
update ma_dev_info set is_safe_book = 1 where ma_id = #{maId} and is_active = 1
delete from ma_dev_info_properties where ma_id = #{maId}
delete from ma_dev_info_properties where ma_id in
#{maId}
insert into
ma_dev_info_properties(ma_id, property_name, property_value, create_time)
values
(
#{maId},
#{item.propertyName},
#{item.propertyValue},
now()
)
insert into ma_dev_info
device_name,
device_weight,
device_count,
code,
identify_code,
type_id,
ma_status,
lease_scope,
location,
province_id,
city_id,
area_id,
brand,
model_name,
production_date,
working_hours,
serial_number,
pic_url,
js_month_price,
js_day_price,
`description`,
gps_code,
own_co,
person,
person_phone,
create_time,
creator,
update_time,
update_by,
specification,
deposit,
is_operator,
is_active,
update_by,
own_id,
check_date,
check_cycle,
#{deviceName},
#{deviceWeight},
#{deviceCount},
#{code},
#{identifyCode},
#{typeId},
#{maStatus},
#{leaseScope},
#{location},
#{provinceId},
#{cityId},
#{areaId},
#{brand},
#{modelName},
#{productionDate},
#{workingHours},
#{serialNumber},
#{picUrl},
#{jsMonthPrice},
#{jsDayPrice},
#{description},
#{gpsCode},
#{companyId},
#{person},
#{personPhone},
now(),
#{creator},
now(),
#{update_by},
#{specification},
#{deposit},
#{isOperator},
1,
#{updateBy},
#{ownId},
#{checkDate},
#{checkCycle}
update ma_dev_info set total_up_day = IFNULL(total_up_day, 0) + 1
where is_active = '1' and ma_status = '2'
update ma_dev_info set total_lease_day = IFNULL(total_lease_day, 0) + 1
where is_active = '1' and ma_status = '3'
update ma_type set lease_price = #{dayLeasePrice}
where type_id = #{typeId}