whyclxw
2024-04-28 b25b814a949d2065a61fd3167206ffb51a57af65
src/main/java/com/whyc/controller/InterFaceController.java
@@ -2,6 +2,7 @@
import com.whyc.dto.InterfaceParam;
import com.whyc.dto.Response;
import com.whyc.pojo.BattRealdata;
import com.whyc.pojo.Fbs9100Setparam;
import com.whyc.service.InterfaceService;
import io.swagger.annotations.Api;
@@ -9,12 +10,13 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;
@RequestMapping("interface")
@RestController
@Api(tags = "第三方接口")
public class InterFaceController {
public class InterFaceController extends BaseController{
    @Resource
    private InterfaceService service;
    @GetMapping("/getBattInf")
@@ -98,7 +100,7 @@
    @GetMapping("/createInterface")
    @ApiOperation("生成第三方验证码")
    public Response createInterface(@RequestParam String interfaceName) {
    public Response createInterface(@RequestParam String interfaceName) throws NoSuchAlgorithmException {
        return service.createInterface(interfaceName);
    }
@@ -136,4 +138,10 @@
    public Response sendCmdSet(@RequestBody Fbs9100Setparam param,@RequestParam String interfaceNumber){
        return service.sendCmdSet(param,interfaceNumber);
    }
    @PostMapping("/getBattHistoryDataList")
    @ApiOperation("获取电池历史实时数据")
    public Response getBattHistoryDataList(@RequestBody BattRealdata data, @RequestParam String interfaceNumber) throws ParseException, InterruptedException {
        return service.getBattHistoryDataList(data, interfaceNumber);
    }
}