这个是自定义sql:
insert into ops_meter_abnorm
(bar_project_id,
bar_building_id,
bar_container_id,
meter_id,
bar_measure_type,
stat_date,
acti_power_s)
SELECT
b.bar_project_id,
b.bar_building_id,
b.bar_container_id,
b.bar_measure_no,
b.bar_measure_type,
date_add(?, interval -1 day),
a.zxygzdl
FROM
col_task a inner join bar_measure b
on a.meterNo = b.bar_measure_no
and a.sjsj = date_add(?, interval -1 day);
ops_meter_abnorm是实体类,id是uuid。
现在执行这个自定义sql报错:CaseMessage=Field 'id' doesn't have a default value
请问下有啥办法能批量生成uuid?或者类似的解决方法