package com.huimv.receiver.farm.controller;

import com.huimv.receiver.farm.service.INetIPService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.UnsupportedEncodingException;
import java.text.ParseException;

/**
 * @Project : huimv.shiwan
 * @Package : com.huimv.biosafety.uface.controller
 * @Description : TODO
 * @Version : 1.0
 * @Author : ZhuoNing
 * @Create : 2020-12-25
 **/
@CrossOrigin
@RestController
@Slf4j
@RequestMapping(value = "/ip")
public class NetIPController {
    @Autowired
    private INetIPService netIPService;

    @RequestMapping(value = "/updateNetIp",method = RequestMethod.POST)
    public void updateIp(@RequestParam(value = "data",required = true) String data) throws UnsupportedEncodingException, ParseException {
        //--更新公网ip
        netIPService.updateNetIP(data);
    }
}
