insert into trouble_rectify_task(id,rectify_id,trouble_id,trouble_code,
trouble_area,point,question_briefly,trouble_des,trouble_photo,trouble_type,
trouble_origin,rectify_status,review_status)
select a.id,a.rectify_id,a.trouble_id,a.trouble_code, a.trouble_area,point,
a.question_briefly,a.trouble_des,a.trouble_photo,a.trouble_type, a.trouble_origin,
a.rectify_status,a.review_status
from
<foreach item="item" index="index" collection="ids.split(',')" open="(" separator="union" close=") a">
select replace(uuid(),'-','') as id,#{rectifyId} as rectify_id,id as trouble_id,trouble_code,
trouble_area,point,question_briefly,trouble_des,trouble_photo,trouble_type,
trouble_origin, '1' as rectify_status,'0' as review_status from trouble_list where id=#{item}
</foreach>
mybits传入id字符串,查询并插入
最新推荐文章于 2024-07-03 03:14:17 发布