Merge branch 'dev' of http://192.168.124.50:3000/wangliwen/share-platform into dev
This commit is contained in:
commit
e331fffaa5
|
@ -75,15 +75,35 @@ public class InitiatorDataEntryListener implements TaskListener {
|
|||
} else if (kv.containsKey("userId")) {
|
||||
creator = kv.get("userId").toString();
|
||||
}
|
||||
Integer type = 10;
|
||||
String flowType = kv.getOrDefault("flowType", "").toString();
|
||||
switch (flowType) {
|
||||
case "能力申请":
|
||||
type = 0;
|
||||
break;
|
||||
case "能力需求申请":
|
||||
type = 6;
|
||||
break;
|
||||
case "评论审核":
|
||||
type = 8;
|
||||
break;
|
||||
case "资源上架":
|
||||
type = 2;
|
||||
break;
|
||||
case "资源下架":
|
||||
type = 4;
|
||||
break;
|
||||
}
|
||||
try {
|
||||
String result = "被驳回";
|
||||
String finalCreator = creator;
|
||||
String finalResult = result;
|
||||
Integer finalType = type;
|
||||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + userDTO.getRealName() + ",您发起的流程 " + kv.getOrDefault("flowType", "") + finalResult;
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setType(finalType);
|
||||
dto.setTitle("流程节点系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
|
|
|
@ -105,14 +105,24 @@ public class ActTaskController {
|
|||
})
|
||||
// @RequiresPermissions("sys:task:all")
|
||||
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);
|
||||
for (TaskDTO taskDTO : page.getList()) {
|
||||
if (!StringUtils.isEmpty(taskDTO.getAssignee())) {
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(taskDTO.getAssignee()));
|
||||
taskDTO.setAssigneeName(userDTO.getRealName());
|
||||
if (userId.equals(taskDTO.getAssignee())) {
|
||||
taskDTO.setSynergism(Boolean.FALSE);
|
||||
} else {
|
||||
taskDTO.setSynergism(Boolean.FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 当未指定流程类型时 补充一下会客厅的待办
|
||||
*/
|
||||
if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) {
|
||||
int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state = 1;", Integer.class);
|
||||
page.setTotal(page.getTotal() + meetingroom_book);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.renren.modules.activiti.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.renren.common.annotation.LogOperation;
|
||||
import io.renren.common.constant.Constant;
|
||||
|
@ -36,6 +37,7 @@ import org.activiti.engine.history.HistoricProcessInstanceQuery;
|
|||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
@ -85,6 +87,8 @@ public class HistoryController {
|
|||
protected RuntimeService runtimeService;
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Autowired
|
||||
private SysUserDao sysUserDao;
|
||||
|
@ -128,6 +132,37 @@ public class HistoryController {
|
|||
params.replace("processDefinitionKey", params.get("processDefinitionKey").toString() + "%");
|
||||
}
|
||||
PageData<ProcessActivityDTO> page = activitiService.getMyProcessInstancePage(params);
|
||||
if (!(params.containsKey("processDefinitionKey") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("processDefinitionKey").toString()))) {
|
||||
int meetingroom_book = jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state != 1;", Integer.class);
|
||||
page.setTotal(page.getTotal() + meetingroom_book);
|
||||
Integer limit = 10;
|
||||
if (params.get(Constant.LIMIT) != null) {
|
||||
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
|
||||
}
|
||||
if (page.getList().size() < limit) {
|
||||
List<Map<String, Object>> meetingroom_bookTask = jdbcTemplate.queryForList("SELECT " +
|
||||
" t_meetingroom_book.id AS `businessKey`, " +
|
||||
" t_meetingroom_book.dept AS `startUserDeptName`, " +
|
||||
" '会客厅' AS `resourceName`, " +
|
||||
" '青岛市大数据发展管理局' AS `provideDept`, " +
|
||||
" t_meetingroom.`name` AS `userName`, " +
|
||||
" '会客厅审核' AS `processDefinitionName `, " +
|
||||
" t_meetingroom.create_date AS `startTime` " +
|
||||
"FROM " +
|
||||
" t_meetingroom_book " +
|
||||
" LEFT JOIN t_meetingroom ON t_meetingroom_book.room_id = t_meetingroom.id " +
|
||||
"WHERE " +
|
||||
" state != 1 ;");
|
||||
List<ProcessActivityDTO> meetingroom_bookTaskDto = meetingroom_bookTask
|
||||
.stream().map(index -> {
|
||||
ProcessActivityDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), ProcessActivityDTO.class);
|
||||
return taskDTO;
|
||||
}).collect(Collectors.toList());
|
||||
List<ProcessActivityDTO> temp = page.getList();
|
||||
temp.addAll(meetingroom_bookTaskDto);
|
||||
page.setList(temp);
|
||||
}
|
||||
}
|
||||
setExtraProcessProperties(Optional.ofNullable(page.getList()).orElse(new ArrayList<>()));
|
||||
return new Result().ok(page);
|
||||
}
|
||||
|
@ -210,7 +245,9 @@ public class HistoryController {
|
|||
TResourceMountApplyDTO tResourceMountApplyDTO = null;
|
||||
TDemandDataDTO tDemandDataDTO = null;
|
||||
ResourceDTO resourceDTO = null;
|
||||
if (!activityDTO.getBusinessKey().startsWith("[") && !activityDTO.getBusinessKey().startsWith("{")) { // json 内容(批量申请)
|
||||
if (StringUtils.isNotEmpty(activityDTO.getBusinessKey())
|
||||
&& !activityDTO.getBusinessKey().startsWith("[")
|
||||
&& !activityDTO.getBusinessKey().startsWith("{")) { // json 内容(批量申请)
|
||||
tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
resourceDTO = resourceService.get(Long.valueOf(activityDTO.getBusinessKey()));
|
||||
|
|
|
@ -100,6 +100,8 @@ public class TaskDTO {
|
|||
|
||||
@ApiModelProperty(value = "提供部门")
|
||||
private String provideDept;
|
||||
@ApiModelProperty(value = "是否为审核组内协助任务")
|
||||
private Boolean synergism;
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -99,7 +99,7 @@ public class ActHistoryService {
|
|||
|
||||
@Autowired
|
||||
private TRemindersService tRemindersService;
|
||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
||||
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||
private Integer interval;
|
||||
|
||||
|
||||
|
@ -397,6 +397,7 @@ public class ActHistoryService {
|
|||
Optional<Task> nowTask = taskService.createTaskQuery().processInstanceId(index.getProcessInstanceId())
|
||||
.orderByTaskCreateTime().desc().active().list().stream().findFirst(); // 尝试获取当前task
|
||||
if (nowTask.isPresent()) { // 存在正在进行的任务
|
||||
logger.info("当前任务id:" + nowTask.get().getId());
|
||||
LocalDate localDate = tRemindersService.selectRemindersTime(nowTask.get().getId());
|
||||
if (localDate == null) { // 未进行过催办
|
||||
LocalDate taskCreateDate = nowTask.get().getCreateTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
|
@ -424,6 +425,7 @@ public class ActHistoryService {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
logger.info("不存在正在进行流程节点");
|
||||
index.setAllowReminders(Boolean.FALSE);
|
||||
index.setDoneReminders(Boolean.FALSE);
|
||||
index.setNextRemindersDays(0);
|
||||
|
|
|
@ -19,8 +19,6 @@ import io.renren.modules.notice.service.SysNoticeService;
|
|||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.resource.dao.ResourceDao;
|
||||
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
|
||||
import io.renren.modules.resource.dto.GetDataResourceListDto;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.entity.ResourceEntity;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
|
@ -53,6 +51,7 @@ import org.activiti.engine.impl.pvm.process.TransitionImpl;
|
|||
import org.activiti.engine.impl.task.TaskDefinition;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
import org.activiti.engine.task.NativeTaskQuery;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.activiti.engine.task.TaskInfo;
|
||||
import org.activiti.engine.task.TaskQuery;
|
||||
|
@ -135,6 +134,10 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
* @return
|
||||
*/
|
||||
public PageData<TaskDTO> page(Map<String, Object> params) {
|
||||
// TODO 同一审核组内成员
|
||||
List<String> groupUserId = new ArrayList<String>() {{ // 测试
|
||||
|
||||
}};
|
||||
String userId = (String) params.get("userId");
|
||||
Integer curPage = 1;
|
||||
Integer limit = 10;
|
||||
|
@ -144,32 +147,86 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
if (params.get(Constant.LIMIT) != null) {
|
||||
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
|
||||
}
|
||||
TaskQuery taskQuery = taskService.createTaskQuery();
|
||||
String taskSql = "SELECT " +
|
||||
" RES.* " +
|
||||
"FROM " +
|
||||
" ACT_RU_TASK RES " +
|
||||
" INNER JOIN ACT_RE_PROCDEF D ON RES.PROC_DEF_ID_ = D.ID_ ";
|
||||
String countSql = "SELECT " +
|
||||
" COUNT(RES.ID_) " +
|
||||
"FROM " +
|
||||
" ACT_RU_TASK RES " +
|
||||
" INNER JOIN ACT_RE_PROCDEF D ON RES.PROC_DEF_ID_ = D.ID_ ";
|
||||
StringBuffer where = new StringBuffer(" WHERE 1 =1 ");
|
||||
if (StringUtils.isNotEmpty(userId)) {
|
||||
taskQuery.taskAssignee(userId);
|
||||
where.append("AND ( RES.ASSIGNEE_ = #{userId} ");
|
||||
// 处理同一工作组内
|
||||
groupUserId.stream().forEach(index -> {
|
||||
where.append(String.format(" OR RES.ASSIGNEE_ = '%s' ", index));
|
||||
});
|
||||
where.append(")");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
|
||||
taskQuery.taskNameLike("%" + params.get("taskName") + "%");
|
||||
where.append(" AND RES.NAME_ = #{taskName}");
|
||||
}
|
||||
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||
taskQuery.processDefinitionKey((String) params.get("processDefinitionKey"));
|
||||
where.append(" AND D.KEY_ = #{processDefinitionKey} ");
|
||||
}
|
||||
if (StringUtils.isNotEmpty((String) params.get("isRoleGroup")) && "1".equals(params.get("isRoleGroup"))) {
|
||||
List<Long> listRoles = sysRoleUserService.getRoleIdList(SecurityUser.getUserId());
|
||||
List<String> listStr = new ArrayList<>();
|
||||
for (Long role : listRoles) {
|
||||
listStr.add(role.toString());
|
||||
where.append(" AND RES.SUSPENSION_STATE_ = 1 ");
|
||||
|
||||
String order = " ORDER BY " +
|
||||
" RES.CREATE_TIME_ DESC ";
|
||||
NativeTaskQuery nativeTaskQuery = taskService.createNativeTaskQuery().sql(taskSql + where + order);
|
||||
NativeTaskQuery nativeCountTaskQuery = taskService.createNativeTaskQuery().sql(countSql + where + order);
|
||||
if (StringUtils.isNotEmpty(userId)) { // 分配审核员
|
||||
nativeTaskQuery.parameter("userId", userId);
|
||||
nativeCountTaskQuery.parameter("userId", userId);
|
||||
}
|
||||
listStr.add(SecurityUser.getUserId().toString());
|
||||
if (!listStr.isEmpty()) {
|
||||
taskQuery.taskCandidateGroupIn(listStr);
|
||||
} else {
|
||||
return new PageData<>(new ArrayList<>(), 0);
|
||||
if (StringUtils.isNotEmpty((String) params.get("taskName"))) { // 任务名称
|
||||
nativeTaskQuery.parameter("taskName", params.get("taskName"));
|
||||
nativeCountTaskQuery.parameter("taskName", params.get("taskName"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||
nativeTaskQuery.parameter("processDefinitionKey", params.get("processDefinitionKey"));
|
||||
nativeCountTaskQuery.parameter("processDefinitionKey", params.get("processDefinitionKey"));
|
||||
}
|
||||
taskQuery.orderByTaskCreateTime().desc();
|
||||
List<Task> list = taskQuery.active().includeProcessVariables().listPage((curPage - 1) * limit, limit);
|
||||
return new PageData<>(tasks2TaskDtos(list), (int) taskQuery.count());
|
||||
List<Task> tasks = nativeTaskQuery.listPage((curPage - 1) * limit, limit);
|
||||
long count = nativeCountTaskQuery.count();
|
||||
List<Task> list_ = tasks.stream().map(index -> {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery();
|
||||
Task temp = taskQuery.taskId(index.getId()).includeProcessVariables().singleResult();
|
||||
return temp;
|
||||
}).collect(Collectors.toList());
|
||||
return new PageData<>(tasks2TaskDtos(list_), (int) count);
|
||||
// 以下注释为原实现方案
|
||||
// TaskQuery taskQuery = taskService.createTaskQuery();
|
||||
// if (StringUtils.isNotEmpty(userId)) {
|
||||
// taskQuery.taskAssignee(userId);
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
|
||||
// taskQuery.taskNameLike("%" + params.get("taskName") + "%");
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
|
||||
// taskQuery.processDefinitionKey((String) params.get("processDefinitionKey"));
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty((String) params.get("isRoleGroup")) && "1".equals(params.get("isRoleGroup"))) {
|
||||
// List<Long> listRoles = sysRoleUserService.getRoleIdList(SecurityUser.getUserId());
|
||||
// List<String> listStr = new ArrayList<>();
|
||||
// for (Long role : listRoles) {
|
||||
// listStr.add(role.toString());
|
||||
// }
|
||||
// listStr.add(SecurityUser.getUserId().toString());
|
||||
// if (!listStr.isEmpty()) {
|
||||
// taskQuery.taskCandidateGroupIn(listStr);
|
||||
// } else {
|
||||
// return new PageData<>(new ArrayList<>(), 0);
|
||||
// }
|
||||
// }
|
||||
// taskQuery.orderByTaskCreateTime().desc();
|
||||
// List<Task> list = taskQuery.active()
|
||||
// .includeProcessVariables().listPage((curPage - 1) * limit, limit);
|
||||
// return new PageData<>(tasks2TaskDtos(list), (int) taskQuery.count());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,11 +11,13 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
import sw.vc3term.contingencyplan.ContingencyPlanUtil;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
|
@ -39,19 +41,27 @@ public class EnkeController {
|
|||
private static final String videoConfernceIp = "35.1.190.62";
|
||||
private static final int videoConferncePort = 8756;
|
||||
|
||||
private static final ContingencyPlanUtil cp;
|
||||
private static ContingencyPlanUtil cp = null;
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ActHistoryService.class);
|
||||
|
||||
@Autowired
|
||||
private EnkeService enkeService;
|
||||
@Value("#{new Boolean(${enke.enable})}")
|
||||
private Boolean enke; // 是否进行恩科会议组会
|
||||
|
||||
static {
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
if (enke) {
|
||||
cp = ContingencyPlanUtil.getInstance();
|
||||
// 初始化会议
|
||||
cp.init(videoConfernceIp, videoConferncePort);
|
||||
List<String> ips = getLocalIP();
|
||||
cp.setLocalAddress(CollectionUtils.isEmpty(ips) ? "0.0.0.0" : ips.get(0), ContingencyPlanUtil.LOCAL_PORT);
|
||||
logger.info("开启组会功能成功!");
|
||||
} else {
|
||||
logger.info("不开启组会功能");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -112,6 +122,7 @@ public class EnkeController {
|
|||
}
|
||||
}
|
||||
}
|
||||
logger.info("本机ip:" + ips);
|
||||
return ips;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ public class TAbilityApplicationController {
|
|||
@Value("${infrastructure.dept-can-apply-max}")
|
||||
private Integer infrastructureMax;
|
||||
|
||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
||||
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||
private Integer interval;
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -57,7 +57,7 @@ public class TRemindersController {
|
|||
@Autowired
|
||||
protected TaskService taskService;
|
||||
|
||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
||||
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||
private Integer interval;
|
||||
|
||||
@GetMapping("page")
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TRemindersServiceImpl extends CrudServiceImpl<TRemindersDao, TRemin
|
|||
@Value("#{new Boolean(${notice.yawei})}")
|
||||
private Boolean noticeYaWei; // 是否发送消息到亚微中心
|
||||
|
||||
@Value("${reminders.interval:7}") // 流程发起后多少天允许催办
|
||||
@Value("${reminders.interval}") // 流程发起后多少天允许催办
|
||||
private Integer interval;
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -524,7 +524,7 @@ public class ResourceController {
|
|||
|
||||
SysUserEntity sysUser = sysUserDao.getById(userId);
|
||||
if (sysUser == null || sysUser.getGuid() == null) {
|
||||
return new Result<>().error("该账号没有权限");
|
||||
return new Result<>().error("该账号没有权限获取资源列表");
|
||||
}
|
||||
|
||||
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZySPPort";
|
||||
|
@ -553,8 +553,13 @@ public class ResourceController {
|
|||
|
||||
return new Result().ok(result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new Result().ok(new ArrayList(0));
|
||||
logger.error("资源列表转发异常", e);
|
||||
Map<String, Object> result = new LinkedHashMap<String, Object>() {{
|
||||
put("PageCount", "0");
|
||||
put("data", new ArrayList<>());
|
||||
put("rows", "0");
|
||||
}};
|
||||
return new Result().ok(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public class SecurityUser {
|
|||
*/
|
||||
public static UserDetail getUser() {
|
||||
|
||||
logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace());
|
||||
// logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace());
|
||||
|
||||
Subject subject = getSubject();
|
||||
if (subject == null) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
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.update.UpdateWrapper;
|
||||
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.service.*;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.h2.util.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -78,6 +77,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
|||
@Value("${spring.datasource.druid.password}")
|
||||
private String password;
|
||||
|
||||
static final String sysUserDTOByIdKey = "SysUserDTOById";
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SysUserController.class);
|
||||
|
||||
|
||||
|
@ -125,6 +126,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
|||
}
|
||||
|
||||
@Override
|
||||
@Cacheable(value = sysUserDTOByIdKey, key = "#p0")
|
||||
public SysUserDTO get(Long id) {
|
||||
SysUserEntity entity = baseDao.getById(id);
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
@ -81,7 +80,7 @@ public class SysNoticeManagementController {
|
|||
return new Result();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@PostMapping(value = "/update")
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update")
|
||||
|
|
|
@ -179,4 +179,7 @@ shangdongtong:
|
|||
reminders:
|
||||
# 催办间隔天数
|
||||
interval: 7
|
||||
# 恩科会议
|
||||
enke:
|
||||
enable: true
|
||||
|
||||
|
|
|
@ -100,4 +100,14 @@
|
|||
diskPersistent="true"
|
||||
memoryStoreEvictionPolicy="LRU"/>
|
||||
|
||||
<!-- SysUserDTOById缓存 -->
|
||||
<cache name="SysUserDTOById"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="false"
|
||||
timeToIdleSeconds="6"
|
||||
timeToLiveSeconds="30"
|
||||
overflowToDisk="true"
|
||||
diskPersistent="true"
|
||||
memoryStoreEvictionPolicy="LRU"/>
|
||||
|
||||
</ehcache>
|
Loading…
Reference in New Issue