id, keyword, guide, scope, matching_rule, audit_status, editor_id, create_user, create_time, update_user, update_time, is_delete
select from book_keyword_warehouse where id = #{id,jdbcType=BIGINT}
select id, keyword, guide, scope, matching_rule, audit_status, editor_id from book_keyword_warehouse where id in #{item} order by id desc
select a.id, a.keyword, a.guide, a.matching_rule as matchingRule, editor_id as editorId, a.scope from book_keyword_warehouse a left join book_keyword_warehouse_detail b on a.id = b.keyword_id where a.is_delete = 0 and b.is_delete = 0 and a.keyword LIKE CONCAT('%', #{keyword},'%') and b.professional_label_id = #{professionalLabelId} and b.depth_label_id = #{depthLabelId} and b.purpose_label_id = #{purposeLabelId} and a.id = #{id} group by a.id order by a.create_time desc
SELECT a.keyword_id as keywordId, a.depth_label_id as depthLabelId, count(*) AS num FROM book_keyword_warehouse_detail a LEFT JOIN book_keyword_warehouse b ON a.keyword_id = b.id WHERE a.is_delete = 0 AND b.is_delete = 0 AND b.keyword = #{keyword} AND a.depth_label_id IN #{item}
insert into book_keyword_warehouse (id, keyword, guide, scope, matching_rule, audit_status, editor_id, create_user, create_time, update_user, update_time, is_delete) values (#{id,jdbcType=BIGINT}, #{keyword,jdbcType=VARCHAR}, #{guide,jdbcType=VARCHAR}, #{scope,jdbcType=INTEGER}, #{matchingRule,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{editorId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=INTEGER})
insert into book_keyword_warehouse id, guide, keyword, scope, matching_rule, audit_status, editor_id, create_user, create_time, update_user, update_time, is_delete, #{id,jdbcType=BIGINT}, #{guide,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{scope,jdbcType=INTEGER}, #{matchingRule,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{editorId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=INTEGER},
update book_keyword_warehouse keyword = #{keyword,jdbcType=VARCHAR}, scope = #{scope,jdbcType=INTEGER}, guide = #{guide,jdbcType=VARCHAR}, matching_rule = #{matchingRule,jdbcType=INTEGER}, audit_status = #{auditStatus,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER}, create_user = #{createUser,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_user = #{updateUser,jdbcType=INTEGER}, update_time = #{updateTime,jdbcType=TIMESTAMP}, is_delete = #{isDelete,jdbcType=INTEGER}, where id = #{id,jdbcType=BIGINT}
update book_keyword_warehouse set keyword = #{keyword,jdbcType=VARCHAR}, scope = #{scope,jdbcType=INTEGER}, guide = #{guide,jdbcType=VARCHAR}, matching_rule = #{matchingRule,jdbcType=INTEGER}, audit_status = #{auditStatus,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER}, create_user = #{createUser,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_user = #{updateUser,jdbcType=INTEGER}, update_time = #{updateTime,jdbcType=TIMESTAMP}, is_delete = #{isDelete,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}