|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.zh.project0512.controller.manage;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
@ -379,13 +380,14 @@ public class TaskController {
|
|
|
|
|
@adminTokenValid
|
|
|
|
|
public Result taskEffect(@Validated @RequestBody DetTaskParam param) {
|
|
|
|
|
List<Map> maps = taskService.taskEffectData(new QueryWrapper<>());
|
|
|
|
|
JSONObject res = (JSONObject) JSONObject.toJSON(maps);
|
|
|
|
|
JSONObject obj = new JSONObject();
|
|
|
|
|
obj.put("taskEffect",maps);
|
|
|
|
|
if(maps!=null) {
|
|
|
|
|
QueryWrapper<Task> qw = new QueryWrapper<>();
|
|
|
|
|
qw.groupBy("t1.userId");
|
|
|
|
|
res.put("userEffect", taskService.taskEffectData(qw));
|
|
|
|
|
obj.put("userEffectList", taskService.taskEffectData(qw));
|
|
|
|
|
}
|
|
|
|
|
return Result.success(res);
|
|
|
|
|
return Result.success(obj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
@ -406,13 +408,14 @@ public class TaskController {
|
|
|
|
|
QueryWrapper<Task> qw = new QueryWrapper<>();
|
|
|
|
|
qw.eq("userId",param.getUserId()).groupBy("t1.userId");
|
|
|
|
|
List<Map> maps = taskService.taskEffectData(qw);
|
|
|
|
|
JSONObject res = (JSONObject) JSONObject.toJSON(maps);
|
|
|
|
|
JSONObject obj = new JSONObject();
|
|
|
|
|
obj.put("userEffect",maps);
|
|
|
|
|
if(maps!=null) {
|
|
|
|
|
QueryWrapper<Video> qw2 = new QueryWrapper<>();
|
|
|
|
|
qw2.eq("taskId",param.getId()).eq("userId",param.getUserId());
|
|
|
|
|
res.put("userEffect", videoService.list(qw2));
|
|
|
|
|
obj.put("userEffectDetail", videoService.list(qw2));
|
|
|
|
|
}
|
|
|
|
|
return Result.success(res);
|
|
|
|
|
return Result.success(obj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
|