43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
package com.yupi.springbootinit.controller;
|
|
|
|
import com.yupi.springbootinit.common.BaseResponse;
|
|
import com.yupi.springbootinit.common.ResultUtils;
|
|
import com.yupi.springbootinit.model.vo.common.AccountCrawlCount;
|
|
import com.yupi.springbootinit.model.vo.country.CountryInfoVO;
|
|
import com.yupi.springbootinit.service.CommonService;
|
|
import com.yupi.springbootinit.service.CountryInfoService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
import java.util.List;
|
|
|
|
/*
|
|
* @author: ziin
|
|
* @date: 2025/6/13 13:44
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/common")
|
|
@Slf4j
|
|
@CrossOrigin
|
|
public class CommonController {
|
|
|
|
@Resource
|
|
private CountryInfoService countryInfoService;
|
|
|
|
@Resource
|
|
private CommonService commonService;
|
|
|
|
@PostMapping("country_info")
|
|
public BaseResponse<List<CountryInfoVO>> countryInfo() {
|
|
|
|
return ResultUtils.success(countryInfoService.getCountryList());
|
|
}
|
|
|
|
@GetMapping("accountCount")
|
|
public BaseResponse<AccountCrawlCount> getAccountCount(@RequestParam String accountName){
|
|
return ResultUtils.success(commonService.getAccountCrawlCount(accountName));
|
|
}
|
|
|
|
}
|