Helius
2020-12-21 975888ed15a3326b824ebc6d28a769da56e3bcd8
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;
    }
}