Merge branch 'dev'
This commit is contained in:
commit
1f72d75871
|
@ -99,12 +99,18 @@ public class ActTaskController {
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("sys:task:all")
|
// @RequiresPermissions("sys:task:all")
|
||||||
public Result<PageData<TaskDTO>> myToDoTaskPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<TaskDTO>> myToDoTaskPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
params.put("userId", SecurityUser.getUserId().toString());
|
String userId = SecurityUser.getUserId().toString();
|
||||||
|
params.put("userId", userId);
|
||||||
PageData<TaskDTO> page = actTaskService.page(params);
|
PageData<TaskDTO> page = actTaskService.page(params);
|
||||||
for (TaskDTO taskDTO : page.getList()) {
|
for (TaskDTO taskDTO : page.getList()) {
|
||||||
if (!StringUtils.isEmpty(taskDTO.getAssignee())) {
|
if (!StringUtils.isEmpty(taskDTO.getAssignee())) {
|
||||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(taskDTO.getAssignee()));
|
SysUserDTO userDTO = sysUserService.get(Long.valueOf(taskDTO.getAssignee()));
|
||||||
taskDTO.setAssigneeName(userDTO.getRealName());
|
taskDTO.setAssigneeName(userDTO.getRealName());
|
||||||
|
if (userId.equals(taskDTO.getAssignee())) {
|
||||||
|
taskDTO.setSynergism(Boolean.FALSE);
|
||||||
|
} else {
|
||||||
|
taskDTO.setSynergism(Boolean.FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,8 @@ public class TaskDTO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "提供部门")
|
@ApiModelProperty(value = "提供部门")
|
||||||
private String provideDept;
|
private String provideDept;
|
||||||
|
@ApiModelProperty(value = "是否为审核组内协助任务")
|
||||||
|
private Boolean synergism;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.renren.modules.sys.service.impl;
|
package io.renren.modules.sys.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
@ -28,12 +27,12 @@ import io.renren.modules.sys.enums.JhDeptsEnum;
|
||||||
import io.renren.modules.sys.enums.SuperAdminEnum;
|
import io.renren.modules.sys.enums.SuperAdminEnum;
|
||||||
import io.renren.modules.sys.service.*;
|
import io.renren.modules.sys.service.*;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
import org.h2.util.StringUtils;
|
import org.h2.util.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@ -78,6 +77,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
@Value("${spring.datasource.druid.password}")
|
@Value("${spring.datasource.druid.password}")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
static final String sysUserDTOByIdKey = "SysUserDTOById";
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SysUserController.class);
|
private static final Logger logger = LoggerFactory.getLogger(SysUserController.class);
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,6 +126,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Cacheable(value = sysUserDTOByIdKey, key = "#p0")
|
||||||
public SysUserDTO get(Long id) {
|
public SysUserDTO get(Long id) {
|
||||||
SysUserEntity entity = baseDao.getById(id);
|
SysUserEntity entity = baseDao.getById(id);
|
||||||
|
|
||||||
|
|
|
@ -100,4 +100,14 @@
|
||||||
diskPersistent="true"
|
diskPersistent="true"
|
||||||
memoryStoreEvictionPolicy="LRU"/>
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
<!-- SysUserDTOById缓存 -->
|
||||||
|
<cache name="SysUserDTOById"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="6"
|
||||||
|
timeToLiveSeconds="30"
|
||||||
|
overflowToDisk="true"
|
||||||
|
diskPersistent="true"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
</ehcache>
|
</ehcache>
|
Loading…
Reference in New Issue