update 加接口

This commit is contained in:
Guoqs
2025-06-16 09:11:48 +08:00
parent 0f9fdfb009
commit 894f9bef89
2 changed files with 48 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
package com.jsowell.api.feign;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.pile.service.PileBasicInfoService;
import com.jsowell.pile.service.PileBillingTemplateService;
import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Anonymous
@RestController
@RequestMapping("/jsowellcharger")
public class JsowellChargerController extends BaseController {
@Autowired
private PileBasicInfoService pileBasicInfoService;
@Autowired
private PileBillingTemplateService pileBillingTemplateService;
/**
* 获取桩基础信息
* http://localhost:8080/jsowellcharger/getPileBasicInfo/88000000000126
* @param pileSn
* @return
*/
@GetMapping("/getPileBasicInfo/{pileSn}")
public PileInfoVO getPileBasicInfo(@PathVariable("pileSn") String pileSn) {
logger.info("获取桩基础信息 pileSn:{}", pileSn);
return pileBasicInfoService.selectPileInfoBySn(pileSn);
}
/**
* 根据桩编号查询计费模板
* http://localhost:8080/jsowellcharger/getPileBasicInfo
*/
@GetMapping("/getPileBillingTemplate/{pileSn}")
public BillingTemplateVO getPileBasicInfoByPileSn(@PathVariable("pileSn") String pileSn) {
logger.info("根据桩编号查询计费模板 pileSn:{}", pileSn);
return pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn);
}
}

View File

@@ -805,7 +805,7 @@ public class SpringBootTestController {
@Test
public void selectBillingTemplateDetailByPileSnTest() {
String pileSn = "88000000000001";
String pileSn = "88000000000126";
// 查询充电桩的计费模板
BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn);
System.out.println(JSON.toJSONString(billingTemplateVO));