id, type, create_time, update_time, robot_wx_id, time_span, seq_num
select from pcloud_guide where id = #{id,jdbcType=INTEGER}
delete from pcloud_guide where id = #{id,jdbcType=INTEGER}
insert into pcloud_guide (type, create_time, update_time, robot_wx_id, time_span, seq_num, pcloud_classify_id) values (#{type,jdbcType=VARCHAR}, now(), now(), #{robotWxId,jdbcType=INTEGER}, #{timeSpan,jdbcType=INTEGER}, #{seqNum,jdbcType=INTEGER}, #{pcloudClassifyId})
insert into pcloud_guide id, type, create_time, update_time, robot_wx_id, time_span, seq_num, #{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{robotWxId,jdbcType=INTEGER}, #{timeSpan,jdbcType=INTEGER}, #{seqNum,jdbcType=INTEGER},
update pcloud_guide type = #{type,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, robot_wx_id = #{robotWxId,jdbcType=INTEGER}, time_span = #{timeSpan,jdbcType=INTEGER}, seq_num = #{seqNum,jdbcType=INTEGER}, where id = #{id,jdbcType=INTEGER}
update pcloud_guide set update_time = now(), time_span = #{timeSpan,jdbcType=INTEGER}, seq_num = #{seqNum,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
select ifnull(max(seq_num), 0) from pcloud_guide where 1=1 and robot_wx_id = #{robotWxId} and pcloud_classify_id = #{pcloudClassifyId} and type = 0
SELECT ifnull(count(1), 0) FROM ( SELECT a.id FROM pcloud_guide a LEFT JOIN pcloud_guide_message b ON a.id = b.pcloud_guide_id WHERE 1=1 and robot_wx_id = #{robotWxId} and type = 0 and content like concat('%', #{search}, '%') and pcloud_classify_id = #{pcloudClassifyId} GROUP BY a.id ) s
SELECT a.id pcloudGuideId, a.type, a.time_span timeSpan, a.seq_num seqNum FROM pcloud_guide a LEFT JOIN pcloud_guide_message b ON a.id = b.pcloud_guide_id WHERE 1=1 and robot_wx_id = #{robotWxId} and type = 0 and content like concat('%', #{search}, '%') and pcloud_classify_id = #{pcloudClassifyId} GROUP BY a.id ORDER BY seq_num ASC limit #{pageNum}, #{numPerPage}
update pcloud_guide set seq_num = #{seqNum} where id = #{id}
SELECT id, time_span, seq_num FROM pcloud_guide WHERE robot_wx_id = #{robotId} ORDER BY seq_num ASC
SELECT id, time_span, seq_num FROM pcloud_guide WHERE robot_wx_id = #{robotId} ORDER BY seq_num ASC LIMIT #{num}, 1
select id from pcloud_guide where robot_wx_id = #{robotWxId}
SELECT id, time_span, seq_num FROM pcloud_guide WHERE pcloud_classify_id = #{pcloudClassifyId} ORDER BY seq_num ASC LIMIT #{num}, 1