Commit 491a51817ba255c0425724e7cce9695a1fa855bb

Authored by 王言钊
1 parent 49b472d1

增加状态工具类 修改代码中的数字

Showing 24 changed files with 704 additions and 434 deletions
src/main/java/com/cnlive/shenhe/api/ChannelControllerApi.java
... ... @@ -6,6 +6,7 @@ import com.cnlive.shenhe.bean.ResponseBean;
6 6 import com.cnlive.shenhe.entity.ShyChannel;
7 7 import com.cnlive.shenhe.serviceImpl.ChannelServiceImpl;
8 8 import com.cnlive.shenhe.utils.CommonConst;
  9 +import com.cnlive.shenhe.utils.CommonConstStates;
9 10 import com.cnlive.shenhe.utils.CommonUtils;
10 11 import org.slf4j.Logger;
11 12 import org.slf4j.LoggerFactory;
... ... @@ -61,7 +62,7 @@ public class ChannelControllerApi {
61 62 shyChannel1.setCallback(json.getString("callback"));
62 63 shyChannel1.setSp_id(spId);
63 64 //是否下线 0表示正常 1表示下线
64   - shyChannel1.setOffline(0);
  65 + shyChannel1.setOffline(CommonConstStates.ZHENGCHANG);
65 66 shyChannel1.setUpdated_at(CommonUtils.getCurrentTime());
66 67 channelService.getShenheType(shyChannel1);
67 68 boolean YorN = channelService.updateshyChannel(shyChannel1);
... ... @@ -77,7 +78,7 @@ public class ChannelControllerApi {
77 78 shyChannel.setCallback(json.getString("callback"));
78 79 shyChannel.setSp_id(spId);
79 80 //是否下线 0表示正常 1表示下线
80   - shyChannel.setOffline(0);
  81 + shyChannel.setOffline(CommonConstStates.ZHENGCHANG);
81 82 shyChannel.setCreated_at(CommonUtils.getCurrentTime());
82 83 shyChannel.setUpdated_at(CommonUtils.getCurrentTime());
83 84 channelService.getShenheType(shyChannel);
... ...
src/main/java/com/cnlive/shenhe/api/CommentsControllerApi.java
... ... @@ -66,19 +66,6 @@ public class CommentsControllerApi {
66 66 if (CommonUtils.isNotEmpty(commentTime)) {
67 67 timestamp = CommonUtils.getTimestamp(commentTime, "yyyy-MM-dd HH:mm");
68 68 }
69   -// 2020.01.07 修改评论审核类型是话题时分享和标题从互动云获取
70   -// if(type.equals(CommonConst.CATEGORY_TOPIC)){//评论类型是话题
71   -// if(level==1){
72   -// ShyTopic shyTopic = new ShyTopic();
73   -// shyTopic.setTopic_id(programId);
74   -// shyTopic=topicService.getShyTopic(shyTopic);
75   -// if(shyTopic!=null){
76   -// commentTitle=shyTopic.getTitle();//设置标题
77   -// originalUrl=topic_comment_shareH5+programId;
78   -// }
79   -// }
80   -//
81   -// }
82 69  
83 70 //判断是否存在
84 71 ShyComments shyComments = new ShyComments();
... ...
src/main/java/com/cnlive/shenhe/api/ContentControllerApi.java
... ... @@ -206,24 +206,36 @@ public class ContentControllerApi {
206 206 shyContent1.setTitle(json.getString("title"));
207 207 //用户头像
208 208 shyContent1.setTitle_image(json.getString("image"));
209   - shyContent1.setShenhe_type(shenheType);//审核类型
210   - String contentTime = json.getString("createTime");//朋友圈内容创建时间
211   - if (CommonUtils.isNotEmpty(contentTime)) {
212   - //Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
213   - shyContent1.setContent_time(new Date(Long.valueOf(contentTime)));
214   -
215   - }
  209 + //审核类型
  210 + shyContent1.setShenhe_type(shenheType);
  211 + //朋友圈内容创建时间
  212 + String contentTime = json.getString("createTime");
  213 + shyContent1.setContent_time(new Date(Long.valueOf(contentTime)));
  214 + //if (CommonUtils.isNotEmpty(contentTime)) {
  215 + // //Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
  216 + //
  217 + //}
216 218 shyContent1.setCreate_date(CommonUtils.getCurrentTime());
217   - shyContent1.setCallback(json.getString("callbackUrl"));//回调地址
218   - shyContent1.setContent_url(json.getString("pageUrl"));//朋友圈分享的url
219   - shyContent1.setContent_pc_url(contentImageUrl);//朋友圈分享的内容的url,以逗号分隔
220   - shyContent1.setSp_id(json.getInteger("spId"));//spid
221   - shyContent1.setAuthor(json.getString("userId"));//用户id
222   - shyContent1.setSource(json.getString("nickName"));//用户昵称
223   - shyContent1.setVideo_id(json.getString("videoId"));//关联videoId
224   - shyContent1.setContent_tag("moment");//图文标签
225   - shyContent1.setReceive_status(CommonConst.RECEIVE_BEFORE);//领取状态
226   - shyContent1.setLast_update(CommonUtils.getCurrentTime());//最后一次更新时间
  219 + //回调地址
  220 + shyContent1.setCallback(json.getString("callbackUrl"));
  221 + //朋友圈分享的url
  222 + shyContent1.setContent_url(json.getString("pageUrl"));
  223 + //朋友圈分享的内容的url,以逗号分隔
  224 + shyContent1.setContent_pc_url(contentImageUrl);
  225 + //spid
  226 + shyContent1.setSp_id(json.getInteger("spId"));
  227 + //用户id
  228 + shyContent1.setAuthor(json.getString("userId"));
  229 + //用户昵称
  230 + shyContent1.setSource(json.getString("nickName"));
  231 + //关联videoId
  232 + shyContent1.setVideo_id(json.getString("videoId"));
  233 + //图文标签
  234 + shyContent1.setContent_tag("moment");
  235 + //领取状态
  236 + shyContent1.setReceive_status(CommonConst.RECEIVE_BEFORE);
  237 + //最后一次更新时间
  238 + shyContent1.setLast_update(CommonUtils.getCurrentTime());
227 239  
228 240  
229 241 boolean YorN = contentService.updateshyContent(shyContent1);
... ... @@ -234,26 +246,40 @@ public class ContentControllerApi {
234 246 }
235 247 }
236 248 //如果不存在直接插入
237   - shyContent.setTitle(json.getString("title"));//标题
238   - shyContent.setTitle_image(json.getString("image"));//用户头像
239   - shyContent.setShenhe_type(shenheType);//审核类型
240   - shyContent.setContent_status(1);//当前朋友圈内容的审核状态,先发后审
241   - String contentTime = json.getString("createTime");//创建时间
242   - if (CommonUtils.isNotEmpty(contentTime)) {
  249 + //标题
  250 + shyContent.setTitle(json.getString("title"));
  251 + //用户头像
  252 + shyContent.setTitle_image(json.getString("image"));
  253 + //审核类型
  254 + shyContent.setShenhe_type(shenheType);
  255 + //当前朋友圈内容的审核状态,先发后审
  256 + shyContent.setContent_status(1);
  257 + //创建时间
  258 + String contentTime = json.getString("createTime");
  259 + shyContent.setContent_time(new Date(Long.valueOf(contentTime)));
  260 +// if (CommonUtils.isNotEmpty(contentTime)) {
243 261 // Date timestamp = CommonUtils.getTimestamp(contentTime, "yyyy-MM-dd HH:mm:ss");
244   - shyContent.setContent_time(new Date(Long.valueOf(contentTime)));
245   -
246   - }
  262 +//
  263 +// }
247 264 shyContent.setCreate_date(CommonUtils.getCurrentTime());
248   - shyContent.setCallback(json.getString("callbackUrl"));//回调地址
249   - shyContent.setContent_url(json.getString("pageUrl"));//朋友圈分享的url
250   - shyContent.setContent_pc_url(contentImageUrl);//朋友圈分享的内容的url,以逗号分隔
251   - shyContent.setSp_id(json.getInteger("spId"));//spid
252   - shyContent.setAuthor(json.getString("userId"));//用户id
253   - shyContent.setSource(json.getString("nickName"));//用户昵称
254   - shyContent.setVideo_id(json.getString("videoId"));//关联videoId
255   - shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE);//领取状态
256   - shyContent.setLast_update(CommonUtils.getCurrentTime());//最后一次更新时间
  265 + //回调地址
  266 + shyContent.setCallback(json.getString("callbackUrl"));
  267 + //朋友圈分享的url
  268 + shyContent.setContent_url(json.getString("pageUrl"));
  269 + //朋友圈分享的内容的url,以逗号分隔
  270 + shyContent.setContent_pc_url(contentImageUrl);
  271 + //spid
  272 + shyContent.setSp_id(json.getInteger("spId"));
  273 + //用户id
  274 + shyContent.setAuthor(json.getString("userId"));
  275 + //用户昵称
  276 + shyContent.setSource(json.getString("nickName"));
  277 + //关联videoId
  278 + shyContent.setVideo_id(json.getString("videoId"));
  279 + //领取状态
  280 + shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE);
  281 + //最后一次更新时间
  282 + shyContent.setLast_update(CommonUtils.getCurrentTime());
257 283 boolean YorN = contentService.impotContent(shyContent);
258 284 if (YorN == true) {
259 285 return new ResponseBean(ErrorEnum.SUCCESS);
... ...
src/main/java/com/cnlive/shenhe/api/LiveApplyControllerApi.java
... ... @@ -53,26 +53,42 @@ public class LiveApplyControllerApi {
53 53 }
54 54 //直播发起人
55 55 String sender = json.getString("sender");
56   - String mobile = json.getString("mobile");//联系方式
57   - String callback = json.getString("callback");//回调地址
58   - String organization = json.getString("organization");//直播发起单位
59   - String theme = json.getString("theme");//直播主题
60   - Integer businessModel = Integer.parseInt(json.getString("businessModel"));//商务模式:0免费 1收费
61   - Integer contentProperty = Integer.parseInt(json.getString("contentProperty"));//内容属性:1商业类活动 0非商业活动
62   - String simpleContent = json.getString("simpleContent");//内容简述
63   - String live_type = json.getString("liveType");//直播类型
64   - String keys = json.getString("keys").equals("")?"无":json.getString("keys");//要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
65   - String livePlace = json.getString("livePlace");//直播地点
66   - String pushUrl = json.getString("pushUrl");//推流地址
67   - String pullUrl = json.getString("pullUrl").equals("")?"无拉流地址":json.getString("pullUrl");//拉流地址
68   - String pullSource = json.getString("pullSource").equals("")?"无来源":json.getString("pullSource");//拉流来源
69   - String platforms = json.getString("platforms");//播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
70   - String startTime = json.getString("preStartTime");//预计开始时间
  56 + //联系方式
  57 + String mobile = json.getString("mobile");
  58 + //回调地址
  59 + String callback = json.getString("callback");
  60 + //直播发起单位
  61 + String organization = json.getString("organization");
  62 + //直播主题
  63 + String theme = json.getString("theme");
  64 + //商务模式:0免费 1收费
  65 + Integer businessModel = Integer.parseInt(json.getString("businessModel"));
  66 + //内容属性:1商业类活动 0非商业活动
  67 + Integer contentProperty = Integer.parseInt(json.getString("contentProperty"));
  68 + //内容简述
  69 + String simpleContent = json.getString("simpleContent");
  70 + //直播类型
  71 + String live_type = json.getString("liveType");
  72 + //要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  73 + String keys = json.getString("keys").equals("")?"无":json.getString("keys");
  74 + //直播地点
  75 + String livePlace = json.getString("livePlace");
  76 + //推流地址
  77 + String pushUrl = json.getString("pushUrl");
  78 + //拉流地址
  79 + String pullUrl = json.getString("pullUrl").equals("")?"无拉流地址":json.getString("pullUrl");
  80 + //拉流来源
  81 + String pullSource = json.getString("pullSource").equals("")?"无来源":json.getString("pullSource");
  82 + //播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  83 + String platforms = json.getString("platforms");
  84 + //预计开始时间
  85 + String startTime = json.getString("preStartTime");
71 86 Date timestamp_start =null;
72 87 if (CommonUtils.isNotEmpty(startTime)) {
73 88 timestamp_start = new Timestamp(Long.valueOf(startTime));
74 89 }
75   - String endTime = json.getString("preEndTime");//预计结束时间
  90 + //预计结束时间
  91 + String endTime = json.getString("preEndTime");
76 92 Date timestamp_end =null;
77 93 if (CommonUtils.isNotEmpty(endTime)) {
78 94 timestamp_end = new Timestamp(Long.valueOf(endTime));
... ... @@ -86,55 +102,95 @@ public class LiveApplyControllerApi {
86 102 if (listshyLiveApply.size() > 0) {
87 103 ShyLiveapply shyliveApply = listshyLiveApply.get(0);
88 104 //封装数据入库
89   - shyliveApply.setSp_id(spId);//设置spid
90   - shyliveApply.setSender(sender);//设置发送者
91   - shyliveApply.setMobile(mobile);//设置联系方式
92   - shyliveApply.setOrganization(organization);//设置直播发起单位
93   - shyliveApply.setTheme(theme);//直播主题
94   - shyliveApply.setLive_type(live_type);//直播类型
95   - shyliveApply.setPre_start_time(timestamp_start);//预计开始时间
96   - shyliveApply.setPre_end_time(timestamp_end);//预计结束时间
97   - shyliveApply.setBusiness_model(businessModel);//商务模式:0免费 1收费
98   - shyliveApply.setContent_property(contentProperty);//内容属性:1商业类活动 0非商业活动
99   - shyliveApply.setSimple_content(simpleContent);//内容简述
100   - shyliveApply.setPoint_key(keys);//要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
101   - shyliveApply.setLive_place(livePlace);//直播地点
102   - shyliveApply.setPush_url(pushUrl);//推流地址
103   - shyliveApply.setPull_url(pullUrl);//拉流地址
104   - shyliveApply.setPull_source(pullSource);//拉流来源
105   - shyliveApply.setPlatforms(platforms);//播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
106   - shyliveApply.setCallback(callback);//设置回调地址
  105 + //设置spid
  106 + shyliveApply.setSp_id(spId);
  107 + //设置发送者
  108 + shyliveApply.setSender(sender);
  109 + //设置联系方式
  110 + shyliveApply.setMobile(mobile);
  111 + //设置直播发起单位
  112 + shyliveApply.setOrganization(organization);
  113 + //直播主题
  114 + shyliveApply.setTheme(theme);
  115 + //直播类型
  116 + shyliveApply.setLive_type(live_type);
  117 + //预计开始时间
  118 + shyliveApply.setPre_start_time(timestamp_start);
  119 + //预计结束时间
  120 + shyliveApply.setPre_end_time(timestamp_end);
  121 + //商务模式:0免费 1收费
  122 + shyliveApply.setBusiness_model(businessModel);
  123 + //内容属性:1商业类活动 0非商业活动
  124 + shyliveApply.setContent_property(contentProperty);
  125 + //内容简述
  126 + shyliveApply.setSimple_content(simpleContent);
  127 + //要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  128 + shyliveApply.setPoint_key(keys);
  129 + //直播地点
  130 + shyliveApply.setLive_place(livePlace);
  131 + //推流地址
  132 + shyliveApply.setPush_url(pushUrl);
  133 + //拉流地址
  134 + shyliveApply.setPull_url(pullUrl);
  135 + //拉流来源
  136 + shyliveApply.setPull_source(pullSource);
  137 + //播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  138 + shyliveApply.setPlatforms(platforms);
  139 + //设置回调地址
  140 + shyliveApply.setCallback(callback);
107 141 shyliveApply.setReceive(CommonConst.RECEIVE_BEFORE);
108 142 shyliveApply.setShenhe_state(CommonConst.AUDIT_INTT);
109 143 shyliveApply.setEmail_notice_state(CommonConst.NOTICE_INTT);
110 144 shyliveApply.setUpdater(null);
111 145 shyliveApply.setAuditor(null);
112   - shyliveApply.setUpdated_at(CommonUtils.getCurrentTime());//更新时间
113   -
114   - liveApplyServiceImpl.getShenheType(shyliveApply);//获取审核类型
  146 + //更新时间
  147 + shyliveApply.setUpdated_at(CommonUtils.getCurrentTime());
  148 +
  149 + //获取审核类型
  150 + liveApplyServiceImpl.getShenheType(shyliveApply);
115 151 YorN = liveApplyServiceImpl.updateshyLiveApply(shyliveApply);
116 152 }else{
117 153 //查了,没有,直接插入数据库
118   - shyliveApply1.setChannel_id(channelId);//设置频道id
119   - shyliveApply1.setSp_id(spId);//设置spid
120   - shyliveApply1.setSender(sender);//设置发送者
121   - shyliveApply1.setMobile(mobile);//设置联系方式
122   - shyliveApply1.setOrganization(organization);//设置直播发起单位
123   - shyliveApply1.setTheme(theme);//直播主题
124   - shyliveApply1.setLive_type(live_type);//直播类型
125   - shyliveApply1.setPre_start_time(timestamp_start);//预计开始时间
126   - shyliveApply1.setPre_end_time(timestamp_end);//预计结束时间
127   - shyliveApply1.setBusiness_model(businessModel);//商务模式:0免费 1收费
128   - shyliveApply1.setContent_property(contentProperty);//内容属性:1商业类活动 0非商业活动
129   - shyliveApply1.setSimple_content(simpleContent);//内容简述
130   - shyliveApply1.setPoint_key(keys);//要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
131   - shyliveApply1.setLive_place(livePlace);//直播地点
132   - shyliveApply1.setPush_url(pushUrl);//推流地址
133   - shyliveApply1.setPull_url(pullUrl);//拉流地址
134   - shyliveApply1.setPull_source(pullSource);//拉流来源
135   - shyliveApply1.setPlatforms(platforms);//播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
136   - shyliveApply1.setCallback(callback);//设置回调地址
137   - liveApplyServiceImpl.getShenheType(shyliveApply1);//获取审核类型
  154 + //设置频道id
  155 + shyliveApply1.setChannel_id(channelId);
  156 + //设置spid
  157 + shyliveApply1.setSp_id(spId);
  158 + //设置发送者
  159 + shyliveApply1.setSender(sender);
  160 + //设置联系方式
  161 + shyliveApply1.setMobile(mobile);
  162 + //设置直播发起单位
  163 + shyliveApply1.setOrganization(organization);
  164 + //直播主题
  165 + shyliveApply1.setTheme(theme);
  166 + //直播类型
  167 + shyliveApply1.setLive_type(live_type);
  168 + //预计开始时间
  169 + shyliveApply1.setPre_start_time(timestamp_start);
  170 + //预计结束时间
  171 + shyliveApply1.setPre_end_time(timestamp_end);
  172 + //商务模式:0免费 1收费
  173 + shyliveApply1.setBusiness_model(businessModel);
  174 + //内容属性:1商业类活动 0非商业活动
  175 + shyliveApply1.setContent_property(contentProperty);
  176 + //内容简述
  177 + shyliveApply1.setSimple_content(simpleContent);
  178 + //要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  179 + shyliveApply1.setPoint_key(keys);
  180 + //直播地点
  181 + shyliveApply1.setLive_place(livePlace);
  182 + //推流地址
  183 + shyliveApply1.setPush_url(pushUrl);
  184 + //拉流地址
  185 + shyliveApply1.setPull_url(pullUrl);
  186 + //拉流来源
  187 + shyliveApply1.setPull_source(pullSource);
  188 + //播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  189 + shyliveApply1.setPlatforms(platforms);
  190 + //设置回调地址
  191 + shyliveApply1.setCallback(callback);
  192 + //获取审核类型
  193 + liveApplyServiceImpl.getShenheType(shyliveApply1);
138 194 shyliveApply1.setReceive(CommonConst.RECEIVE_BEFORE);
139 195 shyliveApply1.setShenhe_state(CommonConst.AUDIT_INTT);
140 196 shyliveApply1.setEmail_notice_state(CommonConst.NOTICE_INTT);
... ... @@ -142,9 +198,11 @@ public class LiveApplyControllerApi {
142 198 shyliveApply1.setAuditor(null);
143 199 shyliveApply1.setShenhe_msg(null);
144 200 shyliveApply1.setEmail_notice_msg("");
145   - shyliveApply1.setCreated_at(CommonUtils.getCurrentTime());//创建时间
146   - shyliveApply1.setUpdated_at(CommonUtils.getCurrentTime());//更新时间
147   -
  201 + //创建时间
  202 + shyliveApply1.setCreated_at(CommonUtils.getCurrentTime());
  203 + //更新时间
  204 + shyliveApply1.setUpdated_at(CommonUtils.getCurrentTime());
  205 +
148 206 YorN = liveApplyServiceImpl.impotLiveApply(shyliveApply1);
149 207 }
150 208  
... ...
src/main/java/com/cnlive/shenhe/api/LiveControllerApi.java
... ... @@ -4,7 +4,8 @@ import com.alibaba.fastjson.JSON;
4 4 import com.alibaba.fastjson.JSONObject;
5 5 import com.cnlive.shenhe.entity.ShyLive;
6 6 import com.cnlive.shenhe.serviceImpl.LiveServiceImpl;
7   -import com.cnlive.shenhe.utils.AntiFraudUtil;
  7 +import com.cnlive.shenhe.utils.CommonConst;
  8 +import com.cnlive.shenhe.utils.CommonConstStates;
8 9 import com.cnlive.shenhe.utils.CommonUtils;
9 10 import org.apache.commons.lang3.StringUtils;
10 11 import org.slf4j.Logger;
... ... @@ -16,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
16 17 import java.sql.Timestamp;
17 18 import java.util.Date;
18 19 import java.util.List;
19   -import java.util.UUID;
20 20  
21 21  
22 22 /**
... ... @@ -44,35 +44,51 @@ public class LiveControllerApi {
44 44 //获取所有参数
45 45 //直播活动id
46 46 String activityId = json.getString("activityId");
47   - String activityName = json.getString("activityName");//直播活动名称
48   - Integer activityStatus = Integer.parseInt(json.getString("activityStatus"));//直播活动状态
49   - String channelId = json.getString("channelId");//直播频道id
50   - String live_type = json.getString("liveType");//直播频道id
51   - String mp4Url = json.getString("mp4Url");//rtmp直播流
52   - String hlsUrl = json.getString("hlsUrl");//m3u8直播流
53   - Integer spId = Integer.parseInt(json.getString("spId"));//spid
54   - String callback = json.getString("callback");//回调地址
55   - Integer is_hot = Integer.parseInt(json.getString("priority"));//优先级
56   - String coverImgUrl = json.getString("coverImgUrl");//封面
57   - String activityIntro = json.getString("activityIntro");//活动描述
58   - String playbackUrl = json.getString("playbackUrl");//回放地址
59   - String startTime = json.getString("startTime");//开始时间
  47 + //直播活动名称
  48 + String activityName = json.getString("activityName");
  49 + //直播活动状态
  50 + Integer activityStatus = Integer.parseInt(json.getString("activityStatus"));
  51 + //直播频道id
  52 + String channelId = json.getString("channelId");
  53 + //直播频道id
  54 + String live_type = json.getString("liveType");
  55 + //rtmp直播流
  56 + String mp4Url = json.getString("mp4Url");
  57 + //m3u8直播流
  58 + String hlsUrl = json.getString("hlsUrl");
  59 + //spid
  60 + Integer spId = Integer.parseInt(json.getString("spId"));
  61 + //回调地址
  62 + String callback = json.getString("callback");
  63 + //优先级
  64 + Integer is_hot = Integer.parseInt(json.getString("priority"));
  65 + //封面
  66 + String coverImgUrl = json.getString("coverImgUrl");
  67 + //活动描述
  68 + String activityIntro = json.getString("activityIntro");
  69 + //回放地址
  70 + String playbackUrl = json.getString("playbackUrl");
  71 + //开始时间
  72 + String startTime = json.getString("startTime");
60 73 Date timestamp_start =null;
61 74 if (CommonUtils.isNotEmpty(startTime)) {
62 75 timestamp_start = new Timestamp(Long.valueOf(startTime));
63 76 }
64   - String endTime = json.getString("endTime");//结束时间
  77 + //结束时间
  78 + String endTime = json.getString("endTime");
65 79 Date timestamp_end =null;
66 80 if (CommonUtils.isNotEmpty(endTime)) {
67 81 timestamp_end = new Timestamp(Long.valueOf(endTime));
68 82 }
69   -
70   - String pre_startTime = json.getString("preStartTime");//预计开始时间
  83 +
  84 + //预计开始时间
  85 + String pre_startTime = json.getString("preStartTime");
71 86 Date pre_timestamp_start =null;
72 87 if (CommonUtils.isNotEmpty(pre_startTime)) {
73 88 pre_timestamp_start = new Timestamp(Long.valueOf(pre_startTime));
74 89 }
75   - String pre_endTime = json.getString("preEndTime");//预计结束时间
  90 + //预计结束时间
  91 + String pre_endTime = json.getString("preEndTime");
76 92 Date pre_timestamp_end =null;
77 93 if (CommonUtils.isNotEmpty(pre_endTime)) {
78 94 pre_timestamp_end = new Timestamp(Long.valueOf(pre_endTime));
... ... @@ -87,98 +103,155 @@ public class LiveControllerApi {
87 103 if (listshyLive.size() > 0) {
88 104 ShyLive shyLive = listshyLive.get(0);
89 105 //封装数据入库
90   - shyLive.setSp_id(spId);//设置spid
91   - shyLive.setActivity_name(activityName);//设置直播活动名称
92   - shyLive.setActivity_status(activityStatus);//设置直播活动状态
  106 + //设置spid
  107 + shyLive.setSp_id(spId);
  108 + //设置直播活动名称
  109 + shyLive.setActivity_name(activityName);
  110 + //设置直播活动状态
  111 + shyLive.setActivity_status(activityStatus);
93 112 shyLive.setPre_start_time(pre_timestamp_start);
94 113 shyLive.setPre_end_time(pre_timestamp_end);
95   - if(activityStatus==3){//发布直播
  114 +
  115 + //直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制)
  116 + //发布直播
  117 + if(activityStatus.equals(CommonConstStates.ZHIBO_DENGDAI)){
96 118 shyLive.setActivity_start_time(null);
97 119 shyLive.setActivity_end_time(null);
98   - shyLive.setIs_hot(2);//是否是热点: 1:不是 ,2: 是
99   - }else if(activityStatus==1){//启动直播
  120 + //是否是热点: 1:不是 ,2: 是
  121 + shyLive.setIs_hot(CommonConstStates.SHIFOU_REDIANYES);
  122 + //启动直播
  123 + }else if(activityStatus.equals(CommonConstStates.ZHIBO_ZHENGZAI)){
100 124 shyLive.setActivity_start_time(timestamp_start);
101 125 shyLive.setActivity_end_time(null);
102   - shyLive.setIs_hot(2);//是否是热点: 1:不是 ,2: 是
103   - }else if(activityStatus==2){//停止直播
  126 + //是否是热点: 1:不是 ,2: 是
  127 + shyLive.setIs_hot(CommonConstStates.SHIFOU_REDIANYES);
  128 + //停止直播
  129 + }else if(activityStatus.equals(CommonConstStates.ZHIBO_JIESHU)){
104 130 shyLive.setActivity_start_time(timestamp_start);
105 131 shyLive.setActivity_end_time(timestamp_end);
106   - shyLive.setPlayback_url(playbackUrl);//回放地址
107   - shyLive.setShenhe_state(2);//状态 0:未认领 1.已领未审,2:已审
108   - shyLive.setUpdater("自动通过");;//直播完成后自动通过
109   - shyLive.setIs_hot(1);//是否是热点: 1:不是 ,2: 是
110   - }else if(activityStatus==4){//审核强制下线
  132 + //回放地址
  133 + shyLive.setPlayback_url(playbackUrl);
  134 + //状态 0:未认领 1.已领未审,2:已审
  135 + shyLive.setShenhe_state(CommonConst.RECEIVE_AUDIT);
  136 + //直播完成后自动通过
  137 + shyLive.setUpdater("自动通过");
  138 + //是否是热点: 1:不是 ,2: 是
  139 + shyLive.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
  140 + //审核强制下线
  141 + }else if(activityStatus.equals(CommonConstStates.ZHIBO_XIAXIAN)){
111 142 shyLive.setActivity_start_time(timestamp_start);
112 143 shyLive.setActivity_end_time(timestamp_end);
113   - shyLive.setPlayback_url(playbackUrl);//回放地址
114   - shyLive.setIs_hot(1);//是否是热点: 1:不是 ,2: 是
  144 + //回放地址
  145 + shyLive.setPlayback_url(playbackUrl);
  146 + //是否是热点: 1:不是 ,2: 是
  147 + shyLive.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
115 148 }
116   - shyLive.setActivity_intro(activityIntro);//直播活动简介
  149 + //直播活动简介
  150 + shyLive.setActivity_intro(activityIntro);
117 151 shyLive.setLive_type(live_type);
118   - shyLive.setM3u8_url(hlsUrl);//m3u8直播流
119   - shyLive.setRtmp_url(mp4Url);//rtmp直播流
120   - shyLive.setCallback(callback);//回调地址
121   - shyLive.setCover_img_url(coverImgUrl);//封面
122   - shyLive.setShenhe_type(3);//审核类型,1:免审,2:机审,3:人工审
123   - shyLive.setAvsample_state(1);//抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败
124   - if(activityStatus==0){//直播撤销
125   - shyLive.setIs_show(0);//是否显示 0:不显示 1:显示
126   - shyLive.setIs_hot(1);//是否是热点: 1:不是 ,2: 是
  152 + //m3u8直播流
  153 + shyLive.setM3u8_url(hlsUrl);
  154 + //rtmp直播流
  155 + shyLive.setRtmp_url(mp4Url);
  156 + //回调地址
  157 + shyLive.setCallback(callback);
  158 + //封面
  159 + shyLive.setCover_img_url(coverImgUrl);
  160 + //审核类型,1:免审,2:机审,3:人工审
  161 + shyLive.setShenhe_type(CommonConst.AUDIT_TYPE_USER);
  162 + //抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败
  163 + shyLive.setAvsample_state(1);
  164 + //直播撤销
  165 + if(activityStatus.equals(CommonConstStates.ZHIBO_CHEXIAO)){
  166 + //是否显示 0:不显示 1:显示
  167 + shyLive.setIs_show(CommonConstStates.SHIFOU_XIANSHINO);
  168 + //是否是热点: 1:不是 ,2: 是
  169 + shyLive.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
127 170 }else{
128   - shyLive.setIs_show(1);
  171 + shyLive.setIs_show(CommonConstStates.SHIFOU_XIANSHIYES);
129 172 }
130   - shyLive.setUpdated_at(CommonUtils.getCurrentTime());//更新时间
131   -
  173 + //更新时间
  174 + shyLive.setUpdated_at(CommonUtils.getCurrentTime());
  175 +
132 176 YorN = liveService.updateshyLive(shyLive);
133 177 }else{
134 178 //查了,没有,直接插入数据库
135   - shylive1.setActivity_id(activityId);//设置直播活动id
136   - shylive1.setActivity_name(activityName);//设置直播活动名称
137   - shylive1.setActivity_status(activityStatus);//设置直播活动状态
138   - shylive1.setChannel_id(channelId);//设置直播频道
139   - shylive1.setSp_id(spId);//设置spid
140   - shylive1.setShenhe_state(0); //状态 0:未认领 1.已领未审,2:已审
141   - shylive1.setIs_hot(2);//是否是热点: 1:不是 ,2: 是
  179 + //设置直播活动id
  180 + shylive1.setActivity_id(activityId);
  181 + //设置直播活动名称
  182 + shylive1.setActivity_name(activityName);
  183 + //设置直播活动状态
  184 + shylive1.setActivity_status(activityStatus);
  185 + //设置直播频道
  186 + shylive1.setChannel_id(channelId);
  187 + //设置spid
  188 + shylive1.setSp_id(spId);
  189 + //状态 0:未认领 1.已领未审,2:已审
  190 + shylive1.setShenhe_state(CommonConst.RECEIVE_BEFORE);
  191 + //是否是热点: 1:不是 ,2: 是
  192 + shylive1.setIs_hot(CommonConstStates.SHIFOU_REDIANYES);
142 193 shylive1.setPre_start_time(pre_timestamp_start);
143 194 shylive1.setPre_end_time(pre_timestamp_end);
144   - if(activityStatus==3){//发布直播
  195 + //发布直播
  196 + if(activityStatus.equals(CommonConstStates.ZHIBO_DENGDAI)){
145 197 shylive1.setActivity_start_time(null);
146 198 shylive1.setActivity_end_time(null);
147   - }else if(activityStatus==1){//启动直播
  199 + }else if(activityStatus.equals(CommonConstStates.ZHIBO_ZHENGZAI)){
  200 + //启动直播
148 201 shylive1.setActivity_start_time(timestamp_start);
149 202 shylive1.setActivity_end_time(null);
150   - }else if(activityStatus==2){//停止直播
  203 + //停止直播
  204 + }else if(activityStatus.equals(CommonConstStates.ZHIBO_JIESHU)){
151 205 shylive1.setActivity_start_time(timestamp_start);
152 206 shylive1.setActivity_end_time(timestamp_end);
153   - shylive1.setPlayback_url(playbackUrl);//回放地址
154   - shylive1.setShenhe_state(2); //状态 0:未认领 1.已领未审,2:已审
155   - shylive1.setUpdater("自动通过");;//直播完成后自动通过
156   - shylive1.setIs_hot(1);//是否是热点: 1:不是 ,2: 是
157   - }else if(activityStatus==4){//审核强制下线
  207 + //回放地址
  208 + shylive1.setPlayback_url(playbackUrl);
  209 + //状态 0:未认领 1.已领未审,2:已审
  210 + shylive1.setShenhe_state(CommonConst.RECEIVE_AUDIT);
  211 + //直播完成后自动通过
  212 + shylive1.setUpdater("自动通过");
  213 + //是否是热点: 1:不是 ,2: 是
  214 + shylive1.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
  215 + //审核强制下线
  216 + }else if(activityStatus.equals(CommonConstStates.ZHIBO_XIAXIAN)){
158 217 shylive1.setActivity_start_time(timestamp_start);
159 218 shylive1.setActivity_end_time(timestamp_end);
160   - shylive1.setPlayback_url(playbackUrl);//回放地址
161   - shylive1.setShenhe_state(2); //状态 0:未认领 1.已领未审,2:已审
162   - shylive1.setIs_hot(1);//是否是热点: 1:不是 ,2: 是
  219 + //回放地址
  220 + shylive1.setPlayback_url(playbackUrl);
  221 + //状态 0:未认领 1.已领未审,2:已审
  222 + shylive1.setShenhe_state(CommonConst.RECEIVE_AUDIT);
  223 + //是否是热点: 1:不是 ,2: 是
  224 + shylive1.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
163 225 }
164   - shylive1.setActivity_intro(activityIntro);//直播活动简介
  226 + //直播活动简介
  227 + shylive1.setActivity_intro(activityIntro);
165 228 shylive1.setLive_type(live_type);
166   - shylive1.setM3u8_url(hlsUrl);//m3u8直播流
167   - shylive1.setRtmp_url(mp4Url);//rtmp直播流
168   - shylive1.setCallback(callback);//回调地址
169   - shylive1.setCover_img_url(coverImgUrl);//封面
170   - shylive1.setShenhe_type(3);//审核类型,1:免审,2:机审,3:人工审
171   - shylive1.setAvsample_state(1);//抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败
172   - if(activityStatus==0){//直播撤销
173   - shylive1.setIs_show(0);//是否显示 0:不显示 1:显示
174   - shylive1.setIs_hot(1);//是否是热点: 1:不是 ,2: 是
  229 + //m3u8直播流
  230 + shylive1.setM3u8_url(hlsUrl);
  231 + //rtmp直播流
  232 + shylive1.setRtmp_url(mp4Url);
  233 + //回调地址
  234 + shylive1.setCallback(callback);
  235 + //封面
  236 + shylive1.setCover_img_url(coverImgUrl);
  237 + //审核类型,1:免审,2:机审,3:人工审
  238 + shylive1.setShenhe_type(CommonConst.AUDIT_TYPE_USER);
  239 + //抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败
  240 + shylive1.setAvsample_state(1);
  241 + //直播撤销
  242 + if(activityStatus.equals(CommonConstStates.ZHIBO_CHEXIAO)){
  243 + //是否显示 0:不显示 1:显示
  244 + shylive1.setIs_show(CommonConstStates.SHIFOU_XIANSHINO);
  245 + //是否是热点: 1:不是 ,2: 是
  246 + shylive1.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
175 247 }else{
176   - shylive1.setIs_show(1);
  248 + shylive1.setIs_show(CommonConstStates.SHIFOU_XIANSHIYES);
177 249 }
178   -
179   - shylive1.setCreated_at(CommonUtils.getCurrentTime());//创建时间
180   - shylive1.setUpdated_at(CommonUtils.getCurrentTime());//更新时间
181   -
  250 +
  251 + //创建时间
  252 + shylive1.setCreated_at(CommonUtils.getCurrentTime());
  253 + //更新时间
  254 + shylive1.setUpdated_at(CommonUtils.getCurrentTime());
182 255 YorN = liveService.impotVideo(shylive1);
183 256 }
184 257  
... ... @@ -213,61 +286,12 @@ public class LiveControllerApi {
213 286 if ("REJECT".equals(riskLevel)) {
214 287 JSONObject detail = resultObj.getJSONObject("detail");
215 288 logger.info("数美视频回调--REJECT,detail:{}", detail);
216   -// resultObj.put("desc",
217   -// String.format("(%s-%s)", detail.getString("description"), detail.getString("matchedItem")));
218 289 }
219   -
220 290 if ("REVIEW".equals(riskLevel)) {
221 291 }
222 292 }else{
223   - //数美请求结果code为失败状态
224   -// jsonObj.put("type", "REJECT");
225   -// jsonObj.put("desc","code:"+code+",message:"+resultObj.getString("message") );
226 293 }
227 294 }
228 295 }
229 296  
230   - /**
231   - * 测试视频流
232   - * @param videoStream
233   - */
234   - @RequestMapping(value="ceshiVideo")
235   - @ResponseBody
236   - public void ceshiVideo(String videoStream){
237   - //调用数美接口
238   - JSONObject result = AntiFraudUtil.filterVideoStream(videoStream, UUID.randomUUID().toString(), "测试流的名称", "");
239   - logger.info("code="+result.getString("code"));
240   - logger.info("requestId="+result.getString("requestId"));
241   - logger.error("直播流开始测试,result:{}", result);
242   - }
243   -
244   - /**
245   - * 测试视频流
246   - * @param
247   - */
248   - @RequestMapping(value="ceshiFinishVideo")
249   - @ResponseBody
250   - public void ceshiFinishVideo(String url,String requestId){
251   - //调用数美接口
252   - JSONObject result = AntiFraudUtil.finishVideoStream(url,requestId);
253   - logger.info("code="+result.getString("code"));
254   - logger.info("requestId="+result.getString("requestId"));
255   - logger.error("直播流结束测试,result:{}", result);
256   - }
257   -
258   - /**
259   - * 测试视频流
260   - * @param
261   - */
262   - @RequestMapping(value="queryVideo")
263   - @ResponseBody
264   - public void queryVideo(){
265   - //调用数美接口
266   - JSONObject result = AntiFraudUtil.queryVideoStreamResult();
267   - logger.info("code="+result.getString("code"));
268   - logger.info("requestId="+result.getString("requestId"));
269   - logger.error("直播流查询,result:{}", result);
270   - }
271   -
272   -
273 297 }
... ...
src/main/java/com/cnlive/shenhe/api/TopicControllerApi.java
... ... @@ -55,23 +55,28 @@ public class TopicControllerApi {
55 55 JSONObject result = new JSONObject();
56 56  
57 57 //获取所有参数
58   - String topic_id = json.getString("topicId");//话题id
59   -// Integer spId = Integer.parseInt(json.getString("spId"));//spId
60   -// Integer spId = json.getInteger("spId");//spId
  58 + //话题id
  59 + String topic_id = json.getString("topicId");
61 60 Integer spId=null;
62 61 try {
63 62 spId=json.getInteger("spId");
64 63 } catch (Exception e) {
65 64 spId=null;
66 65 }
67   - String topicTitle = json.getString("topicTitle");//话题标题
68   - String topicPic = json.getString("topicPic");//话题图片
69   - String topic_text = json.getString("topicMsg");//话题内容
70   - String topic_time = json.getString("createTime");//话题创建时间
71   -
72   - String topic_tag = json.getString("topicTag");//话题标签
73   - String topic_url = json.getString("topicUrl");//话题url
74   -
  66 + //话题标题
  67 + String topicTitle = json.getString("topicTitle");
  68 + //话题图片
  69 + String topicPic = json.getString("topicPic");
  70 + //话题内容
  71 + String topic_text = json.getString("topicMsg");
  72 + //话题创建时间
  73 + String topic_time = json.getString("createTime");
  74 +
  75 + //话题标签
  76 + String topic_tag = json.getString("topicTag");
  77 + //话题url
  78 + String topic_url = json.getString("topicUrl");
  79 +
75 80 //判断是否存在
76 81 ShyTopic shyTopic=new ShyTopic();
77 82 shyTopic.setTopic_id(topic_id);
... ... @@ -82,19 +87,27 @@ public class TopicControllerApi {
82 87 //存在则更新
83 88 if (topicList.size() > 0) {
84 89 ShyTopic shyTopic1 = topicList.get(0);
85   - shyTopic1.setTitle(topicTitle);//话题标题
86   - shyTopic1.setTopic_image(topicPic);//话题图片
87   - shyTopic1.setShenhe_type(shenheType);//审核类型
88   - shyTopic1.setTopic_text(topic_text);//话题内容
89   - shyTopic1.setTopic_tag(topic_tag);//话题标签
90   - shyTopic1.setTopic_url(topic_url);//话题url
91   - shyTopic1.setTopic_time(topic_time);//话题创建时间
92   - shyTopic1.setSp_id(spId);//spid
93   - shyTopic1.setShenhe_status(CommonConst.AUDIT_INTT);;//当前话题的审核状态
94   - shyTopic1.setUpdate_date(CommonUtils.getCurrentTime());//最后一次更新时间
95   -
96   -
97   -
  90 + //话题标题
  91 + shyTopic1.setTitle(topicTitle);
  92 + //话题图片
  93 + shyTopic1.setTopic_image(topicPic);
  94 + //审核类型
  95 + shyTopic1.setShenhe_type(shenheType);
  96 + //话题内容
  97 + shyTopic1.setTopic_text(topic_text);
  98 + //话题标签
  99 + shyTopic1.setTopic_tag(topic_tag);
  100 + //话题url
  101 + shyTopic1.setTopic_url(topic_url);
  102 + //话题创建时间
  103 + shyTopic1.setTopic_time(topic_time);
  104 + //spid
  105 + shyTopic1.setSp_id(spId);
  106 + //当前话题的审核状态
  107 + shyTopic1.setShenhe_status(CommonConst.AUDIT_INTT);
  108 + //最后一次更新时间
  109 + shyTopic1.setUpdate_date(CommonUtils.getCurrentTime());
  110 +
98 111 boolean YorN = topicService.updateshyTopic(shyTopic1);
99 112 if (YorN == true) {
100 113 return new ResponseBean(ErrorEnum.SUCCESS,new JSONObject().put("topic_id", topic_id));
... ... @@ -103,17 +116,28 @@ public class TopicControllerApi {
103 116 }
104 117 }
105 118 //如果不存在直接插入
106   - shyTopic.setTitle(topicTitle);//话题标题
107   - shyTopic.setTopic_image(topicPic);//话题图片
108   - shyTopic.setShenhe_type(shenheType);//审核类型
109   - shyTopic.setTopic_text(topic_text);//话题内容
110   - shyTopic.setTopic_tag(topic_tag);//话题标签
111   - shyTopic.setTopic_url(topic_url);//话题url
112   - shyTopic.setTopic_time(topic_time);//话题创建时间
113   - shyTopic.setSp_id(spId);//spid
114   - shyTopic.setShenhe_status(CommonConst.AUDIT_INTT);;//当前话题的审核状态
115   - shyTopic.setUpdate_date(CommonUtils.getCurrentTime());//最后一次更新时间
116   - shyTopic.setCreate_date(CommonUtils.getCurrentTime());//送审时间
  119 + //话题标题
  120 + shyTopic.setTitle(topicTitle);
  121 + //话题图片
  122 + shyTopic.setTopic_image(topicPic);
  123 + //审核类型
  124 + shyTopic.setShenhe_type(shenheType);
  125 + //话题内容
  126 + shyTopic.setTopic_text(topic_text);
  127 + //话题标签
  128 + shyTopic.setTopic_tag(topic_tag);
  129 + //话题url
  130 + shyTopic.setTopic_url(topic_url);
  131 + //话题创建时间
  132 + shyTopic.setTopic_time(topic_time);
  133 + //spid
  134 + shyTopic.setSp_id(spId);
  135 + //当前话题的审核状态
  136 + shyTopic.setShenhe_status(CommonConst.AUDIT_INTT);
  137 + //最后一次更新时间
  138 + shyTopic.setUpdate_date(CommonUtils.getCurrentTime());
  139 + //送审时间
  140 + shyTopic.setCreate_date(CommonUtils.getCurrentTime());
117 141 boolean YorN = topicService.impotshyTopic(shyTopic);
118 142 if (YorN == true) {
119 143 return new ResponseBean(ErrorEnum.SUCCESS,new JSONObject().put("topic_id", topic_id));
... ...
src/main/java/com/cnlive/shenhe/api/VideosControllerApi.java
... ... @@ -26,7 +26,7 @@ import java.util.Map;
26 26 /**
27 27 * @author : chenhao
28 28 * @Date: 2018/12/6 11:17
29   - * @Description: 视频送审接口
  29 + * @Description: 送审接口
30 30 */
31 31 @Controller
32 32 @RequestMapping("/api/videos")
... ... @@ -67,19 +67,19 @@ public class VideosControllerApi {
67 67 if (CommonUtils.isNotNull(duration)) duration = duration / 1000;
68 68 //获取栏目分类
69 69 String category = CommonUtils.isEmpty(json.getString("multiplecategory")) ? "" : json.getString("multiplecategory");
70   - //获取视频上传人的id
  70 + //获取上传人的id
71 71 String sid = CommonUtils.isEmpty(json.getString("videoClipsName")) ? "" : json.getString("videoClipsName");
72 72 logger.info("videoClipsName:" + sid);
73 73 sid = CommonUtils.isEmpty(sid) ? "" : sid.split("_")[2];
74 74 logger.info("sid:" + sid);
75 75 //查询一下 存在,更新 没有,插入
76 76 ShyVideos shyVideos1 = new ShyVideos();
77   - //g得到视频id去查询是否已有
  77 + //g得到id去查询是否已有
78 78 String videoId = json.getString("videoId");
79 79 shyVideos1.setVideo_id(videoId);
80 80 List<ShyVideos> shyVideosList = videosService.findshyVideo(shyVideos1);
81 81 if (shyVideosList.size() > 0) {
82   - logger.info("点播入库更新视频开始............................");
  82 + logger.info("点播入库更新开始............................");
83 83 ShyVideos shyVideos = shyVideosList.get(0);
84 84 //封装数据入库
85 85 shyVideos.setVideo_id(videoId);
... ... @@ -170,7 +170,7 @@ public class VideosControllerApi {
170 170 //获取审核类型
171 171 videosService.getShenheType(shyVideos1);
172 172  
173   - if (shyVideos1.getShenhe_type() != 1) {
  173 + if (shyVideos1.getShenhe_type() != CommonConst.AUDIT_TYPE_FREE) {
174 174 //如果审核类型是人工审核,按照原有规则
175 175 if (shyVideos1.getShenhe_type() == CommonConst.AUDIT_TYPE_USER) {
176 176 if (CommonUtils.isNotNull(duration) && duration > 80) {
... ... @@ -184,7 +184,7 @@ public class VideosControllerApi {
184 184 shyVideos1 = avsample(shyVideos1);
185 185 } else {
186 186 //机审超过60秒的改为人工审核
187   - shyVideos1.setShenhe_type(3);
  187 + shyVideos1.setShenhe_type(CommonConst.AUDIT_TYPE_USER);
188 188 }
189 189 }
190 190 }
... ...
src/main/java/com/cnlive/shenhe/job/ChannelJob.java
... ... @@ -21,7 +21,8 @@ import java.util.List;
21 21 public class ChannelJob {
22 22 private static Logger logger = LoggerFactory.getLogger(ChannelJob.class);
23 23 @Value("${spring.localhost.url}")
24   - private String localhost_url;//本机地址
  24 + //本机地址
  25 + private String localhost_url;
25 26  
26 27 @Autowired
27 28 AuditPass Pass;
... ... @@ -35,7 +36,8 @@ public class ChannelJob {
35 36  
36 37 //遍历免审的spid去更改状态值
37 38 ShyChannel shyChannel = new ShyChannel();
38   - shyChannel.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);// 审核类型为免审
  39 + // 审核类型为免审
  40 + shyChannel.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);
39 41 shyChannel.setShenhe_status(CommonConst.AUDIT_INTT);
40 42 List<ShyChannel> channelList = channelService.findshyChannel(shyChannel);
41 43 if (channelList.size() > 0) {
... ...
src/main/java/com/cnlive/shenhe/job/CommentsJob.java
... ... @@ -22,10 +22,10 @@ public class CommentsJob {
22 22  
23 23 @Scheduled(fixedRate = 60 * 1000)
24 24 public void updateComments() {
25   -
26 25 //遍历免审的spid去更改状态值
27 26 ShyComments shyComments = new ShyComments();
28   - shyComments.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);// 审核类型为免审
  27 + // 审核类型为免审
  28 + shyComments.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);
29 29 shyComments.setState(CommonConst.AUDIT_INTT);
30 30 List<ShyComments> commentsList = commentsService.findshyComments(shyComments);
31 31 if (commentsList.size() > 0) {
... ... @@ -37,19 +37,22 @@ public class CommentsJob {
37 37  
38 38 /**
39 39 * 自动退领
  40 + * 每天0点执行
40 41 */
41 42 @Scheduled(cron = "0 0 0 * * ? ")
42   - //每天0点执行
43 43 public void autoRetReceive() {
44 44 logger.info("评论自动退领的进入.....");
45 45 ShyComments shyComments = new ShyComments();
46   - shyComments.setState(CommonConst.AUDIT_INTT);//审核状态:未审核
47   - shyComments.setReceive(CommonConst.RECEIVE_AFTER);//已领取
  46 + //审核状态:未审核
  47 + shyComments.setState(CommonConst.AUDIT_INTT);
  48 + //已领取
  49 + shyComments.setReceive(CommonConst.RECEIVE_AFTER);
48 50 List<ShyComments> commentsList = commentsService.findshyComments(shyComments);
49 51 if (commentsList.size() > 0) {
50 52 for (ShyComments comments : commentsList) {
51 53 logger.info("自动退领的comments_id:" + comments.getId());
52   - comments.setReceive(CommonConst.RECEIVE_BEFORE);//未领取
  54 + //未领取
  55 + comments.setReceive(CommonConst.RECEIVE_BEFORE);
53 56 comments.setReceive_user_id(null);
54 57 commentsService.updateshyComments1(comments);
55 58 }
... ...
src/main/java/com/cnlive/shenhe/job/ContentJob.java
... ... @@ -18,7 +18,9 @@ import java.util.List;
18 18 */
19 19 @Component
20 20 public class ContentJob {
  21 +
21 22 private static Logger logger = LoggerFactory.getLogger(ContentJob.class);
  23 +
22 24 @Autowired
23 25 ContentServiceImpl contentService;
24 26  
... ... @@ -45,7 +47,7 @@ public class ContentJob {
45 47  
46 48 /**
47 49 * 定时向易盾提交网站地址
48   - * //每分钟一次
  50 + * 每5分钟一次
49 51 */
50 52 @Scheduled(cron = "0 0/5 * * * ? ")
51 53 public void videofilter() {
... ... @@ -71,8 +73,9 @@ public class ContentJob {
71 73  
72 74 /**
73 75 * 自动退领
  76 + * 每天0点执行
74 77 */
75   - @Scheduled(cron = "0 0 0 * * ? ")//每天0点执行
  78 + @Scheduled(cron = "0 0 0 * * ? ")
76 79 public void autoRetReceive() {
77 80 logger.info("图文自动退领的进入.....");
78 81 ShyContent shyContent = new ShyContent();
... ...
src/main/java/com/cnlive/shenhe/job/LiveApplyJob.java
... ... @@ -31,14 +31,26 @@ import java.util.Map;
31 31 @Component
32 32 public class LiveApplyJob {
33 33 private static Logger logger = LoggerFactory.getLogger(LiveApplyJob.class);
  34 + /**
  35 + * //本机地址
  36 + */
34 37 @Value("${spring.localhost.url}")
35   - private String localhost_url;//本机地址
  38 + private String localhost_url;
  39 + /**
  40 + * //开发者对应的id,与app_key相对应
  41 + */
36 42 @Value("${email_app_id}")
37   - private String email_app_id;//开发者对应的id,与app_key相对应
  43 + private String email_app_id;
  44 + /**
  45 + * //开发者帐号对应的key. 请开发者谨慎保管此值。
  46 + */
38 47 @Value("${email_app_key}")
39   - private String email_app_key;//开发者帐号对应的key. 请开发者谨慎保管此值。
  48 + private String email_app_key;
  49 + /**
  50 + * //调用邮件发送服务器的地址
  51 + */
40 52 @Value("${email_send_URL}")
41   - private String email_send_URL;//调用邮件发送服务器的地址
  53 + private String email_send_URL;
42 54  
43 55 @Autowired
44 56 SitesServiceImpl sitesService;
... ... @@ -55,7 +67,8 @@ public class LiveApplyJob {
55 67  
56 68 //遍历免审的spid去更改状态值
57 69 ShyLiveapply shyLiveApply = new ShyLiveapply();
58   - shyLiveApply.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);// 审核类型为免审
  70 + // 审核类型为免审
  71 + shyLiveApply.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);
59 72 shyLiveApply.setShenhe_state(CommonConst.AUDIT_INTT);
60 73 List<ShyLiveapply> liveApplyList = liveApplyServiceImpl.findshyLiveApply(shyLiveApply);
61 74 if (liveApplyList.size() > 0) {
... ... @@ -73,28 +86,36 @@ public class LiveApplyJob {
73 86 Example example = new Example(ShyLiveapply.class);
74 87 Criteria criteria = example.createCriteria();
75 88 criteria.andEqualTo("shenhe_state", CommonConst.AUDIT_SUCCESS);
76   - criteria.andNotEqualTo("email_notice_state", CommonConst.NOTICE_SUCCESS);//状态不等于已通知
  89 + //状态不等于已通知
  90 + criteria.andNotEqualTo("email_notice_state", CommonConst.NOTICE_SUCCESS);
77 91 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example);
78 92 if (shyLiveApplyList.size() > 0) {
79   - String app_id = email_app_id; //开发者对应的id,与app_key相对应
80   - String app_key = email_app_key; //开发者帐号对应的key. 请开发者谨慎保管此值。
81   - String URL = email_send_URL;//调用邮件发送服务器的地址
  93 + //开发者对应的id,与app_key相对应
  94 + String app_id = email_app_id;
  95 + //开发者帐号对应的key. 请开发者谨慎保管此值。
  96 + String app_key = email_app_key;
  97 + //调用邮件发送服务器的地址
  98 + String URL = email_send_URL;
82 99 List<ShyEmail> shyEmailList = emailServiceImpl.getEmailSendList(CommonConst.EMAIL_LIVEAPPLY);
83 100 logger.info("直播申请邮件通知开始,共" + shyLiveApplyList.size() + "个申请,每个申请通知" + shyEmailList.size() + "个邮箱");
84 101 for (ShyLiveapply liveApply : shyLiveApplyList) {
85 102 logger.info("当前发送邮件的直播申请id为:" + liveApply.getId());
86   - Integer notice_state = liveApply.getEmail_notice_state();//初始化通知状态
87   - String notice_msg = liveApply.getEmail_notice_msg();//初始化通知消息
  103 + //初始化通知状态
  104 + Integer notice_state = liveApply.getEmail_notice_state();
  105 + //初始化通知消息
  106 + String notice_msg = liveApply.getEmail_notice_msg();
88 107 //显示spid简称
89 108 ShySites shySites = sitesService.findspidDescByspid(liveApply.getSp_id());
90 109 if (CommonUtils.isNotNull(shySites)) {
91 110 liveApply.setSpid_desc(shySites.getName());
92 111 }
93   - for (ShyEmail shyEmail : shyEmailList) {//循环需要发送邮件的邮箱
  112 + //循环需要发送邮件的邮箱
  113 + for (ShyEmail shyEmail : shyEmailList) {
94 114 String startTime = CommonUtils.formatDate(liveApply.getPre_start_time(), "yyyy-MM-dd HH:mm:ss");
95 115 String endTime = CommonUtils.isNotNull(liveApply.getPre_end_time()) ? CommonUtils.formatDate(liveApply.getPre_end_time(), "yyyy-MM-dd HH:mm:ss") : "待定";
96 116 String content = liveApply.getSender() + "__" + liveApply.getMobile() + "__" + liveApply.getOrganization() + "__" + liveApply.getTheme() + "__" + startTime + "__" + endTime + "__" + liveApply.getLive_place() + "__" + liveApply.getPush_url() + "__" + liveApply.getPull_source() + "," + liveApply.getPull_url();
97   - String dateTime = CommonUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss");//获取一个格式化后的当前时间
  117 + //获取一个格式化后的当前时间
  118 + String dateTime = CommonUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss");
98 119 String emailAddr = shyEmail.getEmail();
99 120 String title = liveApply.getSpid_desc() + "新直播开播申请";
100 121 String templateId = "4017";
... ... @@ -142,18 +163,22 @@ public class LiveApplyJob {
142 163  
143 164 /**
144 165 * 自动退领
  166 + * 每天0点执行
145 167 */
146   - @Scheduled(cron = "0 0 0 * * ? ")//每天0点执行
  168 + @Scheduled(cron = "0 0 0 * * ? ")
147 169 public void autoRetReceive() {
148 170 logger.info("直播申请自动退领的进入.....");
149 171 ShyLiveapply liveApply = new ShyLiveapply();
150   - liveApply.setShenhe_state(CommonConst.AUDIT_INTT);//审核状态:未审核
151   - liveApply.setReceive(CommonConst.RECEIVE_AFTER);//已领取
  172 + //审核状态:未审核
  173 + liveApply.setShenhe_state(CommonConst.AUDIT_INTT);
  174 + //已领取
  175 + liveApply.setReceive(CommonConst.RECEIVE_AFTER);
152 176 List<ShyLiveapply> shyLiveapplyList = liveApplyServiceImpl.findshyLiveApply(liveApply);
153 177 if (shyLiveapplyList.size() > 0) {
154 178 for (ShyLiveapply liveapply : shyLiveapplyList) {
155 179 logger.info("自动退领的liveApply_id:" + liveapply.getId());
156   - liveapply.setReceive(CommonConst.RECEIVE_BEFORE);//未领取
  180 + //未领取
  181 + liveapply.setReceive(CommonConst.RECEIVE_BEFORE);
157 182 liveapply.setAuditor(null);
158 183 liveApplyServiceImpl.updateshyLiveApply(liveApply);
159 184 }
... ...
src/main/java/com/cnlive/shenhe/job/NotSpeakJob.java
... ... @@ -22,8 +22,9 @@ public class NotSpeakJob {
22 22  
23 23 /**
24 24 * 自动解除禁言
  25 + * 每分钟一次
25 26 */
26   - @Scheduled(cron = "0 0/1 * * * ? ")//每分钟一次
  27 + @Scheduled(cron = "0 0/1 * * * ? ")
27 28 public void autoRetReceive() {
28 29 List<ShyNotspeak> shyNotspeakList = notSpeakService.getNotSpeakByTime();
29 30 if (shyNotspeakList.size() > 0) {
... ...
src/main/java/com/cnlive/shenhe/job/UsersSiteJob.java
... ... @@ -31,6 +31,7 @@ import java.util.Map;
31 31 */
32 32 @Component
33 33 public class UsersSiteJob {
  34 +
34 35 private static Logger logger = LoggerFactory.getLogger(UsersSiteJob.class);
35 36  
36 37 @Value("${sync_users_api}")
... ...
src/main/java/com/cnlive/shenhe/job/VideosJob.java
... ... @@ -17,7 +17,9 @@ import java.util.List;
17 17 */
18 18 @Component
19 19 public class VideosJob {
  20 +
20 21 private static Logger logger = LoggerFactory.getLogger(VideosJob.class);
  22 +
21 23 @Autowired
22 24 VideosServiceImpl videosService;
23 25  
... ... @@ -30,8 +32,10 @@ public class VideosJob {
30 32 @Scheduled(fixedRate = 60 * 1000)
31 33 public void updateVideos() {
32 34 ShyVideos shyVideos = new ShyVideos();
33   - shyVideos.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);// 审核类型为免审
34   - shyVideos.setState(CommonConst.AUDIT_INTT);// 审核状态为未审核
  35 + // 审核类型为免审
  36 + shyVideos.setShenhe_type(CommonConst.AUDIT_TYPE_FREE);
  37 + // 审核状态为未审核
  38 + shyVideos.setState(CommonConst.AUDIT_INTT);
35 39 List<ShyVideos> shyVideosList = videosService.findshyVideo(shyVideos);
36 40 if (shyVideosList.size() > 0) {
37 41 for (ShyVideos video : shyVideosList) {
... ... @@ -45,8 +49,9 @@ public class VideosJob {
45 49  
46 50 /**
47 51 * 定时向易盾发送视频抽帧图片进行检测
  52 + * 每天10点到23点执行,每分钟一次
48 53 */
49   - @Scheduled(cron = "0 0/1 10-23 * * ? ")//每天10点到23点执行,每分钟一次
  54 + @Scheduled(cron = "0 0/1 10-23 * * ? ")
50 55 public void videofilter() {
51 56 ShyVideos shyVideos = new ShyVideos();
52 57 //审核类型为机审
... ... @@ -77,8 +82,9 @@ public class VideosJob {
77 82  
78 83 /**
79 84 * 自动退领
  85 + * 每天0点执行
80 86 */
81   - @Scheduled(cron = "0 0 0 * * ? ")//每天0点执行
  87 + @Scheduled(cron = "0 0 0 * * ? ")
82 88 public void autoRetReceive() {
83 89 logger.info("点播自动退领的进入.....");
84 90 ShyVideos shyVideos = new ShyVideos();
... ...
src/main/java/com/cnlive/shenhe/job/YiDunUrlResultJob.java
... ... @@ -55,8 +55,9 @@ public class YiDunUrlResultJob {
55 55  
56 56 /**
57 57 * 定时查询易盾网站检测结果接口
  58 + * 每分钟一次
58 59 */
59   - @Scheduled(cron = "0 0/1 * * * ? ")//每分钟一次
  60 + @Scheduled(cron = "0 0/1 * * * ? ")
60 61 public void YiDunUrl() {
61 62 try {
62 63 Map<String, String> params = new HashMap<>(5);
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/AudioServiceImpl.java
... ... @@ -339,11 +339,11 @@ public class AudioServiceImpl {
339 339 logger.info("sites" + sites.toString());
340 340 //初始化一个审核状态
341 341 //审核类型 1-免审 2-机审 3-人工审
342   - Integer shenheType = 3;
  342 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
343 343 //如果当前sp是免审sp
344 344 if (sites.contains(shyAudio.getSpId())) {
345 345 //免审
346   - shenheType = 1;
  346 + shenheType = CommonConst.AUDIT_TYPE_FREE;
347 347 }
348 348 shyAudio.setShenhe_type(shenheType);
349 349 }
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/ChannelServiceImpl.java
... ... @@ -100,8 +100,8 @@ public class ChannelServiceImpl {
100 100 //是 我的已审,查通过和拒绝的两种状态
101 101 } else if (CommonUtils.isNotNull(channelDTO.getShenhe_status()) && channelDTO.getShenhe_status() == 3) {
102 102 Example.Criteria criteria1 = example.createCriteria();
103   - criteria1.orEqualTo("shenhe_status", 1);
104   - criteria1.orEqualTo("shenhe_status", 2);
  103 + criteria1.orEqualTo("shenhe_status", CommonConst.AUDIT_SUCCESS);
  104 + criteria1.orEqualTo("shenhe_status", CommonConst.AUDIT_REFUSE);
105 105 example.and(criteria1);
106 106 }
107 107  
... ... @@ -197,11 +197,11 @@ public class ChannelServiceImpl {
197 197 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_CHANNEL);
198 198 //初始化一个审核状态
199 199 //审核类型,1:免审,2:机审,3:人工审
200   - Integer shenheType = 3;
  200 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
201 201 //如果当前sp是免审sp
202 202 if (sites.contains(shyChannel.getSp_id())) {
203 203 //免审
204   - shenheType = 1;
  204 + shenheType = CommonConst.AUDIT_TYPE_FREE;
205 205 }
206 206 shyChannel.setShenhe_type(shenheType);
207 207 }
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/CommentsServiceImpl.java
... ... @@ -124,8 +124,8 @@ public class CommentsServiceImpl {
124 124 criteria.andEqualTo("state", commentsDTO.getState());
125 125 } else if (CommonUtils.isNotNull(commentsDTO.getState()) && commentsDTO.getState() == 3) {
126 126 Example.Criteria criteria1 = example.createCriteria();
127   - criteria1.orEqualTo("state", 1);
128   - criteria1.orEqualTo("state", 2);
  127 + criteria1.orEqualTo("state", CommonConst.AUDIT_SUCCESS);
  128 + criteria1.orEqualTo("state", CommonConst.AUDIT_REFUSE);
129 129 example.and(criteria1);
130 130 }
131 131  
... ... @@ -159,9 +159,9 @@ public class CommentsServiceImpl {
159 159 if (CommonUtils.isNotNull(commentsDTO.getIs_hot())) {
160 160 criteria.andEqualTo("is_hot", commentsDTO.getIs_hot());
161 161 }
162   - if (CommonUtils.isNotEmpty(commentsDTO.getType()) && commentsDTO.getType().equals("0")) {
  162 + if (CommonUtils.isNotEmpty(commentsDTO.getType()) && Integer.valueOf(commentsDTO.getType()) == 0) {
163 163 criteria.andEqualTo("type", CommonConst.CATEGORY_TOPIC);
164   - } else if (CommonUtils.isNotEmpty(commentsDTO.getType()) && commentsDTO.getType().equals("0")) {
  164 + } else if (CommonUtils.isNotEmpty(commentsDTO.getType()) && Integer.valueOf(commentsDTO.getType()) == 1) {
165 165 criteria.andIsNull("type");
166 166 }
167 167 if (CommonUtils.isNotEmpty(commentsDTO.getActivity_id())) {
... ... @@ -178,8 +178,8 @@ public class CommentsServiceImpl {
178 178 criteria.andEqualTo("state", commentsDTO.getState());
179 179 } else if (CommonUtils.isNotNull(commentsDTO.getState()) && commentsDTO.getState() == 3) {
180 180 Example.Criteria criteria1 = example.createCriteria();
181   - criteria1.orEqualTo("state", 1);
182   - criteria1.orEqualTo("state", 2);
  181 + criteria1.orEqualTo("state", CommonConst.AUDIT_SUCCESS);
  182 + criteria1.orEqualTo("state", CommonConst.AUDIT_REFUSE);
183 183 example.and(criteria1);
184 184 }
185 185  
... ... @@ -321,14 +321,15 @@ public class CommentsServiceImpl {
321 321 * @param shyComments
322 322 */
323 323 public void getShenheType(ShyComments shyComments) {
324   -
325 324 //获取评论免审sp
326 325 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_COMMENT);
327 326 //初始化一个审核状态
328   - Integer shenheType = 3;//审核类型,1:免审,2:机审,3:人工审
  327 + //审核类型,1:免审,2:机审,3:人工审
  328 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
329 329 //如果当前sp是免审sp
330 330 if (sites.contains(shyComments.getSpid())) {
331   - shenheType = 1;//免审
  331 + //免审
  332 + shenheType = CommonConst.AUDIT_TYPE_FREE;
332 333 }
333 334 shyComments.setShenhe_type(shenheType);
334 335 }
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/ContentServiceImpl.java
... ... @@ -266,13 +266,17 @@ public class ContentServiceImpl {
266 266  
267 267 // 设置图文状态为审核后的状态
268 268 content.setContent_status(state);
269   - content.setReceive_status(CommonConst.RECEIVE_AUDIT);// 领取状态为已审核
270   - content.setShenhe_msg(msg);// 设置审核消息
  269 + // 领取状态为已审核
  270 + content.setReceive_status(CommonConst.RECEIVE_AUDIT);
  271 + // 设置审核消息
  272 + content.setShenhe_msg(msg);
271 273 if (CommonUtils.isNotEmpty(userId)) {
272 274 content.setAuditor_id(userId);
273   - content.setShenhe_type(CommonConst.AUDIT_TYPE_USER);// 设置审核类型为人工
  275 + // 设置审核类型为人工
  276 + content.setShenhe_type(CommonConst.AUDIT_TYPE_USER);
274 277 } else {
275   - content.setUpdater(updater);//设置更新人
  278 + //设置更新人
  279 + content.setUpdater(updater);
276 280 }
277 281 content.setLast_update(CommonUtils.getCurrentTime());
278 282 int i = shyContentMapper.updateByPrimaryKeySelective(content);
... ... @@ -358,21 +362,21 @@ public class ContentServiceImpl {
358 362 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_CONTENT);
359 363 //初始化一个审核状态
360 364 //审核类型,1:免审,2:机审,3:人工审
361   - Integer shenheType = 3;
  365 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
362 366 //如果当前sp是免审sp
363 367 if (sites.contains(spId)) {
364 368 //免审
365   - shenheType = 1;
  369 + shenheType = CommonConst.AUDIT_TYPE_FREE;
366 370 } else {
367 371 if ("content".equals(ContentTag)) {
368 372 //免审
369   - shenheType = 1;
  373 + shenheType = CommonConst.AUDIT_TYPE_FREE;
370 374 } else if (ContentTag.startsWith("cms_") || ContentTag.startsWith("edu_")) {
371 375 //机审
372   - shenheType = 2;
  376 + shenheType = CommonConst.AUDIT_TYPE_MACHANE;
373 377 } else {
374 378 //人工审
375   - shenheType = 3;
  379 + shenheType = CommonConst.AUDIT_TYPE_USER;
376 380 }
377 381 }
378 382 return shenheType;
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/LiveApplyServiceImpl.java
... ... @@ -32,17 +32,17 @@ import java.util.List;
32 32 */
33 33 @Service
34 34 public class LiveApplyServiceImpl {
35   - private static Logger logger = LoggerFactory.getLogger(LiveApplyServiceImpl.class);
  35 + private static Logger logger = LoggerFactory.getLogger(LiveApplyServiceImpl.class);
36 36 @Autowired
37 37 ShyLiveMapper shyLiveMapper;
38 38 @Autowired
39 39 ShyLiveapplyMapper shyLiveApplyMapper;
40 40 @Autowired
41 41 ShyUsersMapper shyUsersMapper;
42   -
  42 +
43 43 @Autowired
44 44 SitesServiceImpl sitesService;
45   -
  45 +
46 46 //==============
47 47 public boolean impotLiveApply(ShyLiveapply shyLiveApply) {
48 48 int result = shyLiveApplyMapper.insertSelective(shyLiveApply);
... ... @@ -54,7 +54,7 @@ public class LiveApplyServiceImpl {
54 54  
55 55 //==============
56 56 public ShyLiveapply selectByPrimaryKey(Integer id) {
57   - ShyLiveapply shyLiveApply = shyLiveApplyMapper.selectByPrimaryKey(id);
  57 + ShyLiveapply shyLiveApply = shyLiveApplyMapper.selectByPrimaryKey(id);
58 58 return shyLiveApply;
59 59 }
60 60  
... ... @@ -63,12 +63,12 @@ public class LiveApplyServiceImpl {
63 63 List<ShyLiveapply> shyLiveApplylist = shyLiveApplyMapper.selectByRowBounds(shyLiveApply, new RowBounds(0, 100));
64 64 return shyLiveApplylist;
65 65 }
66   -
  66 +
67 67 public ShyLiveapply queryshyLiveApply(String activity_id) {
68   - ShyLiveapply shyLiveApply =new ShyLiveapply();
69   - shyLiveApply.setActivity_id(activity_id);
70   - List<ShyLiveapply> shyLiveApplylist = shyLiveApplyMapper.select(shyLiveApply);
71   - return shyLiveApplylist.get(0);
  68 + ShyLiveapply shyLiveApply = new ShyLiveapply();
  69 + shyLiveApply.setActivity_id(activity_id);
  70 + List<ShyLiveapply> shyLiveApplylist = shyLiveApplyMapper.select(shyLiveApply);
  71 + return shyLiveApplylist.get(0);
72 72 }
73 73  
74 74 //==============
... ... @@ -81,14 +81,14 @@ public class LiveApplyServiceImpl {
81 81 }
82 82  
83 83 //==============
84   - public int updateLiveApply(Integer id, String auditor_id,String updater, Integer status, String msg) {
85   - ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id);
86   - shyLiveapply.setAuditor(auditor_id);
87   - shyLiveapply.setShenhe_state(status);
88   - shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER);
89   - shyLiveapply.setShenhe_msg(msg);
90   - shyLiveapply.setUpdater(updater);
91   - shyLiveapply.setUpdated_at(CommonUtils.getCurrentTime());
  84 + public int updateLiveApply(Integer id, String auditor_id, String updater, Integer status, String msg) {
  85 + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id);
  86 + shyLiveapply.setAuditor(auditor_id);
  87 + shyLiveapply.setShenhe_state(status);
  88 + shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER);
  89 + shyLiveapply.setShenhe_msg(msg);
  90 + shyLiveapply.setUpdater(updater);
  91 + shyLiveapply.setUpdated_at(CommonUtils.getCurrentTime());
92 92 return shyLiveApplyMapper.updateByPrimaryKey(shyLiveapply);
93 93 }
94 94  
... ... @@ -99,8 +99,8 @@ public class LiveApplyServiceImpl {
99 99 Example.Criteria criteria = example.createCriteria();
100 100 if (CommonUtils.isNotEmpty(liveApplyDTO.getOrderByClause())) {
101 101 example.setOrderByClause(liveApplyDTO.getOrderByClause());
102   - }else{
103   - example.setOrderByClause("created_at desc");
  102 + } else {
  103 + example.setOrderByClause("created_at desc");
104 104 }
105 105 if (CommonUtils.isNotEmpty(liveApplyDTO.getStart_date())) {
106 106 Timestamp startdate = null;
... ... @@ -111,35 +111,35 @@ public class LiveApplyServiceImpl {
111 111 }
112 112 criteria.andGreaterThanOrEqualTo("pre_start_time", startdate);
113 113 }
114   - if ( CommonUtils.isNotEmpty(liveApplyDTO.getEnd_date())) {
115   - Timestamp enddate = null;
116   - try {
117   - enddate = CommonUtils.parseDate(liveApplyDTO.getEnd_date(), "yyyy-MM-dd");
118   - } catch (ParseException e) {
119   - e.printStackTrace();
120   - }
121   - criteria.andLessThanOrEqualTo("pre_end_time", enddate);
  114 + if (CommonUtils.isNotEmpty(liveApplyDTO.getEnd_date())) {
  115 + Timestamp enddate = null;
  116 + try {
  117 + enddate = CommonUtils.parseDate(liveApplyDTO.getEnd_date(), "yyyy-MM-dd");
  118 + } catch (ParseException e) {
  119 + e.printStackTrace();
  120 + }
  121 + criteria.andLessThanOrEqualTo("pre_end_time", enddate);
122 122 }
123 123 if (CommonUtils.isNotEmpty(liveApplyDTO.getTheme())) {
124 124 criteria.andLike("theme", "%" + liveApplyDTO.getTheme() + "%");
125 125 }
126   -
  126 +
127 127 if (CommonUtils.isNotNull(liveApplyDTO.getBusiness_model())) {
128 128 criteria.andLike("organization", "%" + liveApplyDTO.getBusiness_model() + "%");
129 129 }
130 130 if (CommonUtils.isNotNull(liveApplyDTO.getSpid())) {
131 131 criteria.andEqualTo("sp_id", liveApplyDTO.getSpid());
132 132 }
133   - if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() != 3) {
  133 + if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state()) && liveApplyDTO.getShenhe_state() != 3) {
134 134 criteria.andEqualTo("shenhe_state", liveApplyDTO.getShenhe_state());
135   - }else if(CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() == 3){
136   - criteria.andNotEqualTo("shenhe_state", 0);
  135 + } else if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state()) && liveApplyDTO.getShenhe_state() == 3) {
  136 + criteria.andNotEqualTo("shenhe_state", 0);
137 137 }
138 138 if (CommonUtils.isNotNull(liveApplyDTO.getReceive())) {
139   - criteria.andEqualTo("receive", liveApplyDTO.getReceive());
140   - if(liveApplyDTO.getReceive()!=0 && CommonUtils.isNotEmpty(liveApplyDTO.getUserId())){
141   - criteria.andEqualTo("auditor", liveApplyDTO.getUserId());
142   - }
  139 + criteria.andEqualTo("receive", liveApplyDTO.getReceive());
  140 + if (liveApplyDTO.getReceive() != 0 && CommonUtils.isNotEmpty(liveApplyDTO.getUserId())) {
  141 + criteria.andEqualTo("auditor", liveApplyDTO.getUserId());
  142 + }
143 143 }
144 144 PageHelper.startPage(liveApplyDTO.getPage(), liveApplyDTO.getPageSize(), true);
145 145 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example);
... ... @@ -149,16 +149,16 @@ public class LiveApplyServiceImpl {
149 149  
150 150 //======================
151 151 public ShyLiveapply getDetailsLive(Integer id) {
152   - ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id);
  152 + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id);
153 153 if (!shyLiveapply.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
154   - String updater = CommonUtils.isEmpty(shyLiveapply.getUpdater()) || "null".equals(shyLiveapply.getUpdater())? "自动通过":shyLiveapply.getUpdater();
  154 + String updater = CommonUtils.isEmpty(shyLiveapply.getUpdater()) || "null".equals(shyLiveapply.getUpdater()) ? "自动通过" : shyLiveapply.getUpdater();
155 155 String auditor_id = shyLiveapply.getAuditor();
156 156 if (CommonUtils.isNotEmpty(auditor_id)) {
157 157 ShyUsers user = new ShyUsers();
158 158 user.setUser_id(auditor_id);
159 159 user = shyUsersMapper.selectOne(user);
160   - String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail())? "" : user.getEmail();
161   - String userName = CommonUtils.isEmpty(user.getUsername()) ? email: user.getUsername();
  160 + String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail();
  161 + String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername();
162 162 updater = userName;
163 163 }
164 164 shyLiveapply.setUpdater(updater);
... ... @@ -172,12 +172,13 @@ public class LiveApplyServiceImpl {
172 172 if (CommonUtils.isNotEmpty(ids)) {
173 173 String[] cids = ids.split(",");
174 174 for (String cid : cids) {
175   - ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid));
  175 + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid));
176 176 if (CommonUtils.isNotNull(shyLiveapply) && shyLiveapply.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
177   - shyLiveapply.setAuditor(userId);;
178   - shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
179   - shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER);
180   - shyLiveApplyMapper.updateByPrimaryKeySelective(shyLiveapply);
  177 + shyLiveapply.setAuditor(userId);
  178 + ;
  179 + shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
  180 + shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER);
  181 + shyLiveApplyMapper.updateByPrimaryKeySelective(shyLiveapply);
181 182 n++;
182 183 }
183 184 }
... ... @@ -192,10 +193,10 @@ public class LiveApplyServiceImpl {
192 193 List<ShyLiveapply> shyLiveapplyList = shyLiveApplyMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
193 194 if (!shyLiveapplyList.isEmpty()) {
194 195 for (ShyLiveapply shyLiveapply : shyLiveapplyList) {
195   - shyLiveapply.setAuditor(userId);
196   - shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
197   - shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER);
198   - shyLiveApplyMapper.updateByPrimaryKeySelective(shyLiveapply);
  196 + shyLiveapply.setAuditor(userId);
  197 + shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
  198 + shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER);
  199 + shyLiveApplyMapper.updateByPrimaryKeySelective(shyLiveapply);
199 200 n++;
200 201 }
201 202 }
... ... @@ -207,11 +208,11 @@ public class LiveApplyServiceImpl {
207 208 public ResponseBean retReceive(String ids, String userId) {
208 209 String[] cids = ids.split(",");
209 210 for (String cid : cids) {
210   - ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid));
  211 + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid));
211 212 if (shyLiveapply.getShenhe_state().equals(CommonConst.AUDIT_INTT) && shyLiveapply.getReceive().equals(CommonConst.RECEIVE_AFTER) && shyLiveapply.getAuditor().equals(userId)) {
212   - shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
213   - shyLiveapply.setReceive(CommonConst.RECEIVE_BEFORE);
214   - shyLiveapply.setAuditor(null);
  213 + shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
  214 + shyLiveapply.setReceive(CommonConst.RECEIVE_BEFORE);
  215 + shyLiveapply.setAuditor(null);
215 216 int i = shyLiveApplyMapper.updateByPrimaryKey(shyLiveapply);
216 217 if (i != 1) {
217 218 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,请重试");
... ... @@ -225,6 +226,7 @@ public class LiveApplyServiceImpl {
225 226  
226 227 /**
227 228 * 根据条件导出数据excel
  229 + *
228 230 * @return
229 231 */
230 232 public List<ShyLiveapply> findByCondition(LiveApplyDTO liveApplyDTO) {
... ... @@ -232,8 +234,8 @@ public class LiveApplyServiceImpl {
232 234 Example.Criteria criteria = example.createCriteria();
233 235 if (CommonUtils.isNotEmpty(liveApplyDTO.getOrderByClause())) {
234 236 example.setOrderByClause(liveApplyDTO.getOrderByClause());
235   - }else{
236   - example.setOrderByClause("pre_start_time");
  237 + } else {
  238 + example.setOrderByClause("pre_start_time");
237 239 }
238 240 if (CommonUtils.isNotEmpty(liveApplyDTO.getStart_date())) {
239 241 Timestamp startdate = null;
... ... @@ -244,56 +246,59 @@ public class LiveApplyServiceImpl {
244 246 }
245 247 criteria.andGreaterThanOrEqualTo("pre_start_time", startdate);
246 248 }
247   - if ( CommonUtils.isNotEmpty(liveApplyDTO.getEnd_date())) {
248   - Timestamp enddate = null;
249   - try {
250   - enddate = CommonUtils.parseDate(liveApplyDTO.getEnd_date(), "yyyy-MM-dd");
251   - } catch (ParseException e) {
252   - e.printStackTrace();
253   - }
254   - criteria.andLessThanOrEqualTo("pre_end_time", enddate);
  249 + if (CommonUtils.isNotEmpty(liveApplyDTO.getEnd_date())) {
  250 + Timestamp enddate = null;
  251 + try {
  252 + enddate = CommonUtils.parseDate(liveApplyDTO.getEnd_date(), "yyyy-MM-dd");
  253 + } catch (ParseException e) {
  254 + e.printStackTrace();
  255 + }
  256 + criteria.andLessThanOrEqualTo("pre_end_time", enddate);
255 257 }
256 258 if (CommonUtils.isNotEmpty(liveApplyDTO.getTheme())) {
257 259 criteria.andLike("theme", "%" + liveApplyDTO.getTheme() + "%");
258 260 }
259   -
  261 +
260 262 if (CommonUtils.isNotNull(liveApplyDTO.getBusiness_model())) {
261 263 criteria.andEqualTo("business_model", liveApplyDTO.getBusiness_model());
262 264 }
263 265 if (CommonUtils.isNotNull(liveApplyDTO.getSpid())) {
264 266 criteria.andEqualTo("sp_id", liveApplyDTO.getSpid());
265 267 }
266   - if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() != 3) {
  268 + if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state()) && liveApplyDTO.getShenhe_state() != 3) {
267 269 criteria.andEqualTo("shenhe_state", liveApplyDTO.getShenhe_state());
268   - }else if(CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() == 3){
269   - criteria.andNotEqualTo("shenhe_state", 0);
  270 + } else if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state()) && liveApplyDTO.getShenhe_state() == 3) {
  271 + criteria.andNotEqualTo("shenhe_state", 0);
270 272 }
271 273 if (CommonUtils.isNotNull(liveApplyDTO.getReceive())) {
272   - criteria.andEqualTo("receive", liveApplyDTO.getReceive());
273   - if(liveApplyDTO.getReceive()!=0 && CommonUtils.isNotEmpty(liveApplyDTO.getUserId())){
274   - criteria.andEqualTo("auditor", liveApplyDTO.getUserId());
275   - }
  274 + criteria.andEqualTo("receive", liveApplyDTO.getReceive());
  275 + if (liveApplyDTO.getReceive() != 0 && CommonUtils.isNotEmpty(liveApplyDTO.getUserId())) {
  276 + criteria.andEqualTo("auditor", liveApplyDTO.getUserId());
  277 + }
276 278 }
277 279 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example);
278 280 return shyLiveApplyList;
279 281 }
280   -
  282 +
281 283 /**
282 284 * 获得审核类型
  285 + *
283 286 * @param shyLiveApply
284 287 */
285   - public void getShenheType(ShyLiveapply shyLiveApply){
286   -
287   - //获取直播频道免审sp
  288 + public void getShenheType(ShyLiveapply shyLiveApply) {
  289 +
  290 + //获取直播频道免审sp
288 291 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_LIVEAPPLY);
289 292 //初始化一个审核状态
290   - Integer shenheType=3;//审核类型,1:免审,2:机审,3:人工审
  293 + //审核类型,1:免审,2:机审,3:人工审
  294 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
291 295 //如果当前sp是免审sp
292   - if(sites.contains(shyLiveApply.getSp_id())){
293   - shenheType=1;//免审
  296 + if (sites.contains(shyLiveApply.getSp_id())) {
  297 + //免审
  298 + shenheType = CommonConst.AUDIT_TYPE_FREE;
294 299 }
295 300 shyLiveApply.setShenhe_type(shenheType);
296   - }
297   -
  301 + }
  302 +
298 303  
299 304 }
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/TopicServiceImpl.java
... ... @@ -238,12 +238,15 @@ public class TopicServiceImpl {
238 238 //获取图文免审sp
239 239 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_TOPIC);
240 240 //初始化一个审核状态
241   - Integer shenheType = 3;//审核类型,1:免审,2:机审,3:人工审
  241 + //审核类型,1:免审,2:机审,3:人工审
  242 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
242 243 //如果当前sp是免审sp
243 244 if (sites.contains(spId)) {
244   - shenheType = 1;//免审
  245 + //免审
  246 + shenheType = CommonConst.AUDIT_TYPE_FREE;
245 247 } else {
246   - shenheType = 3;//人工审
  248 + //人工审
  249 + shenheType = CommonConst.AUDIT_TYPE_USER;
247 250 }
248 251 return shenheType;
249 252 }
... ...
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
... ... @@ -28,9 +28,7 @@ import org.springframework.util.StringUtils;
28 28 import tk.mybatis.mapper.entity.Example;
29 29  
30 30 import java.text.ParseException;
31   -import java.util.Date;
32   -import java.util.List;
33   -import java.util.UUID;
  31 +import java.util.*;
34 32  
35 33 /**
36 34 * @Auther: chenhao
... ... @@ -463,15 +461,15 @@ public class VideosServiceImpl {
463 461 String source = shyVideo.getSource();
464 462 //初始化一个审核状态
465 463 //审核类型,1:免审,2:机审,3:人工审
466   - Integer shenheType = 3;
  464 + Integer shenheType = CommonConst.AUDIT_TYPE_USER;
467 465 //如果当前sp是免审sp source有传空的时候 默认给0
468 466 if (sites.contains(shyVideo.getSpid()) || shyActivities.contains(StringUtils.isEmpty(source) ? "0" : Integer.valueOf(source))) {
469 467 logger.info("进入已经免审渠道:{}", source);
470 468 //免审
471   - shenheType = 1;
  469 + shenheType = CommonConst.AUDIT_TYPE_FREE;
472 470 } else if ("10000".equals(source)) {
473 471 //机审
474   - shenheType = 2;
  472 + shenheType = CommonConst.AUDIT_TYPE_MACHANE;
475 473 } else {
476 474 //如果栏目是“目击者”
477 475 if (CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_WITNESS)) {
... ... @@ -481,30 +479,46 @@ public class VideosServiceImpl {
481 479 //如果存在免审用户
482 480 if (CommonUtils.isNotNull(shyUserfree)) {
483 481 //免审
484   - shenheType = 1;
  482 + shenheType = CommonConst.AUDIT_TYPE_FREE;
485 483 } else {
486 484 //用户不免审
487 485 //机审
488   - shenheType = 2;
  486 + shenheType = CommonConst.AUDIT_TYPE_MACHANE;
489 487 }
490 488 } else {
491 489 //如果用户id不存在
492 490 //机审
493   - shenheType = 2;
  491 + shenheType = CommonConst.AUDIT_TYPE_MACHANE;
494 492 }
495   - if ("41".equals(shyVideo.getSource()) || "42".equals(shyVideo.getSource()) || "43".equals(shyVideo.getSource()) || "44".equals(shyVideo.getSource()) || "45".equals(shyVideo.getSource()) || "46".equals(shyVideo.getSource()) || "47".equals(shyVideo.getSource())) {
496   - shenheType = 3;
  493 + if (renGongShenHe(shyVideo)) {
  494 + //给审核变量 赋值人工审核
  495 + shenheType = CommonConst.AUDIT_TYPE_USER;
497 496 }
498 497 }
499 498 //如果栏目是朋友圈
500 499 if (CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_MOMENT)) {
501 500 //免审
502   - shenheType = 1;
  501 + shenheType = CommonConst.AUDIT_TYPE_FREE;
503 502 }
504 503 }
505 504 shyVideo.setShenhe_type(shenheType);
506 505 }
507 506  
  507 + /**
  508 + * 以下参数为人工审核
  509 + *
  510 + * @param shyVideo
  511 + * @return
  512 + */
  513 + public boolean renGongShenHe(ShyVideos shyVideo) {
  514 + String[] list = {"41", "42", "43", "44", "45", "46", "47"};
  515 + List<String> asList = Arrays.asList(list);
  516 + if (asList.contains(shyVideo.getSource())) {
  517 + //人工审 返回true
  518 + return true;
  519 + }
  520 + return false;
  521 + }
508 522  
509 523 public String repulse(String shyVideoId, String msg, String userId) {
510 524 String showMsg = "";
... ... @@ -533,7 +547,6 @@ public class VideosServiceImpl {
533 547 showMsg = showMsg + "," + shyVideos.getVideo_title() + " 更新失败";
534 548 return showMsg;
535 549 }
536   -
537 550 return showMsg;
538 551 }
539 552  
... ...
src/main/java/com/cnlive/shenhe/utils/CommonConst.java
... ... @@ -2,8 +2,6 @@ package com.cnlive.shenhe.utils;
2 2  
3 3 import com.alibaba.fastjson.JSONObject;
4 4  
5   -import java.util.Map;
6   -
7 5 /**
8 6 * @Auther: 周伟鹏
9 7 * @Date: 2018/11/30 14:20
... ... @@ -146,6 +144,7 @@ public class CommonConst {
146 144 //邮件消息设置
147 145 public static JSONObject EMAIL_MESSAGE = JSONObject.parseObject("{\"1\":\"直播申请邮件通知\"}");
148 146  
  147 + //抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败
149 148 /**
150 149 * 抽帧状态:未抽帧
151 150 */
... ...
src/main/java/com/cnlive/shenhe/utils/CommonConstStates.java 0 → 100644
  1 +package com.cnlive.shenhe.utils;
  2 +
  3 +/**
  4 + * @Author: yan-zhao-wang
  5 + * @DateTime: 2022-03-31 11:44
  6 + */
  7 +public class CommonConstStates {
  8 +
  9 + //直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制)
  10 + /**
  11 + * 直播撤销
  12 + */
  13 + public static Integer ZHIBO_CHEXIAO = 0;
  14 + /**
  15 + * 直播等待
  16 + */
  17 + public static Integer ZHIBO_DENGDAI = 3;
  18 + /**
  19 + * 正在直播
  20 + */
  21 + public static Integer ZHIBO_ZHENGZAI = 1;
  22 + /**
  23 + * 直播结束
  24 + */
  25 + public static Integer ZHIBO_JIESHU = 2;
  26 +
  27 + /**
  28 + * 直播下线
  29 + */
  30 + public static Integer ZHIBO_XIAXIAN = 4;
  31 +
  32 +
  33 +
  34 + //是否是热点: 0:全部 ,1:不是 ,2: 是
  35 +
  36 + /**
  37 + * 是否是热点: 0:全部 ,1:不是 ,2: 是
  38 + */
  39 + public static Integer SHIFOU_REDIANYES = 2;
  40 + /**
  41 + * 是否是热点: 0:全部 ,1:不是 ,2: 是
  42 + */
  43 + public static Integer SHIFOU_REDIANNO = 1;
  44 +
  45 + /**
  46 + * 是否是热点: 0:全部 ,1:不是 ,2: 是
  47 + */
  48 + public static Integer QUANBU = 0;
  49 +
  50 +
  51 + //是否显示 0:不显示 1:显示
  52 + /**
  53 + * 是否显示 0:不显示 1:显示
  54 + */
  55 + public static Integer SHIFOU_XIANSHINO = 0;
  56 + /**
  57 + * 是否显示 0:不显示 1:显示
  58 + */
  59 + public static Integer SHIFOU_XIANSHIYES = 1;
  60 +
  61 +
  62 +
  63 + //商务模式:0免费 1收费
  64 + /**
  65 + * 商务模式:0免费 1收费
  66 + */
  67 + public static Integer MIANFEI = 0;
  68 + /**
  69 + * 商务模式:0免费 1收费
  70 + */
  71 + public static Integer SHOUFEI = 1;
  72 +
  73 + //0表示正常 1表示下线
  74 +
  75 + /**
  76 + * 0表示正常 1表示下线
  77 + */
  78 + public static Integer ZHENGCHANG = 0;
  79 + /**
  80 + * 0表示正常 1表示下线
  81 + */
  82 + public static Integer XIAXIAN = 1;
  83 +}
... ...