select model_id,
model_name,
product_id,
product_name,
tenant_id,
tenant_name,
identifier,
type,
datatype,
temp_slave_id,
formula,
specs,
is_chart,
is_share_perm,
is_history,
reverse_formula,
reg_addr,
is_monitor,
del_flag,
bit_option,
value_type,
create_by,
create_time,
update_by,
update_time,
remark,
is_readonly,
model_order,
quantity,
code,
parse_type
from iot_things_model
insert into iot_things_model
model_name,
product_id,
product_name,
tenant_id,
tenant_name,
identifier,
type,
datatype,
temp_slave_id,
formula,
specs,
is_chart,
is_share_perm,
is_history,
reverse_formula,
reg_addr,
is_monitor,
del_flag,
bit_option,
value_type,
create_by,
create_time,
update_by,
update_time,
remark,
is_readonly,
model_order,
quantity,
code,
parse_type,
#{modelName},
#{productId},
#{productName},
#{tenantId},
#{tenantName},
#{identifier},
#{type},
#{datatype},
#{tempSlaveId},
#{formula},
#{specs},
#{isChart},
#{isSharePerm},
#{isHistory},
#{reverseFormula},
#{regAddr},
#{isMonitor},
#{delFlag},
#{bitOption},
#{valueType},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
#{isReadonly},
#{modelOrder},
#{quantity},
#{code},
#{parseType},
insert into iot_things_model (
model_name,product_id,product_name,tenant_id,tenant_name,identifier,type,
datatype,specs,is_chart,is_share_perm,is_history,is_monitor,is_readonly,create_by,create_time,temp_slave_id,formula,
reverse_formula,reg_addr,bit_option,value_type,quantity,code,parse_type
)
values
#{model.modelName},#{model.productId},#{model.productName},#{model.tenantId},#{model.tenantName}
,#{model.identifier},#{model.type},#{model.datatype},#{model.specs}
,#{model.isChart},#{model.isSharePerm},#{model.isHistory},#{model.isMonitor},#{model.isReadonly},#{model.createBy},#{model.createTime},
#{model.tempSlaveId},#{model.formula},#{model.reverseFormula},#{model.regAddr},
#{model.bitOption},#{model.valueType},#{model.quantity},#{model.code},#{model.parseType}
update iot_things_model
model_name = #{modelName},
product_id = #{productId},
product_name = #{productName},
tenant_id = #{tenantId},
tenant_name = #{tenantName},
identifier = #{identifier},
type = #{type},
datatype = #{datatype},
temp_slave_id = #{tempSlaveId},
formula = #{formula},
specs = #{specs},
is_chart = #{isChart},
is_share_perm = #{isSharePerm},
is_history = #{isHistory},
reverse_formula = #{reverseFormula},
reg_addr = #{regAddr},
is_monitor = #{isMonitor},
del_flag = #{delFlag},
bit_option = #{bitOption},
value_type = #{valueType},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
is_readonly = #{isReadonly},
model_order = #{modelOrder},
quantity =#{quantity},
code = #{code},
parse_type= #{parseType},
where model_id = #{modelId}
delete
from iot_things_model
where model_id = #{modelId}
delete from iot_things_model where model_id in
#{modelId}
delete from iot_things_model where product_id = #{productId}