打印日志

This commit is contained in:
Guoqs
2024-09-09 21:45:49 +08:00
parent 4500fd649d
commit d77aeaec35
2 changed files with 77 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ import com.jsowell.web.controller.pile.PileConnectorInfoController;
import com.jsowell.thirdparty.common.CommonService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@@ -259,7 +260,36 @@ public class PileController extends BaseController {
return response;
}
/**
* 预约充电接口
*/
@PostMapping("/selectConnectorInfoListNo")
public RestApiResponse<?> selectConnectorInfoListNo(@RequestBody QueryConnectorListDTO dto) {
RestApiResponse<?> response = null;
try {
Map<String, Object> map = Maps.newHashMap();
StopWatch stopWatch = new StopWatch("selectConnectorInfoListNo");
stopWatch.start("查询枪口列表");
List<ConnectorInfoVO> connectorInfoVOS = pileConnectorInfoService.selectConnectorInfoList(dto.getPileSn());
stopWatch.stop();
stopWatch.start("查询计费模板");
List<BillingPriceVO> billingPriceVOS = pileBillingTemplateService.queryBillingPrice(dto.getStationId());
stopWatch.stop();
stopWatch.start("查询运营商信息");
MerchantInfoVO merchantInfoVO = pileMerchantInfoService.getMerchantInfoVO(dto.getMerchantId());
stopWatch.stop();
map.put("connectorInfoList", connectorInfoVOS);
map.put("billingPriceList", billingPriceVOS);
map.put("merchantInfoVO", merchantInfoVO);
response = new RestApiResponse<>(map);
logger.info("查询充电枪口详情耗时:{}", stopWatch);
}catch (Exception e) {
logger.error("查询充电枪口详情 error", e);
response = new RestApiResponse<>(e);
}
logger.info("查询充电枪口详情 response:{}", response);
return response;
}
}