update
This commit is contained in:
parent
8738b0fbba
commit
624901c174
|
@ -59,6 +59,7 @@ public class ApiAppointController extends ApiBaseController {
|
|||
// .eq("created_id", getApiUserId())
|
||||
// .or()
|
||||
// .inSql("id", "select appoint_id from t_appoint_user where user_id='" + getApiUserId() + "'"))
|
||||
.lt("state", Appoint.STATE_END)
|
||||
.orderByDesc("created_at");
|
||||
IPage<Appoint> paged = appointService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(AppointWrapper.build().pageVO(paged)));
|
||||
|
@ -75,7 +76,7 @@ public class ApiAppointController extends ApiBaseController {
|
|||
@GetMapping("public")
|
||||
public void publicPage() {
|
||||
QueryWrapper<Appoint> qw = new QueryWrapper<Appoint>()
|
||||
.ge("state", Appoint.STATE_PUBLIC)
|
||||
.eq("state", Appoint.STATE_END)
|
||||
.orderByDesc("created_at");
|
||||
IPage<Appoint> paged = appointService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(AppointWrapper.build().pageVO(paged)));
|
||||
|
|
|
@ -44,14 +44,19 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
ContactDbCommentService contactDbCommentService;
|
||||
|
||||
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"), @ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ", required = true)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系代表", name = "data", dataTypeClass = ContactDbDto.class)})
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value =
|
||||
"显示条数"), @ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ",
|
||||
required = true)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系代表", name = "data", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
@ApiOperation("常委会联系代表列表 (被指定的人与创建人可见)")
|
||||
@GetMapping
|
||||
public void contactDbPage(String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ContactDb> qw = new QueryWrapper<ContactDb>()
|
||||
// .and(_qw -> _qw.eq("created_id", getApiUserId()).or().inSql("id", "select contact_db_id from t_contact_db_user where user_id='" + getApiUserId() + "'"))
|
||||
.lt("state", ContactDb.STATE_END)
|
||||
// .and(_qw -> _qw.eq("created_id", getApiUserId()).or().inSql("id", "select contact_db_id from
|
||||
// t_contact_db_user where user_id='" + getApiUserId() + "'"))
|
||||
.orderByDesc("created_at");
|
||||
if (Const.TYPE_RDDB.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
|
@ -62,12 +67,22 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
render(Ret.ok().paged(ContactDbWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"),})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系代表", name = "data", dataTypeClass = ContactDbDto.class)})
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value =
|
||||
"显示条数"), @ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ",
|
||||
required = true)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系代表", name = "data", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
@ApiOperation("已完成的常委会联系代表列表 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage() {
|
||||
QueryWrapper<ContactDb> qw = new QueryWrapper<ContactDb>().ge("state", ContactDb.STATE_EVALUATE).orderByDesc("created_at");
|
||||
public void publicPage(String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ContactDb> qw = new QueryWrapper<ContactDb>().eq("state", ContactDb.STATE_END).orderByDesc(
|
||||
"created_at");
|
||||
if (Const.TYPE_RDDB.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
} else if (Const.TYPE_VOTER.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
}
|
||||
IPage<ContactDb> paged = contactDbService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ContactDbWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
@ -76,7 +91,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
@GetMapping("{id}")
|
||||
@ResponseBody
|
||||
@ApiImplicitParam(name = "id", value = "常委会联系代表id")
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void contactDbDetail(@PathVariable String id) {
|
||||
ContactDb contactDb = contactDbService.getById(id);
|
||||
Assert.notNull(contactDb, "未找到该记录");
|
||||
|
@ -91,12 +107,18 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
render(ret);
|
||||
}
|
||||
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"), @ApiImplicitParam(name = "contactDbId", value = "常委会联系代表id"), @ApiImplicitParam(name = "type", value = "环节 1-5")})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(value = "评论", name = "data", dataTypeClass = ContactDbComment.class)})
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value =
|
||||
"显示条数"), @ApiImplicitParam(name = "contactDbId", value = "常委会联系代表id"), @ApiImplicitParam(name = "type",
|
||||
value = "环节 1-5")})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(value = "评论", name = "data", dataTypeClass =
|
||||
ContactDbComment.class)})
|
||||
@ApiOperation("评论列表")
|
||||
@GetMapping("comment")
|
||||
public void commentPage(String contactDbId, Integer type) {
|
||||
LambdaQueryWrapper<ContactDbComment> qw = new LambdaQueryWrapper<ContactDbComment>().eq(StrUtil.isNotBlank(contactDbId), ContactDbComment::getContactDbId, contactDbId).eq(type != null, ContactDbComment::getType, type).orderByDesc(ContactDbComment::getCreatedAt);
|
||||
LambdaQueryWrapper<ContactDbComment> qw =
|
||||
new LambdaQueryWrapper<ContactDbComment>().eq(StrUtil.isNotBlank(contactDbId),
|
||||
ContactDbComment::getContactDbId, contactDbId).eq(type != null, ContactDbComment::getType,
|
||||
type).orderByDesc(ContactDbComment::getCreatedAt);
|
||||
IPage<ContactDbComment> paged = contactDbCommentService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(paged));
|
||||
}
|
||||
|
@ -104,7 +126,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
@ApiOperation("上传主题环节")
|
||||
@PostMapping("state/subject")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void stateSubjectSave(@Validated ContactDbSubjectRequest contactDbSubjectRequest) {
|
||||
ContactDb contactDb = contactDbService.stateSubjectSave(contactDbSubjectRequest, getApiUser());
|
||||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
|
@ -113,7 +136,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
@ApiOperation("选择常委会和代表环节")
|
||||
@PostMapping("state/choose")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void stateChooseSave(@Validated ContactDbChooseRequest contactDbChooseRequest) {
|
||||
ContactDb contactDb = contactDbService.stateChooseSave(contactDbChooseRequest, getApiUser());
|
||||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
|
@ -122,7 +146,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
@ApiOperation("签到环节")
|
||||
@PostMapping("state/sign")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void stateSignSave(@Validated ContactDbSignRequest contactSignRequest) {
|
||||
ContactDb contactDb = contactDbService.stateSignSave(contactSignRequest, getApiUser());
|
||||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
|
@ -148,7 +173,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
@ApiOperation("会议环节")
|
||||
@PostMapping("state/conference")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void stateConferenceSave(@Validated ContactDbConferenceRequest contactDbConferenceRequest) {
|
||||
ContactDb contactDb = contactDbService.stateConferenceSave(contactDbConferenceRequest, getApiUser());
|
||||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
|
@ -157,7 +183,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
@ApiOperation("测评环节")
|
||||
@PostMapping("state/evaluate")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
|
||||
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass =
|
||||
ContactDbDto.class)})
|
||||
public void stateEvaluateSave(@Validated ContactDbEvaluateRequest contactDbEvaluateRequest) {
|
||||
ContactDb contactDb = contactDbService.stateEvaluateSave(contactDbEvaluateRequest, getApiUser());
|
||||
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
|
||||
|
@ -182,7 +209,8 @@ public class ApiContactDbController extends ApiBaseController {
|
|||
|
||||
// @ApiOperation("是否通过")
|
||||
// @PutMapping("evaluate/status/{id}/{status")
|
||||
// @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "常委会联系代表id"), @ApiImplicitParam(name = "status", value =
|
||||
// @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "常委会联系代表id"), @ApiImplicitParam(name = "status",
|
||||
// value =
|
||||
// "是否通过: 1通过,0不通过")})
|
||||
// public void evaluateStatus(@PathVariable("id") String id,@PathVariable("status") Integer status) {
|
||||
// Ret ret = contactDbService.evaluateStatus(id,status,getApiUser());
|
||||
|
|
|
@ -64,6 +64,7 @@ public class ApiReviewOfficerController extends ApiBaseController {
|
|||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewOfficer> qw = new QueryWrapper<ReviewOfficer>()
|
||||
.eq("type", type)
|
||||
.lt("state", ReviewOfficer.STATE_PUBLIC)
|
||||
.like(StrUtil.isNotBlank(reviewSubject),"review_subject", reviewSubject)
|
||||
// .and(_qw -> _qw
|
||||
// .eq("created_id", getApiUserId())
|
||||
|
@ -81,24 +82,33 @@ public class ApiReviewOfficerController extends ApiBaseController {
|
|||
render(Ret.ok().paged(ReviewOfficerWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "page", value = "当前页"),
|
||||
// @ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
// @ApiImplicitParam(name = "type", value = "类型"),
|
||||
// })
|
||||
// @DynamicResponseParameters(properties = {
|
||||
// @DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewOfficerDto.class)
|
||||
// })
|
||||
// @ApiOperation("公告栏 (所有人可见)")
|
||||
// @GetMapping("public")
|
||||
// public void publicPage(String type) {
|
||||
// QueryWrapper<ReviewOfficer> qw = new QueryWrapper<ReviewOfficer>()
|
||||
//// .eq("type", type)
|
||||
// .ge("state", ReviewOfficer.STATE_PUBLIC)
|
||||
// .orderByDesc("created_at");
|
||||
// IPage<ReviewOfficer> paged = reviewOfficerService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
// render(Ret.ok().paged(ReviewOfficerWrapper.build().pageVO(paged)));
|
||||
// }
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "type", value = "类型 1法官评议 2检查官评议 "),
|
||||
@ApiImplicitParam(name = "reviewSubject", value = "评议主题"),
|
||||
@ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ", required = true)
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewOfficerDto.class)
|
||||
})
|
||||
@ApiOperation("公告栏 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage(String type,String reviewSubject,String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewOfficer> qw = new QueryWrapper<ReviewOfficer>()
|
||||
.eq("type", type)
|
||||
.eq("state", ReviewOfficer.STATE_PUBLIC)
|
||||
.like(StrUtil.isNotBlank(reviewSubject),"review_subject", reviewSubject)
|
||||
.orderByDesc("created_at");
|
||||
if (Const.TYPE_RDDB.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
} else if (Const.TYPE_VOTER.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
}
|
||||
IPage<ReviewOfficer> paged = reviewOfficerService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ReviewOfficerWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("{id}")
|
||||
|
|
|
@ -64,6 +64,7 @@ public class ApiReviewSubjectController extends ApiBaseController {
|
|||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewSubject> qw = new QueryWrapper<ReviewSubject>()
|
||||
.eq("type", type)
|
||||
.lt("state", ReviewSubject.STATE_PUBLIC)
|
||||
.like(StrUtil.isNotBlank(reviewSubject),"review_subject", reviewSubject)
|
||||
// .and(_qw -> _qw
|
||||
// .eq("created_id", getApiUserId())
|
||||
|
@ -81,24 +82,33 @@ public class ApiReviewSubjectController extends ApiBaseController {
|
|||
render(Ret.ok().paged(ReviewSubjectWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "page", value = "当前页"),
|
||||
// @ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
// @ApiImplicitParam(name = "type", value = "类型", required = true),
|
||||
// })
|
||||
// @DynamicResponseParameters(properties = {
|
||||
// @DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewSubjectDto.class)
|
||||
// })
|
||||
// @ApiOperation("公告栏 (所有人可见)")
|
||||
// @GetMapping("public")
|
||||
// public void publicPage(String type) {
|
||||
// QueryWrapper<ReviewSubject> qw = new QueryWrapper<ReviewSubject>()
|
||||
//// .eq("type", type)
|
||||
// .ge("state", ReviewSubject.STATE_PUBLIC)
|
||||
// .orderByDesc("created_at");
|
||||
// IPage<ReviewSubject> paged = reviewSubjectService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
// render(Ret.ok().paged(ReviewSubjectWrapper.build().pageVO(paged)));
|
||||
// }
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "type", value = "类型 1专题询问 2专项评议 "),
|
||||
@ApiImplicitParam(name = "reviewSubject", value = "评议主题"),
|
||||
@ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ", required = true)
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewSubjectDto.class)
|
||||
})
|
||||
@ApiOperation("公告栏 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage(String type,String reviewSubject,String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewSubject> qw = new QueryWrapper<ReviewSubject>()
|
||||
.eq("type", type)
|
||||
.eq("state", ReviewSubject.STATE_PUBLIC)
|
||||
.like(StrUtil.isNotBlank(reviewSubject),"review_subject", reviewSubject)
|
||||
.orderByDesc("created_at");
|
||||
if (Const.TYPE_RDDB.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
} else if (Const.TYPE_VOTER.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
}
|
||||
IPage<ReviewSubject> paged = reviewSubjectService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ReviewSubjectWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("{id}")
|
||||
|
|
|
@ -65,6 +65,7 @@ public class ApiReviewSuperviseController extends ApiBaseController {
|
|||
// .or()
|
||||
// .inSql("id", "select review_supervise_id from t_review_supervise_user where user_id='" + getApiUserId() + "'")
|
||||
// )
|
||||
.lt("state", ReviewSupervise.STATE_PUBLIC)
|
||||
.like(StrUtil.isNotBlank(subjectName), "subject_name", subjectName)
|
||||
.like(StrUtil.isNotBlank(type), "type", type)
|
||||
.orderByDesc("created_at");
|
||||
|
@ -80,16 +81,27 @@ public class ApiReviewSuperviseController extends ApiBaseController {
|
|||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "subjectName", value = "主题名称"),
|
||||
@ApiImplicitParam(name = "type", value = "分类 会议审查conference/视察调研view/执法检查law/其他活动other"),
|
||||
@ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ", required = true)
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "审议督政", name = "data", dataTypeClass = ReviewSuperviseDto.class)
|
||||
})
|
||||
@ApiOperation("公告栏 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage() {
|
||||
public void publicPage(String subjectName, String type, String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewSupervise> qw = new QueryWrapper<ReviewSupervise>()
|
||||
.eq("state", ReviewSupervise.STATE_PUBLIC)
|
||||
.like(StrUtil.isNotBlank(subjectName), "subject_name", subjectName)
|
||||
.like(StrUtil.isNotBlank(type), "type", type)
|
||||
.orderByDesc("created_at");
|
||||
if (Const.TYPE_RDDB.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
} else if (Const.TYPE_VOTER.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
}
|
||||
IPage<ReviewSupervise> paged = reviewSuperviseService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ReviewSuperviseWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ public class ApiReviewWorkController extends ApiBaseController {
|
|||
public void reviewPage(String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewWork> qw = new QueryWrapper<ReviewWork>()
|
||||
.lt("state", ReviewWork.STATE_PUBLIC)
|
||||
// .and(_qw -> _qw
|
||||
// .eq("created_id", getApiUserId())
|
||||
// .or()
|
||||
|
@ -80,16 +81,23 @@ public class ApiReviewWorkController extends ApiBaseController {
|
|||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "platform", value = "当前登录的是哪个端 admin机关办公/ rddb代表/ voter选民 ", required = true)
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewWorkDto.class)
|
||||
})
|
||||
@ApiOperation("公告栏 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage() {
|
||||
public void publicPage(String platform) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
QueryWrapper<ReviewWork> qw = new QueryWrapper<ReviewWork>()
|
||||
.ge("state", ReviewWork.STATE_PUBLIC)
|
||||
.eq("state", ReviewWork.STATE_PUBLIC)
|
||||
.orderByDesc("created_at");
|
||||
if (Const.TYPE_RDDB.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
} else if (Const.TYPE_VOTER.equals(platform)) {
|
||||
qw.like("obj", platform);
|
||||
}
|
||||
IPage<ReviewWork> paged = reviewWorkService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ReviewWorkWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue