新增 小程序查询站点计费模板列表接口

This commit is contained in:
Lemon
2023-08-10 18:48:50 +08:00
parent cd8d934d8f
commit 0e0b199fea
3 changed files with 33 additions and 6 deletions

View File

@@ -10,10 +10,8 @@ import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
import com.jsowell.pile.dto.QueryConnectorListDTO;
import com.jsowell.pile.dto.QueryStationDTO;
import com.jsowell.pile.service.IPileBasicInfoService;
import com.jsowell.pile.service.IPileConnectorInfoService;
import com.jsowell.pile.service.IPileStationInfoService;
import com.jsowell.pile.service.YKCPushCommandService;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
import com.jsowell.pile.vo.uniapp.GroundLockInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -43,6 +41,9 @@ public class PileController extends BaseController {
@Autowired
private IPileBasicInfoService pileBasicInfoService;
@Autowired
private IPileBillingTemplateService pileBillingTemplateService;
/**
* 查询充电站信息列表(主页)
@@ -67,6 +68,27 @@ public class PileController extends BaseController {
return response;
}
/**
* 通过站点id查询计费模板列表
* http://localhost:8080/uniapp/pile/queryBillingPrice/{stationId}
* @param stationId
* @return
*/
@GetMapping("/queryBillingPrice/{stationId}")
public RestApiResponse<?> queryBillingPrice(@PathVariable("stationId") String stationId) {
logger.info("通过站点id查询计费模板列表 params:{}", stationId);
RestApiResponse<?> response = null;
try {
List<BillingPriceVO> billingPriceVOList = pileBillingTemplateService.queryBillingPrice(stationId);
response = new RestApiResponse<>(billingPriceVOList);
} catch (Exception e) {
logger.error("通过站点id查询计费模板列表 error, ", e);
response = new RestApiResponse<>(e);
}
logger.info("通过站点id查询计费模板列表 result:{}", response);
return response;
}
/**
* 通过前端参数查询充电枪口列表
*

View File

@@ -264,8 +264,8 @@ public class TempController extends BaseController {
* @param dto
* @return
*/
@PostMapping("/batchRefund")
public RestApiResponse<?> batchRefund(@RequestBody ApplyRefundDTO dto) {
@PostMapping("/batchWechatRefund")
public RestApiResponse<?> batchWechatRefund(@RequestBody ApplyRefundDTO dto) {
logger.info("批量退款接口 params:{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response = null;
List<String> memberIdList = dto.getMemberIdList();

View File

@@ -520,6 +520,11 @@ public class PileBillingTemplateServiceImpl implements IPileBillingTemplateServi
return resultList;
}
/**
* 通过站点id查询计费模板列表
* @param stationId 站点id
* @return
*/
@Override
public List<BillingPriceVO> queryBillingPrice(String stationId) {
// 查询站点当前计费模板 有缓存