zhangjinli 3 years ago
parent 10dc72b2a4
commit f8ea03faec

@ -493,7 +493,7 @@ public class TaskController {
static class ListTParam { static class ListTParam {
private int pageNum; private int pageNum;
private int pageSize; private int pageSize;
@Schema(title = "任务状态", description = "0未上线1已上线2已结束") @Schema(title = "任务状态", description = "0未上线1已上线2已结束;3已结算")
private Integer status; private Integer status;
@Schema(title = "月份区间") @Schema(title = "月份区间")
private Integer month; private Integer month;

@ -87,6 +87,7 @@ public class UserController {
.and(param.getDepartment() != null, q -> q.like("t2.name", param.getDepartment()) .and(param.getDepartment() != null, q -> q.like("t2.name", param.getDepartment())
.or(o -> o.like("t3.name", param.getDepartment()))) .or(o -> o.like("t3.name", param.getDepartment())))
.like(param.getName() != null, "t1.name", param.getName()); .like(param.getName() != null, "t1.name", param.getName());
qw.orderByDesc("updateAt","creatAt");
return Result.success(userService.pageList(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize()), qw)); return Result.success(userService.pageList(MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize()), qw));
} }

@ -103,9 +103,9 @@ public class TaskUController {
// 与sql表中task的status意义不同这里status-- // 与sql表中task的status意义不同这里status--
// 0:0待领取(未接受任务且任务status为1); // 0:0待领取(未接受任务且任务status为1);
// 1:进行中(已接受任务且任务status为1); // 1:进行中(已接受任务且任务status为1);
// 2:已完成(已接受任务且任务status2); // 2:已完成(已接受任务且任务status2或3);
// 3:已结束(未接受任务且任务status为2); // 3:已结束(未接受任务且任务status为2或3);
// 4:我的任务(已接受任务且任务status2); // 4:我的任务(已接受任务);
Integer status = param.getStatus(); Integer status = param.getStatus();
qw.ne("t1.status", 0); qw.ne("t1.status", 0);
if(null != status) { 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); 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; break;
case 2: 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; break;
case 3: 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; break;
case 4: 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); 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);

Loading…
Cancel
Save