admin
2021-08-27 8fee151ffae0c3818694b7318583814bf92663e2
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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);
  }
}