Helius
2020-12-28 2c678522fc2adf031c28feb6563648f7133ff4b1
zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
@@ -1,13 +1,25 @@
package com.matrix.system.app.action;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.system.app.vo.RankingDto;
import com.matrix.core.tools.DateUtil;
import com.matrix.system.app.dto.RankingDto;
import com.matrix.system.app.vo.RankingVo;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.SysOrder;
import com.matrix.system.hive.service.AchieveNewService;
import com.matrix.system.hive.service.SysOrderService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @author wzy
@@ -18,19 +30,47 @@
@RequestMapping(value ="/api/ranking")
public class ApiRankingAction {
    public AjaxResult findStaffAchieveRanking() {
    @Autowired
    private SysOrderService sysOrderService;
    @Autowired
    private AchieveNewService achieveNewService;
    @ApiOperation(value = "顾问业绩排行榜", notes = "顾问业绩排行榜")
    @ApiResponses({
            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
    })
    @PostMapping(value = "/findStaffAchieveRanking")
    public AjaxResult findStaffAchieveRanking(@RequestBody RankingDto rankingDto) {
        return null;
    }
    @ApiOperation(value = "门店业绩排行榜", notes = "门店业绩排行榜")
    @ApiResponses({
            @ApiResponse(code = 200, message = "ok", response = RankingDto.class)
            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
    })
    public AjaxResult findShopAchieveRanking() {
        return null;
    @PostMapping(value = "/findShopAchieveRanking")
    public AjaxResult findShopAchieveRanking(@RequestBody RankingDto rankingDto) {
        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("");
        if (RankingDto.SALE.equals(rankingDto.getDataType())) {
            SysOrder sysOrder = new SysOrder();
            QueryUtil.setQueryLimitCom(sysOrder);
            sysOrder.setType(rankingDto.getType());
            sysOrder.setOrderTime(DateUtil.stringToDate(rankingDto.getTime(), DateUtil.DATE_FORMAT_DD));
            List<RankingVo> list = sysOrderService.findApiShopAchieveRanking(sysOrder);
            ajaxResult.setRows(list);
        } else {
        }
        return ajaxResult;
    }
    public AjaxResult findBeauticianAchieveRanking() {
    @ApiOperation(value = "美疗师业绩排行榜", notes = "美疗师业绩排行榜")
    @ApiResponses({
            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
    })
    @PostMapping(value = "/findBeauticianAchieveRanking")
    public AjaxResult findBeauticianAchieveRanking(@RequestBody RankingDto rankingDto) {
        return null;
    }
}