id, keyword_id, professional_label_id, depth_label_id, purpose_label_id, group_id, product_id, product_type, channel_id, type_code, description, content, link_url, pic_url, use_num, create_user, create_time, update_user, update_time, is_delete
update book_keyword_warehouse_detail set use_num = use_num + 1, update_user = #{adviserId}, update_time = NOW() where id = #{id,jdbcType=BIGINT}
SELECT a.keyword_id as keywordId, a.id as keywordDetailId, b.guide, a.description, a.content, a.link_url as linkUrl, a.pic_url as picUrl, a.product_id as productId, a.product_type as productType, a.channel_id as channelId, a.type_code as typeCode, b.keyword, b.matching_rule as matchingRule, a.use_num as useNum, b.guide 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.editor_id = #{adviserId} and b.scope = 0 and (b.scope = 0 or b.editor_id = #{adviserId}) and a.depth_label_id = #{depthLabelId} and b.keyword like CONCAT('%', #{keyword},'%') ORDER BY a.use_num DESC, a.create_time DESC
update book_keyword_warehouse_detail set is_delete = 1 where keyword_id = #{keywordId} and is_delete = 0
select from book_keyword_warehouse_detail where id = #{id,jdbcType=BIGINT}
select from book_keyword_warehouse_detail where is_delete = 0 and keyword_id in #{item} ORDER BY id ASC
insert into book_keyword_warehouse_detail (id, keyword_id, professional_label_id, depth_label_id, purpose_label_id, group_id, product_id, product_type, channel_id, type_code, description,content, link_url, pic_url, use_num, create_user, create_time, update_user, update_time, is_delete) values (#{id,jdbcType=BIGINT}, #{keywordId,jdbcType=INTEGER}, #{professionalLabelId,jdbcType=INTEGER}, #{depthLabelId,jdbcType=INTEGER}, #{purposeLabelId,jdbcType=INTEGER}, #{groupId,jdbcType=CHAR}, #{productId,jdbcType=INTEGER},#{productType,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER},#{typeCode,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR}, #{linkUrl,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, #{useNum,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=INTEGER})
insert into book_keyword_warehouse_detail (keyword_id, professional_label_id, depth_label_id, purpose_label_id, group_id, product_id, product_type, channel_id, type_code, description,content, link_url, pic_url, use_num, create_user, create_time, update_user, update_time, is_delete) values (#{item.keywordId,jdbcType=INTEGER}, #{item.professionalLabelId,jdbcType=INTEGER}, #{item.depthLabelId,jdbcType=INTEGER}, #{item.purposeLabelId,jdbcType=INTEGER}, #{item.groupId,jdbcType=CHAR}, #{item.productId,jdbcType=INTEGER},#{item.productType,jdbcType=VARCHAR}, #{item.channelId,jdbcType=INTEGER}, #{item.typeCode,jdbcType=VARCHAR},#{item.description,jdbcType=VARCHAR},#{item.content,jdbcType=VARCHAR}, #{item.linkUrl,jdbcType=VARCHAR}, #{item.picUrl,jdbcType=VARCHAR}, #{item.useNum,jdbcType=INTEGER}, #{item.createUser,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUser,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.isDelete,jdbcType=INTEGER})
insert into book_keyword_warehouse_detail id, keyword_id, professional_label_id, depth_label_id, purpose_label_id, group_id, product_id, product_type, channel_id, type_code, content, use_num, create_user, create_time, update_user, update_time, is_delete, #{id,jdbcType=BIGINT}, #{keywordId,jdbcType=INTEGER}, #{professionalLabelId,jdbcType=INTEGER}, #{depthLabelId,jdbcType=INTEGER}, #{purposeLabelId,jdbcType=INTEGER}, #{groupId,jdbcType=CHAR}, #{productId,jdbcType=INTEGER}, #{productType,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER}, #{typeCode,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{useNum,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=INTEGER},
update book_keyword_warehouse_detail keyword_id = #{keywordId,jdbcType=INTEGER}, professional_label_id = #{professionalLabelId,jdbcType=INTEGER}, depth_label_id = #{depthLabelId,jdbcType=INTEGER}, purpose_label_id = #{purposeLabelId,jdbcType=INTEGER}, group_id = #{groupId,jdbcType=CHAR}, product_id = #{productId,jdbcType=INTEGER}, product_type = #{productType,jdbcType=VARCHAR}, channel_id = #{channelId,jdbcType=INTEGER}, type_code = #{typeCode,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR}, use_num = #{useNum,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_detail set keyword_id = #{keywordId,jdbcType=INTEGER}, professional_label_id = #{professionalLabelId,jdbcType=INTEGER}, depth_label_id = #{depthLabelId,jdbcType=INTEGER}, purpose_label_id = #{purposeLabelId,jdbcType=INTEGER}, group_id = #{groupId,jdbcType=CHAR}, product_id = #{productId,jdbcType=INTEGER}, product_type = #{productType,jdbcType=VARCHAR}, channel_id = #{channelId,jdbcType=INTEGER}, content = #{content,jdbcType=VARCHAR}, type_code = #{typeCode,jdbcType=VARCHAR}, use_num = #{useNum,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}