墨杭相关的代码

master
土豆兄弟 4 years ago
parent 06963abd8a
commit 6edf050f34

@ -92,7 +92,7 @@ public class ABClient {
@ResponseBody
public CommonResponse getDBTagInfoMohang(@RequestBody ABClientInterMessageVO vo) {
// 记录日志
log.info("====== [ one request comming, request content is {} ] ======", vo.toString());
log.info("====== [ Mohang request comming, request content is {} ] ======", vo.toString());
// 转换实体类映射
List<ABMessageDTO> dtos = ABMessageConverter.convertABMessageDTOFromVO(vo);
// 调用业务处理接口 返回校验成功的结果

@ -289,10 +289,10 @@ public class ABDownTask {
@Async(value = "abTaskExecutor")
public void doRunMohangTask(List<ABMessageDTO> messageDTOList){
Long satrtMilliSecond = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
log.info("====== [ task start running, task name is {} ] ======", "ABDownTask");
log.info("====== [ RunMohang task start running, task name is {} ] ======", "ABDownTask");
runMohangTask(messageDTOList);
Long endMilliSecond = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
log.info("====== [ task start end, task name is {},cost milliSecond is {} ] ======", "ABDownTask", (endMilliSecond-satrtMilliSecond));
log.info("====== [ RunMohang task start end, task name is {},cost milliSecond is {} ] ======", "ABDownTask", (endMilliSecond-satrtMilliSecond));
}
/**
@ -346,7 +346,7 @@ public class ABDownTask {
mohangMessageCovDTO.setSignature(SecureUtil.sha1("app_id="+ mohangAppId +"&timestamp="+ time + "&secret=" + mohangSecretKey));
// 数据实体转成Json 不忽略空kv 有序
String jsonStr = JSON.toJSONString(mohangMessageCovDTO);
log.info("========== [ready send json is {} ] =============", jsonStr);
log.info("========== [RunMohang ready send json is {} ] =============", jsonStr);
// 请求的响应处理
// todo 失败重发请求3次
while (count <= 3){

@ -151,6 +151,10 @@ ab:
token_addr: https://tapi.qizuang.com/v1/gettoken
akey: mPMRhJIX4xWAUgxc
ckey: jTuMccC8qkc49hUK
mohang:
appId: TZRamCan
url: http://175.27.191.107:8080//highseas/api/tz
secretKey: 77ea829b727913a87f8aa461b392dbb5
logging:
config: classpath:logback.xml
@ -222,3 +226,7 @@ ab:
token_addr: https://tapi.qizuang.com/v1/gettoken
akey: mPMRhJIX4xWAUgxc
ckey: jTuMccC8qkc49hUK
mohang:
appId: TZRamCan
url: http://175.27.191.107:8080//highseas/api/tz
secretKey: 77ea829b727913a87f8aa461b392dbb5

@ -163,12 +163,11 @@ public class OpenapiApplicationTest {
*/
@Test
public void testMatchArea(){
String phone = "13311112222"; // 13311112222
String phone = "18958049294"; // 13311112222
if (phone.length() == 11 ){
String substring = StringUtils.substring(phone, 0, phone.length() - 4);
System.out.println(phonesRepository.findByNumber(substring)); // 1300018
}
}
}

Loading…
Cancel
Save