select tm.obj_id,
tm.team_code,
tm.team_name,
tm.team_head,
tm.product_line_code,
bpl.PRODUCT_LINE_NAME productLineName,
tm.is_flag,
tm.created_by,
tm.created_time,
tm.updated_by,
tm.updated_time
from base_teammembers tm
left join base_productline bpl on bpl.PRODUCT_LINE_CODE = tm.PRODUCT_LINE_CODE
SELECT seq_base_teammembers.NEXTVAL as objId FROM DUAL
insert into base_teammembers
obj_id,
team_code,
team_name,
team_head,
product_line_code,
is_flag,
created_by,
created_time,
updated_by,
updated_time,
#{objId},
#{teamCode},
#{teamName},
#{teamHead},
#{productLineCode},
#{isFlag},
#{createdBy},
#{createdTime},
#{updatedBy},
#{updatedTime},
update base_teammembers
team_code = #{teamCode},
team_name = #{teamName},
team_head = #{teamHead},
product_line_code = #{productLineCode},
is_flag = #{isFlag},
created_by = #{createdBy},
created_time = #{createdTime},
updated_by = #{updatedBy},
updated_time = #{updatedTime},
where obj_id = #{objId}
delete from base_teammembers where obj_id = #{objId}
delete from base_teammembers where obj_id in
#{objId}