c.`id`, c.`tenant_id`, c.`parent_tenant_id`, c.`type`, c.`cover_img`, c.`cover_picture`, c.`detail_picture`,
c.`title`, c.`sub_title`, c.`count_class`, c.`video_id`, c.`video_time`,c.`video_url`, c.`html`, c.`is_landscape`, c.`is_payment`,
c.`sale_price`, c.`orig_price`, c.`is_preview`, c.`preview_duration`, c.`detail`, c.`false_sell_count`,
c.`dy_title`, c.`inventory`, c.`remark`, c.`status`, c.`create_date`, c.`update_date`, c.`puton_date`,
c.`see_count`, c.`sell_count`, c.`assess_count`, c.`collect_count`, c.`mark`,c.mark_time, c.`is_del`,
c.`column_id`, c.`popularity`, c.`merchant_id`, c.`business_id`, c.`business_name`,
m.name merchant_name, m.img_url merchant_pic
where c.`is_del` = 0
and c.`type` != 3
and c.`id` = #{id}
and c.`tenant_id` = #{tenantId}
and c.`parent_tenant_id` = #{parentTenantId}
and c.`type` = #{type}
and c.`column_id` = #{columnId}
and c.`title` like concat('%', #{title},'%')
and c.`is_landscape` = #{isLandscape}
and c.`is_payment` = #{isPayment}
and c.`is_preview` = #{isPreview}
and c.`status` = #{status}
and (c.`mark` is null or c.`mark` <> 1)
and c.`mark` = 1
and c.`create_date` >= #{startdate}
and c.`create_date` <= #{enddate}
and c.`business_id` = #{businessId}
and c.`merchant_id` = #{merchantId}
and m.`name` like concat('%', #{merchantName},'%')
and c.id in
#{idItem}
order by ${sortColumns}
update tt_coupon set is_del = 1, update_date=now() where id = #{id}
update tt_coupon SET see_count = see_count+1,popularity = popularity+1 where id = #{id}
update tt_coupon SET sell_count = sell_count+1,popularity = popularity+20, false_sell_count = false_sell_count+1 where id = #{id}
update tt_coupon SET sell_count = sell_count-1,popularity = popularity-20, false_sell_count = false_sell_count-1 where id = #{id}
update tt_coupon SET assess_count = assess_count+1,popularity = popularity+10 where id = #{id}
update tt_coupon SET collect_count = collect_count+1,popularity = popularity+5 where id = #{id}
update tt_coupon SET collect_count = collect_count-1,popularity = popularity-5 where id = #{id}
update tt_coupon SET popularity = popularity+#{popularity} where id = #{id}