diff --git a/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java b/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java index 4c5d6dd8..4c9d1dd0 100644 --- a/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java +++ b/renren-admin/src/main/java/io/renren/common/listener/InitiatorDataEntryListener.java @@ -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); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java index 78da8f1a..213151aa 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java @@ -105,14 +105,24 @@ public class ActTaskController { }) // @RequiresPermissions("sys:task:all") public Result> myToDoTaskPage(@ApiIgnore @RequestParam Map params) { - params.put("userId", SecurityUser.getUserId().toString()); + String userId = SecurityUser.getUserId().toString(); + params.put("userId", userId); PageData 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); @@ -508,7 +518,7 @@ public class ActTaskController { @ApiOperation("根据政务云资源申请业务ID查询详情") @LogOperation("根据政务云资源申请业务ID查询详情") @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "业务ID", paramType = "query",required = true, dataType = "String") + @ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String") }) public Result getZwyBusinessInfoById(String id) { try { @@ -570,7 +580,7 @@ public class ActTaskController { @ApiOperation("根据政务云视频申请业务ID查询详情") @LogOperation("根据政务云视频申请业务ID查询详情") @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "业务ID", paramType = "query",required = true, dataType = "String") + @ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String") }) public Result getZwyVideoInfoById(String id) { diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/HistoryController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/HistoryController.java index b806fcb7..2239f181 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/HistoryController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/HistoryController.java @@ -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 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> 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 meetingroom_bookTaskDto = meetingroom_bookTask + .stream().map(index -> { + ProcessActivityDTO taskDTO = JSON.parseObject(JSON.toJSONString(index), ProcessActivityDTO.class); + return taskDTO; + }).collect(Collectors.toList()); + List 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())); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java b/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java index e3dfa9fc..c666d17a 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java @@ -100,6 +100,8 @@ public class TaskDTO { @ApiModelProperty(value = "提供部门") private String provideDept; + @ApiModelProperty(value = "是否为审核组内协助任务") + private Boolean synergism; @Override diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java index cce261f9..c6b90442 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java @@ -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 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); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java index 1553213a..a25e49b2 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java @@ -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 page(Map params) { + // TODO 同一审核组内成员 + List groupUserId = new ArrayList() {{ // 测试 + + }}; 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 listRoles = sysRoleUserService.getRoleIdList(SecurityUser.getUserId()); - List 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); - } + 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); } - taskQuery.orderByTaskCreateTime().desc(); - List list = taskQuery.active().includeProcessVariables().listPage((curPage - 1) * limit, limit); - return new PageData<>(tasks2TaskDtos(list), (int) taskQuery.count()); + 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")); + } + List tasks = nativeTaskQuery.listPage((curPage - 1) * limit, limit); + long count = nativeCountTaskQuery.count(); + List 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 listRoles = sysRoleUserService.getRoleIdList(SecurityUser.getUserId()); +// List 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 list = taskQuery.active() +// .includeProcessVariables().listPage((curPage - 1) * limit, limit); +// return new PageData<>(tasks2TaskDtos(list), (int) taskQuery.count()); } /** diff --git a/renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java b/renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java index f568d775..42e6b3bb 100644 --- a/renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java +++ b/renren-admin/src/main/java/io/renren/modules/enke/controller/EnkeController.java @@ -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 { - cp = ContingencyPlanUtil.getInstance(); - // 初始化会议 - cp.init(videoConfernceIp, videoConferncePort); - List ips = getLocalIP(); - cp.setLocalAddress(CollectionUtils.isEmpty(ips) ? "0.0.0.0" : ips.get(0), ContingencyPlanUtil.LOCAL_PORT); + @PostConstruct + public void init() { + if (enke) { + cp = ContingencyPlanUtil.getInstance(); + // 初始化会议 + cp.init(videoConfernceIp, videoConferncePort); + List 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; } } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index 0da56cf4..8e9e14b0 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -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 diff --git a/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java b/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java index 29a6621f..59fa9ddb 100644 --- a/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java +++ b/renren-admin/src/main/java/io/renren/modules/reminders/controller/TRemindersController.java @@ -57,7 +57,7 @@ public class TRemindersController { @Autowired protected TaskService taskService; - @Value("${reminders.interval:7}") // 流程发起后多少天允许催办 + @Value("${reminders.interval}") // 流程发起后多少天允许催办 private Integer interval; @GetMapping("page") diff --git a/renren-admin/src/main/java/io/renren/modules/reminders/service/impl/TRemindersServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/reminders/service/impl/TRemindersServiceImpl.java index ce73e477..ac29ab3d 100644 --- a/renren-admin/src/main/java/io/renren/modules/reminders/service/impl/TRemindersServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/reminders/service/impl/TRemindersServiceImpl.java @@ -46,7 +46,7 @@ public class TRemindersServiceImpl extends CrudServiceImpl().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 result = new LinkedHashMap() {{ + put("PageCount", "0"); + put("data", new ArrayList<>()); + put("rows", "0"); + }}; + return new Result().ok(result); } } diff --git a/renren-admin/src/main/java/io/renren/modules/security/user/SecurityUser.java b/renren-admin/src/main/java/io/renren/modules/security/user/SecurityUser.java index bb83b8c0..74afe875 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/user/SecurityUser.java +++ b/renren-admin/src/main/java/io/renren/modules/security/user/SecurityUser.java @@ -25,7 +25,7 @@ public class SecurityUser { */ public static UserDetail getUser() { - logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace()); +// logger.error("————————————————————————————当前调用的方法为{}", getMyGrandpaStackTrace()); Subject subject = getSubject(); if (subject == null) { diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java index 53e5588d..ee946119 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java @@ -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> page(@ApiIgnore @RequestParam Map params){ + public Result> page(@ApiIgnore @RequestParam Map params) { PageData page = sysNoticeManagementService.page(params); return new Result>().ok(page); @@ -61,7 +60,7 @@ public class SysNoticeManagementController { @GetMapping("{id}") @ApiOperation("信息") //@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:info") - public Result get(@PathVariable("id") Long id){ + public Result get(@PathVariable("id") Long id) { SysNoticeManagementDTO data = sysNoticeManagementService.get(id); return new Result().ok(data); @@ -71,7 +70,7 @@ public class SysNoticeManagementController { @ApiOperation("保存") @LogOperation("保存") //@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:save") - public Result save(@RequestBody SysNoticeManagementDTO dto){ + public Result save(@RequestBody SysNoticeManagementDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); dto.setDelFlag(0); @@ -81,11 +80,11 @@ public class SysNoticeManagementController { return new Result(); } - @PutMapping + @PostMapping(value = "/update") @ApiOperation("修改") @LogOperation("修改") //@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update") - public Result update(@RequestBody SysNoticeManagementDTO dto){ + public Result update(@RequestBody SysNoticeManagementDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -98,7 +97,7 @@ public class SysNoticeManagementController { @ApiOperation("删除") @LogOperation("删除") //@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:delete") - public Result delete(@RequestBody Long[] ids){ + public Result delete(@RequestBody Long[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); diff --git a/renren-admin/src/main/resources/application.yml b/renren-admin/src/main/resources/application.yml index 9c2d76cd..853b9125 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -179,4 +179,7 @@ shangdongtong: reminders: # 催办间隔天数 interval: 7 +# 恩科会议 +enke: + enable: true diff --git a/renren-admin/src/main/resources/ehcache.xml b/renren-admin/src/main/resources/ehcache.xml index 89011744..ea90c19b 100644 --- a/renren-admin/src/main/resources/ehcache.xml +++ b/renren-admin/src/main/resources/ehcache.xml @@ -100,4 +100,14 @@ diskPersistent="true" memoryStoreEvictionPolicy="LRU"/> + + + \ No newline at end of file