서버 인터페이스

1468 단어
/**
 * Created by ZYY on 2017/7/27.
 */
@RestController
@RequestMapping("/bang")
public class DemoController {
    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @PostMapping("/getVersion")
    public UpdateVO getVersionByMac(String mac){
        logger.info(" :" + mac);
        // ==================   mac version ( service , )=====
        UpdateVO updateVO = new UpdateVO();
//        APKcode apkcode = new APKcode();
//        Map map = apkcode.readAPK();
//        Object obj = map.get("versionCode");
//        int serverVersionCode = 0;
//        if(null != obj) { 
//            serverVersionCode = Integer.parseInt(obj.toString());
//        }
        updateVO.setServerVersionCode(2);
//        updateVO.setUrl("http://192.168.20.97:8020/customer-signup/apk/app-debug.apk");
        updateVO.setUrl("http://139.196.106.143/app-debug.apk ");
        return updateVO;
        // ====================end===================
    }
}


class UpdateVO{
    private int serverVersionCode;
    private String url;

    public int getServerVersionCode() {
        return serverVersionCode;
    }

    public void setServerVersionCode(int serverVersionCode) {
        this.serverVersionCode = serverVersionCode;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}

좋은 웹페이지 즐겨찾기