新增 运营端小程序查询枪口信息列表接口

This commit is contained in:
Lemon
2024-08-28 16:15:43 +08:00
parent 653ace40e6
commit 702820e0b4
4 changed files with 122 additions and 13 deletions

View File

@@ -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;
}
}