id, pid, moments_id, uid, no, nick, type,
state, content, like_num, admin_id, create_time
SELECT LAST_INSERT_ID()
insert into moments_comment (pid, moments_id, uid,
no, nick, type,
state, content, like_num,
admin_id, create_time)
values (#{pid,jdbcType=INTEGER}, #{momentsId,jdbcType=INTEGER}, #{uid,jdbcType=BIGINT},
#{no,jdbcType=BIGINT}, #{nick,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{state,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{likeNum,jdbcType=INTEGER},
#{adminId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
SELECT LAST_INSERT_ID()
insert into moments_comment
pid,
moments_id,
uid,
no,
nick,
type,
state,
content,
like_num,
admin_id,
create_time,
#{pid,jdbcType=INTEGER},
#{momentsId,jdbcType=INTEGER},
#{uid,jdbcType=BIGINT},
#{no,jdbcType=BIGINT},
#{nick,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{state,jdbcType=INTEGER},
#{content,jdbcType=VARCHAR},
#{likeNum,jdbcType=INTEGER},
#{adminId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
update moments_comment
pid = #{pid,jdbcType=INTEGER},
moments_id = #{momentsId,jdbcType=INTEGER},
uid = #{uid,jdbcType=BIGINT},
no = #{no,jdbcType=BIGINT},
nick = #{nick,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
state = #{state,jdbcType=INTEGER},
content = #{content,jdbcType=VARCHAR},
like_num = #{likeNum,jdbcType=INTEGER},
admin_id = #{adminId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
where id = #{id,jdbcType=INTEGER}
update moments_comment
set pid = #{pid,jdbcType=INTEGER},
moments_id = #{momentsId,jdbcType=INTEGER},
uid = #{uid,jdbcType=BIGINT},
no = #{no,jdbcType=BIGINT},
nick = #{nick,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
state = #{state,jdbcType=INTEGER},
content = #{content,jdbcType=VARCHAR},
like_num = #{likeNum,jdbcType=INTEGER},
admin_id = #{adminId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
delete from moments_comment
where id = #{id,jdbcType=INTEGER}
update moments_comment set state = #{state},admin_id = #{adminId} where moments_id = #{momentsId}
delete from moments_comment where moments_id = #{momentsId}