select log_id, area_id, user_id, coupon_id, create_time, gain_method, status, expiration_time,limit_num from et_coupon_user_log insert into et_coupon_user_log area_id, user_id, coupon_id, create_time, gain_method, status, expiration_time, limit_num, #{areaId}, #{userId}, #{couponId}, #{createTime}, #{gainMethod}, #{status}, #{expirationTime}, #{limitNum}, update et_coupon_user_log area_id = #{areaId}, user_id = #{userId}, coupon_id = #{couponId}, create_time = #{createTime}, gain_method = #{gainMethod}, status = #{status}, expiration_time = #{expirationTime}, limit_num = #{limitNum}, where log_id = #{logId} update et_coupon_user_log set limit_num = limit_num - 1 where log_id = #{logId} and limit_num > 0 delete from et_coupon_user_log where log_id = #{logId} delete from et_coupon_user_log where log_id in #{logId}