insert into c_comment(comment_id,user_id,b_id,comment_type_cd,out_id,month,status_cd)
values(#{commentId},#{userId},#{bId},#{commentTypeCd},#{outId},#{month},'0')
insert into c_sub_comment(sub_comment_id,comment_id,parent_sub_comment_id,b_id,sub_comment_type_cd,comment_context,month,status_cd)
values(#{subCommentId},#{commentId},#{parentSubCommentId},#{bId},#{subCommentTypeCd},#{commentContext},#{month},'0')
insert into c_sub_comment_attr(sub_comment_id,b_id,attr_id,spec_cd,value,month,status_cd)
values(#{subCommentId},#{bId},#{attrId},#{specCd},#{value},#{month},'0')
update c_comment c set c.status_cd = #{statusCd}
,c.b_id = #{newBId}
where 1=1
and c.b_id = #{bId}
and c.comment_id = #{commentId}
update c_sub_comment sc set sc.status_cd = #{statusCd}
,sc.b_id = #{newBId}
where 1=1
and sc.b_id = #{bId}
and sc.sub_comment_id = #{subCommentId}
and sc.comment_id = #{commentId}
update c_sub_comment_attr bca set bca.status_cd = #{statusCd}
,bca.b_id = #{newBId}
,bca.value = #{value}
where 1=1
and bca.b_id = #{bId}
and bca.sub_comment_id = #{subCommentId}
and bca.spec_cd = #{specCd}
and bca.attr_id = #{attrId}
insert into c_sub_comment_photo(comment_photo_id,b_id,sub_comment_id,comment_photo_type_cd,photo,month,status_cd)
values(#{commentPhotoId},#{bId},#{subCommentId},#{commentPhotoTypeCd},#{photo},#{month},'0')
update c_sub_comment_photo scp set scp.status_cd = #{statusCd}
,scp.b_id = #{newBId}
where 1=1
and scp.b_id = #{bId}
and scp.comment_photo_id = #{commentPhotoId}
insert into c_comment_score(comment_score_id,b_id,comment_id,score_type_cd,value,month,status_cd)
values(#{commentScoreId},#{bId},#{commentId},#{scoreTypeCd},#{value},#{month},'0')
update c_comment_score cs set cs.status_cd = #{statusCd}
,cs.b_id = #{newBId}
where 1=1
and cs.b_id = #{bId}
and cs.comment_score_id = #{commentScoreId}
and cs.comment_id = #{commentId}