package com.yeshi.buwan.dao.juhe.mogotv;
|
|
import com.yeshi.buwan.videos.mogotv.entity.MogoTVClipInfo;
|
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 MogoTVClipInfoDao extends MongodbBaseDao<MogoTVClipInfo>{
|
|
public void updateSelective(MogoTVClipInfo bean) {
|
Query query = new Query();
|
Update update=new Update();
|
query.addCriteria(Criteria.where("clipId").is(bean.getClipId()));
|
if(bean.getImg() != null) {
|
update.set("img", bean.getImg());
|
}
|
if(bean.getYear() != null) {
|
update.set("year", bean.getYear());
|
}
|
if(bean.getPrefix() != null) {
|
update.set("prefix", bean.getPrefix());
|
}
|
if(bean.getTitle() != null) {
|
update.set("title", bean.getTitle());
|
}
|
if(bean.getPlayPartId() != null) {
|
update.set("playPartId", bean.getPlayPartId());
|
}
|
if(bean.getAwards() != null) {
|
update.set("awards", bean.getAwards());
|
}
|
if(bean.getSubtitle() != null) {
|
update.set("subtitle", bean.getSubtitle());
|
}
|
if(bean.getUpdateInfo() != null) {
|
update.set("updateInfo", bean.getUpdateInfo());
|
}
|
if(bean.getVpicture() != null) {
|
update.set("vpicture", bean.getVpicture());
|
}
|
if(bean.getHpicture() != null) {
|
update.set("hpicture", bean.getHpicture());
|
}
|
if(bean.getArea() != null) {
|
update.set("area", bean.getArea());
|
}
|
if(bean.getLeader() != null) {
|
update.set("leader", bean.getLeader());
|
}
|
if(bean.getReleaseTime() != null) {
|
update.set("releaseTime", bean.getReleaseTime());
|
}
|
if(bean.getPresenter() != null) {
|
update.set("presenter", bean.getPresenter());
|
}
|
if(bean.getKind() != null) {
|
update.set("kind", bean.getKind());
|
}
|
if(bean.getDirector() != null) {
|
update.set("director", bean.getDirector());
|
}
|
if(bean.getTelevision() != null) {
|
update.set("television", bean.getTelevision());
|
}
|
if(bean.getLanguage() != null) {
|
update.set("language", bean.getLanguage());
|
}
|
if(bean.getFstlvlType() != null) {
|
update.set("fstlvlType", bean.getFstlvlType());
|
}
|
if(bean.getStory() != null) {
|
update.set("story", bean.getStory());
|
}
|
if(bean.getCreateTime() != null) {
|
update.set("createTime", bean.getCreateTime());
|
}
|
update.set("updateTime", new Date());
|
update(query, update);
|
}
|
}
|