Browse Source

Merge remote-tracking branch 'origin/feature/lc_issueAdjustment'

feature/screenDataPush
songyunpeng 4 years ago
parent
commit
58dd27aa7a
  1. 81
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/RoleEventsTagDTO.java
  2. 4
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/SysRoleDTO.java
  3. 5
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/SysUserDTO.java
  4. 32
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/WorkUserEventTagRelationFormDTO.java
  5. 44
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/WorkUserEventTagRelationResultDTO.java
  6. 103
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/RoleEventsTagController.java
  7. 9
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java
  8. 66
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/RoleEventsTagDao.java
  9. 51
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/RoleEventsTagEntity.java
  10. 5
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysUserEntity.java
  11. 129
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/RoleEventsTagService.java
  12. 136
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/RoleEventsTagServiceImpl.java
  13. 6
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysRoleServiceImpl.java
  14. 33
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/RoleEventsTagDao.xml
  15. 1
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysUserDao.xml
  16. 12
      esua-epdc/epdc-gateway/pom.xml
  17. 20
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java
  18. 13
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
  19. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java
  20. 16
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java
  21. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java
  22. 81
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/WorkUserEventsDTO.java
  23. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
  24. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssuePendingResponseFormDTO.java
  25. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/WorkIssueListFormDTO.java
  26. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java
  27. 18
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java
  28. 84
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/WorkUserEventsController.java
  29. 33
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/WorkUserEventsDao.java
  30. 51
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/WorkUserEventsEntity.java
  31. 107
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/WorkUserEventsService.java
  32. 37
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  33. 117
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/WorkUserEventsServiceImpl.java
  34. 1
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java
  35. 11
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
  36. 37
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
  37. 7
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/WorkUserEventsDao.xml
  38. 18
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
  39. 4
      renren-cloud-generator/src/main/resources/application.yml

81
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/RoleEventsTagDTO.java

@ -0,0 +1,81 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 角色和事件标签关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-20
*/
@Data
public class RoleEventsTagDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 角色ID
*/
private Long roleId;
/**
* 事件标签ID
*/
private String eventTagId;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
}

4
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/SysRoleDTO.java

@ -86,4 +86,8 @@ public class SysRoleDTO implements Serializable {
* 吹哨部门id列表
*/
private List<Long> whistleDeptIdList;
/**
* 事件标签授权id列表
*/
private List<String> eventsTagsIdList;
}

5
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/SysUserDTO.java

@ -134,4 +134,9 @@ public class SysUserDTO implements Serializable {
*/
private SysEpmetUserRelationDTO wgyInfo;
/**
* 职务
*/
private String position;
}

32
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/WorkUserEventTagRelationFormDTO.java

@ -0,0 +1,32 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* @Authorliuchuang
* @Date2021/7/21 13:33
*/
@Data
public class WorkUserEventTagRelationFormDTO implements Serializable {
private static final long serialVersionUID = -8443508933049274341L;
/**
* 页码
*/
@Min(value = 1, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 1, message = "页容量必须大于0")
private Integer pageSize;
/**
* 事件标签ID
*/
private String eventTagId;
}

44
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/WorkUserEventTagRelationResultDTO.java

@ -0,0 +1,44 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Authorliuchuang
* @Date2021/7/21 13:34
*/
@Data
public class WorkUserEventTagRelationResultDTO implements Serializable {
private static final long serialVersionUID = -5886159562245131518L;
/**
* 用户ID
*/
private Long id;
/**
* 姓名
*/
private String realName;
/**
* 头像
*/
private String headUrl;
/**
* 性别 1 0 2保密
*/
private Integer gender;
/**
* 手机号
*/
private String mobile;
/**
* 职务
*/
private String position;
}

103
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/RoleEventsTagController.java

@ -0,0 +1,103 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.RoleEventsTagDTO;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.service.RoleEventsTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 角色和事件标签关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-20
*/
@RestController
@RequestMapping("roleeventstag")
public class RoleEventsTagController {
@Autowired
private RoleEventsTagService roleEventsTagService;
@GetMapping("page")
public Result<PageData<RoleEventsTagDTO>> page(@RequestParam Map<String, Object> params){
PageData<RoleEventsTagDTO> page = roleEventsTagService.page(params);
return new Result<PageData<RoleEventsTagDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<RoleEventsTagDTO> get(@PathVariable("id") String id){
RoleEventsTagDTO data = roleEventsTagService.get(id);
return new Result<RoleEventsTagDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody RoleEventsTagDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
roleEventsTagService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody RoleEventsTagDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
roleEventsTagService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
roleEventsTagService.delete(ids);
return new Result();
}
/**
* 获取事件标签关联的工作端用户
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO>>
* @author liuchuang
* @since 2021/7/21 13:47
*/
@GetMapping("eventtagworkuser")
public Result<List<WorkUserEventTagRelationResultDTO>> eventTagWorkUser(@RequestBody WorkUserEventTagRelationFormDTO formDto) {
List<WorkUserEventTagRelationResultDTO> data = roleEventsTagService.eventTagWorkUser(formDto);
return new Result<List<WorkUserEventTagRelationResultDTO>>().ok(data);
}
}

9
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java

@ -17,10 +17,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.SysRoleDTO;
import com.elink.esua.epdc.enums.AppMenuCategoryEnum;
import com.elink.esua.epdc.service.AppRoleMenuService;
import com.elink.esua.epdc.service.SysRoleDataScopeService;
import com.elink.esua.epdc.service.SysRoleMenuService;
import com.elink.esua.epdc.service.SysRoleService;
import com.elink.esua.epdc.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -44,6 +41,8 @@ public class SysRoleV2Controller {
private SysRoleDataScopeService sysRoleDataScopeService;
@Autowired
private AppRoleMenuService appRoleMenuService;
@Autowired
private RoleEventsTagService roleEventsTagService;
@GetMapping("{id}")
public Result<SysRoleDTO> get(@PathVariable("id") Long id) {
@ -61,6 +60,8 @@ public class SysRoleV2Controller {
data.setCategoryIdList(sysRoleService.getCategoryIdList(id));
//查询角色对应的吹哨部门
data.setWhistleDeptIdList(sysRoleService.getWhistleDeptIdList(id));
// 查询角色对应的事件标签
data.setEventsTagsIdList(roleEventsTagService.getEventTagIdList(id));
return new Result<SysRoleDTO>().ok(data);
}

66
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/RoleEventsTagDao.java

@ -0,0 +1,66 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.entity.RoleEventsTagEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色和事件标签关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-20
*/
@Mapper
public interface RoleEventsTagDao extends BaseDao<RoleEventsTagEntity> {
/**
* 删除角色对应的事件标签关系
*
* @param roleId
* @return void
* @author liuchuang
* @since 2021/7/20 14:58
*/
void updateDelFlag(Long roleId);
/**
* 根据角色获取事件标签
*
* @param roleId
* @return java.util.List<java.lang.String>
* @author liuchuang
* @since 2021/7/20 15:02
*/
List<String> selectListEventTagIdByRoleId(Long roleId);
/**
* 获取事件标签关联的工作端用户
*
* @param formDto
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO>
* @author liuchuang
* @since 2021/7/21 13:49
*/
List<WorkUserEventTagRelationResultDTO> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto);
}

51
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/RoleEventsTagEntity.java

@ -0,0 +1,51 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色和事件标签关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_role_events_tag")
public class RoleEventsTagEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private Long roleId;
/**
* 事件标签ID
*/
private String eventTagId;
}

5
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysUserEntity.java

@ -109,4 +109,9 @@ public class SysUserEntity extends BaseEntity {
*/
private String scrip;
/**
* 职务
*/
private String position;
}

129
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/RoleEventsTagService.java

@ -0,0 +1,129 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.RoleEventsTagDTO;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.entity.RoleEventsTagEntity;
import java.util.List;
import java.util.Map;
/**
* 角色和事件标签关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-20
*/
public interface RoleEventsTagService extends BaseService<RoleEventsTagEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<RoleEventsTagDTO>
* @author generator
* @date 2021-07-20
*/
PageData<RoleEventsTagDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<RoleEventsTagDTO>
* @author generator
* @date 2021-07-20
*/
List<RoleEventsTagDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return RoleEventsTagDTO
* @author generator
* @date 2021-07-20
*/
RoleEventsTagDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-07-20
*/
void save(RoleEventsTagDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-07-20
*/
void update(RoleEventsTagDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-07-20
*/
void delete(String[] ids);
/**
* 保存角色授权的事件标签
*
* @param roleId
* @param eventsTagIdList
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author liuchuang
* @since 2021/7/20 14:49
*/
Result saveOrUpdateRoleEventTagRelation(Long roleId, List<String> eventsTagIdList);
/**
* 根据角色获取事件标签
*
* @param roleId
* @return java.util.List<java.lang.String>
* @author liuchuang
* @since 2021/7/20 15:02
*/
List<String> getEventTagIdList(Long roleId);
/**
* 获取事件标签关联的工作端用户
*
* @param formDto
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO>
* @author liuchuang
* @since 2021/7/21 13:49
*/
List<WorkUserEventTagRelationResultDTO> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto);
}

136
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/RoleEventsTagServiceImpl.java

@ -0,0 +1,136 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dao.RoleEventsTagDao;
import com.elink.esua.epdc.dto.RoleEventsTagDTO;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.entity.RoleEventsTagEntity;
import com.elink.esua.epdc.service.RoleEventsTagService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 角色和事件标签关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-20
*/
@Service
public class RoleEventsTagServiceImpl extends BaseServiceImpl<RoleEventsTagDao, RoleEventsTagEntity> implements RoleEventsTagService {
@Override
public PageData<RoleEventsTagDTO> page(Map<String, Object> params) {
IPage<RoleEventsTagEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, RoleEventsTagDTO.class);
}
@Override
public List<RoleEventsTagDTO> list(Map<String, Object> params) {
List<RoleEventsTagEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, RoleEventsTagDTO.class);
}
private QueryWrapper<RoleEventsTagEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<RoleEventsTagEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public RoleEventsTagDTO get(String id) {
RoleEventsTagEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, RoleEventsTagDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(RoleEventsTagDTO dto) {
RoleEventsTagEntity entity = ConvertUtils.sourceToTarget(dto, RoleEventsTagEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(RoleEventsTagDTO dto) {
RoleEventsTagEntity entity = ConvertUtils.sourceToTarget(dto, RoleEventsTagEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result saveOrUpdateRoleEventTagRelation(Long roleId, List<String> eventsTagIdList) {
if (null != roleId) {
// 删除角色已关联的事件标签
baseDao.updateDelFlag(roleId);
// 插入新的关联关系
for (String eventTagId:
eventsTagIdList) {
RoleEventsTagEntity entity = new RoleEventsTagEntity();
entity.setRoleId(roleId);
entity.setEventTagId(eventTagId);
insert(entity);
}
}
return new Result();
}
@Override
public List<String> getEventTagIdList(Long roleId) {
return baseDao.selectListEventTagIdByRoleId(roleId);
}
@Override
public List<WorkUserEventTagRelationResultDTO> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto) {
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize();
formDto.setPageIndex(pageIndex);
return baseDao.eventTagWorkUser(formDto);
}
}

6
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysRoleServiceImpl.java

@ -66,6 +66,9 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
private EventFeignClient eventFeignClient;
@Autowired
private SysDeptDao sysDeptDao;
@Autowired
private RoleEventsTagService roleEventsTagService;
@Override
public PageData<SysRoleDTO> page(Map<String, Object> params) {
IPage<SysRoleEntity> page = baseDao.selectPage(
@ -266,6 +269,9 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
List<Long> whistleDeptIdList = dto.getWhistleDeptIdList();
//保存角色对应的可吹哨部门权限
this.saveOrUpdateWhistleDeptId(entity.getId(), whistleDeptIdList);
// 保存角色授权的事件标签
roleEventsTagService.saveOrUpdateRoleEventTagRelation(entity.getId(), dto.getEventsTagsIdList());
}
/**

33
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/RoleEventsTagDao.xml

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.dao.RoleEventsTagDao">
<update id="updateDelFlag">
UPDATE epdc_role_events_tag SET DEL_FLAG = '1' WHERE role_id = #{roleId}
</update>
<select id="selectListEventTagIdByRoleId" resultType="string">
SELECT EVENT_TAG_ID FROM epdc_role_events_tag WHERE DEL_FLAG = '0' AND role_id = #{roleId}
</select>
<select id="eventTagWorkUser" resultType="com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO">
SELECT
u.id,
u.real_name,
u.head_url,
u.gender,
u.mobile,
u.position
FROM
epdc_role_events_tag t
LEFT JOIN sys_role_user ru ON ru.role_id = t.ROLE_ID
LEFT JOIN sys_user u ON u.id = ru.user_id
WHERE
t.DEL_FLAG = '0'
AND t.EVENT_TAG_ID = #{eventTagId}
AND u.del_flag = 0
LIMIT #{pageIndex},#{pageSize}
</select>
</mapper>

1
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysUserDao.xml

@ -48,6 +48,7 @@
t1.updater,
t1.update_date,
t1.user_tag_key,
t1.position,
(select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName from sys_user t1
where t1.id = #{value} and t1.del_flag = 0
</select>

12
esua-epdc/epdc-gateway/pom.xml

@ -101,12 +101,12 @@
<!-- gateway routes -->
<gateway.routes.epdc-auth-server.uri>lb://epdc-auth-server</gateway.routes.epdc-auth-server.uri>
<!-- <gateway.routes.epdc-auth-server.uri>http://127.0.0.1:9091</gateway.routes.epdc-auth-server.uri>-->
<gateway.routes.epdc-admin-server.uri>lb://epdc-admin-server</gateway.routes.epdc-admin-server.uri>
<!-- <gateway.routes.epdc-admin-server.uri>http://127.0.0.1:9092</gateway.routes.epdc-admin-server.uri>-->
<!-- <gateway.routes.epdc-admin-server.uri>lb://epdc-admin-server</gateway.routes.epdc-admin-server.uri>-->
<gateway.routes.epdc-admin-server.uri>http://127.0.0.1:9092</gateway.routes.epdc-admin-server.uri>
<gateway.routes.epdc-activiti-server.uri>lb://epdc-activiti-server
</gateway.routes.epdc-activiti-server.uri>
<!-- <gateway.routes.epdc-api-server.uri>lb://epdc-api-server</gateway.routes.epdc-api-server.uri>-->
<gateway.routes.epdc-api-server.uri>http://127.0.0.1:9040</gateway.routes.epdc-api-server.uri>
<gateway.routes.epdc-api-server.uri>lb://epdc-api-server</gateway.routes.epdc-api-server.uri>
<!-- <gateway.routes.epdc-api-server.uri>http://127.0.0.1:9040</gateway.routes.epdc-api-server.uri>-->
<gateway.routes.epdc-app-server.uri>lb://epdc-app-server</gateway.routes.epdc-app-server.uri>
<!-- <gateway.routes.epdc-app-server.uri>http://127.0.0.1:9058</gateway.routes.epdc-app-server.uri>-->
<!-- <gateway.routes.epdc-heart-server.uri>lb://epdc-heart-server</gateway.routes.epdc-heart-server.uri>-->
@ -118,8 +118,8 @@
<!--<gateway.routes.epdc-news-server.uri>lb://epdc-news-server</gateway.routes.epdc-news-server.uri>-->
<gateway.routes.epdc-news-server.uri>http://127.0.0.1:9064</gateway.routes.epdc-news-server.uri>
<gateway.routes.epdc-oss-server.uri>lb://epdc-oss-server</gateway.routes.epdc-oss-server.uri>
<gateway.routes.epdc-events-server.uri>lb://epdc-events-server</gateway.routes.epdc-events-server.uri>
<!-- <gateway.routes.epdc-events-server.uri>http://127.0.0.1:9066</gateway.routes.epdc-events-server.uri>-->
<!-- <gateway.routes.epdc-events-server.uri>lb://epdc-events-server</gateway.routes.epdc-events-server.uri>-->
<gateway.routes.epdc-events-server.uri>http://127.0.0.1:9066</gateway.routes.epdc-events-server.uri>
<gateway.routes.epdc-services-server.uri>lb://epdc-services-server
</gateway.routes.epdc-services-server.uri>
<!-- <gateway.routes.epdc-services-server.uri>http://127.0.0.1:9067</gateway.routes.epdc-services-server.uri>-->

20
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java

@ -3,6 +3,9 @@ package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -10,6 +13,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 管理端对外接口
*
@ -48,4 +53,19 @@ public class ApiAdminController {
public Result<String> getScrip(@LoginUser TokenDto userDetail){
return adminService.getScrip(userDetail);
}
/**
* 获取事件标签关联的工作端用户
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO>>
* @author liuchuang
* @since 2021/7/21 13:42
*/
@GetMapping("eventtagworkuser")
public Result<List<WorkUserEventTagRelationResultDTO>> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return adminService.eventTagWorkUser(formDto);
}
}

13
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java

@ -5,8 +5,10 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.GridLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcScripUserInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppIndexPanelResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppSysDictResultDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.feign.fallback.AdminFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -198,4 +200,15 @@ public interface AdminFeignClient {
**/
@GetMapping("sys/dept/party/getDeptTree")
Result<DeptOption> getAllDeptTree();
/**
* 获取事件标签关联的工作端用户
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO>>
* @author liuchuang
* @since 2021/7/21 13:45
*/
@GetMapping("sys/roleeventstag/eventtagworkuser")
Result<List<WorkUserEventTagRelationResultDTO>> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto);
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java

@ -6,8 +6,10 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.GridLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcScripUserInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppIndexPanelResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppSysDictResultDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.feign.AdminFeignClient;
import org.springframework.stereotype.Component;
@ -100,4 +102,9 @@ public class AdminFeignClientFallback implements AdminFeignClient {
public Result<DeptOption> getAllDeptTree() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTree");
}
@Override
public Result<List<WorkUserEventTagRelationResultDTO>> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "eventTagWorkUser", formDto);
}
}

16
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java

@ -2,7 +2,9 @@ package com.elink.esua.epdc.service;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppSysDictResultDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.dto.result.EpdcAppWorkLogUserResult;
import com.elink.esua.epdc.dto.result.EpdcWorkLogUserDetailDTO;
@ -36,7 +38,7 @@ public interface AdminService {
**/
Result<String> getDefaultGridInfo(String dicType);
/**
* @Description 获取临时凭证
* @Description 获取临时凭证
* @Author songyunpeng
* @Date 2020/6/22
* @Param [userDetail]
@ -78,11 +80,21 @@ public interface AdminService {
**/
Result<EpdcAppWorkLogUserResult> getUserDeptOptionByUserId();
/**
* @Description 获取customId
* @Description 获取customId
* @Author songyunpeng
* @Date 2021/1/27
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String>
**/
Result<String> getCustomId();
/**
* 获取事件标签关联的工作端用户
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO>>
* @author liuchuang
* @since 2021/7/21 13:44
*/
Result<List<WorkUserEventTagRelationResultDTO>> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto);
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java

@ -11,7 +11,9 @@ import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.SysSimpleDictDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcScripUserInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppSysDictResultDTO;
import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
import com.elink.esua.epdc.dto.result.EpdcAppWorkLogUserResult;
import com.elink.esua.epdc.dto.result.EpdcWorkLogUserDetailDTO;
import com.elink.esua.epdc.feign.AdminFeignClient;
@ -144,4 +146,9 @@ public class AdminServiceImpl implements AdminService {
public Result<String> getCustomId() {
return analysisFeignClient.getCustomId();
}
@Override
public Result<List<WorkUserEventTagRelationResultDTO>> eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto) {
return adminFeignClient.eventTagWorkUser(formDto);
}
}

81
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/WorkUserEventsDTO.java

@ -0,0 +1,81 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 事件工作人员关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-21
*/
@Data
public class WorkUserEventsDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 工作人员ID
*/
private Long workUserId;
/**
* 事件ID
*/
private String eventId;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java

@ -173,4 +173,9 @@ public class EpdcEventSubmitFormDTO implements Serializable {
* 事件标签
*/
private List<String> tagIds;
/**
* 工作人员ID
*/
private List<Long> workUserIds;
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssuePendingResponseFormDTO.java

@ -41,4 +41,9 @@ public class IssuePendingResponseFormDTO implements Serializable {
*/
private String timestamp;
/**
* 工作人员ID
*/
private Long workUserId;
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/WorkIssueListFormDTO.java

@ -47,6 +47,9 @@ public class WorkIssueListFormDTO implements Serializable {
*/
private Integer issueState;
/**
* 工作人员ID
*/
private Long workUserId;
}

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java

@ -57,7 +57,6 @@ public class EpdcEventsController {
private EpdcEventsService epdcEventsService;
@GetMapping("page")
@DataFilter(tableAlias = "temp", deptId = "grid_id", prefix = "AND", isPendingCreator = false)
public Result<PageData<EpdcEventsDTO>> page(@RequestParam Map<String, Object> params){
PageData<EpdcEventsDTO> page = epdcEventsService.listOfPendingReviewEvents(params);
@ -155,7 +154,6 @@ public class EpdcEventsController {
* @Date: 2019/9/6 15:11
*/
@GetMapping("rejectEvents")
@DataFilter(tableAlias = "temp", deptId = "grid_id", prefix = "AND", isPendingCreator = false)
public Result<PageData<EpdcRejectEventsDTO>> rejectEvents(@RequestParam Map<String, Object> params){
PageData<EpdcRejectEventsDTO> page = epdcEventsService.listOfRejectEvents(params);
return new Result<PageData<EpdcRejectEventsDTO>>().ok(page);

18
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java

@ -26,6 +26,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.events.EventTagDTO;
import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO;
import com.elink.esua.epdc.modules.events.excel.EventTagExcel;
import com.elink.esua.epdc.modules.events.service.EventTagService;
import org.springframework.beans.factory.annotation.Autowired;
@ -45,7 +46,7 @@ import java.util.Map;
@RestController
@RequestMapping("eventtag")
public class EventTagController {
@Autowired
private EventTagService eventTagService;
@ -91,4 +92,17 @@ public class EventTagController {
ExcelUtils.exportExcelToTarget(response, null, list, EventTagExcel.class);
}
}
/**
* 事件标签列表
*
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.events.result.EventTagsResultDTO>>
* @author liuchuang
* @since 2021/7/20 14:23
*/
@GetMapping("eventstags")
public Result<List<EventTagsResultDTO>> eventsTags() {
List<EventTagsResultDTO> data = eventTagService.listOfEventTags();
return new Result<List<EventTagsResultDTO>>().ok(data);
}
}

84
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/WorkUserEventsController.java

@ -0,0 +1,84 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.events.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.WorkUserEventsDTO;
import com.elink.esua.epdc.modules.events.service.WorkUserEventsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 事件工作人员关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-21
*/
@RestController
@RequestMapping("workusereventstag")
public class WorkUserEventsController {
@Autowired
private WorkUserEventsService workUserEventsService;
@GetMapping("page")
public Result<PageData<WorkUserEventsDTO>> page(@RequestParam Map<String, Object> params){
PageData<WorkUserEventsDTO> page = workUserEventsService.page(params);
return new Result<PageData<WorkUserEventsDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<WorkUserEventsDTO> get(@PathVariable("id") String id){
WorkUserEventsDTO data = workUserEventsService.get(id);
return new Result<WorkUserEventsDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody WorkUserEventsDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
workUserEventsService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody WorkUserEventsDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
workUserEventsService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
workUserEventsService.delete(ids);
return new Result();
}
}

33
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/WorkUserEventsDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.events.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.events.entity.WorkUserEventsEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 事件工作人员关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-21
*/
@Mapper
public interface WorkUserEventsDao extends BaseDao<WorkUserEventsEntity> {
}

51
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/WorkUserEventsEntity.java

@ -0,0 +1,51 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.events.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 事件工作人员关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-21
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_work_user_events")
public class WorkUserEventsEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 工作人员ID
*/
private Long workUserId;
/**
* 事件ID
*/
private String eventId;
}

107
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/WorkUserEventsService.java

@ -0,0 +1,107 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.events.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.WorkUserEventsDTO;
import com.elink.esua.epdc.modules.events.entity.WorkUserEventsEntity;
import java.util.List;
import java.util.Map;
/**
* 事件工作人员关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-21
*/
public interface WorkUserEventsService extends BaseService<WorkUserEventsEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<WorkUserEventsTagDTO>
* @author generator
* @date 2021-07-21
*/
PageData<WorkUserEventsDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<WorkUserEventsTagDTO>
* @author generator
* @date 2021-07-21
*/
List<WorkUserEventsDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return WorkUserEventsTagDTO
* @author generator
* @date 2021-07-21
*/
WorkUserEventsDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-07-21
*/
void save(WorkUserEventsDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-07-21
*/
void update(WorkUserEventsDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-07-21
*/
void delete(String[] ids);
/**
* 保存事件与工作人员关系
*
* @param eventId
* @param workUserIds
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author liuchuang
* @since 2021/7/21 14:28
*/
Result saveWorkUserRelationEventInfo(String eventId, List<Long> workUserIds);
}

37
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java

@ -61,10 +61,7 @@ import com.elink.esua.epdc.modules.category.entity.CategoryEntity;
import com.elink.esua.epdc.modules.category.service.CategoryService;
import com.elink.esua.epdc.modules.events.dao.EpdcEventsDao;
import com.elink.esua.epdc.modules.events.entity.EpdcEventsEntity;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
import com.elink.esua.epdc.modules.events.service.EventTagRelationService;
import com.elink.esua.epdc.modules.events.service.EventTagService;
import com.elink.esua.epdc.modules.events.service.ImgService;
import com.elink.esua.epdc.modules.events.service.*;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.feign.GroupFeignClient;
@ -130,8 +127,19 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
@Autowired
private EventTagRelationService eventTagRelationService;
@Autowired
private WorkUserEventsService workUserEventsService;
@Override
public PageData<EpdcEventsDTO> listOfPendingReviewEvents(Map<String, Object> params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
throw new RenException("当前登录状态已失效,请重新登录");
}
List<Long> deptIdList = user.getDeptIdList();
deptIdList.add(user.getDeptId());
params.put("deptIdList", deptIdList);
params.put("workUserId", user.getId());
IPage<EpdcEventsDTO> page = getPage(params);
List<EpdcEventsDTO> list = baseDao.selectListOfPendingReviewEvents(params);
return new PageData<>(list, page.getTotal());
@ -206,6 +214,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
// 保存事件标签
eventTagRelationService.saveEventTags(dto.getTagIds(), entity.getId());
// 保存事件关联的工作人员
workUserEventsService.saveWorkUserRelationEventInfo(entity.getId(), dto.getWorkUserIds());
// 发送菜单消息-议题待回应
this.sendMenuNoticeOfEventRespond(entity.getGridId(), null);
@ -379,6 +390,14 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
@Override
public PageData<EpdcRejectEventsDTO> listOfRejectEvents(Map<String, Object> params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
throw new RenException("当前登录状态已失效,请重新登录");
}
List<Long> deptIdList = user.getDeptIdList();
deptIdList.add(user.getDeptId());
params.put("deptIdList", deptIdList);
params.put("workUserId", user.getId());
IPage<EpdcRejectEventsDTO> page = getPage(params);
List<EpdcRejectEventsDTO> list = baseDao.selectListOfRejectEvents(params);
return new PageData<>(list, page.getTotal());
@ -619,14 +638,14 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
return resultDto;
}
/**
/**
* @Description: 议题待回应事件菜单 审核通过不通过短信通知 议题发起人
* @Param: [dto]
* @Param: [userMobiles] 手机号列表
* @return: void
* @Author: zy
* @Date: 2020-01-08
*/
* @return: void
* @Author: zy
* @Date: 2020-01-08
*/
private void issueSmsNotification(EpdcEventsReviewFormDTO dto, List<String> userMobiles){
// 审核操作发送短信
SmsNoticeFormDTO sms = new SmsNoticeFormDTO();

117
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/WorkUserEventsServiceImpl.java

@ -0,0 +1,117 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.events.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.WorkUserEventsDTO;
import com.elink.esua.epdc.modules.events.dao.WorkUserEventsDao;
import com.elink.esua.epdc.modules.events.entity.WorkUserEventsEntity;
import com.elink.esua.epdc.modules.events.service.WorkUserEventsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 事件工作人员关系表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-07-21
*/
@Service
public class WorkUserEventsServiceImpl extends BaseServiceImpl<WorkUserEventsDao, WorkUserEventsEntity> implements WorkUserEventsService {
@Override
public PageData<WorkUserEventsDTO> page(Map<String, Object> params) {
IPage<WorkUserEventsEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, WorkUserEventsDTO.class);
}
@Override
public List<WorkUserEventsDTO> list(Map<String, Object> params) {
List<WorkUserEventsEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, WorkUserEventsDTO.class);
}
private QueryWrapper<WorkUserEventsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<WorkUserEventsEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public WorkUserEventsDTO get(String id) {
WorkUserEventsEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, WorkUserEventsDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(WorkUserEventsDTO dto) {
WorkUserEventsEntity entity = ConvertUtils.sourceToTarget(dto, WorkUserEventsEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(WorkUserEventsDTO dto) {
WorkUserEventsEntity entity = ConvertUtils.sourceToTarget(dto, WorkUserEventsEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result saveWorkUserRelationEventInfo(String eventId, List<Long> workUserIds) {
if (StringUtils.isNotEmpty(eventId) && CollectionUtil.isNotEmpty(workUserIds)) {
for (Long workUserId:
workUserIds) {
WorkUserEventsEntity entity = new WorkUserEventsEntity();
entity.setWorkUserId(workUserId);
entity.setEventId(eventId);
insert(entity);
}
}
return new Result();
}
}

1
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java

@ -66,7 +66,6 @@ public class IssueController {
* @Date: 2019/9/5 16:49
*/
@GetMapping("page")
@DataFilter(tableAlias = "issue", deptId = "grid_id", prefix = "AND", isPendingCreator = false)
public Result<PageData<IssueWaitHandleOrClosedDTO>> waitHandlePage(@RequestParam Map<String, Object> params){
PageData<IssueWaitHandleOrClosedDTO> page = issueService.listOfIssues(params);
return new Result<PageData<IssueWaitHandleOrClosedDTO>>().ok(page);

11
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java

@ -121,6 +121,15 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Override
public PageData<IssueWaitHandleOrClosedDTO> listOfIssues(Map<String, Object> params) {
UserDetail user = SecurityUser.getUser();
if (null == user) {
throw new RenException("当前登录状态已失效,请重新登录");
}
List<Long> deptIdList = user.getDeptIdList();
deptIdList.add(user.getDeptId());
params.put("deptIdList", deptIdList);
params.put("workUserId", user.getId());
IPage<IssueWaitHandleOrClosedDTO> page = getPage(params);
if (null != params.get("issueCode")) {
params.put("issueCode", params.get("issueCode").toString().trim());
@ -484,6 +493,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
public Result<List<IssuePendingResponseResultDTO>> listIssuePendingResponse(IssuePendingResponseFormDTO formDto) {
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize();
formDto.setPageIndex(pageIndex);
formDto.setWorkUserId(SecurityUser.getUserId());
return epdcEventsService.listIssuePendingResponse(formDto);
}
@ -504,6 +514,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
list = SecurityUser.getUser().getDeptIdList();
}
formDto.setDeptIdList(list);
formDto.setWorkUserId(SecurityUser.getUserId());
List<WorkIssueListResultDTO> data = baseDao.selectWorkIssueListOfNewOrHot(formDto);
// 查询最热评论
for (WorkIssueListResultDTO dto : data) {

37
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml

@ -68,8 +68,15 @@
temp.CREATED_TIME AS createdTime
FROM
epdc_events temp
LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = temp.ID AND u.DEL_FLAG = '0'
WHERE
temp.DEL_FLAG = '0'
AND (temp.GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
OR u.WORK_USER_ID = #{workUserId}
)
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if>
@ -97,8 +104,15 @@
temp.EVENT_CONTENT AS eventContent
FROM
epdc_events temp
LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = temp.ID AND u.DEL_FLAG = '0'
WHERE
temp.DEL_FLAG = '0'
AND (temp.GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
OR u.WORK_USER_ID = #{workUserId}
)
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if>
@ -315,18 +329,21 @@
</resultMap>
<select id="listIssuePendingResponse" resultMap="pendingResponseMap">
SELECT ID,EVENT_CONTENT,NICK_NAME,CREATED_TIME,IS_PARTY_MEMBER,USER_FACE
FROM epdc_events
WHERE DEL_FLAG = '0'
AND GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
AND EVENT_STATE = #{state}
SELECT e.ID,e.EVENT_CONTENT,e.NICK_NAME,e.CREATED_TIME,e.IS_PARTY_MEMBER,e.USER_FACE
FROM epdc_events e
LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = e.ID AND u.DEL_FLAG = '0'
WHERE e.DEL_FLAG = '0'
AND (e.GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
OR u.WORK_USER_ID = #{workUserId}
)
AND e.EVENT_STATE = #{state}
<if test="timestamp != null">
<![CDATA[ AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
<![CDATA[ AND DATE_FORMAT(e.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
</if>
order by CREATED_TIME DESC
order by e.CREATED_TIME DESC
LIMIT #{pageIndex},#{pageSize}
</select>

7
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/WorkUserEventsDao.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.events.dao.WorkUserEventsDao">
</mapper>

18
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml

@ -17,10 +17,17 @@
issue.ISSUE_CODE
FROM
epdc_issue issue
LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = issue.EVENT_ID AND u.DEL_FLAG = '0'
LEFT JOIN epdc_events e ON issue.EVENT_ID = e.ID
AND e.DEL_FLAG = '0'
WHERE
issue.DEL_FLAG = '0'
AND (issue.GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
OR u.WORK_USER_ID = #{workUserId}
)
and issue.ISSUE_STATE = #{state}
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( issue.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@ -539,15 +546,18 @@
t1.id
FROM
epdc_issue t1
LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = t1.EVENT_ID AND u.DEL_FLAG = '0'
LEFT JOIN epdc_events t2
ON t1.EVENT_ID = t2.ID
AND t2.DEL_FLAG = '0'
WHERE t1.DEL_FLAG = '0'
AND t1.ISSUE_STATE = #{issueState}
AND t1.GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
AND (t1.GRID_ID IN
<foreach collection="deptIdList" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
OR u.WORK_USER_ID = #{workUserId}
)
<![CDATA[ AND DATE_FORMAT(t1.DISTRIBUTE_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
ORDER BY
<if test='orderType == "1"'>( t2.APPROVE_NUM + t2.OPPOSE_NUM + t2.COMMENT_NUM + t2.BROWSE_NUM ) DESC,</if>

4
renren-cloud-generator/src/main/resources/application.yml

@ -9,7 +9,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
#MySQL配置
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_custom?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_events?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: jinshui_epdc_test
password: jinshui@833066
#oracle配置
@ -46,4 +46,4 @@ pagehelper:
#指定数据库,可选值有【mysql、oracle、sqlserver、postgresql】
renren:
database: mysql
database: mysql

Loading…
Cancel
Save