zhangjinli 3 years ago
parent 8b74664d42
commit 61a1b18c0a

@ -60,6 +60,13 @@ public class ScheduleController {
videoService.updStatusWhenTaskEnd(format);
}
// 按任务结算积分
@Scheduled(cron = "0 0 0 * * ?")
@Transactional
public void videoEffect() {
// 任务结束7天时自动结算积分
// videoService.videoEffectResult(taskId);
}
// @Scheduled(cron = "0 0/1 * * * ? ")
// @Scheduled(cron = "0 0 0 1 1/1 ?")
// public void taskRank() {

@ -0,0 +1,28 @@
package com.zh.project0512.controller.manage;
import com.zh.project0512.annotation.AdminTokenValid;
import com.zh.project0512.model.dto.RankListDTO;
import com.zh.project0512.utils.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
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;
/**
*
*/
@Tag(name = "首页数据统计")
@RestController
@RequestMapping("/manage/statistics")
public class StatisticsController {
// @Operation(summary = "排行列表")
// @PostMapping("/list")
// @AdminTokenValid
// public Result rankList(@Validated @RequestBody RankListDTO rankListDTO) {
// return Result.success(rankService.rankList(rankListDTO), "请求成功");
// }
}

@ -449,7 +449,7 @@ public class TaskController {
}
@Operation(summary = "导出excel", description = "任务成员传播效果")
@GetMapping("/excel")
@PostMapping("/excel")
@AdminTokenValid
public void excel(HttpServletResponse response, @Validated @RequestBody DetTaskParam param) throws IOException {
//这是表头及格式
@ -512,7 +512,7 @@ public class TaskController {
}
@Operation(summary = "导出用户线索excel", description = "用户线索")
@GetMapping("/cnExcel")
@PostMapping("/cnExcel")
// @AdminTokenValid
public void cnExcel(HttpServletResponse response,@RequestBody CNListParam param) throws IOException {
//这是表头及格式

@ -82,7 +82,7 @@ public class UserAccountController {
}
@Operation(summary = "导出excel", description = "关联账号列表导出")
@GetMapping("/excel")
@PostMapping("/excel")
@AdminTokenValid
public void excel(HttpServletResponse response, @Validated @RequestBody ListUAParam param) throws IOException {
//这是表头及格式

@ -90,7 +90,7 @@ public class UserController {
}
@Operation(summary = "导出excel", description = "成员导出")
@GetMapping("/excel")
@PostMapping("/excel")
@AdminTokenValid
public void excel(HttpServletResponse response, @Validated @RequestBody UParam param) throws IOException {
//这是表头及格式

@ -59,7 +59,13 @@ public interface VideoMapper extends BaseMapper<Video> {
"INNER JOIN task as t2 on t1.taskId = t2.id\n" +
"INNER JOIN user as t3 on t1.userId = t3.id\n" +
"WHERE taskId = #{taskId}\n" +
"<if test='ew != null'>" +
"<if test='ew.nonEmptyOfWhere'>" +
"AND " +
"</if> " +
"${ew.SqlSegment}" +
"</if> " +
"GROUP BY t1.userId \n" +
"ORDER BY effectResultSum DESC")
List<Map> videoEffectResult(int taskId);
List<Map> videoEffectResult(int taskId, @Param("ew") Wrapper<Video> queryWrapper);
}

@ -26,4 +26,5 @@ public interface IVideoService extends IService<Video> {
void updStatusByTaskId(int taskId,LocalDateTime localDateTime);
IPage<Map> pageList(IPage iPage, @Param("ew") Wrapper<Video> queryWrapper);
JSONObject record(String openid);
List<Map> videoEffectResult(int taskId ,@Param("ew") Wrapper<Video> queryWrapper);
}

@ -45,4 +45,7 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
public JSONObject record(String openid) {
return videoMapper.record(openid);
}
public List<Map> videoEffectResult(int taskId, @Param("ew") Wrapper<Video> queryWrapper){
return videoMapper.videoEffectResult(taskId, queryWrapper);
}
}

Loading…
Cancel
Save