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