Commit 3a03e176 by admin

部分推送取消

parent 025cc5e6
......@@ -305,6 +305,19 @@ public class ExcelReadAndWrite {
}
public static void main(String[] args) {
try (Socket s = new Socket(host, port);
PrintWriter pw = new PrintWriter(s.getOutputStream());
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(s.getInputStream(), "utf-8"));) {
pw.println("getnum");
pw.flush();
String str = bufferedReader.readLine();
System.out.println("正常运行" + str);
} catch (Exception e) {
log.error("错误信息{}", e);
}
}
public static byte[] readStream(InputStream inStream) throws Exception {
ByteArrayOutputStream outSteam = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
......
......@@ -22,8 +22,10 @@ public class ReaderExcel {
private final static Log log = LogFactory.getLog(ReaderExcel.class);
public static void main(String[] args) throws IOException {
System.out.println("https://mp.weixin.qq.com/s?src=11&timestamp=1525385592&ver=855&signature=t61muuTJKorCLU9B6F9khlfr3ezct6GGh-Moxq*9b4RZxgQnHSpElHV9CYCi2YnSA3nOz2*a04k6R9iHOGzctg1KS9Bgx3jelhxEi5NzmXHmhglHbp8Tjf5*rKEFilpi&new=1&key=95dc4253938e3c7ba33e1ff6f7363608ab00e37f99c7f7ff7e7cb4e5b1a6ce70df92e7de80d56d237ffe33cd15ffcb0a80bc0d064ece8d169c6e38960f0d44e359a01cd7bcb987a08b3de1a19e94eb06&uin=NTk1NjM2Nzg3&key=b97b0a94956e0cb2b01167441267dc09f5e79cb852c323792d0040c1988b0c39913e23a2e43b0bccef725d2843e0da0d81c5164338260e6b932f25085936eec21b0e71ca66cd78582d2411b4737cb644&uin=MzM3MTk2NzAxNA%3D%3D".replaceAll("&key=[\\s\\S]+", ""));
System.out.println(
"https://mp.weixin.qq.com/s?src=11&timestamp=1525385592&ver=855&signature=t61muuTJKorCLU9B6F9khlfr3ezct6GGh-Moxq*9b4RZxgQnHSpElHV9CYCi2YnSA3nOz2*a04k6R9iHOGzctg1KS9Bgx3jelhxEi5NzmXHmhglHbp8Tjf5*rKEFilpi&new=1&key=95dc4253938e3c7ba33e1ff6f7363608ab00e37f99c7f7ff7e7cb4e5b1a6ce70df92e7de80d56d237ffe33cd15ffcb0a80bc0d064ece8d169c6e38960f0d44e359a01cd7bcb987a08b3de1a19e94eb06&uin=NTk1NjM2Nzg3&key=b97b0a94956e0cb2b01167441267dc09f5e79cb852c323792d0040c1988b0c39913e23a2e43b0bccef725d2843e0da0d81c5164338260e6b932f25085936eec21b0e71ca66cd78582d2411b4737cb644&uin=MzM3MTk2NzAxNA%3D%3D"
.replaceAll("&key=[\\s\\S]+", ""));
}
public static List<Weixin> getExcel(String url) throws IOException {
......@@ -101,7 +103,7 @@ public class ReaderExcel {
}
}
}
if (w != null)
if (w != null && w.getUrl() != null)
list.add(w);
}
}
......@@ -140,6 +142,7 @@ public class ReaderExcel {
}
return list;
}
public static Sheet getSheetByNum(Workbook book, int number) {
Sheet sheet = null;
try {
......
......@@ -107,7 +107,7 @@ public class PushFinanceByTime extends Thread {
}
}
private void sendsEmail(Calendar cal, List<NewsResult> list,
private void sendsEmail(Calendar cal, List<NewsResult> list,
String url) {
try {
new ExcelUtil().pushDataWithFinanceLong(list,cal.getTime(), url);
......@@ -118,7 +118,7 @@ public class PushFinanceByTime extends Thread {
} catch (Exception e) {
log.error("一号邮箱发送失败,尝试二号邮箱{}", e);
try {
new ExcelUtil().pushDataWithFinanceLong(list, cal.getTime(), url);
new ExcelUtil().pushDataWithFinanceLong(list, cal.getTime(), url);
SendMailUtil.sendMessage2("949131080@qq.com", url, "金融");
SendMailUtil.sendMessage2("yuhualong@zhiweidata.com", url, "金融");
SendMailUtil.sendMessage2("ligaodie@zhiweidata.com", url, "金融");
......
......@@ -17,7 +17,7 @@ import com.zw.entity.NewsResult;
import sendmail.SendMailUtil;
@Component
//@Component
public class PushFinanceByTimeLess extends Thread {
private static final Log log = LogFactory.getLog(PushFinanceByTimeLess.class);
private static final MongoConnection con = new MongoConnection();
......
......@@ -230,6 +230,7 @@ public class MainController {
excel.setSite(0);
excel.setSurplusCount(list.size());
excel.setStartDate("未开始");
System.out.println(list.size());
lists.add(excel);
if (!ExcelReadAndWrite.runStrat) {
Thread t = new Thread() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment