mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 加接口
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user