Commit b3a9e4abb6d110ad15809d6fe9a1d5e108a28c92

Authored by liwei2917
1 parent 2d210fbb

直播申请审核增加拉流来源

src/main/java/com/cnlive/shenhe/api/LiveApplyControllerApi.java
... ... @@ -69,6 +69,7 @@ public class LiveApplyControllerApi {
69 69 String livePlace = json.getString("livePlace");//直播地点
70 70 String pushUrl = json.getString("pushUrl");//推流地址
71 71 String pullUrl = json.getString("pullUrl");//拉流地址
  72 + String pullSource = json.getString("pullSource");//拉流来源
72 73 String platforms = json.getString("platforms");//播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
73 74 String startTime = json.getString("preStartTime");//预计开始时间
74 75 Date timestamp_start =null;
... ... @@ -104,6 +105,7 @@ public class LiveApplyControllerApi {
104 105 shyliveApply.setLive_place(livePlace);//直播地点
105 106 shyliveApply.setPush_url(pushUrl);//推流地址
106 107 shyliveApply.setPull_url(pullUrl);//拉流地址
  108 + shyliveApply.setPull_source(pullSource);//拉流来源
107 109 shyliveApply.setPlatforms(platforms);//播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
108 110 shyliveApply.setCallback(callback);//设置回调地址
109 111 shyliveApply.setReceive(CommonConst.RECEIVE_BEFORE);
... ... @@ -133,6 +135,7 @@ public class LiveApplyControllerApi {
133 135 shyliveApply1.setLive_place(livePlace);//直播地点
134 136 shyliveApply1.setPush_url(pushUrl);//推流地址
135 137 shyliveApply1.setPull_url(pullUrl);//拉流地址
  138 + shyliveApply1.setPull_source(pullSource);//拉流来源
136 139 shyliveApply1.setPlatforms(platforms);//播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
137 140 shyliveApply1.setCallback(callback);//设置回调地址
138 141 liveApplyServiceImpl.getShenheType(shyliveApply1);//获取审核类型
... ...
src/main/java/com/cnlive/shenhe/entity/ShyLiveapply.java
... ... @@ -92,6 +92,11 @@ public class ShyLiveapply {
92 92 private String pull_url;
93 93  
94 94 /**
  95 + * 拉流来源
  96 + */
  97 + private String pull_source;
  98 +
  99 + /**
95 100 * 播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
96 101 */
97 102 private String platforms;
... ... @@ -466,6 +471,24 @@ public class ShyLiveapply {
466 471 }
467 472  
468 473 /**
  474 + * 获取拉流来源
  475 + *
  476 + * @return pull_source - 拉流来源
  477 + */
  478 + public String getPull_source() {
  479 + return pull_source;
  480 + }
  481 +
  482 + /**
  483 + * 设置拉流来源
  484 + *
  485 + * @param pull_source 拉流来源
  486 + */
  487 + public void setPull_source(String pull_source) {
  488 + this.pull_source = pull_source;
  489 + }
  490 +
  491 + /**
469 492 * 获取播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
470 493 *
471 494 * @return platforms - 播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
... ...
src/main/java/com/cnlive/shenhe/job/LiveApplyJob.java
... ... @@ -97,6 +97,7 @@ public class LiveApplyJob {
97 97 List<ShyEmail> shyEmailList=emailServiceImpl.getEmailSendList(CommonConst.EMAIL_LIVEAPPLY);
98 98 logger.info("直播申请邮件通知开始,共"+shyLiveApplyList.size()+"个申请,每个申请通知"+shyEmailList.size()+"个邮箱");
99 99 for(ShyLiveapply liveApply : shyLiveApplyList){
  100 + logger.info("当前发送邮件的直播申请id为:"+liveApply.getId());
100 101 Integer notice_state = liveApply.getEmail_notice_state();//初始化通知状态
101 102 String notice_msg = liveApply.getEmail_notice_msg();//初始化通知消息
102 103 //显示spid简称
... ... @@ -107,7 +108,7 @@ public class LiveApplyJob {
107 108 for(ShyEmail shyEmail:shyEmailList){//循环需要发送邮件的邮箱
108 109 String startTime=CommonUtils.formatDate(liveApply.getPre_start_time(), "yyyy-MM-dd HH:mm:ss");
109 110 String endTime=CommonUtils.isNotNull(liveApply.getPre_end_time())?CommonUtils.formatDate(liveApply.getPre_end_time(), "yyyy-MM-dd HH:mm:ss"):"待定";
110   - String content = liveApply.getSender()+"__"+liveApply.getMobile()+"__"+liveApply.getOrganization()+"__"+liveApply.getTheme()+"__"+startTime+"__"+endTime+"__"+liveApply.getLive_place()+"__"+liveApply.getPush_url()+"__"+liveApply.getPull_url();
  111 + String content = liveApply.getSender()+"__"+liveApply.getMobile()+"__"+liveApply.getOrganization()+"__"+liveApply.getTheme()+"__"+startTime+"__"+endTime+"__"+liveApply.getLive_place()+"__"+liveApply.getPush_url()+"__"+liveApply.getPull_source()+","+liveApply.getPull_url();
111 112 String dateTime=CommonUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss");//获取一个格式化后的当前时间
112 113 String emailAddr = shyEmail.getEmail();
113 114 String title = liveApply.getSpid_desc()+"新直播开播申请";
... ... @@ -123,7 +124,7 @@ public class LiveApplyJob {
123 124 httpUtil.setParamMap(params);
124 125 try {
125 126 Map<String, String> post = httpUtil.post(URL);
126   - logger.info(post.get("result"));
  127 + logger.info("当前发送邮件用户为:"+emailAddr+",发送邮件的直播申请审核云id为:"+liveApply.getId()+"结果为:"+post.get("result"));
127 128 JSONObject result=JSONObject.parseObject(post.get("result"));
128 129 if (result == null) {
129 130 notice_state=CommonConst.NOTICE_FAIL;
... ...
src/main/resources/mapper/ShyLiveapplyMapper.xml
... ... @@ -22,6 +22,7 @@
22 22 <result column="live_place" jdbcType="VARCHAR" property="live_place" />
23 23 <result column="push_url" jdbcType="VARCHAR" property="push_url" />
24 24 <result column="pull_url" jdbcType="VARCHAR" property="pull_url" />
  25 + <result column="pull_source" jdbcType="VARCHAR" property="pull_source" />
25 26 <result column="platforms" jdbcType="VARCHAR" property="platforms" />
26 27 <result column="callback" jdbcType="VARCHAR" property="callback" />
27 28 <result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type" />
... ... @@ -31,9 +32,9 @@
31 32 <result column="auditor" jdbcType="VARCHAR" property="auditor" />
32 33 <result column="shenhe_msg" jdbcType="VARCHAR" property="shenhe_msg" />
33 34 <result column="email_notice_state" jdbcType="INTEGER" property="email_notice_state" />
34   - <result column="email_notice_msg" jdbcType="VARCHAR" property="email_notice_msg" />
35 35 <result column="created_at" jdbcType="TIMESTAMP" property="created_at" />
36 36 <result column="updated_at" jdbcType="TIMESTAMP" property="updated_at" />
37 37 <result column="simple_content" jdbcType="LONGVARCHAR" property="simple_content" />
  38 + <result column="email_notice_msg" jdbcType="LONGVARCHAR" property="email_notice_msg" />
38 39 </resultMap>
39 40 </mapper>
40 41 \ No newline at end of file
... ...