select ID, COMPANY_ID, PARENT_ID, ANCESTORS, NAME, DESCRIPTION, VALID_FLAG, DEL_FLAG, CREATE_BY, CREATOR_ID, CREATE_TIME, UPDATE_BY, UPDATOR_ID, UPDATE_TIME, REMARK from MODEL_CLASSIFY
select ID,ANCESTORS from MODEL_CLASSIFY
and COMPANY_ID = #{companyId}
and PARENT_ID = #{parentId}
and ANCESTORS = #{ancestors}
and NAME like concat('%', #{name}, '%')
and DESCRIPTION = #{description}
and CREATE_TIME = #{createTime}
where ID = #{id}
where find_in_set(#{classifyId}, ancestors) and DEL_FLAG = 0
insert into MODEL_CLASSIFY ID, COMPANY_ID, PARENT_ID, ANCESTORS, NAME, DESCRIPTION, VALID_FLAG, DEL_FLAG, CREATE_BY, CREATOR_ID, CREATE_TIME, UPDATE_BY, UPDATOR_ID, UPDATE_TIME, REMARK, #{id}, #{companyId}, #{parentId}, #{ancestors}, #{name}, #{description}, #{validFlag}, #{delFlag}, #{createBy}, #{creatorId}, #{createTime}, #{updateBy}, #{updatorId}, #{updateTime}, #{remark},
update MODEL_CLASSIFY COMPANY_ID = #{companyId}, PARENT_ID = #{parentId}, ANCESTORS = #{ancestors}, NAME = #{name}, DESCRIPTION = #{description}, VALID_FLAG = #{validFlag}, DEL_FLAG = #{delFlag}, CREATE_BY = #{createBy}, CREATOR_ID = #{creatorId}, CREATE_TIME = #{createTime}, UPDATE_BY = #{updateBy}, UPDATOR_ID = #{updatorId}, UPDATE_TIME = #{updateTime}, REMARK = #{remark}, where ID = #{id}
delete from MODEL_CLASSIFY where ID = #{id}
delete from MODEL_CLASSIFY where ID in #{id}