添加未读消息列列表
This commit is contained in:
@@ -92,10 +92,30 @@ public class CmsNoticeController extends BaseController
|
||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("pc端获取未读消息")
|
||||
@ApiOperation("pc端获取消息列表")
|
||||
@GetMapping("/appNoticList")
|
||||
public TableDataInfo list(Notice notice)
|
||||
public TableDataInfo selectListAppNotics(Notice notice)
|
||||
{
|
||||
if(!SecurityUtils.isLogin()){
|
||||
error(HttpStatus.ERROR,"未登录!");
|
||||
}
|
||||
if(notice.getUserId()==null){
|
||||
String idCard= RoleUtils.getCurrentUseridCard();
|
||||
AppUser appUser=appUserService.selectAppuserByIdcard(idCard);
|
||||
if(appUser==null){
|
||||
error(HttpStatus.ERROR,"用户信息未完善,请完善身份证信息!");
|
||||
}else{
|
||||
notice.setUserId(appUser.getUserId());
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
List<Notice> notices = noticeService.selectListAppNotics(notice);
|
||||
return getDataTable(notices);
|
||||
}
|
||||
|
||||
@ApiOperation("pc端获取未读消息列表")
|
||||
@GetMapping("/appNoticReadList")
|
||||
public TableDataInfo appNoticReadList(Notice notice)
|
||||
{
|
||||
if(!SecurityUtils.isLogin()){
|
||||
error(HttpStatus.ERROR,"未登录!");
|
||||
|
||||
@@ -34,7 +34,7 @@ public class EmployeeConfirmController extends BaseController {
|
||||
* 列表
|
||||
*/
|
||||
@ApiOperation("新入职员工确认信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('cms:employeeConfirm:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('cms:employeeConfirm:list')")
|
||||
@RequestMapping("/list")
|
||||
public TableDataInfo list(EmployeeConfirm employeeConfirm){
|
||||
List<EmployeeConfirm> list=employeeConfirmService.getEmployeeConfirmList(employeeConfirm);
|
||||
@@ -45,7 +45,7 @@ public class EmployeeConfirmController extends BaseController {
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation("新增新入职员工确认信息")
|
||||
@PreAuthorize("@ss.hasPermi('cms:employeeConfirm:add')")
|
||||
// @PreAuthorize("@ss.hasPermi('cms:employeeConfirm:add')")
|
||||
@Log(title = "职员工确认信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmployeeConfirm employeeConfirm){
|
||||
@@ -53,7 +53,7 @@ public class EmployeeConfirmController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation("修改新入职员工确认信息")
|
||||
@PreAuthorize("@ss.hasPermi('cms:employeeConfirm:edit')")
|
||||
// @PreAuthorize("@ss.hasPermi('cms:employeeConfirm:edit')")
|
||||
@Log(title = "职员工确认信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmployeeConfirm employeeConfirm){
|
||||
@@ -61,7 +61,7 @@ public class EmployeeConfirmController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation("删除新入职员工确认信息")
|
||||
@PreAuthorize("@ss.hasPermi('app:employeeConfirm:remove')")
|
||||
// @PreAuthorize("@ss.hasPermi('app:employeeConfirm:remove')")
|
||||
@Log(title = "公司", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{employeeConfirmIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] employeeConfirmIds)
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Notice extends BaseEntity
|
||||
@ApiModelProperty("未读数量")
|
||||
private Integer notReadCount;
|
||||
|
||||
@ApiModelProperty("是否阅读")
|
||||
@ApiModelProperty("是否阅读 0未读 1已读")
|
||||
private Integer isRead;
|
||||
|
||||
@JsonFormat(pattern = "MM-dd")
|
||||
|
||||
@@ -80,4 +80,6 @@ public interface IAppNoticeService
|
||||
List<Notice> selectListAppNotRead(Notice notice);
|
||||
|
||||
void readSysNotices(String ids,Long userId);
|
||||
|
||||
List<Notice> selectListAppNotics(Notice notice);
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ public class AppNoticeServiceImpl implements IAppNoticeService
|
||||
|
||||
@Override
|
||||
public List<Notice> selectListAppNotRead(Notice notice) {
|
||||
List<Notice> sysNoticeList = noticeInfoMapper.selectList(Wrappers.<Notice>lambdaQuery().eq(Notice::getUserId, notice.getUserId()).eq(Notice::getRemark,"notice_bar").orderByDesc(Notice::getCreateTime));
|
||||
List<Notice> sysNoticeList = noticeInfoMapper.selectList(Wrappers.<Notice>lambdaQuery().eq(Notice::getUserId, notice.getUserId()).eq(Notice::getRemark,"notice_bar").eq(Notice::getIsRead,0).orderByDesc(Notice::getCreateTime));
|
||||
return sysNoticeList;
|
||||
}
|
||||
|
||||
@@ -221,5 +221,11 @@ public class AppNoticeServiceImpl implements IAppNoticeService
|
||||
}
|
||||
noticeInfoMapper.updateById(notice);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Notice> selectListAppNotics(Notice notice) {
|
||||
List<Notice> sysNoticeList = noticeInfoMapper.selectList(Wrappers.<Notice>lambdaQuery().eq(Notice::getUserId, notice.getUserId()).eq(Notice::getRemark,"notice_bar").orderByDesc(Notice::getCreateTime));
|
||||
return sysNoticeList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@ package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.ruoyi.cms.domain.EmployeeConfirm;
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.domain.Notice;
|
||||
import com.ruoyi.cms.mapper.EmployeeConfirmMapper;
|
||||
import com.ruoyi.cms.mapper.JobApplyMapper;
|
||||
import com.ruoyi.cms.mapper.NoticeMapper;
|
||||
import com.ruoyi.cms.service.EmployeeConfirmService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -19,6 +21,8 @@ public class EmployeeConfirmServiceImpl implements EmployeeConfirmService {
|
||||
EmployeeConfirmMapper employeeConfirmMapper;
|
||||
@Autowired
|
||||
private JobApplyMapper jobApplyMapper;
|
||||
@Autowired
|
||||
private NoticeMapper noticeMapper;
|
||||
|
||||
@Override
|
||||
public List<EmployeeConfirm> getEmployeeConfirmList(EmployeeConfirm employeeConfirm) {
|
||||
@@ -34,6 +38,13 @@ public class EmployeeConfirmServiceImpl implements EmployeeConfirmService {
|
||||
apply.setHire("0");
|
||||
jobApplyMapper.updateById(apply);
|
||||
}
|
||||
//添加消息
|
||||
/*Notice notice=new Notice();
|
||||
notice.setUserId();
|
||||
notice.setBussinessId();
|
||||
notice.setIsRead(0);
|
||||
notice
|
||||
noticeMapper.insert(notice);*/
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user