diff --git a/src/main/java/com/zh/project0512/controller/manage/TaskController.java b/src/main/java/com/zh/project0512/controller/manage/TaskController.java index 8874b2e..6381dc4 100644 --- a/src/main/java/com/zh/project0512/controller/manage/TaskController.java +++ b/src/main/java/com/zh/project0512/controller/manage/TaskController.java @@ -493,7 +493,7 @@ public class TaskController { static class ListTParam { private int pageNum; private int pageSize; - @Schema(title = "任务状态", description = "0未上线;1已上线;2已结束") + @Schema(title = "任务状态", description = "0未上线;1已上线;2已结束;3已结算") private Integer status; @Schema(title = "月份区间") private Integer month; diff --git a/src/main/java/com/zh/project0512/controller/manage/UserController.java b/src/main/java/com/zh/project0512/controller/manage/UserController.java index 308fa3e..05726d1 100644 --- a/src/main/java/com/zh/project0512/controller/manage/UserController.java +++ b/src/main/java/com/zh/project0512/controller/manage/UserController.java @@ -87,6 +87,7 @@ public class UserController { .and(param.getDepartment() != null, q -> q.like("t2.name", param.getDepartment()) .or(o -> o.like("t3.name", param.getDepartment()))) .like(param.getName() != null, "t1.name", param.getName()); + qw.orderByDesc("updateAt","creatAt"); return Result.success(userService.pageList(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize()), qw)); } diff --git a/src/main/java/com/zh/project0512/controller/wxApp/TaskUController.java b/src/main/java/com/zh/project0512/controller/wxApp/TaskUController.java index bf0774f..bba8d92 100644 --- a/src/main/java/com/zh/project0512/controller/wxApp/TaskUController.java +++ b/src/main/java/com/zh/project0512/controller/wxApp/TaskUController.java @@ -103,9 +103,9 @@ public class TaskUController { // 与sql表中task的status意义不同,这里status-- // 0:0待领取(未接受任务且任务status为1); // 1:进行中(已接受任务且任务status为1); - // 2:已完成(已接受任务且任务status2); - // 3:已结束(未接受任务且任务status为2); - // 4:我的任务(已接受任务且任务status2); + // 2:已完成(已接受任务且任务status2或3); + // 3:已结束(未接受任务且任务status为2或3); + // 4:我的任务(已接受任务); Integer status = param.getStatus(); qw.ne("t1.status", 0); if(null != status) { @@ -117,10 +117,10 @@ public class TaskUController { qw.eq("t1.status", 1).eq("(SELECT count(*)!=0 from userTask as t4,user as t5 WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = +'" + openid + "' )", 1); break; case 2: - qw.eq("t1.status", 2).eq("(SELECT count(*)!=0 from userTask as t4,user as t5 WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = +'" + openid + "' )", 1); + qw.between("t1.status", 2,3).eq("(SELECT count(*)!=0 from userTask as t4,user as t5 WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = +'" + openid + "' )", 1); break; case 3: - qw.eq("t1.status", 2).ne("(SELECT count(*)!=0 from userTask as t4,user as t5 WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = +'" + openid + "' )", 1); + qw.between("t1.status", 2,3).ne("(SELECT count(*)!=0 from userTask as t4,user as t5 WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = +'" + openid + "' )", 1); break; case 4: qw.eq("(SELECT count(*)!=0 from userTask as t4,user as t5 WHERE t1.id = t4.taskId and t4.userId = t5.id and t5.openid = +'" + openid + "' )", 1);