e01e5c44265f6436bbc1b490e90bf6275c21e63a.svn-base 1.15 KB
/*
 * Powered By bj_ivt
 * Web Site: http://www.vjivt.com
 * 
 * Since 2015 - 2016
 */

package com.bjivt.showtime.api.dao.impl;

import java.util.*;

import com.bjivt.showtime.api.entity.*;
import com.bjivt.showtime.api.dao.*;
import com.bjivt.showtime.api.service.*;
import org.springframework.stereotype.Repository;

/**
 * @author Yh.T
 * @version 1.0
 * @since 1.0
 */

@Repository
public class LiveRecordDaoImpl extends BaseDaoImpl<LiveRecord,java.lang.Integer> implements LiveRecordDao{

	public Class getEntityClass() {
		return LiveRecord.class;
	}
	@Override
	public void save(Object[] values) {
		String sql = "INSERT INTO db_showtime_log.tbl_live_record(user_id,live_id,record_time,	visit_user_id,mark,remark) "+
				"VALUES (	?,	?,	?,	?,	?,	?)";
		update(sql, values);
	}
	/**
	 * 更新一下结束时间
	 * ALTER TABLE db_showtime_log.tbl_live_record ADD end_time datetime  null comment '停止观看时间';

	 */
	@Override
	public void updateBySql(Object[] values) {
		String sql = "update db_showtime_log.tbl_live_record set end_time=? where "+
				"mark=? and user_id=? and live_id=? and visit_user_id=? and end_time is null";
		update(sql, values);
	}

}