select id,cmpt_id as cmptId,field_name as fieldName,field_type as fieldType,field_index as fieldIndex from gk_cmpt_score_field where cmpt_id=#{cmptId} order by index
</select>
<insertid="insert">
INSERT INTO gk_cmpt_score_field (cmpt_id,field_name,field_type,field_index) VALUES(#cmptId,#fieldName,#fieldType,#fieldIndex)
</insert>
<updateid="update">
UPDATE gk_cmpt_score_field set cmpt_id=#{cmptId},field_name=#{fieldName},field_type=#{fieldType},field_index=#{fieldIndex} where id=#{id}