package com.zhiqiyun.open.manager.controller;

import com.zhiqiyun.open.service.Ip2RegionService;
import com.zhiqiyun.open.service.SequenceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class IndexController {

	@Autowired
	private Ip2RegionService ip2RegionService;
	@Autowired
	private SequenceService sequenceService;

	@RequestMapping(method = {RequestMethod.POST, RequestMethod.GET}, value = {"/", "/index", "/index.do"})
	public Object index() {
		return this.sequenceService.nextId();
	}
}
