|
@@ -49,6 +49,7 @@ public class TNoticeController {
|
|
|
tNotice.setTitle(notice.getTitle());
|
|
|
tNotice.setNote(notice.getNote());
|
|
|
tNotice.setStatus("0");
|
|
|
+ tNotice.setCompanyType(notice.getCompanyType());
|
|
|
noticeService.save(tNotice);
|
|
|
return R.ok(tNotice,"添加成功");
|
|
|
}
|
|
@@ -60,8 +61,13 @@ public class TNoticeController {
|
|
|
return R.fail(ResponseCodesEnum.A0001,"数据有空");
|
|
|
}
|
|
|
TAdmin admin = tAdminService.getById(adminId);
|
|
|
+ String companyType = admin.getCompanyType();
|
|
|
+ if(StringUtils.isEmpty(companyType)) {
|
|
|
+ companyType = "0";
|
|
|
+ }
|
|
|
LambdaQueryWrapper<TNotice> query = Wrappers.lambdaQuery();
|
|
|
query.eq(TNotice::getStatus,"0");
|
|
|
+ query.eq(TNotice::getCompanyType,companyType);
|
|
|
query.orderByDesc(TNotice::getCreateDate);
|
|
|
List<TNotice> notices = noticeService.list(query);
|
|
|
if(notices.size() > 0){
|