e01e5c44265f6436bbc1b490e90bf6275c21e63a.svn-base
1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* 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);
}
}