mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
打印日志
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user