|
@@ -1,5 +1,6 @@
|
|
|
package com.jeeplus.flowable.service;
|
|
|
|
|
|
+import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
@@ -7,8 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.jeeplus.core.domain.BaseEntity;
|
|
|
import com.jeeplus.flowable.mapper.MyNoticeListMapper;
|
|
|
import com.jeeplus.flowable.model.MyNoticeList;
|
|
|
+import com.jeeplus.sys.feign.IUserApi;
|
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
-import com.jeeplus.sys.utils.UserUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -34,9 +35,9 @@ public class MyNoticeService {
|
|
|
*/
|
|
|
public Page<MyNoticeList> noticeList(Page<MyNoticeList> page, String type, String title, String taskName){
|
|
|
// 获取当前登录人名称查询出未查看通知列表
|
|
|
- String userName = UserUtils.getCurrentUserDTO ().getName ();
|
|
|
+ String userName = SpringUtil.getBean ( IUserApi.class ).getLoginUser ().getName ();
|
|
|
QueryWrapper<MyNoticeList> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("a.notice_id", UserUtils.getCurrentUserDTO ().getId());
|
|
|
+ queryWrapper.eq("a.notice_id", SpringUtil.getBean ( IUserApi.class ).getLoginUser ().getId());
|
|
|
queryWrapper.orderByDesc("a.create_date");
|
|
|
if (StringUtils.isNotEmpty(type)) {
|
|
|
queryWrapper.eq("a.type", Integer.parseInt(type));
|
|
@@ -67,7 +68,7 @@ public class MyNoticeService {
|
|
|
mapper.updateById(one);
|
|
|
}
|
|
|
//获取当前登录人信息
|
|
|
- UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
+ UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getLoginUser ();
|
|
|
//生成id
|
|
|
String id = UUID.randomUUID().toString().replace("-", "");
|
|
|
notice.setId(id);
|
|
@@ -135,7 +136,7 @@ public class MyNoticeService {
|
|
|
|
|
|
public String readAll() {
|
|
|
// 获取当前登录人信息
|
|
|
- UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
+ UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getLoginUser ();
|
|
|
mapper.readAll(userDTO.getName());
|
|
|
return "操作成功";
|
|
|
}
|