mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
新增 运营端小程序查询枪口信息列表接口
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package com.jsowell.api.uniapp.business;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.business.QueryConnectorInfoDTO;
|
||||
import com.jsowell.pile.service.PileConnectorInfoService;
|
||||
import com.jsowell.pile.vo.uniapp.business.BusinessConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.business.StationStatisticsInfosVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运营端小程序枪口信息相关controller
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/8/27 16:04:31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business/pile/connector")
|
||||
public class BusinessConnectorInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private PileConnectorInfoService pileConnectorInfoService;
|
||||
|
||||
/**
|
||||
* 获取枪口信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getBusinessConnectorInfoList")
|
||||
public RestApiResponse<?> getBusinessConnectorInfoList(@RequestBody QueryConnectorInfoDTO dto) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
BusinessConnectorInfoVO connectorInfoVO = pileConnectorInfoService.getConnectorListByStationAndStatus(dto);
|
||||
response = new RestApiResponse<>(ImmutableMap.of("ConnectorInfoVO", connectorInfoVO));
|
||||
} catch (Exception e) {
|
||||
logger.error("获取枪口信息列表 error", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("获取枪口信息列表 params:{}, result:{}", JSONObject.toJSONString(dto), response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user