src/main/java/com/javaer/employmentmanage/controller/EmploymentStatisticController.java
(完整代码) 1KBpackage com.javaer.employmentmanage.controller;
import com.github.pagehelper.PageInfo;
import com.javaer.employmentmanage.common.CommonResult;
import com.javaer.employmentmanage.service.EmploymentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/employmentmanage")
public class EmploymentStatisticController {
@Autowired
EmploymentInfoService employmentInfoService;
@RequestMapping("/statistic")
public String index() {
return "system/employmentstatistic/employmentstatistic";
}
@ResponseBody
@RequestMapping("/statistic/{fieldName}")
public CommonResult<List<Map<String, String>>> getStatisticData(@PathVariable("fieldName") String fieldName,
@RequestParam("limit") int pageSize, @RequestParam("page") int pageNum) {
PageInfo<Map<String, String>> pageInfo = employmentInfoService.getStudentCount(fieldName, pageNum, pageSize);
return CommonResult.generateSuccessResult(pageInfo.getTotal(), pageInfo.getList());
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
