|
@@ -1,780 +0,0 @@
|
|
|
-package org.jeecg.modules.system.controller;
|
|
|
-
|
|
|
-import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
|
-import cn.com.ctop.performanceaccount.entity.PerformanceAccount;
|
|
|
-import cn.com.ctop.performanceappraisal.entity.Performance;
|
|
|
-import cn.com.ctop.userefficientvideomap.entity.*;
|
|
|
-import cn.com.ctop.userefficientvideomap.mapper.UserEfficientVideoMapMapper;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang.StringUtils;
|
|
|
-import org.apache.shiro.SecurityUtils;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
-import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
-import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.system.vo.LoginUser;
|
|
|
-import org.jeecg.common.util.DateUtils;
|
|
|
-import org.jeecg.modules.ctop.entity.Project;
|
|
|
-import org.jeecg.modules.system.service.IPerformanceService2;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-/**
|
|
|
- * 设计师季度绩效表2
|
|
|
- *
|
|
|
- * @author jeecg-boot
|
|
|
- * @version V1.0
|
|
|
- * @date 2019-12-10
|
|
|
- */
|
|
|
-@Slf4j
|
|
|
-@Api(tags = "设计师季度绩效表2")
|
|
|
-@RestController
|
|
|
-@RequestMapping("/ctop/performance2")
|
|
|
-public class PerformanceController2 {
|
|
|
- @Autowired
|
|
|
- private IPerformanceService2 performanceService;
|
|
|
- @Autowired
|
|
|
- private UserEfficientVideoMapMapper userEfficientVideoMapMapper;
|
|
|
-
|
|
|
- //平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效
|
|
|
- @AutoLog(value = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效")
|
|
|
- @ApiOperation(value = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效", notes = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效")
|
|
|
- @PostMapping(value = "/getPerformanceInfo")
|
|
|
- public Result<Map<String,Object>> getPerformanceInfo() {
|
|
|
- Result<Map<String, Object>> result = new Result<>();
|
|
|
- Map<String,Object> resultMap = new HashMap<>();
|
|
|
- try {
|
|
|
- resultMap = performanceService.getPerformanceInfo();
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(resultMap);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- result.error500("/getPerformanceInfo出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //有效率排行榜
|
|
|
- @AutoLog(value = "有效率排行榜")
|
|
|
- @ApiOperation(value = "有效率排行榜", notes = "有效率排行榜")
|
|
|
- @PostMapping(value = "/effiRateRank")
|
|
|
- public Result<Map<String,Object>> effiRateRank(@RequestParam(name = "pageSize")Integer pageSize) {
|
|
|
- Result<Map<String,Object>> result = new Result<Map<String,Object>>();
|
|
|
- Map<String,Object> resultMap = new HashMap<>();
|
|
|
- try {
|
|
|
- resultMap = performanceService.effiRateRank(pageSize);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(resultMap);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- result.error500("/ctop/performance2/effiRateRank出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //素材、素材跑量、封面点击数、封面曝光数、行为数
|
|
|
- @AutoLog(value = "素材、素材跑量、封面点击数、封面曝光数、行为数")
|
|
|
- @ApiOperation(value = "素材、素材跑量、封面点击数、封面曝光数、行为数", notes = "素材、素材跑量、封面点击数、封面曝光数、行为数")
|
|
|
- @PostMapping(value = "/materialInfoList")
|
|
|
- public Result<Map<String,Object>> materialInfoList() {
|
|
|
- Result<Map<String,Object>> result = new Result<Map<String,Object>>();
|
|
|
- Map<String,Object> resultMap = new HashMap<>();
|
|
|
- try {
|
|
|
- List<DesignMaterialInfo> designMaterialInfoList= performanceService.materialInfoList();
|
|
|
- resultMap.put("designMaterialInfoList",designMaterialInfoList);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(resultMap);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- result.error500("/ctop/performance2/materialInfoList出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //点击+符号 投放账户、投放账户、跑量
|
|
|
- @AutoLog(value = "点击账户增加_投放账户、投放账户、跑量")
|
|
|
- @ApiOperation(value = "点击账户增加_投放账户、投放账户、跑量", notes = "点击账户增加_投放账户、投放账户、跑量")
|
|
|
- @PostMapping(value = "/materialAccountInfo")
|
|
|
- public Result<Map<String,Object>> materialAccountInfo(@RequestParam(name = "materialId")String materialId) {
|
|
|
- Result<Map<String,Object>> result = new Result<Map<String,Object>>();
|
|
|
- Map<String,Object> resultMap = new HashMap<>();
|
|
|
- try {
|
|
|
- List<DesignMaterialInfo> designMaterialInfoList= performanceService.materialAccountInfo(materialId);
|
|
|
- resultMap.put("designMaterialInfoList",designMaterialInfoList);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(resultMap);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- result.error500("/ctop/performance2/materialAccountInfo出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "根据year、quarter计算季度设计师绩效")
|
|
|
- @ApiOperation(value = "根据year、quarter计算季度设计师绩效", notes = "根据year、quarter计算季度设计师绩效")
|
|
|
- @GetMapping(value = "/designerPerformance")
|
|
|
- public Result<Map<String, Object>> designerPerformanceTask(@RequestParam(name = "year", required = true) int year,
|
|
|
- @RequestParam(name = "quarter", required = true) int quarter) {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- try {
|
|
|
- performanceService.designerPerformanceTask(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/designerPerformance出错啦" + "year:" + year + " quarter:" + quarter);
|
|
|
- result.error500("/ctop/performance2/designerPerformance出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "有效视频定时任务")
|
|
|
- @ApiOperation(value = "有效视频定时任务", notes = "calcDate传递yyyy-MM-dd格式的日期")
|
|
|
- @GetMapping(value = "/efficientVideo")
|
|
|
- public Result<Map<String, Object>> efficientVideo(@RequestParam(name = "calcDate", required = true) String calcDate) {
|
|
|
- log.info("有效视频任务开始,有效视频所属时间为" + calcDate);
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- if (StringUtils.isBlank(calcDate)) {
|
|
|
- result.error500("时间不能为空");
|
|
|
- }
|
|
|
- try {
|
|
|
- //String calc = "2020-01-03";
|
|
|
- //for(int i=0; i<12 ;i++){
|
|
|
- // if(i!=0){
|
|
|
- // calc = DateUtils.addDay( calc, 7);
|
|
|
- // }
|
|
|
- // performanceService.efficientVideoTask(calc);
|
|
|
- //}
|
|
|
- performanceService.efficientVideoTask(calcDate);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/efficientVideo出错啦" + "date:" + calcDate);
|
|
|
- result.error500("/ctop/performance2/efficientVideo出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "根据year、quarter计算kuaishou季度设计师绩效")
|
|
|
- @ApiOperation(value = "根据year、quarter计算kuaishou季度设计师绩效", notes = "根据year、quarter计算kuaishou季度设计师绩效")
|
|
|
- @PostMapping(value = "/toutiaoDesignerPerformance")
|
|
|
- public Result<Map<String, Object>> toutiaoDesignerPerformance(@RequestParam(name = "year", required = true) int year,
|
|
|
- @RequestParam(name = "quarter", required = true) int quarter) {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- try {
|
|
|
- performanceService.toutiaoDesigner(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/toutiaoDesignerPerformance出错啦" + "year:" + year + " quarter:" + quarter);
|
|
|
- result.error500("/ctop/performance2/toutiaoDesignerPerformance出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "根据year、quarter计算toutiao季度设计师绩效")
|
|
|
- @ApiOperation(value = "根据year、quarter计算toutiao季度设计师绩效", notes = "根据year、quarter计算toutiao季度设计师绩效")
|
|
|
- @PostMapping(value = "/kuaishouDesignerPerformance")
|
|
|
- public Result<Map<String, Object>> kuaishouDesignerPerformance(@RequestParam(name = "year", required = true) int year,
|
|
|
- @RequestParam(name = "quarter", required = true) int quarter) {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- try {
|
|
|
- performanceService.kuaishouDesigner(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/kuaishouDesignerPerformance出错啦" + "year:" + year + " quarter:" + quarter);
|
|
|
- result.error500("/ctop/performance2/kuaishouDesignerPerformance出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取设计师组下所有人的绩效")
|
|
|
- @ApiOperation(value = "获取设计师组下所有人的绩效", notes = "获取设计师组下所有人的绩效")
|
|
|
- @PostMapping(value = "/designerLastQuarterPerformanceInfo")
|
|
|
- public Result<Map<String, Object>> designerLastQuarterPerformanceInfo() {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- try {
|
|
|
- Map<String, Object> resultMap = performanceService.designerLastQuarterPerformanceInfo();
|
|
|
- result.setResult(resultMap);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/designerLastQuarterPerformanceInfo出错啦");
|
|
|
- result.error500("/ctop/performance2/designerLastQuarterPerformanceInfo出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取同一媒体类型下上个季度所有人的绩效")
|
|
|
- @ApiOperation(value = "获取同一媒体类型下上个季度所有人的绩效", notes = "获取同一媒体类型下上个季度所有人的绩效")
|
|
|
- @PostMapping(value = "/quarterUserPerformanceList")
|
|
|
- public Result<Map<String, Object>> quarterUserPerformanceList(@RequestParam(name = "appType", required = true) int appType) {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- try {
|
|
|
- Map<String, Object> resultMap = performanceService.quarterUserPerformanceList(appType);
|
|
|
- result.setResult(resultMap);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/quarterUserPerformanceList出错啦");
|
|
|
- result.error500("/ctop/performance2/quarterUserPerformanceList出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取快手上个季度的季度有效数、素材总数、上个季度的绩效")
|
|
|
- @ApiOperation(value = "获取快手上个季度的季度有效数、素材总数、上个季度的绩效", notes = "获取快手上个季度的季度有效数、素材总数、上个季度的绩效")
|
|
|
- @PostMapping(value = "/kuaishouDesignerLastQuarterPerformanceInfo")
|
|
|
- public Result<Map<String, Object>> kuaishouDesignerLastQuarterPerformanceInfo() {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- Map<String, Object> resultMap = new HashMap<>();
|
|
|
- try {
|
|
|
- resultMap = performanceService.kuaishouDesignerLastQuarterPerformanceInfo();
|
|
|
- result.setResult(resultMap);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/kuaishouDesignerLastQuarterPerformanceInfo出错啦");
|
|
|
- result.error500("/ctop/performance2/kuaishouDesignerLastQuarterPerformanceInfo出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取平面设计师上个季度的绩效")
|
|
|
- @ApiOperation(value = "获取平面设计师上个季度的绩效", notes = "获取平面设计师上个季度的绩效")
|
|
|
- @PostMapping(value = "/planeLastQuarterPerformanceInfo")
|
|
|
- public Result<Map<String, Object>> planeLastQuarterPerformanceInfo(@RequestParam(name = "appType", required = true) int appType) {
|
|
|
- Result<Map<String, Object>> result = new Result<Map<String, Object>>();
|
|
|
- try {
|
|
|
- Map<String, Object> resultMap = performanceService.planeLastQuarterPerformanceInfo(appType);
|
|
|
- result.setResult(resultMap);
|
|
|
- result.setSuccess(true);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- log.error("/ctop/performance2/planeLastQuarterPerformanceInfo出错啦");
|
|
|
- result.error500("/ctop/performance2/planeLastQuarterPerformanceInfo出错啦");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 分页列表查询
|
|
|
- *
|
|
|
- * @param performance
|
|
|
- * @param pageNo
|
|
|
- * @param pageSize
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "平面设计师季度绩效表-分页列表查询")
|
|
|
- @ApiOperation(value = "平面设计师季度绩效表-分页列表查询", notes = "平面设计师季度绩效表-分页列表查询")
|
|
|
- @GetMapping(value = "/planePerformanceList")
|
|
|
- public Result<IPage<Performance>> planePerformanceList(Performance performance,
|
|
|
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<IPage<Performance>> result = new Result<IPage<Performance>>();
|
|
|
- LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
- performance.setUserId(sysUser.getId());
|
|
|
- QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
|
|
|
- Page<Performance> page = new Page<Performance>(pageNo, pageSize);
|
|
|
- IPage<Performance> pageList = performanceService.page(page, queryWrapper);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(pageList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 分页列表查询
|
|
|
- *
|
|
|
- * @param performance
|
|
|
- * @param pageNo
|
|
|
- * @param pageSize
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AutoLog(value = "平面设计师季度绩效表-分页列表查询")
|
|
|
- @ApiOperation(value = "平面设计师季度绩效表-分页列表查询", notes = "平面设计师季度绩效表-分页列表查询")
|
|
|
- @GetMapping(value = "/designerDepartMemberPerformanceList")
|
|
|
- public Result<IPage<Performance>> designerDepartMemberPerformanceList(Performance performance,
|
|
|
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<IPage<Performance>> result = new Result<IPage<Performance>>();
|
|
|
- LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
- String departId = userEfficientVideoMapMapper.getDepartIdByUserId("e9ca23d68d884d4ebb19d07889727dae");
|
|
|
- List<String> userIdList = userEfficientVideoMapMapper.getUserIdListByDepId(departId);
|
|
|
- //
|
|
|
- QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
|
|
|
- queryWrapper.in("user_id", userIdList);
|
|
|
-
|
|
|
- Page<Performance> page = new Page<Performance>(pageNo, pageSize);
|
|
|
- IPage<Performance> pageList = performanceService.page(page, queryWrapper);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(pageList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取快手绩效时时数据接口")
|
|
|
- @ApiOperation(value = "获取快手绩效时时数据接口", notes = "获取快手绩效时时数据接口")
|
|
|
- @PostMapping(value = "/kuaishouPerformanceInfoNow")
|
|
|
- public Result<List<UserDto2>> kuaishouPerformanceInfoNow(HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- List<UserDto2> userDto2List = performanceService.kuaishouPerformanceInfoNow();
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取快手优化师绩效时时数据接口")
|
|
|
- @ApiOperation(value = "获取快手优化师绩效时时数据接口", notes = "获取快手优化师绩效时时数据接口")
|
|
|
- @PostMapping(value = "/kuaishouYouhuaPerformanceInfoNow")
|
|
|
- public Result<List<UserDto2>> kuaishouYouhuaPerformanceInfoNow(HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- List<UserDto2> userDto2List = performanceService.kuaishouYouhuaPerformanceInfoNow();
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取头条优化师绩效时时数据接口")
|
|
|
- @ApiOperation(value = "获取头条优化师绩效时时数据接口", notes = "获取头条优化师绩效时时数据接口")
|
|
|
- @PostMapping(value = "/toutiaoYouhuaPerformanceInfoNow")
|
|
|
- public Result<List<UserDto2>> toutiaoYouhuaPerformanceInfoNow(HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- List<UserDto2> userDto2List = performanceService.toutiaoYouhuaPerformanceInfoNow();
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取快手优化师所属账号信息")
|
|
|
- @ApiOperation(value = "获取快手优化师所属账号信息", notes = "获取快手优化师所属账号信息")
|
|
|
- @PostMapping(value = "/getKuaiShouYouhuaAccountsList")
|
|
|
- public Result<List<AccountDTO>> getKuaiShouYouhuaAccountsList(@RequestBody PerformanceTimeDTO dto, HttpServletRequest req) {
|
|
|
- Result<List<AccountDTO>> result = new Result<>();
|
|
|
- String userId = dto.getUserId();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(userId==null || appType == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("userId和appType不能为空");
|
|
|
- }
|
|
|
- List<AccountDTO> accountDTOList = performanceService.getKuaiShouYouhuaAccountsList(userId, appType, year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(accountDTOList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取头条优化师所属账号信息")
|
|
|
- @ApiOperation(value = "获取头条优化师所属账号信息", notes = "获取头条优化师所属账号信息")
|
|
|
- @PostMapping(value = "/getToutiaoYouhuaAccountsList")
|
|
|
- public Result<List<AccountDTO>> getToutiaoYouhuaAccountsList(@RequestBody PerformanceTimeDTO dto, HttpServletRequest req) {
|
|
|
- Result<List<AccountDTO>> result = new Result<>();
|
|
|
- String userId = dto.getUserId();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(userId==null || appType == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("userId和appType不能为空");
|
|
|
- }
|
|
|
- List<AccountDTO> accountDTOList = performanceService.getToutiaoYouhuaAccountsList(userId, appType, year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(accountDTOList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取头条绩效时时数据接口")
|
|
|
- @ApiOperation(value = "获取头条绩效时时数据接口", notes = "获取头条绩效时时数据接口")
|
|
|
- @PostMapping(value = "/toutiaoPerformanceInfoNow")
|
|
|
- public Result<List<UserDto2>> toutiaoPerformanceInfoNow(HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- List<UserDto2> userDto2List = performanceService.toutiaoPerformanceInfoNow();
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取快手绩效周报表")
|
|
|
- @ApiOperation(value = "获取快手绩效周报表", notes = "获取快手绩效周报表")
|
|
|
- @PostMapping(value = "/kuaishouWeekReport")
|
|
|
- public Result<List<UserDto2>> kuaishouWeekReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- String startDate = dto.getStartDate();
|
|
|
- String endDate = dto.getEndDate();
|
|
|
- if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- return result;
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.kuaishouWeekReport(startDate, endDate);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取头条绩效周报表")
|
|
|
- @ApiOperation(value = "获取头条绩效周报表", notes = "获取头条绩效周报表")
|
|
|
- @PostMapping(value = "/toutiaoWeekReport")
|
|
|
- public Result<List<UserDto2>> toutiaoWeekReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- String startDate = dto.getStartDate();
|
|
|
- String endDate = dto.getEndDate();
|
|
|
- if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- return result;
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.toutiaoWeekReport(startDate, endDate);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //快手优化师周报
|
|
|
- @AutoLog(value = "获取快手优化师绩效周报表")
|
|
|
- @ApiOperation(value = "获取快手优化师绩效周报表", notes = "获取快手优化师绩效周报表")
|
|
|
- @PostMapping(value = "/kuaishouYouhuaWeekReport")
|
|
|
- public Result<List<UserDto2>> kuaishouYouhuaWeekReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- String startDate = dto.getStartDate();
|
|
|
- String endDate = dto.getEndDate();
|
|
|
- if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- return result;
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.kuaishouYouhuaWeekReport(startDate, endDate);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //头条优化师周报
|
|
|
- @AutoLog(value = "获取头条优化师绩效周报表")
|
|
|
- @ApiOperation(value = "获取头条优化师绩效周报表", notes = "获取头条绩效周报表")
|
|
|
- @PostMapping(value = "/toutiaoYouhuaWeekReport")
|
|
|
- public Result<List<UserDto2>> toutiaoYouhuaWeekReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- String startDate = dto.getStartDate();
|
|
|
- String endDate = dto.getEndDate();
|
|
|
- if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- return result;
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.toutiaoYouhuaWeekReport(startDate, endDate);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取快手季度绩效报表")
|
|
|
- @ApiOperation(value = "获取快手季度绩效报表", notes = "获取快手季度绩效报表")
|
|
|
- @PostMapping(value = "/kuaishouQuarterReport")
|
|
|
- public Result<List<UserDto2>> kuaishouQuarterReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- if(year==null || quarter == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.kuaishouQuarterReport(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取头条季度绩效报表")
|
|
|
- @ApiOperation(value = "获取头条季度绩效报表", notes = "获取头条季度绩效报表")
|
|
|
- @PostMapping(value = "/toutiaoQuarterReport")
|
|
|
- public Result<List<UserDto2>> toutiaoQuarterReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- if(year==null || quarter == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.toutiaoQuarterReport(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取相关有效视频列表")
|
|
|
- @ApiOperation(value = "获取相关有效视频列表", notes = "获取相关有效视频列表")
|
|
|
- @PostMapping(value = "/getEffiVideoList")
|
|
|
- public Result<List<MaterialInfo>> getEffiVideoList(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<MaterialInfo>> result = new Result<>();
|
|
|
- String userId = dto.getUserId();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(userId==null || appType == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("userId和appType不能为空");
|
|
|
- }
|
|
|
- List<MaterialInfo> materialInfoList = performanceService.effiVideoList(appType, year, quarter, userId);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(materialInfoList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取相关视频列表")
|
|
|
- @ApiOperation(value = "获取相关视频列表", notes = "获取相关视频列表")
|
|
|
- @PostMapping(value = "/getVideoList")
|
|
|
- public Result<List<MaterialInfo>> getVideoList(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<MaterialInfo>> result = new Result<>();
|
|
|
- String userId = dto.getUserId();
|
|
|
- String startDate = dto.getStartDate();
|
|
|
- String endDate = dto.getEndDate();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(userId==null || startDate == null || endDate == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("userId和时间不能为空");
|
|
|
- }
|
|
|
- List<MaterialInfo> materialInfoList = performanceService.getVideoList(appType, userId, startDate, endDate);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(materialInfoList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "获取本周相关有效视频列表")
|
|
|
- @ApiOperation(value = "获取本周相关有效视频列表", notes = "获取本周相关有效视频列表")
|
|
|
- @PostMapping(value = "/getWeekEffiVideoList")
|
|
|
- public Result<List<MaterialInfo>> getWeekEffiVideoList(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<MaterialInfo>> result = new Result<>();
|
|
|
- String userId = dto.getUserId();
|
|
|
- String startDate = dto.getStartDate();
|
|
|
- String endDate = dto.getEndDate();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(userId==null || appType == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("userId和appType不能为空");
|
|
|
- }
|
|
|
- List<MaterialInfo> materialInfoList = performanceService.getEffiWeekVideoList(appType, startDate, endDate, userId);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(materialInfoList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //快手优化季度绩效报表
|
|
|
- //List<UserDto2> kuaishouYouhuaQuarterReport(Integer year, Integer quarter);
|
|
|
- @AutoLog(value = "快手优化季度绩效报表")
|
|
|
- @ApiOperation(value = "快手优化季度绩效报表", notes = "快手优化季度绩效报表")
|
|
|
- @PostMapping(value = "/kuaishouYouhuaQuarterReport")
|
|
|
- public Result<List<UserDto2>> kuaishouYouhuaQuarterReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- if(year==null || quarter == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.kuaishouYouhuaQuarterReport(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- //头条优化季度绩效报表
|
|
|
- @AutoLog(value = "头条优化季度绩效报表")
|
|
|
- @ApiOperation(value = "头条优化季度绩效报表", notes = "头条优化季度绩效报表")
|
|
|
- @PostMapping(value = "/toutiaoYouhuaQuarterReport")
|
|
|
- public Result<List<UserDto2>> toutiaoYouhuaQuarterReport(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<UserDto2>> result = new Result<List<UserDto2>>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- if(year==null || quarter == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- }
|
|
|
- List<UserDto2> userDto2List = performanceService.toutiaoYouhuaQuarterReport(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //头条优化季度绩效报表
|
|
|
- @AutoLog(value = "头条优化季度绩效报表")
|
|
|
- @ApiOperation(value = "头条优化季度绩效报表", notes = "头条优化季度绩效报表")
|
|
|
- @PostMapping(value = "/getYunyingQuarterDetailByUserId")
|
|
|
- public Result<List<PerformanceAccount>> getYunyingQuarterDetailByUserId(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<PerformanceAccount>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- String userId = dto.getUserId();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(year==null || quarter == null || StringUtils.isBlank(userId) || appType == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("时间不能为空");
|
|
|
- }
|
|
|
- List<PerformanceAccount> userDto2List = performanceService.getYunyingQuarterDetailByUserId(year, quarter, userId, appType);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @AutoLog(value = "项目报表-按平台获取其下所有项目信息以及消耗")
|
|
|
- @ApiOperation(value = "按平台获取其下所有项目信息以及消耗", notes = "按平台获取其下所有项目信息以及消耗")
|
|
|
- @PostMapping(value = "/getProjcetListByMediaType")
|
|
|
- public Result<List<ProjectDTO>> getProjcetListByMediaType(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<ProjectDTO>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- if(year==null || quarter == null || appType == null ){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- List<ProjectDTO> userDto2List = performanceService.getProjcetListByMediaType(year, quarter, appType);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "项目报表-根据projectId获取其下账户季度消耗信息")
|
|
|
- @ApiOperation(value = "根据projectId获取其下账户季度消耗信息", notes = "根据projectId获取其下账户季度消耗信息")
|
|
|
- @PostMapping(value = "/getQuarterAccountDetail")
|
|
|
- public Result<List<AccountDTO>> getQuarterAccountDetail(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<AccountDTO>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Integer appType = dto.getAppType();
|
|
|
- Integer projectId = dto.getProjectId();
|
|
|
- if(year==null || quarter == null || appType == null || projectId == null){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- List<AccountDTO> userDto2List = performanceService.getQuarterAccountDetail(year, quarter, projectId, appType);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "项目报表-根据accountId获取季度视频信息")
|
|
|
- @ApiOperation(value = "根据accountId获取季度视频信息", notes = "根据accountId获取季度视频信息")
|
|
|
- @PostMapping(value = "/getKuaishouQuarterVideoInfoByAccountId")
|
|
|
- public Result<List<VideoDTO>> getKuaishouQuarterVideoInfoByAccountId(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<VideoDTO>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Long accountId = dto.getAccountId();
|
|
|
- if(year==null || quarter == null || accountId == null ){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- List<VideoDTO> userDto2List = performanceService.getKuaishouQuarterVideoInfoByAccountId(year, quarter, accountId);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "项目报表-根据accountId获取季度视频信息")
|
|
|
- @ApiOperation(value = "根据accountId获取季度视频信息", notes = "根据accountId获取季度视频信息")
|
|
|
- @PostMapping(value = "/getToutiaoQuarterVideoInfoByAccountId")
|
|
|
- public Result<List<VideoDTO>> getToutiaoQuarterVideoInfoByAccountId(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<VideoDTO>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- Long accountId = dto.getAccountId();
|
|
|
- if(year==null || quarter == null || accountId == null ){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- List<VideoDTO> userDto2List = performanceService.getToutiaoQuarterVideoInfoByAccountId(year, quarter, accountId);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "项目报表-根据accountId获取季度视频信息")
|
|
|
- @ApiOperation(value = "根据accountId获取季度视频信息", notes = "根据accountId获取季度视频信息")
|
|
|
- @PostMapping(value = "/getUserQuarterVideo")
|
|
|
- public Result<List<VideoDTO>> getUserQuarterVideo(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<VideoDTO>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- String userId = dto.getUserId();
|
|
|
- if(year==null || quarter == null || userId == null ){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- List<VideoDTO> userDto2List = performanceService.getUserQuarterVideo(year, quarter, userId);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "项目报表-根据userId获取有效视频信息")
|
|
|
- @ApiOperation(value = "根据userId获取有效视频信息", notes = "根据userId获取有效视频信息")
|
|
|
- @PostMapping(value = "/getUserQuarterEffiVideo")
|
|
|
- public Result<List<VideoDTO>> getUserQuarterEffiVideo(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<List<VideoDTO>> result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- String userId = dto.getUserId();
|
|
|
- if(year==null || quarter == null || userId == null ){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- List<VideoDTO> userDto2List = performanceService.getUserQuarterEffiVideo(year, quarter, userId);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(userDto2List);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @AutoLog(value = "绩效-获取快手、头条下各账户下视频的季度消耗")
|
|
|
- @ApiOperation(value = "绩效-获取快手、头条下各账户下视频的季度消耗", notes = "绩效-获取快手、头条下各账户下视频的季度消耗")
|
|
|
- @PostMapping(value = "/getQuarterVideoInfoByAccountId")
|
|
|
- public Result getQuarterVideoInfoByAccountId(@RequestBody PerformanceTimeDTO dto,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result result = new Result<>();
|
|
|
- Integer year = dto.getYear();
|
|
|
- Integer quarter = dto.getQuarter();
|
|
|
- if(year==null || quarter == null ){
|
|
|
- result.setSuccess(false);
|
|
|
- result.setMessage("媒体类型均不能为空");
|
|
|
- }
|
|
|
- performanceService.getQuarterVideoInfoByAccountId(year, quarter);
|
|
|
- result.setSuccess(true);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|