package com.yeshi.buwan.dao.pptv;
|
|
import com.yeshi.buwan.domain.pptv.PPTVPlayProcessRecord;
|
import com.yeshi.buwan.dao.base.MongodbBaseDao;
|
import org.springframework.data.mongodb.core.query.Criteria;
|
import org.springframework.data.mongodb.core.query.Query;
|
import org.springframework.data.mongodb.core.query.Update;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.Date;
|
|
@Repository
|
public class PPTVPlayProcessRecordDao extends MongodbBaseDao<PPTVPlayProcessRecord>{
|
|
public void updateSelective(PPTVPlayProcessRecord bean) {
|
Query query = new Query();
|
Update update=new Update();
|
query.addCriteria(Criteria.where("id").is(bean.getId()));
|
if(bean.getDeviceId() != null) {
|
update.set("deviceId", bean.getDeviceId());
|
}
|
if(bean.getDetailSystemId() != null) {
|
update.set("detailSystemId", bean.getDetailSystemId());
|
}
|
if(bean.getCid() != null) {
|
update.set("cid", bean.getCid());
|
}
|
if(bean.getVid() != null) {
|
update.set("vid", bean.getVid());
|
}
|
if(bean.getCurrentTime() != null) {
|
update.set("currentTime", bean.getCurrentTime());
|
}
|
if(bean.getLoginUid() != null) {
|
update.set("loginUid", bean.getLoginUid());
|
}
|
if(bean.getCreateTime() != null) {
|
update.set("createTime", bean.getCreateTime());
|
}
|
update.set("updateTime", new Date());
|
update(query, update);
|
}
|
}
|