|
|
@ -2,6 +2,7 @@ package com.epmet.controller; |
|
|
|
|
|
|
|
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; |
|
|
|
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; |
|
|
|
import com.epmet.commons.tools.enums.EnvEnum; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
@ -24,10 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
import javax.annotation.PreDestroy; |
|
|
|
import java.net.InetAddress; |
|
|
|
import java.net.UnknownHostException; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
@ -186,7 +184,7 @@ public class IndexCalculateController { |
|
|
|
future.cancel(true); |
|
|
|
redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId)); |
|
|
|
futureMap.remove(customerId); |
|
|
|
HttpClientManager.getInstance().sendAlarmMsg(String.format("数据统计服务-中止计算成功,customerId:%s", customerId)); |
|
|
|
HttpClientManager.getInstance().sendAlarmMsg(String.format(EnvEnum.getCurrentEnv().getName() + "数据统计服务-中止计算成功,customerId:%s", customerId)); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
@ -195,7 +193,7 @@ public class IndexCalculateController { |
|
|
|
public Result<Boolean> calculateAll(@RequestBody CalculateCommonFormDTO formDTO) { |
|
|
|
long start = System.currentTimeMillis(); |
|
|
|
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); |
|
|
|
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
if (aBoolean) { |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|