A.checklist_id,
A.item_id,
A.item_title,
A.item_code,
A.item_type,
A.item_remark,
A.parent_id,
A.is_fixed,
A.root_id,
A.node_left,
A.node_right,
A.node_level,
A.is_leaf,
A.sort_no
INSERT INTO checklist_item
oc_id,
checklist_id,
item_id,
item_title,
item_code,
item_type,
item_remark,
is_fixed,
parent_id,
root_id,
node_left,
node_right,
node_level,
is_leaf,
created_by,
created_at,
#{ocId ,jdbcType=BIGINT},
#{checklistId, jdbcType=BIGINT},
#{itemId, jdbcType=BIGINT},
#{itemTitle ,jdbcType=VARCHAR},
#{itemCode ,jdbcType=VARCHAR},
#{itemType, jdbcType=BIGINT},
#{itemRemark ,jdbcType=VARCHAR},
#{isFixed ,jdbcType=BIGINT},
#{parentId ,jdbcType=BIGINT},
#{rootId ,jdbcType=BIGINT},
#{nodeLeft ,jdbcType=BIGINT},
#{nodeRight ,jdbcType=BIGINT},
#{nodeLevel ,jdbcType=BIGINT},
#{isLeaf ,jdbcType=BIGINT},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
UPDATE checklist_item
item_title = #{itemTitle, jdbcType=VARCHAR},
item_code = #{itemCode, jdbcType=VARCHAR},
item_type = #{itemType, jdbcType=BIGINT},
item_remark = #{itemRemark, jdbcType=VARCHAR},
is_fixed = #{isFixed ,jdbcType=BIGINT},
parent_id = #{parentId ,jdbcType=BIGINT},
root_id = #{rootId ,jdbcType=BIGINT},
node_left = #{nodeLeft ,jdbcType=BIGINT},
node_right = #{nodeRight ,jdbcType=BIGINT},
node_level = #{nodeLevel ,jdbcType=BIGINT},
is_leaf = #{isLeaf ,jdbcType=BIGINT},
updated_by = #{updatedBy ,jdbcType=BIGINT},
updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND checklist_id = #{checklistId ,jdbcType=BIGINT}
AND item_id = #{itemId ,jdbcType=BIGINT}
UPDATE checklist_item
deleted_flag = #{deletedFlag,jdbcType=BIGINT},
deleted_time = #{deletedTime,jdbcType=VARCHAR},
deleted_by = #{deletedBy,jdbcType=BIGINT},
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND checklist_id = #{checklistId ,jdbcType=BIGINT}
AND item_id = #{itemId ,jdbcType=BIGINT}
= #{nodeLeft ,jdbcType=BIGINT}
AND node_right <= #{nodeRight ,jdbcType=BIGINT}
]]>