From 975888ed15a3326b824ebc6d28a769da56e3bcd8 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Mon, 21 Dec 2020 18:18:30 +0800 Subject: [PATCH] modify --- zq-erp/src/main/java/com/matrix/system/api/action/UsersAction.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/api/action/UsersAction.java b/zq-erp/src/main/java/com/matrix/system/api/action/UsersAction.java index 92a4aa3..68402ca 100644 --- a/zq-erp/src/main/java/com/matrix/system/api/action/UsersAction.java +++ b/zq-erp/src/main/java/com/matrix/system/api/action/UsersAction.java @@ -1,6 +1,15 @@ package com.matrix.system.api.action; +import com.matrix.core.pojo.AjaxResult; +import com.matrix.system.api.vo.UserAchieveVo; +import com.matrix.system.hive.service.AchieveNewService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -13,7 +22,21 @@ @RequestMapping(value = "/api/user") public class UsersAction { + @Autowired + private AchieveNewService achieveNewService; + @ApiOperation(value = "获取用户业绩接口 type 1-今日 2-昨天 3-本月 4-上月") + @ApiResponses({ + @ApiResponse(code = 200, message = "ok", response = UserAchieveVo.class) + }) + @GetMapping(value = "/findUserAchieve/{type}") + public AjaxResult findUserAchieve(@PathVariable("type") Integer type) { + UserAchieveVo achieveVo = achieveNewService.findUserAchieveByTime(type); + AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); + ajaxResult.putInMap("achieve", achieveVo); + return ajaxResult; + } + } -- Gitblit v1.9.1