启动充电测试

This commit is contained in:
ZZ 2021-08-05 19:01:50 +08:00
parent 6d48e9c2c4
commit 8ac066fb13
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import com.xhpc.common.core.constant.ServiceNameConstants;
import com.xhpc.common.core.domain.R; import com.xhpc.common.core.domain.R;
import com.xhpc.common.data.down.StartChargingData; import com.xhpc.common.data.down.StartChargingData;
import com.xhpc.common.data.redis.CacheRateModel; import com.xhpc.common.data.redis.CacheRateModel;
import com.xhpc.common.security.annotation.PreAuthorize;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -16,7 +15,7 @@ import java.util.Set;
@FeignClient(contextId = "powerPileService", value = ServiceNameConstants.PILE_SERVICE, fallbackFactory = PowerPileFallbackFactory.class) @FeignClient(contextId = "powerPileService", value = ServiceNameConstants.PILE_SERVICE, fallbackFactory = PowerPileFallbackFactory.class)
public interface PowerPileService { public interface PowerPileService {
@PreAuthorize(hasPermi = "user:privilege:add") // @PreAuthorize(hasPermi = "user:privilege:add") todo
@PostMapping("/charging/start") @PostMapping("/charging/start")
R startCharging(@Validated @RequestBody StartChargingData startChargingData); R startCharging(@Validated @RequestBody StartChargingData startChargingData);

View File

@ -64,6 +64,7 @@ public class PileController {
@GetMapping("terminal/{terminalSn}/status") @GetMapping("terminal/{terminalSn}/status")
public Object terminalStatus(@PathVariable("terminalSn")String terminalSn) { public Object terminalStatus(@PathVariable("terminalSn")String terminalSn) {
// todo
return R.ok(); return R.ok();
} }

View File

@ -27,8 +27,8 @@ public class TestController {
// String ipAndPort = GetIpAndPort.getIpAndPort(); // String ipAndPort = GetIpAndPort.getIpAndPort();
StartChargingData d = new StartChargingData(); StartChargingData d = new StartChargingData();
d.setBalance(b); //300
d.setOrderNo(ono); //00000000000000000000000123456789 d.setOrderNo(ono); //00000000000000000000000123456789
d.setBalance(b); //300
d.setGunId(gid); //02 d.setGunId(gid); //02
return powerPileService.startCharging(d); return powerPileService.startCharging(d);
} }