delete from content where id in
#{item}
delete from content_tags WHERE cid = #{cid}
INSERT IGNORE INTO content_tags (cid, tid)
values
(#{item.cid}, #{item.tid} )
delete from content_images WHERE cid = #{cid}
INSERT IGNORE INTO content_images (cid, imgurl, sort, ori_name)
values
(#{item.cid}, #{item.imgurl}, #{item.sort}, #{item.ori_name} )
UPDATE content
viewno = IF(viewno IS NULL, 1, viewno+1)
praiseno = IF(praiseno IS NULL, 1, praiseno+1)
WHERE id = #{id}
insert ignore into content_tags
(
createtime,
cid,
tid
)
values
(
now(),
#{cid},
#{tid}
)
delete from content_tags where cid in
#{id}
update content set
comments = comments + 1
where id = #{contentId}
insert into scoring_table
(
content_id,
score,
user_id,
create_time
)
values
(
#{contentId},
#{score},
#{userId},
now()
)
insert into application
(
content_id,
user_id,
type,
create_time
)
values
(
#{contentId},
#{userId},
#{type},
now()
)
insert into `check`
(
application_id,
check_id,
create_time
)
values
(
#{applicationId},
#{checkId},
now()
)
delete from application where id = #{applicationId}
delete from `check` where application_id = #{applicationId}
update application set
status = 1
where id = #{applicationId}
update `check` set
status = 1
where application_id = #{applicationId}
update `check` set
status = #{status}
where application_id = #{applicationId} and check_id = #{checkId}
update content set
online_time = null,
online_time = now(),
`release` = #{release},visibility = #{visibility}
where id = #{contentId}
update application set
status = #{status}
where id = #{id}