Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

master
chenchaod pirms 4 dienas
vecāks
revīzija
d6862ec331

+ 19
- 0
zhywpt-service-ats/lib/postmsg.conf Parādīt failu

@@ -0,0 +1,19 @@

#********** XuanWu SDK **********

#********** Logger(depends on commons-logging) **********
sdk.logger.enable=true
# Business level logs
sdk.logger.biz.enable=true

#********** User Profiles **********
sdk.userProfiles.enable=true
sdk.userProfiles.serverUrl=http://profiles.139130.com/profiles/pub/mos/user/getUserProfiles
# Fetch interval, must be greater than 0
sdk.userProfiles.fetchIntervalSeconds=30

#********** High Availability **********
sdk.highAvailability.enable=true

#********** Performance Monitor **********
sdk.monitor.enable=false

+ 18
- 18
zhywpt-service-ats/src/main/java/cn/com/taiji/ats/manager/hltSendShort/SendShortManager.java Parādīt failu

@@ -86,31 +86,30 @@ public class SendShortManager {
}

public UpwardShortQueryResponse upwardShort(UpwardShortQueryRequest request) throws ServiceHandleException {
// MTReport mtReport = new MTReport();
// mtReport.setId("f97f1629be7e4363b1f109bc447ad594");
// mtReport.setBatchID("123");
// mtReport.setPhone("13888889999");
// mtReport.setMsgID("测试");
// mtReport.setCustomMsgID("13888889999");
// mtReport.setState(1);
// mtReport.setSubmitTime(1755484481);
// mtReport.setDoneTime(1755484492);
List<MTReport> list = test(request.getFetchSize());
// list.add(mtReport);
List<MTReport> list = getUpward(request.getFetchSize());
UpwardShortQueryResponse response = new UpwardShortQueryResponse();
response.setMTReports(list);
return response;
}

public List<MTReport> test(int fetchSize) {
Account account = new Account("admin@test1", "123456"); // 账号
final PostMsg pm = new PostMsg(false, 7000, 1); // 注意, 请使用单例模式, 而非每次下发new一次
pm.getCmHost().setHost("192.168.100.44", 9080); //设置网关的IP和port,用于发送信息
pm.getWsHost().setHost("192.168.100.44", 9070);
// pm.getCmHost().setHost("211.147.239.62", 9080); //设置网关的IP和port,用于发送信息
// pm.getWsHost().setHost("211.147.239.62", 9070);
// private static PostMsg pm;
// static {
// pm = new PostMsg();
// // 内网地址
// // 设置发送短信的网关
// pm.getCmHost().setHost("192.168.100.112", 8090);
// // 设置用户获取账号信息、上行、状态报告等的网关
// pm.getWsHost().setHost("192.168.100.112", 8088);
// }
public List<MTReport> getUpward(int fetchSize) {
System.out.println("-----------------------------------开始初始化------------------------------------");
Account account = new Account("QTZL20240529", "ATuwRFkX"); // 账号
PostMsg pm = new PostMsg();
pm.getCmHost().setHost("192.168.100.112", 9080);
pm.getWsHost().setHost("192.168.100.112", 8088);
MOMsg[] mos = new MOMsg[0];
List<MTReport> mtReportList = new ArrayList<>();
System.out.println("-----------------------------------开始访问------------------------------------");
try {
mos = pm.getMOMsgs(account, fetchSize);
} catch (Exception e) {
@@ -124,6 +123,7 @@ public class SendShortManager {
mtReportList.add(mtReport);
}
}
System.out.println("-----------------------------------访问结束------------------------------------");
return mtReportList;
}


Notiek ielāde…
Atcelt
Saglabāt