修改redis配置参数,新增获取账号爬取次数接口
This commit is contained in:
@@ -2,13 +2,12 @@ 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.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@@ -26,9 +25,18 @@ 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user