update
This commit is contained in:
parent
774eb1a1eb
commit
e15453ca1c
|
@ -51,21 +51,15 @@ public class ApiNoticeController extends ApiBaseController {
|
|||
String title, Integer top, String type, String platform) {
|
||||
QueryWrapper<Notice> qw = new QueryWrapper<>();
|
||||
Condition.appendIfNotEmpty(title, "title#like", qw);
|
||||
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
if ("gg".equals(type)) {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
qw.eq("type", type);
|
||||
qw.like("obj", platform);
|
||||
} else if ("tz".equals(type)) {
|
||||
qw.eq("type", type);
|
||||
qw.like("obj", platform);
|
||||
} else {
|
||||
Assert.notNull(platform, "请填入当前端参数");
|
||||
qw.and(_qw -> {
|
||||
_qw.and(__qw -> {
|
||||
__qw.eq("type", "gg").like("obj", platform);
|
||||
}
|
||||
).or().eq("type", "tz");
|
||||
});
|
||||
qw.like("obj", platform);
|
||||
}
|
||||
qw.orderByDesc("top", "created_at");
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class NoticeController extends BaseAdminController {
|
|||
@PreAuth("rddb:notice:list")
|
||||
@PostMapping("/list")
|
||||
public void list(NoticeVO noticeVO) {
|
||||
QueryWrapper<Notice> qw = getQueryWrapper(noticeVO.getTitle());
|
||||
QueryWrapper<Notice> qw = getQueryWrapper(noticeVO.getTitle(),noticeVO.getType());
|
||||
IPage<Notice> paged = noticeService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(NoticeWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
@ -88,11 +88,12 @@ public class NoticeController extends BaseAdminController {
|
|||
renderJson(!flag ? Ret.fail("操作失败") : Ret.ok());
|
||||
}
|
||||
|
||||
private QueryWrapper<Notice> getQueryWrapper(String keywords) {
|
||||
private QueryWrapper<Notice> getQueryWrapper(String keywords,String type) {
|
||||
QueryWrapper<Notice> queryWrapper = new QueryWrapper<>();
|
||||
if (!StrUtil.isBlankOrUndefined(keywords)) {
|
||||
queryWrapper.like("title", keywords);
|
||||
}
|
||||
if(StrUtil.isNotBlank(type)) queryWrapper.eq("type",type);
|
||||
queryWrapper.orderByDesc("created_at");
|
||||
return queryWrapper;
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
.filecontent[data-v-0ae74f24]{margin:.32rem 0;padding:.42667rem;background:#fff}.filecontent[data-v-0ae74f24] .van-cell{background-color:#f8f8f8}.filecontent .p1[data-v-0ae74f24]{font-size:.42667rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;color:#333;line-height:.53333rem;margin-bottom:.32rem}.form .van-cell[data-v-0ae74f24]{margin-bottom:.32rem}.form .van-cell[data-v-0ae74f24] .van-cell__title{font-size:.42667rem;color:#333;font-weight:700}.form .van-cell[data-v-0ae74f24] .van-cell__value{font-size:.37333rem}.form .van-cell .van-icon[data-v-0ae74f24]:before{vertical-align:middle;margin-left:.21333rem}.form .textarea[data-v-0ae74f24]{flex-direction:column}.form .textarea[data-v-0ae74f24] .van-cell__value{margin-top:.32rem;background-color:#f8f8f8;padding:.32rem}.form .van-button[data-v-0ae74f24]{display:block;width:8.50667rem;height:1.06667rem;margin:1.38667rem auto .42667rem;background-color:#d03a29;border-color:#d03a29;font-size:.37333rem;color:#fff;line-height:1.06667rem;font-weight:700;border-radius:.10667rem}
|
|
@ -0,0 +1 @@
|
|||
.filecontent[data-v-1d094ec7]{margin:.32rem 0;padding:.42667rem;background:#fff}.filecontent[data-v-1d094ec7] .van-cell{background-color:#f8f8f8}.filecontent .p1[data-v-1d094ec7]{font-size:.42667rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;color:#333;line-height:.53333rem;margin-bottom:.32rem}.form .van-cell[data-v-1d094ec7]{margin-bottom:.32rem}.form .van-cell[data-v-1d094ec7] .van-cell__title{font-size:.42667rem;color:#333;font-weight:700}.form .van-cell[data-v-1d094ec7] .van-cell__value{font-size:.37333rem}.form .van-cell .van-icon[data-v-1d094ec7]:before{vertical-align:middle;margin-left:.21333rem}.form .textarea[data-v-1d094ec7]{flex-direction:column}.form .textarea[data-v-1d094ec7] .van-cell__value{margin-top:.32rem;background-color:#f8f8f8;padding:.32rem}.form .van-button[data-v-1d094ec7]{display:block;width:8.50667rem;height:1.06667rem;margin:1.38667rem auto .42667rem;background-color:#d03a29;border-color:#d03a29;font-size:.37333rem;color:#fff;line-height:1.06667rem;font-weight:700;border-radius:.10667rem}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,8 +12,9 @@
|
|||
before="before">
|
||||
<input type="hidden" name="id" value="${bean.id!}">
|
||||
<div class="box-body">
|
||||
<act:title title="" fields="2"/>
|
||||
<act:title title="" fields="3"/>
|
||||
<input type="hidden" name="type" value="tz">
|
||||
<act:input text="通知对象" name="obj" as="select" dictType="t_notice_object" required="true" multiple="multiple" />
|
||||
<act:input text="是否置顶" name="top" as="bool" col="1"/>
|
||||
<act:input text="标题" name="title" required="true" col="2"/>
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in New Issue