230 changed files with 16776 additions and 203 deletions
@ -0,0 +1,21 @@ |
|||
------------------------------------------2019-11-08----------------------------------------------- |
|||
-- 删除友邻社区ID字段 |
|||
ALTER TABLE epdc_events DROP COLUMN FRIENDLY_COMMUNITY_ID; |
|||
ALTER TABLE epdc_issue DROP COLUMN FRIENDLY_COMMUNITY_ID; |
|||
ALTER TABLE epdc_item DROP COLUMN FRIENDLY_COMMUNITY_ID; |
|||
-- 增加社群ID字段 |
|||
ALTER TABLE epdc_events ADD GROUP_ID varchar(32) NULL COMMENT '社群ID'; |
|||
ALTER TABLE epdc_issue ADD GROUP_ID varchar(32) NULL COMMENT '社群ID'; |
|||
ALTER TABLE epdc_item ADD GROUP_ID varchar(32) NULL COMMENT '社群ID'; |
|||
-- 增加社群名称字段 |
|||
ALTER TABLE epdc_events ADD GROUP_NAME varchar(128) NULL COMMENT '社群名称'; |
|||
ALTER TABLE epdc_issue ADD GROUP_NAME varchar(128) NULL COMMENT '社群名称'; |
|||
ALTER TABLE epdc_item ADD GROUP_NAME varchar(128) NULL COMMENT '社群名称'; |
|||
------------------------------------------2019-11-08----------------------------------------------- |
|||
|
|||
------------------------------------------2019-11-11----------------------------------------------- |
|||
-- 增加话题ID字段 |
|||
ALTER TABLE epdc_events ADD TOPIC_ID varchar(32) NULL COMMENT '话题ID'; |
|||
ALTER TABLE epdc_issue ADD TOPIC_ID varchar(32) NULL COMMENT '话题ID'; |
|||
ALTER TABLE epdc_item ADD TOPIC_ID varchar(32) NULL COMMENT '话题ID'; |
|||
------------------------------------------2019-11-11----------------------------------------------- |
|||
@ -0,0 +1,22 @@ |
|||
-------------------------------------------------------2019-11-14------------------------------------------------ |
|||
-- 新增党委部门管理表 |
|||
CREATE TABLE sys_party_dept( |
|||
ID BIGINT NOT NULL COMMENT '主键' , |
|||
PID BIGINT COMMENT '上级ID' , |
|||
PIDS VARCHAR(500) COMMENT '所有上级ID,用逗号分开' , |
|||
NAME VARCHAR(50) COMMENT '部门名称' , |
|||
TYPE_KEY VARCHAR(50) COMMENT '机构类型键值' , |
|||
PARTY_CODE VARCHAR(50) COMMENT '部门编码' , |
|||
SORT INT COMMENT '排序' , |
|||
DEL_FLAG VARCHAR(1) NOT NULL COMMENT '删除标记' , |
|||
CREATOR BIGINT NOT NULL COMMENT '创建者' , |
|||
CREATED_DATE DATETIME NOT NULL COMMENT '创建时间' , |
|||
UPDATER BIGINT NOT NULL COMMENT '更新者' , |
|||
UPDATED_DATE DATETIME NOT NULL COMMENT '更新时间' , |
|||
PRIMARY KEY (ID) |
|||
) COMMENT = '党委部门管理 党委部门管理';; |
|||
|
|||
-- 部门表新增所属党委ID字段 |
|||
ALTER TABLE sys_dept ADD ppid bigint NULL COMMENT '所属党委ID'; |
|||
|
|||
-------------------------------------------------------2019-11-14------------------------------------------------ |
|||
@ -0,0 +1,18 @@ |
|||
-------------------------------------------------------2019-11-14------------------------------------------------ |
|||
-- 新增接口日志表 |
|||
CREATE TABLE epdc_interface_log( |
|||
ID VARCHAR(32) NOT NULL COMMENT '主键' , |
|||
REFERENCE_ID VARCHAR(32) NOT NULL COMMENT '引用ID' , |
|||
BUSINESS_TYPE VARCHAR(100) COMMENT '业务类型' , |
|||
INTERFACE_NAME VARCHAR(200) NOT NULL COMMENT '调用接口名称' , |
|||
SUCCESS_FLAG VARCHAR(1) NOT NULL COMMENT '调用是否成功 0-调用失败,1-调用成功' , |
|||
CALL_MSG_BODY VARCHAR(2000) COMMENT '调用消息体' , |
|||
RETURN_MSG_BODY TEXT COMMENT '调用返回消息体' , |
|||
CREATED_BY VARCHAR(32) NOT NULL COMMENT '创建人' , |
|||
CREATED_TIME DATETIME NOT NULL COMMENT '创建时间' , |
|||
UPDATED_BY VARCHAR(32) NOT NULL COMMENT '更新人' , |
|||
UPDATED_TIME DATETIME NOT NULL COMMENT '更新时间' , |
|||
DEL_FLAG VARCHAR(1) NOT NULL COMMENT '删除标记' , |
|||
PRIMARY KEY (ID) |
|||
) COMMENT = '接口日志表 接口日志表';; |
|||
-------------------------------------------------------2019-11-14------------------------------------------------ |
|||
@ -0,0 +1,39 @@ |
|||
-------------------------------------------------------2019-11-14------------------------------------------------ |
|||
-- 新建党员认证失败表 |
|||
CREATE TABLE epdc_party_authentication_failed( |
|||
ID VARCHAR(32) NOT NULL COMMENT '主键' , |
|||
REAL_NAME VARCHAR(20) NOT NULL COMMENT '姓名' , |
|||
MOBILE VARCHAR(20) COMMENT '手机号' , |
|||
IDENTITY_NO VARCHAR(20) NOT NULL COMMENT '身份证号' , |
|||
USER_ID VARCHAR(32) COMMENT '用户ID' , |
|||
ADDRESS VARCHAR(512) COMMENT '居民住址' , |
|||
POST VARCHAR(128) COMMENT '职务 字典表dict_name' , |
|||
POST_VALUE VARCHAR(32) COMMENT '职务ID 字典表dict_value' , |
|||
CADRE_FLAG VARCHAR(1) NOT NULL COMMENT '干部下沉标识 0-否,1-是' , |
|||
REGIST_FLAG VARCHAR(1) NOT NULL COMMENT '注册状态 0-否,1-是' , |
|||
REGIST_TIME DATETIME COMMENT '注册时间' , |
|||
STREET_NAME VARCHAR(128) COMMENT '街道名称' , |
|||
STREET_ID BIGINT COMMENT '街道ID' , |
|||
COMMUNITY_NAME VARCHAR(128) COMMENT '社区名称' , |
|||
COMMUNITY_ID BIGINT COMMENT '社区ID' , |
|||
GRID_NAME VARCHAR(128) COMMENT '网格名称' , |
|||
GRID_ID BIGINT COMMENT '网格ID' , |
|||
DEPT_ID BIGINT COMMENT '部门ID' , |
|||
STATE INT COMMENT '状态 0-认证失败' , |
|||
PROCESSING_OPINIONS VARCHAR(500) COMMENT '处理意见' , |
|||
REVISION INT COMMENT '乐观锁' , |
|||
CREATED_BY VARCHAR(32) NOT NULL COMMENT '创建人' , |
|||
CREATED_TIME DATETIME NOT NULL COMMENT '创建时间' , |
|||
UPDATED_BY VARCHAR(32) NOT NULL COMMENT '更新人' , |
|||
UPDATED_TIME DATETIME NOT NULL COMMENT '更新时间' , |
|||
DEL_FLAG VARCHAR(1) NOT NULL COMMENT '删除标记 0-否,1-是' , |
|||
PRIMARY KEY (ID) |
|||
) COMMENT = '党员认证失败表 党员认证失败表';; |
|||
|
|||
-- 党员表新增居住地址字段 |
|||
ALTER TABLE epdc_party_members ADD ADDRESS varchar(512) NULL COMMENT '居民住址'; |
|||
|
|||
-- 用户表增加约束 |
|||
ALTER TABLE esua_epdc_user.epdc_user ADD CONSTRAINT epdc_user_un UNIQUE KEY (`MOBILE`,`IDENTITY_NO`); |
|||
|
|||
-------------------------------------------------------2019-11-14------------------------------------------------ |
|||
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.commons.tools.enums; |
|||
|
|||
/** |
|||
* 用户性别 枚举类 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/11/18 14:30 |
|||
*/ |
|||
public enum UserSexEnum { |
|||
|
|||
/** |
|||
* 男 |
|||
*/ |
|||
MALE("1"), |
|||
|
|||
/** |
|||
* 女 |
|||
*/ |
|||
FEMALE("0"); |
|||
|
|||
private String sex; |
|||
|
|||
UserSexEnum(String sex) { |
|||
this.sex = sex; |
|||
} |
|||
|
|||
public String sex() { |
|||
return sex; |
|||
} |
|||
} |
|||
@ -0,0 +1,229 @@ |
|||
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.EpdcUserGroupInviteFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
|||
import com.elink.esua.epdc.dto.group.GroupSettingStateDTO; |
|||
import com.elink.esua.epdc.dto.group.form.*; |
|||
import com.elink.esua.epdc.dto.group.result.*; |
|||
import com.elink.esua.epdc.service.GroupService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 移动端接口-社群模块 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/17 13:48 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("group/group") |
|||
public class ApiGroupController { |
|||
|
|||
@Autowired |
|||
private GroupService groupService; |
|||
|
|||
/** |
|||
* |
|||
* 创建社群 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/17 13:58 |
|||
*/ |
|||
@PostMapping("create") |
|||
public Result createGroup(@LoginUser TokenDto userDetail, @RequestBody GroupCreateFormDTO formDto) { |
|||
return groupService.saveGroup(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 解散社群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/21 9:51 |
|||
*/ |
|||
@PostMapping("disband") |
|||
public Result disbandGroup(@RequestBody GroupSettingStateDTO formDto) { |
|||
return groupService.disbandGroup(formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 我的群列表 |
|||
* |
|||
* @params [userDetail] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/21 17:20 |
|||
*/ |
|||
@GetMapping("listOfMine") |
|||
public Result<List<GroupsOfMineResultDTO>> groupsOfMine(@LoginUser TokenDto userDetail) { |
|||
return groupService.listGroupsOfMine(userDetail); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 推荐群列表 |
|||
* |
|||
* @params [userDetail] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/22 13:53 |
|||
*/ |
|||
@GetMapping("listOfRecommend") |
|||
public Result<List<GroupsOfRecommendResultDTO>> groupsOfRecommend(@LoginUser TokenDto userDetail) { |
|||
return groupService.listGroupsOfRecommend(userDetail); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 社群详情 |
|||
* |
|||
* @params [userDetail, id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/22 15:14 |
|||
*/ |
|||
@GetMapping("detail/{id}") |
|||
public Result<GroupDetailForMobileEndResultDTO> detail(@LoginUser TokenDto userDetail, @PathVariable("id") String id) { |
|||
return groupService.getGroupDetail(userDetail, id); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 修改群介绍 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/22 15:33 |
|||
*/ |
|||
@PostMapping("modifyIntroduction") |
|||
public Result modifyIntroduction(@LoginUser TokenDto userDetail, @RequestBody GroupIntroductionFormDTO formDto) { |
|||
return groupService.modifyIntroduction(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 修改群头像 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/22 17:25 |
|||
*/ |
|||
@PostMapping("modifyAvatar") |
|||
public Result modifyAvatar(@LoginUser TokenDto userDetail, @RequestBody GroupModifyAvatarFormDTO formDto) { |
|||
return groupService.modifyAvatar(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 社群成员列表(待审核/审核通过) |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 9:13 |
|||
*/ |
|||
@GetMapping("listOfMember") |
|||
public Result<List<GroupUserListResultDTO>> listOfMember(@RequestBody GroupUsersFormDTO formDto) { |
|||
return groupService.listOfMember(formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 移除社群成员 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 10:35 |
|||
*/ |
|||
@PostMapping("removeMember") |
|||
public Result removeMember(@LoginUser TokenDto userDetail, @RequestBody GroupUserRemoveOrQuitFormDTO formDto) { |
|||
return groupService.removeMember(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 退出社群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 10:40 |
|||
*/ |
|||
@PostMapping("quitGroup") |
|||
public Result quitGroup(@LoginUser TokenDto userDetail, @RequestBody GroupUserRemoveOrQuitFormDTO formDto) { |
|||
return groupService.quitGroup(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 添加成员列表 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/23 16:39 |
|||
*/ |
|||
@GetMapping("getInviteList") |
|||
public Result<List<EpdcUserGroupInviteResultDTO>> getInviteList(@LoginUser TokenDto userDetail, @RequestBody EpdcUserGroupInviteFormDTO formDto) { |
|||
return groupService.listOfInviteUsers(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 添加社群成员 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 9:17 |
|||
*/ |
|||
@PostMapping("addMember") |
|||
public Result addMember(@RequestBody GroupAddUserFormDTO formDto) { |
|||
return groupService.saveGroupUsers(formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 审核入群申请 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 13:22 |
|||
*/ |
|||
@PostMapping("reviewApply") |
|||
public Result reviewApply(@RequestBody GroupUserReviewFormDTO formDto) { |
|||
return groupService.updateGroupUsers(formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 申请入群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 14:00 |
|||
*/ |
|||
@PostMapping("applyForGroup") |
|||
public Result applyForGroup(@LoginUser TokenDto userDetail, @RequestBody GroupApplyFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return groupService.applyForGroup(userDetail, formDto); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
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.dto.comment.TopicCommentFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; |
|||
import com.elink.esua.epdc.service.TopicCommentService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* 移动端接口-评论模块 |
|||
* @Author WJP |
|||
* @Date 2019/9/9 09:45 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("group/comment") |
|||
public class ApiTopicCommentController { |
|||
|
|||
@Autowired |
|||
private TopicCommentService topicCommentService; |
|||
|
|||
/** |
|||
* 提交评论或回复接口 |
|||
*/ |
|||
@PostMapping("submit") |
|||
public Result submit(@LoginUser TokenDto userDetail, @RequestBody TopicCommentFormDTO topicCommentFormDTO) { |
|||
return topicCommentService.submit(userDetail,topicCommentFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* 评论(赞/踩) |
|||
*/ |
|||
@PostMapping("statement") |
|||
public Result statement(@LoginUser TokenDto userDetail, @RequestBody TopicCommentStatementFormDTO topicCommentStatementFormDTO) { |
|||
return topicCommentService.statement(userDetail,topicCommentStatementFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* 评论列表 |
|||
*/ |
|||
@GetMapping("list") |
|||
public Result<EventCommentsResultDTO> listOfComments(@LoginUser TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO) { |
|||
return topicCommentService.listOfComments(userDetail,topicCommentsFormDTO); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,136 @@ |
|||
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.group.result.TopicAuditRecordResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|||
import com.elink.esua.epdc.service.TopicService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 移动端接口-话题模块 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/6 14:44 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("group/topic") |
|||
public class ApiTopicController { |
|||
|
|||
@Autowired |
|||
private TopicService topicService; |
|||
|
|||
/** |
|||
* |
|||
* 发布话题 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 14:46 |
|||
*/ |
|||
@PostMapping("submit") |
|||
public Result submit(@LoginUser TokenDto userDetail, @RequestBody TopicSubmitFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return topicService.saveTopic(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 话题列表 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/11 15:04 |
|||
*/ |
|||
@GetMapping("list") |
|||
public Result<List<TopicListResultDTO>> listTopic(@LoginUser TokenDto userDetail, @RequestBody TopicListFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return topicService.listOfTopic(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 我的话题列表 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/11 15:04 |
|||
*/ |
|||
@GetMapping("listOfMine") |
|||
public Result<List<TopicListResultDTO>> listTopicOfMine(@LoginUser TokenDto userDetail, @RequestBody TopicListFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return topicService.listTopicOfMine(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 话题详情 |
|||
* |
|||
* @params [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO> |
|||
* @author liuchuang |
|||
* @since 2019/11/7 15:37 |
|||
*/ |
|||
@GetMapping("detail/{id}") |
|||
public Result<TopicDetailResultDTO> detail(@PathVariable("id") String id) { |
|||
return topicService.getTopicDetailById(id); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 关闭话题 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/7 16:10 |
|||
*/ |
|||
@PostMapping("close") |
|||
public Result close(@LoginUser TokenDto userDetail, @RequestBody TopicCloseFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return topicService.closeTopic(userDetail, formDto); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 话题审核记录 |
|||
* |
|||
* @params [topicId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/8 9:39 |
|||
*/ |
|||
@GetMapping("auditRecord/{topicId}") |
|||
public Result<List<TopicAuditRecordResultDTO>> auditRecord(@PathVariable("topicId") String topicId) { |
|||
return topicService.listOfTopicAuditRecord(topicId); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* 转议题 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/8 10:37 |
|||
*/ |
|||
@PostMapping("changeToIssue") |
|||
public Result changeToIssue(@LoginUser TokenDto userDetail, @RequestBody TopicChangeToIssueFormDTO formDto) { |
|||
ValidatorUtils.validateEntity(formDto); |
|||
return topicService.changeToIssue(userDetail, formDto); |
|||
} |
|||
} |
|||
@ -0,0 +1,207 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
|||
import com.elink.esua.epdc.dto.group.GroupSettingStateDTO; |
|||
import com.elink.esua.epdc.dto.group.form.*; |
|||
import com.elink.esua.epdc.dto.group.result.*; |
|||
import com.elink.esua.epdc.feign.fallback.GroupFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 社群模块调用 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/17 14:40 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = GroupFeignClientFallback.class) |
|||
public interface GroupFeignClient { |
|||
|
|||
/** |
|||
* |
|||
* 创建社群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/17 14:44 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/create", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result createGroup(GroupCreateFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 解散社群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/21 9:54 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/operate", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result disbandGroup(GroupSettingStateDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 我的群列表 |
|||
* |
|||
* @params [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/21 17:26 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/group/listOfMine", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<GroupsOfMineResultDTO>> listGroupsOfMine(GroupsOfMineFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 推荐群列表 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/22 13:51 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/group/listOfRecommend", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(GroupsOfMineFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 社群详情 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.group.result.GroupDetailForMobileEndResultDTO> |
|||
* @author liuchuang |
|||
* @since 2019/10/22 15:09 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/group/detail", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<GroupDetailForMobileEndResultDTO> detail(GroupDetailForMobileEndFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 修改群介绍 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/22 15:36 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/modifyIntroduction", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result modifyIntroduction(GroupIntroductionFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 修改群头像 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/22 17:29 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/modifyAvatar", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result modifyAvatar(GroupModifyAvatarFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 社群成员列表(待审核/审核通过) |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 9:16 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/group/listOfMember", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<GroupUserListResultDTO>> listOfMember(GroupUsersFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 移除社群成员 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 10:47 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/removeMember", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result removeMember(GroupUserRemoveOrQuitFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 退出社群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 10:47 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/quitGroup", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result quitGroup(GroupUserRemoveOrQuitFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 添加成员列表 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/23 16:38 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/usergroup/getInviteList", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<EpdcUserGroupInviteResultDTO>> getInviteList(EpdcUserGroupInviteFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 添加成员 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 9:37 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/usergroup/addMember", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result addMember(GroupAddUserFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 审核入群申请 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 13:26 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/usergroup/reviewApply", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result reviewApply(GroupUserReviewFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 申请入群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 14:04 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/group/applyForGroup", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result applyForGroup(GroupApplyFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 更新社群用户党员标识 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 14:32 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/usergroup/partyMember", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result updateUserPartyMember(GroupUserPartyMemberFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; |
|||
import com.elink.esua.epdc.feign.fallback.TopicCommentFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
/** |
|||
* 评论模块调用 |
|||
* @Author LC |
|||
* @Date 2019/9/7 11:34 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = TopicCommentFeignClientFallback.class) |
|||
public interface TopicCommentFeignClient { |
|||
|
|||
|
|||
@PostMapping(value = "group/epdc-app/comment/submit", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result submit(TopicCommentFormDTO commentFormDTO); |
|||
|
|||
@PostMapping(value = "group/epdc-app/comment/statement", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result statement(TopicCommentStatementFormDTO commentStatementFormDTO); |
|||
|
|||
@GetMapping(value = "group/epdc-app/comment/list", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<EventCommentsResultDTO> listOfComments(TopicCommentsFormDTO formDto); |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|||
import com.elink.esua.epdc.feign.fallback.TopicFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 社群-话题模块调用 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/6 15:36 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = TopicFeignClientFallback.class) |
|||
public interface TopicFeignClient { |
|||
|
|||
/** |
|||
* |
|||
* 发布话题 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 15:40 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/topic/submit", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result submit(TopicSubmitFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 话题详情 |
|||
* |
|||
* @params [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO> |
|||
* @author liuchuang |
|||
* @since 2019/11/7 15:37 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/topic/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<TopicDetailResultDTO> detail(@PathVariable("id") String id); |
|||
|
|||
/** |
|||
* |
|||
* 话题列表 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/11 15:06 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/topic/list", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<TopicListResultDTO>> listOfTopic(TopicListFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 关闭话题 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/7 16:14 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/topic/close", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result close(TopicCloseFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 话题审核记录 |
|||
* |
|||
* @params [topicId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/8 9:41 |
|||
*/ |
|||
@GetMapping(value = "group/epdc-app/topic/auditRecord/{topicId}", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<TopicAuditRecordResultDTO>> auditRecord(@PathVariable("topicId") String topicId); |
|||
|
|||
/** |
|||
* |
|||
* 转议题 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/8 10:39 |
|||
*/ |
|||
@PostMapping(value = "group/epdc-app/topic/changeToIssue", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result changeToIssue(TopicChangeToIssueFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
package com.elink.esua.epdc.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
|||
import com.elink.esua.epdc.dto.group.GroupSettingStateDTO; |
|||
import com.elink.esua.epdc.dto.group.form.*; |
|||
import com.elink.esua.epdc.dto.group.result.*; |
|||
import com.elink.esua.epdc.feign.GroupFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/17 14:40 |
|||
*/ |
|||
@Component |
|||
public class GroupFeignClientFallback implements GroupFeignClient { |
|||
|
|||
@Override |
|||
public Result createGroup(GroupCreateFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "createGroup", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result disbandGroup(GroupSettingStateDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "disbandGroup", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupsOfMineResultDTO>> listGroupsOfMine(GroupsOfMineFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listGroupsOfMine", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(GroupsOfMineFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listGroupsOfRecommend", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<GroupDetailForMobileEndResultDTO> detail(GroupDetailForMobileEndFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "detail", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result modifyIntroduction(GroupIntroductionFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyIntroduction", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result modifyAvatar(GroupModifyAvatarFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyAvatar", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupUserListResultDTO>> listOfMember(GroupUsersFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfMember", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result removeMember(GroupUserRemoveOrQuitFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "removeMember", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result quitGroup(GroupUserRemoveOrQuitFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "quitGroup", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<EpdcUserGroupInviteResultDTO>> getInviteList(EpdcUserGroupInviteFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "getInviteList", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result addMember(GroupAddUserFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "addMember", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result reviewApply(GroupUserReviewFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "reviewApply", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result applyForGroup(GroupApplyFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "applyForGroup", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result updateUserPartyMember(GroupUserPartyMemberFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "updateUserPartyMember", formDto); |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.elink.esua.epdc.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; |
|||
import com.elink.esua.epdc.feign.TopicCommentFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
|
|||
@Component |
|||
public class TopicCommentFeignClientFallback implements TopicCommentFeignClient { |
|||
|
|||
@Override |
|||
public Result submit(TopicCommentFormDTO commentFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "submit", commentFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result statement(TopicCommentStatementFormDTO commentStatementFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "statement", commentStatementFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<EventCommentsResultDTO> listOfComments(TopicCommentsFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfComments", formDto); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
package com.elink.esua.epdc.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|||
import com.elink.esua.epdc.feign.TopicFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/6 15:36 |
|||
*/ |
|||
@Component |
|||
public class TopicFeignClientFallback implements TopicFeignClient { |
|||
|
|||
@Override |
|||
public Result submit(TopicSubmitFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "submit", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<TopicDetailResultDTO> detail(String id) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "detail", id); |
|||
} |
|||
|
|||
@Override |
|||
public Result close(TopicCloseFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "close", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<TopicAuditRecordResultDTO>> auditRecord(@PathVariable("topicId") String topicId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "auditRecord", topicId); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<TopicListResultDTO>> listOfTopic(TopicListFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "listOfTopic", formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result changeToIssue(TopicChangeToIssueFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "changeToIssue", formDto); |
|||
} |
|||
} |
|||
@ -0,0 +1,176 @@ |
|||
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.EpdcUserGroupInviteFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
|||
import com.elink.esua.epdc.dto.group.GroupSettingStateDTO; |
|||
import com.elink.esua.epdc.dto.group.form.*; |
|||
import com.elink.esua.epdc.dto.group.result.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 社群模块 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/17 13:55 |
|||
*/ |
|||
public interface GroupService { |
|||
|
|||
/** |
|||
* |
|||
* 创建社群 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/17 13:58 |
|||
*/ |
|||
Result saveGroup(TokenDto userDetail, GroupCreateFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 解散社群 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/21 9:51 |
|||
*/ |
|||
Result disbandGroup(GroupSettingStateDTO dto); |
|||
|
|||
/** |
|||
* |
|||
* 我的群列表 |
|||
* |
|||
* @params [userDetail] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfMineResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/21 17:21 |
|||
*/ |
|||
Result<List<GroupsOfMineResultDTO>> listGroupsOfMine(TokenDto userDetail); |
|||
|
|||
/** |
|||
* |
|||
* 推荐群列表 |
|||
* |
|||
* @params [userDetail] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.GroupsOfRecommendResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/22 13:54 |
|||
*/ |
|||
Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(TokenDto userDetail); |
|||
|
|||
/** |
|||
* |
|||
* 社群详情 |
|||
* |
|||
* @params [userDetail, id] |
|||
* @return com.elink.esua.epdc.dto.group.result.GroupDetailForMobileEndResultDTO |
|||
* @author liuchuang |
|||
* @since 2019/10/22 15:15 |
|||
*/ |
|||
Result<GroupDetailForMobileEndResultDTO> getGroupDetail(TokenDto userDetail, String id); |
|||
|
|||
/** |
|||
* |
|||
* 修改群介绍 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/22 15:34 |
|||
*/ |
|||
Result modifyIntroduction(TokenDto userDetail, GroupIntroductionFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 修改群头像 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/22 17:26 |
|||
*/ |
|||
Result modifyAvatar(TokenDto userDetail, GroupModifyAvatarFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 社群成员列表(待审核/审核通过) |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 9:14 |
|||
*/ |
|||
Result<List<GroupUserListResultDTO>> listOfMember(GroupUsersFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 移除社群成员 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 10:43 |
|||
*/ |
|||
Result removeMember(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 退出社群 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/10/23 10:43 |
|||
*/ |
|||
Result quitGroup(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 添加成员列表 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/10/23 16:40 |
|||
*/ |
|||
Result<List<EpdcUserGroupInviteResultDTO>> listOfInviteUsers(TokenDto userDetail, EpdcUserGroupInviteFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 添加社群成员 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 9:18 |
|||
*/ |
|||
Result saveGroupUsers(GroupAddUserFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 审核入群申请 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 13:23 |
|||
*/ |
|||
Result updateGroupUsers(GroupUserReviewFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 申请入群 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 14:02 |
|||
*/ |
|||
Result applyForGroup(TokenDto userDetail, GroupApplyFormDTO formDto); |
|||
|
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
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.dto.comment.*; |
|||
import com.elink.esua.epdc.dto.comment.form.CommentFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.form.EventCommentsFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; |
|||
|
|||
|
|||
/** |
|||
* 移动端接口-评论模块 |
|||
* @Author WJP |
|||
* @Date 2019/9/9 09:45 |
|||
*/ |
|||
public interface TopicCommentService { |
|||
|
|||
/** |
|||
* 提交评论或回复接口 |
|||
*/ |
|||
Result submit(@LoginUser TokenDto userDetail, TopicCommentFormDTO topicCommentFormDTO); |
|||
|
|||
/** |
|||
* 评论(赞/踩) |
|||
*/ |
|||
Result statement(@LoginUser TokenDto userDetail, TopicCommentStatementFormDTO topicCommentStatementFormDTO); |
|||
|
|||
|
|||
/** |
|||
* 评论列表 |
|||
*/ |
|||
Result<EventCommentsResultDTO> listOfComments(TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO); |
|||
} |
|||
@ -0,0 +1,100 @@ |
|||
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.group.result.TopicAuditRecordResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 话题模块 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/6 14:48 |
|||
*/ |
|||
public interface TopicService { |
|||
|
|||
/** |
|||
* |
|||
* 发布话题 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/6 14:51 |
|||
*/ |
|||
Result saveTopic(TokenDto userDetail, TopicSubmitFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 话题详情 |
|||
* |
|||
* @params [id] |
|||
* @return com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO |
|||
* @author liuchuang |
|||
* @since 2019/11/7 15:34 |
|||
*/ |
|||
Result<TopicDetailResultDTO> getTopicDetailById(String id); |
|||
|
|||
/** |
|||
* |
|||
* 关闭话题 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/7 16:11 |
|||
*/ |
|||
Result closeTopic(TokenDto userDetail, TopicCloseFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 话题审核记录 |
|||
* |
|||
* @params [topicId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/8 9:43 |
|||
*/ |
|||
Result<List<TopicAuditRecordResultDTO>> listOfTopicAuditRecord(String topicId); |
|||
|
|||
/** |
|||
* |
|||
* 话题列表 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/11 15:05 |
|||
*/ |
|||
Result<List<TopicListResultDTO>> listOfTopic(TokenDto userDetail, TopicListFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 我的话题列表 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.topic.result.TopicListResultDTO>> |
|||
* @author liuchuang |
|||
* @since 2019/11/11 15:50 |
|||
*/ |
|||
Result<List<TopicListResultDTO>> listTopicOfMine(TokenDto userDetail, TopicListFormDTO formDto); |
|||
|
|||
/** |
|||
* |
|||
* 转议题 |
|||
* |
|||
* @params [userDetail, formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/8 10:37 |
|||
*/ |
|||
Result changeToIssue(TokenDto userDetail, TopicChangeToIssueFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,186 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|||
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGroupInviteResultDTO; |
|||
import com.elink.esua.epdc.dto.group.GroupSettingStateDTO; |
|||
import com.elink.esua.epdc.dto.enums.GroupStateEnum; |
|||
import com.elink.esua.epdc.dto.enums.GroupUserStateEnum; |
|||
import com.elink.esua.epdc.dto.group.form.*; |
|||
import com.elink.esua.epdc.dto.group.result.*; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.feign.GroupFeignClient; |
|||
import com.elink.esua.epdc.service.GroupService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 社群模块 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/17 13:55 |
|||
*/ |
|||
@Service |
|||
public class GroupServiceImpl implements GroupService { |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Autowired |
|||
private GroupFeignClient groupFeignClient; |
|||
|
|||
@Override |
|||
public Result saveGroup(TokenDto userDetail, GroupCreateFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
// 获取该网格所有上级机构
|
|||
Result<CompleteDeptDTO> deptDTOResult = adminFeignClient.getCompleteDept(userDetail.getGridId()); |
|||
CompleteDeptDTO deptDTO = deptDTOResult.getData(); |
|||
formDto.setArea(deptDTO.getDistrict()); |
|||
formDto.setAreaId(deptDTO.getDistrictId()); |
|||
formDto.setStreet(deptDTO.getStreet()); |
|||
formDto.setStreetId(deptDTO.getStreetId()); |
|||
formDto.setCommunity(deptDTO.getCommunity()); |
|||
formDto.setCommunityId(deptDTO.getCommunityId()); |
|||
formDto.setGrid(deptDTO.getGrid()); |
|||
formDto.setGridId(deptDTO.getGridId()); |
|||
formDto.setGroupCategory(NumConstant.ONE_STR); |
|||
// 群主信息
|
|||
GroupUserFormDTO groupUserFormDTO = new GroupUserFormDTO(); |
|||
groupUserFormDTO.setUserId(userDetail.getUserId()); |
|||
groupUserFormDTO.setNickname(userDetail.getNickname()); |
|||
groupUserFormDTO.setUserAvatar(userDetail.getFaceImg()); |
|||
groupUserFormDTO.setMobile(userDetail.getMobile()); |
|||
// 判断当前用户是否为党员
|
|||
if (!NumConstant.ONE_STR.equals(userDetail.getPartyFlag())) { |
|||
return new Result().error("您当前身份不是党员,不能创建社群"); |
|||
} |
|||
groupUserFormDTO.setPartyMember(userDetail.getPartyFlag()); |
|||
groupUserFormDTO.setLordFlag(NumConstant.ONE_STR); |
|||
groupUserFormDTO.setState(GroupUserStateEnum.GROUP_USER_STATE_EXAMINATION_PASSED.getValue()); |
|||
formDto.setGroupUserFormDTO(groupUserFormDTO); |
|||
|
|||
return groupFeignClient.createGroup(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result disbandGroup(GroupSettingStateDTO dto) { |
|||
dto.setState(GroupStateEnum.GROUP_STATE_DISBANDED.getValue()); |
|||
return groupFeignClient.disbandGroup(dto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupsOfMineResultDTO>> listGroupsOfMine(TokenDto userDetail) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
GroupsOfMineFormDTO formDto = new GroupsOfMineFormDTO(); |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
formDto.setGridId(userDetail.getGridId()); |
|||
return groupFeignClient.listGroupsOfMine(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupsOfRecommendResultDTO>> listGroupsOfRecommend(TokenDto userDetail) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
GroupsOfMineFormDTO formDto = new GroupsOfMineFormDTO(); |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
formDto.setGridId(userDetail.getGridId()); |
|||
return groupFeignClient.listGroupsOfRecommend(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<GroupDetailForMobileEndResultDTO> getGroupDetail(TokenDto userDetail, String id) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
GroupDetailForMobileEndFormDTO formDto = new GroupDetailForMobileEndFormDTO(); |
|||
formDto.setId(id); |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return groupFeignClient.detail(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result modifyIntroduction(TokenDto userDetail, GroupIntroductionFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return groupFeignClient.modifyIntroduction(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result modifyAvatar(TokenDto userDetail, GroupModifyAvatarFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return groupFeignClient.modifyAvatar(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupUserListResultDTO>> listOfMember(GroupUsersFormDTO formDto) { |
|||
return groupFeignClient.listOfMember(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result removeMember(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setOperatorId(userDetail.getUserId()); |
|||
return groupFeignClient.removeMember(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result quitGroup(TokenDto userDetail, GroupUserRemoveOrQuitFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setOperatorId(userDetail.getUserId()); |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return groupFeignClient.quitGroup(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<EpdcUserGroupInviteResultDTO>> listOfInviteUsers(TokenDto userDetail, EpdcUserGroupInviteFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setGridId(userDetail.getGridId()); |
|||
return groupFeignClient.getInviteList(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result saveGroupUsers(GroupAddUserFormDTO formDto) { |
|||
return groupFeignClient.addMember(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result updateGroupUsers(GroupUserReviewFormDTO formDto) { |
|||
return groupFeignClient.reviewApply(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result applyForGroup(TokenDto userDetail, GroupApplyFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
formDto.setNickname(userDetail.getNickname()); |
|||
formDto.setUserAvatar(userDetail.getFaceImg()); |
|||
formDto.setMobile(userDetail.getMobile()); |
|||
formDto.setPartyMember(userDetail.getPartyFlag()); |
|||
return groupFeignClient.applyForGroup(formDto); |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
|
|||
import com.elink.esua.epdc.async.WxMaSecCheckTask; |
|||
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; |
|||
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; |
|||
import com.elink.esua.epdc.feign.TopicCommentFeignClient; |
|||
import com.elink.esua.epdc.service.TopicCommentService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.data.redis.listener.Topic; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 移动端接口-评论模块 |
|||
* @Author WJP |
|||
* @Date 2019/9/9 09:45 |
|||
*/ |
|||
@Service |
|||
public class TopicCommentServiceImpl implements TopicCommentService { |
|||
|
|||
@Autowired |
|||
private TopicCommentFeignClient topicCommentFeignClient; |
|||
|
|||
@Autowired |
|||
private WxMaSecCheckTask wxMaSecCheckTask; |
|||
|
|||
@Override |
|||
public Result submit(TokenDto userDetail, TopicCommentFormDTO topicCommentFormDTO) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
// 上传内容安全检查
|
|||
wxMaSecCheckTask.checkMessage(topicCommentFormDTO.getContent()); |
|||
topicCommentFormDTO.setUserId(userDetail.getUserId()); |
|||
topicCommentFormDTO.setUserName(userDetail.getNickname()); |
|||
topicCommentFormDTO.setUserFace(userDetail.getFaceImg()); |
|||
return topicCommentFeignClient.submit(topicCommentFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result statement(TokenDto userDetail, TopicCommentStatementFormDTO topicCommentStatementFormDTO) { |
|||
if (null == userDetail) { |
|||
return new Result<EventCommentsResultDTO>().error("获取用户信息失败"); |
|||
} |
|||
topicCommentStatementFormDTO.setUseId(userDetail.getUserId()); |
|||
topicCommentStatementFormDTO.setUserName(userDetail.getNickname()); |
|||
return topicCommentFeignClient.statement(topicCommentStatementFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<EventCommentsResultDTO> listOfComments(TokenDto userDetail, TopicCommentsFormDTO topicCommentsFormDTO) { |
|||
if (null == userDetail) { |
|||
return new Result<EventCommentsResultDTO>().error("获取用户信息失败"); |
|||
} |
|||
topicCommentsFormDTO.setUserId(userDetail.getUserId()); |
|||
return topicCommentFeignClient.listOfComments(topicCommentsFormDTO); |
|||
} |
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|||
import com.elink.esua.epdc.dto.enums.TopicStateEnum; |
|||
import com.elink.esua.epdc.dto.group.result.TopicAuditRecordResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.feign.TopicFeignClient; |
|||
import com.elink.esua.epdc.service.TopicService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 话题模块 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/6 14:48 |
|||
*/ |
|||
@Service |
|||
public class TopicServiceImpl implements TopicService { |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Autowired |
|||
private TopicFeignClient topicFeignClient; |
|||
|
|||
@Override |
|||
public Result saveTopic(TokenDto userDetail, TopicSubmitFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
|
|||
// 获取该网格所有上级机构
|
|||
Result<CompleteDeptDTO> deptDTOResult = adminFeignClient.getCompleteDept(userDetail.getGridId()); |
|||
CompleteDeptDTO deptDTO = deptDTOResult.getData(); |
|||
formDto.setArea(deptDTO.getDistrict()); |
|||
formDto.setAreaId(deptDTO.getDistrictId()); |
|||
formDto.setStreet(deptDTO.getStreet()); |
|||
formDto.setStreetId(deptDTO.getStreetId()); |
|||
formDto.setCommunity(deptDTO.getCommunity()); |
|||
formDto.setCommunityId(deptDTO.getCommunityId()); |
|||
formDto.setGrid(deptDTO.getGrid()); |
|||
formDto.setGridId(deptDTO.getGridId()); |
|||
|
|||
formDto.setUserId(userDetail.getUserId()); |
|||
formDto.setUserFace(userDetail.getFaceImg()); |
|||
formDto.setNickname(userDetail.getNickname()); |
|||
formDto.setPartyMember(userDetail.getPartyFlag()); |
|||
formDto.setMobile(userDetail.getMobile()); |
|||
formDto.setState(TopicStateEnum.TOPIC_STATE_IN_CONVERSATION.getValue()); |
|||
|
|||
return topicFeignClient.submit(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<TopicDetailResultDTO> getTopicDetailById(String id) { |
|||
return topicFeignClient.detail(id); |
|||
} |
|||
|
|||
@Override |
|||
public Result closeTopic(TokenDto userDetail, TopicCloseFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return topicFeignClient.close(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<TopicAuditRecordResultDTO>> listOfTopicAuditRecord(String topicId) { |
|||
return topicFeignClient.auditRecord(topicId); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<TopicListResultDTO>> listOfTopic(TokenDto userDetail, TopicListFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setGridId(userDetail.getGridId()); |
|||
return topicFeignClient.listOfTopic(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<TopicListResultDTO>> listTopicOfMine(TokenDto userDetail, TopicListFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return topicFeignClient.listOfTopic(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result changeToIssue(TokenDto userDetail, TopicChangeToIssueFormDTO formDto) { |
|||
if (null == userDetail) { |
|||
return new Result().error("获取用户信息失败"); |
|||
} |
|||
formDto.setUserId(userDetail.getUserId()); |
|||
return topicFeignClient.changeToIssue(formDto); |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
package com.elink.esua.epdc.dto.comment; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 话题评论、评论支持反对数据 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/12 14:17 |
|||
*/ |
|||
@Data |
|||
public class EpdcCommentsAndAttitudeFromTopicFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8779307899428155354L; |
|||
|
|||
/** |
|||
* 评论 |
|||
*/ |
|||
private List<EventCommentDTO> comments; |
|||
|
|||
/** |
|||
* 表态 |
|||
*/ |
|||
private List<EventCommentUserAttitudeDTO> attitudes; |
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* 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.interfacelog; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 接口日志表 接口日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-11-14 |
|||
*/ |
|||
@Data |
|||
public class InterfaceLogDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 引用ID |
|||
*/ |
|||
private String referenceId; |
|||
|
|||
/** |
|||
* 业务类型 |
|||
*/ |
|||
private String businessType; |
|||
|
|||
/** |
|||
* 调用接口名称 |
|||
*/ |
|||
private String interfaceName; |
|||
|
|||
/** |
|||
* 调用是否成功 0-调用失败,1-调用成功 |
|||
*/ |
|||
private String successFlag; |
|||
|
|||
/** |
|||
* 调用消息体 |
|||
*/ |
|||
private String callMsgBody; |
|||
|
|||
/** |
|||
* 调用返回消息体 |
|||
*/ |
|||
private String returnMsgBody; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 删除标记 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* 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.log; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 部门响应记录 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-22 |
|||
*/ |
|||
@Data |
|||
public class DeptRespondLogDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 引用ID |
|||
*/ |
|||
private String referenceId; |
|||
|
|||
/** |
|||
* 引用类型 issue或item |
|||
*/ |
|||
private String referenceType; |
|||
|
|||
/** |
|||
* 响应部门的id(被呼叫的部门即审核部门) |
|||
*/ |
|||
private Long respondDeptId; |
|||
|
|||
/** |
|||
* 响应时间即审核时间 |
|||
*/ |
|||
private Date respondTime; |
|||
|
|||
/** |
|||
* 响应类型,参考枚举类DeptRespondTypeEnum |
|||
*/ |
|||
private Integer respondType; |
|||
|
|||
/** |
|||
* 删除标识 0:未删除,1:删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* 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.rule; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 考核规则 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-21 |
|||
*/ |
|||
@Data |
|||
public class DeptKpiConfigDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 绩效指标编码 |
|||
*/ |
|||
private String kpiItemCode; |
|||
|
|||
/** |
|||
* 绩效指标值 |
|||
*/ |
|||
private Integer kpiItemValue; |
|||
|
|||
/** |
|||
* 绩效指标描述 |
|||
*/ |
|||
private String kpiItemDesc; |
|||
|
|||
/** |
|||
* 删除标识 0:未删除,1:删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
/** |
|||
* 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.time; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 绩效考核时间规则表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Data |
|||
public class DeptRespondTimeConfigDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 议题或项目类别ID(不可重复) |
|||
*/ |
|||
private String categoryId; |
|||
|
|||
/** |
|||
* 类别名称 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 网格长在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer gridValidRespLimitHour; |
|||
|
|||
/** |
|||
* 网格长在多少小时内关闭算是有效关闭 |
|||
*/ |
|||
private Integer gridValidCloseLimitHour; |
|||
|
|||
/** |
|||
* 社区在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer commValidRespLimitHour; |
|||
|
|||
/** |
|||
* 街道在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer streetValidRespLimitHour; |
|||
|
|||
/** |
|||
* 区直在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer districtValidRespLimitHour; |
|||
|
|||
/** |
|||
* 超过多少小时响应算是无效响应。此值应大于各部门的有效响应值。若响应发生在有效响应与无效响应之间,为超时响应。 |
|||
*/ |
|||
private Integer invalidRespLimitHour; |
|||
|
|||
/** |
|||
* 有效响应系数 |
|||
*/ |
|||
private BigDecimal validRespCoefficient; |
|||
|
|||
/** |
|||
* 超时响应系数 |
|||
*/ |
|||
private BigDecimal overtimeRespCoefficient; |
|||
|
|||
/** |
|||
* 无效响应系数 |
|||
*/ |
|||
private BigDecimal invalidRespCoefficient; |
|||
|
|||
/** |
|||
* 删除标识 0:未删除,1:删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
package com.elink.esua.epdc.enums; |
|||
|
|||
/** |
|||
* 部门绩效考核项枚举 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/10/21 14:28 |
|||
*/ |
|||
public enum DeptKpiConfigEnum { |
|||
|
|||
/** |
|||
* 选用单词:Grid(网格) Work(工作) Score(得分) Percent(百分比) |
|||
*/ |
|||
G_WSP("G_WSP", "履行抓基层党建工作职责得分占比(%)"), |
|||
/** |
|||
* 选用单词:People(人们) Satisfied(满意) Percent(百分比) |
|||
*/ |
|||
P_SP("P_SP", "群众满意度得分占比(%)"), |
|||
/** |
|||
* 选用单词:Grid(网格) Respond(响应) |
|||
*/ |
|||
G_R("G_R", "群众反应问题网格响应率得分"), |
|||
/** |
|||
* 选用单词:Grid(网格) Satisfied(满意) |
|||
*/ |
|||
G_S("G_S", "群众反应问题网格满意率得分"), |
|||
/** |
|||
* 选用单词:District(地区) Street(街道) Respond(响应) |
|||
*/ |
|||
DS_R("DS_R", "(区直/街道)网格呼叫事项响应率得分"), |
|||
/** |
|||
* 选用单词:District(地区) Street(街道) Complete(完成) |
|||
*/ |
|||
DS_C("DS_C", "(区直/街道)网格呼叫事项办结率得分"), |
|||
/** |
|||
* 选用单词:District(地区) Street(街道) Satisfied(满意) |
|||
*/ |
|||
DS_S("DS_S", "(区直/街道)网格工作评议得分"); |
|||
|
|||
|
|||
private String code; |
|||
|
|||
private String desc; |
|||
|
|||
|
|||
DeptKpiConfigEnum(String code, String desc) { |
|||
this.code = code; |
|||
this.desc = desc; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public String getDesc() { |
|||
return desc; |
|||
} |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
package com.elink.esua.epdc.enums; |
|||
|
|||
|
|||
import com.elink.esua.epdc.constant.EventIssueItemState; |
|||
|
|||
/** |
|||
* 部门响应类型枚举 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/10/21 09:52 |
|||
*/ |
|||
public enum DeptRespondTypeEnum { |
|||
|
|||
/** |
|||
* 项目:处理 |
|||
*/ |
|||
ITEM_I_HANDLE(ItemHandleCategoryEnum.HANDLE_I_HANDLE.getValue(), ItemHandleCategoryEnum.HANDLE_I_HANDLE.getName()), |
|||
/** |
|||
* 项目:流转协助 |
|||
*/ |
|||
ITEM_CIRCULATION_ASSISTANCE(ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue(), ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getName()), |
|||
/** |
|||
* 项目:关闭 |
|||
*/ |
|||
ITEM_HANDLED_CLOSE(ItemHandleCategoryEnum.HANDLE_CLOSE.getValue(), ItemHandleCategoryEnum.HANDLE_CLOSE.getName()), |
|||
/** |
|||
* 项目:结案 |
|||
*/ |
|||
ITEM_HANDLED_END(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue(), ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getName()), |
|||
|
|||
|
|||
//-------------------------------------
|
|||
|
|||
/** |
|||
* 事件-驳回 |
|||
*/ |
|||
EVENT_REVIEW_REJECT(EventIssueItemState.EVENT_REVIEW_REJECT,"事件驳回"), |
|||
|
|||
//-----------------------------------------------------------
|
|||
/** |
|||
* 议题:审核通过 成为议题 |
|||
*/ |
|||
ISSUE_HANDLED_PASS(EventIssueItemState.ISSUE_HANDLED_PASS, "审核通过"), |
|||
/** |
|||
* 议题:议题-已转项目 |
|||
*/ |
|||
ISSUE_CHANGE_TO_ITEM(EventIssueItemState.ISSUE_CHANGE_TO_ITEM, "审核通过"), |
|||
/** |
|||
* 议题:反馈 |
|||
*/ |
|||
ISSUE_HANDLED_FEEDBACK(EventIssueItemState.ISSUE_HANDLED_FEEDBACK, "反馈"), |
|||
/** |
|||
* 议题:关闭 |
|||
*/ |
|||
ISSUE_CLOSED(EventIssueItemState.ISSUE_CLOSED, "关闭"), |
|||
|
|||
|
|||
//-------------------------------------
|
|||
|
|||
|
|||
/** |
|||
* 被抢占响应(还未响应时,议题或项目已被关闭或结案) |
|||
*/ |
|||
RESPONSE_BE_ROBBED(-1, "被抢占响应"), |
|||
|
|||
/** |
|||
* 超时响应 |
|||
*/ |
|||
RESPONSE_TIMED_OUT(-2, "超时响应"); |
|||
|
|||
private int value; |
|||
private String desc; |
|||
|
|||
DeptRespondTypeEnum(int value, String desc) { |
|||
this.value = value; |
|||
this.desc = desc; |
|||
} |
|||
|
|||
|
|||
public int getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public String getDesc() { |
|||
return desc; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.elink.esua.epdc.enums; |
|||
|
|||
/** |
|||
* 议题或项目枚举 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/10/21 10:30 |
|||
*/ |
|||
public enum ReferenceTypeEnum { |
|||
|
|||
/** |
|||
* 议题 |
|||
*/ |
|||
ISSUE("issue"), |
|||
|
|||
/** |
|||
* 项目 |
|||
*/ |
|||
ITEM("item"), |
|||
|
|||
/** |
|||
* 事件 |
|||
*/ |
|||
EVENT("event"); |
|||
|
|||
private String name; |
|||
|
|||
ReferenceTypeEnum(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
} |
|||
@ -0,0 +1,138 @@ |
|||
package com.elink.esua.epdc.modules.async; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; |
|||
import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.constant.EventIssueItemState; |
|||
import com.elink.esua.epdc.constant.EventsNoticeConstant; |
|||
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO; |
|||
import com.elink.esua.epdc.dto.issue.form.IssueWaitHandleSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.item.form.ItemHandleSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.log.DeptRespondLogDTO; |
|||
import com.elink.esua.epdc.enums.DeptRespondTypeEnum; |
|||
import com.elink.esua.epdc.enums.ItemHandleCategoryEnum; |
|||
import com.elink.esua.epdc.enums.ReferenceTypeEnum; |
|||
import com.elink.esua.epdc.modules.issue.service.IssueService; |
|||
import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity; |
|||
import com.elink.esua.epdc.modules.log.service.DeptRespondLogService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.scheduling.annotation.Async; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2019/10/22 14:22 |
|||
* @Description: 响应log日志 |
|||
*/ |
|||
@Component |
|||
public class DeptRespondTask { |
|||
|
|||
@Autowired |
|||
private DeptRespondLogService deptRespondLogService; |
|||
|
|||
/*** |
|||
* 转议题插入部门响应记录 4-事件-审核通过 2-事件-驳回 |
|||
* @param dto |
|||
* @return void |
|||
* @author qushutong |
|||
* @date 2019/10/22 11:06 |
|||
*/ |
|||
@Async |
|||
public void saveEventDeptRespond(EpdcEventsReviewFormDTO dto) { |
|||
//待审核 则不插入
|
|||
if (EventIssueItemState.EVENT_PENDING_REVIEW == dto.getEventState()) { |
|||
return; |
|||
} |
|||
//组装插入数据
|
|||
DeptRespondLogEntity entity = new DeptRespondLogEntity(); |
|||
UserDetail user = SecurityUser.getUser(); |
|||
entity.setReferenceId(dto.getId()); |
|||
entity.setReferenceType(ReferenceTypeEnum.EVENT.getName()); |
|||
entity.setRespondDeptId(user.getDeptId()); |
|||
entity.setRespondTime(new Date()); |
|||
//审核通过
|
|||
if (EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ISSUE_HANDLED_PASS.getValue()); |
|||
}//驳回
|
|||
else if (EventIssueItemState.EVENT_REVIEW_REJECT == dto.getEventState()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.EVENT_REVIEW_REJECT.getValue()); |
|||
} |
|||
DeptRespondLogDTO deptRespondLogDTO = ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class); |
|||
deptRespondLogService.save(deptRespondLogDTO); |
|||
} |
|||
|
|||
/*** |
|||
* 议事处理审核/关闭 1-反馈,2-关闭,4-已转项目 不是这三种状态不作响应 |
|||
* @param dto |
|||
* @return void |
|||
* @author qushutong |
|||
* @date 2019/10/22 14:51 |
|||
*/ |
|||
@Async |
|||
public void saveIssueDeptRespond(IssueWaitHandleSubmitFormDTO dto) { |
|||
//1-反馈,2-关闭,4-已转项目 不是这三种状态不作响应
|
|||
if (EventIssueItemState.ISSUE_CLOSED != dto.getState() || EventIssueItemState.ISSUE_HANDLED_FEEDBACK != dto.getState() || EventIssueItemState.ISSUE_CHANGE_TO_ITEM != dto.getState()) { |
|||
return; |
|||
} |
|||
//组装插入数据
|
|||
DeptRespondLogEntity entity = new DeptRespondLogEntity(); |
|||
UserDetail user = SecurityUser.getUser(); |
|||
entity.setReferenceId(dto.getId()); |
|||
entity.setReferenceType(ReferenceTypeEnum.ISSUE.getName()); |
|||
entity.setRespondDeptId(user.getDeptId()); |
|||
entity.setRespondTime(new Date()); |
|||
//议题关闭 1-反馈,2-关闭,4-已转项目
|
|||
if (EventIssueItemState.ISSUE_CLOSED == dto.getState()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ISSUE_CLOSED.getValue()); |
|||
} |
|||
//议题审核
|
|||
else if (EventIssueItemState.ISSUE_HANDLED_FEEDBACK == dto.getState()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ISSUE_HANDLED_FEEDBACK.getValue()); |
|||
} |
|||
//已转项目
|
|||
else if (EventIssueItemState.ISSUE_CHANGE_TO_ITEM == dto.getState()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ISSUE_CHANGE_TO_ITEM.getValue()); |
|||
} |
|||
DeptRespondLogDTO deptRespondLogDTO = ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class); |
|||
deptRespondLogService.save(deptRespondLogDTO); |
|||
} |
|||
|
|||
|
|||
/*** |
|||
* 项目 处理方式:0 处理,1 流转协助,5 关闭,10 结案 |
|||
* @param dto |
|||
* @return void |
|||
* @author qushutong |
|||
* @date 2019/10/22 16:03 |
|||
*/ |
|||
@Async |
|||
public void saveItemDeptRespond(ItemHandleSubmitFormDTO dto) { |
|||
//组装插入数据
|
|||
DeptRespondLogEntity entity = new DeptRespondLogEntity(); |
|||
UserDetail user = SecurityUser.getUser(); |
|||
entity.setReferenceId(dto.getId()); |
|||
entity.setReferenceType(ReferenceTypeEnum.ITEM.getName()); |
|||
entity.setRespondDeptId(user.getDeptId()); |
|||
entity.setRespondTime(new Date()); |
|||
//流转
|
|||
if (ItemHandleCategoryEnum.HANDLE_CIRCULATION_ASSISTANCE.getValue() == dto.getHandleCategory()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ITEM_CIRCULATION_ASSISTANCE.getValue()); |
|||
} |
|||
//关闭
|
|||
else if (ItemHandleCategoryEnum.HANDLE_CLOSE.getValue() == dto.getHandleCategory()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ITEM_HANDLED_CLOSE.getValue()); |
|||
} |
|||
//结案
|
|||
else if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ITEM_HANDLED_END.getValue()); |
|||
} |
|||
//处理
|
|||
else if (ItemHandleCategoryEnum.HANDLE_CLOSING_CASE.getValue() == dto.getHandleCategory()) { |
|||
entity.setRespondType(DeptRespondTypeEnum.ITEM_I_HANDLE.getValue()); |
|||
} |
|||
DeptRespondLogDTO deptRespondLogDTO = ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class); |
|||
deptRespondLogService.save(deptRespondLogDTO); |
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
package com.elink.esua.epdc.modules.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.modules.feign.fallback.GroupFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* 社群模块调用 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/11 10:31 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_GROUP_SERVER, fallback = GroupFeignClientFallback.class) |
|||
public interface GroupFeignClient { |
|||
|
|||
/** |
|||
* |
|||
* 话题转议题审核回调 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 10:36 |
|||
*/ |
|||
@PostMapping(value = "group/topic/reviewCallback", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result reviewCallback(Map<String, String> callbackMap); |
|||
|
|||
/** |
|||
* |
|||
* 更新话题状态 |
|||
* |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author liuchuang |
|||
* @since 2019/11/11 13:31 |
|||
*/ |
|||
@PostMapping(value = "group/topic/modifyState", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result modifyTopicState(Map<String, String> map); |
|||
|
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.elink.esua.epdc.modules.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.modules.feign.GroupFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/11 10:31 |
|||
*/ |
|||
@Component |
|||
public class GroupFeignClientFallback implements GroupFeignClient { |
|||
|
|||
@Override |
|||
public Result reviewCallback(Map<String, String> callbackMap) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "reviewCallback", callbackMap); |
|||
} |
|||
|
|||
@Override |
|||
public Result modifyTopicState(Map<String, String> map) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_GROUP_SERVER, "modifyTopicState", map); |
|||
} |
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.interfacelog.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.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO; |
|||
import com.elink.esua.epdc.modules.interfacelog.excel.InterfaceLogExcel; |
|||
import com.elink.esua.epdc.modules.interfacelog.service.InterfaceLogService; |
|||
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 2019-11-14 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("interfacelog") |
|||
public class InterfaceLogController { |
|||
|
|||
@Autowired |
|||
private InterfaceLogService interfaceLogService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<InterfaceLogDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<InterfaceLogDTO> page = interfaceLogService.listInterfaceLog(params); |
|||
return new Result<PageData<InterfaceLogDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<InterfaceLogDTO> get(@PathVariable("id") String id){ |
|||
InterfaceLogDTO data = interfaceLogService.get(id); |
|||
return new Result<InterfaceLogDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody InterfaceLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
interfaceLogService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody InterfaceLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
interfaceLogService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
interfaceLogService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<InterfaceLogDTO> list = interfaceLogService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, InterfaceLogExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
/** |
|||
* 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.interfacelog.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO; |
|||
import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 接口日志表 接口日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-11-14 |
|||
*/ |
|||
@Mapper |
|||
public interface InterfaceLogDao extends BaseDao<InterfaceLogEntity> { |
|||
/** |
|||
* |
|||
* @param params |
|||
* @return 获取接口日志列表 |
|||
*/ |
|||
List<InterfaceLogDTO> listInterfaceLog(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
/** |
|||
* 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.interfacelog.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 接口日志表 接口日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-11-14 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_interface_log") |
|||
public class InterfaceLogEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 引用ID |
|||
*/ |
|||
private String referenceId; |
|||
|
|||
/** |
|||
* 业务类型 |
|||
*/ |
|||
private String businessType; |
|||
|
|||
/** |
|||
* 调用接口名称 |
|||
*/ |
|||
private String interfaceName; |
|||
|
|||
/** |
|||
* 调用是否成功 0-调用失败,1-调用成功 |
|||
*/ |
|||
private String successFlag; |
|||
|
|||
/** |
|||
* 调用消息体 |
|||
*/ |
|||
private String callMsgBody; |
|||
|
|||
/** |
|||
* 调用返回消息体 |
|||
*/ |
|||
private String returnMsgBody; |
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
/** |
|||
* 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.interfacelog.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 接口日志表 接口日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-11-14 |
|||
*/ |
|||
@Data |
|||
public class InterfaceLogExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "引用ID") |
|||
private String referenceId; |
|||
|
|||
@Excel(name = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Excel(name = "调用接口名称") |
|||
private String interfaceName; |
|||
|
|||
@Excel(name = "调用是否成功 0-调用失败,1-调用成功") |
|||
private String successFlag; |
|||
|
|||
@Excel(name = "调用消息体") |
|||
private String callMsgBody; |
|||
|
|||
@Excel(name = "调用返回消息体") |
|||
private String returnMsgBody; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
@Excel(name = "删除标记") |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* 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.interfacelog.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 接口日志表 接口日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-11-14 |
|||
*/ |
|||
@Component |
|||
public class InterfaceLogRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* 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.interfacelog.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO; |
|||
import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 接口日志表 接口日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-11-14 |
|||
*/ |
|||
public interface InterfaceLogService extends BaseService<InterfaceLogEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<InterfaceLogDTO> |
|||
* @author generator |
|||
* @date 2019-11-14 |
|||
*/ |
|||
PageData<InterfaceLogDTO> listInterfaceLog(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<InterfaceLogDTO> |
|||
* @author generator |
|||
* @date 2019-11-14 |
|||
*/ |
|||
List<InterfaceLogDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return InterfaceLogDTO |
|||
* @author generator |
|||
* @date 2019-11-14 |
|||
*/ |
|||
InterfaceLogDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-11-14 |
|||
*/ |
|||
void save(InterfaceLogDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-11-14 |
|||
*/ |
|||
void update(InterfaceLogDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-11-14 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,101 @@ |
|||
/** |
|||
* 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.interfacelog.service.impl; |
|||
|
|||
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.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO; |
|||
import com.elink.esua.epdc.modules.interfacelog.dao.InterfaceLogDao; |
|||
import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity; |
|||
import com.elink.esua.epdc.modules.interfacelog.redis.InterfaceLogRedis; |
|||
import com.elink.esua.epdc.modules.interfacelog.service.InterfaceLogService; |
|||
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 2019-11-14 |
|||
*/ |
|||
@Service |
|||
public class InterfaceLogServiceImpl extends BaseServiceImpl<InterfaceLogDao, InterfaceLogEntity> implements InterfaceLogService { |
|||
|
|||
@Autowired |
|||
private InterfaceLogRedis interfaceLogRedis; |
|||
|
|||
@Override |
|||
public PageData<InterfaceLogDTO> listInterfaceLog(Map<String, Object> params) { |
|||
IPage<InterfaceLogDTO> page = getPage(params); |
|||
List<InterfaceLogDTO> list = baseDao.listInterfaceLog(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<InterfaceLogDTO> list(Map<String, Object> params) { |
|||
List<InterfaceLogEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, InterfaceLogDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<InterfaceLogEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<InterfaceLogEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public InterfaceLogDTO get(String id) { |
|||
InterfaceLogEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, InterfaceLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(InterfaceLogDTO dto) { |
|||
InterfaceLogEntity entity = ConvertUtils.sourceToTarget(dto, InterfaceLogEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(InterfaceLogDTO dto) { |
|||
InterfaceLogEntity entity = ConvertUtils.sourceToTarget(dto, InterfaceLogEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.log.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.log.DeptRespondLogDTO; |
|||
import com.elink.esua.epdc.modules.log.excel.DeptRespondLogExcel; |
|||
import com.elink.esua.epdc.modules.log.service.DeptRespondLogService; |
|||
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 2019-10-22 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("deptrespondlog") |
|||
public class DeptRespondLogController { |
|||
|
|||
@Autowired |
|||
private DeptRespondLogService deptRespondLogService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<DeptRespondLogDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<DeptRespondLogDTO> page = deptRespondLogService.page(params); |
|||
return new Result<PageData<DeptRespondLogDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<DeptRespondLogDTO> get(@PathVariable("id") String id){ |
|||
DeptRespondLogDTO data = deptRespondLogService.get(id); |
|||
return new Result<DeptRespondLogDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody DeptRespondLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
deptRespondLogService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody DeptRespondLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
deptRespondLogService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
deptRespondLogService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<DeptRespondLogDTO> list = deptRespondLogService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, DeptRespondLogExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -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.log.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 部门响应记录 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-22 |
|||
*/ |
|||
@Mapper |
|||
public interface DeptRespondLogDao extends BaseDao<DeptRespondLogEntity> { |
|||
|
|||
} |
|||
@ -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.modules.log.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 2019-10-22 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_dept_respond_log") |
|||
public class DeptRespondLogEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 引用ID |
|||
*/ |
|||
private String referenceId; |
|||
|
|||
/** |
|||
* 引用类型 issue或item |
|||
*/ |
|||
private String referenceType; |
|||
|
|||
/** |
|||
* 响应部门的id(被呼叫的部门即审核部门) |
|||
*/ |
|||
private Long respondDeptId; |
|||
|
|||
/** |
|||
* 响应时间即审核时间 |
|||
*/ |
|||
private Date respondTime; |
|||
|
|||
/** |
|||
* 响应类型,参考枚举类DeptRespondTypeEnum |
|||
*/ |
|||
private Integer respondType; |
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
/** |
|||
* 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.log.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 部门响应记录 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-22 |
|||
*/ |
|||
@Data |
|||
public class DeptRespondLogExcel { |
|||
|
|||
@Excel(name = "ID") |
|||
private String id; |
|||
|
|||
@Excel(name = "引用ID") |
|||
private String referenceId; |
|||
|
|||
@Excel(name = "引用类型 issue或item") |
|||
private String referenceType; |
|||
|
|||
@Excel(name = "响应部门的id(被呼叫的部门即审核部门)") |
|||
private Long respondDeptId; |
|||
|
|||
@Excel(name = "响应时间即审核时间") |
|||
private Date respondTime; |
|||
|
|||
@Excel(name = "响应类型,参考枚举类DeptRespondTypeEnum") |
|||
private Integer respondType; |
|||
|
|||
@Excel(name = "删除标识 0:未删除,1:删除") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* 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.log.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 部门响应记录 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-22 |
|||
*/ |
|||
@Component |
|||
public class DeptRespondLogRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* 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.log.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.dto.log.DeptRespondLogDTO; |
|||
import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 部门响应记录 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-22 |
|||
*/ |
|||
public interface DeptRespondLogService extends BaseService<DeptRespondLogEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DeptRespondLogDTO> |
|||
* @author generator |
|||
* @date 2019-10-22 |
|||
*/ |
|||
PageData<DeptRespondLogDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DeptRespondLogDTO> |
|||
* @author generator |
|||
* @date 2019-10-22 |
|||
*/ |
|||
List<DeptRespondLogDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DeptRespondLogDTO |
|||
* @author generator |
|||
* @date 2019-10-22 |
|||
*/ |
|||
DeptRespondLogDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-22 |
|||
*/ |
|||
void save(DeptRespondLogDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-22 |
|||
*/ |
|||
void update(DeptRespondLogDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-22 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.log.service.impl; |
|||
|
|||
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.modules.log.dao.DeptRespondLogDao; |
|||
import com.elink.esua.epdc.dto.log.DeptRespondLogDTO; |
|||
import com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity; |
|||
import com.elink.esua.epdc.modules.log.redis.DeptRespondLogRedis; |
|||
import com.elink.esua.epdc.modules.log.service.DeptRespondLogService; |
|||
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 2019-10-22 |
|||
*/ |
|||
@Service |
|||
public class DeptRespondLogServiceImpl extends BaseServiceImpl<DeptRespondLogDao, DeptRespondLogEntity> implements DeptRespondLogService { |
|||
|
|||
@Autowired |
|||
private DeptRespondLogRedis deptRespondLogRedis; |
|||
|
|||
@Override |
|||
public PageData<DeptRespondLogDTO> page(Map<String, Object> params) { |
|||
IPage<DeptRespondLogEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DeptRespondLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DeptRespondLogDTO> list(Map<String, Object> params) { |
|||
List<DeptRespondLogEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DeptRespondLogDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DeptRespondLogEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DeptRespondLogEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DeptRespondLogDTO get(String id) { |
|||
DeptRespondLogEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DeptRespondLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DeptRespondLogDTO dto) { |
|||
DeptRespondLogEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondLogEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DeptRespondLogDTO dto) { |
|||
DeptRespondLogEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondLogEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.rule.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.rule.DeptKpiConfigDTO; |
|||
import com.elink.esua.epdc.modules.rule.excel.DeptKpiConfigExcel; |
|||
import com.elink.esua.epdc.modules.rule.service.DeptKpiConfigService; |
|||
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 2019-10-21 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("deptkpiconfig") |
|||
public class DeptKpiConfigController { |
|||
|
|||
@Autowired |
|||
private DeptKpiConfigService deptKpiConfigService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<DeptKpiConfigDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<DeptKpiConfigDTO> page = deptKpiConfigService.page(params); |
|||
return new Result<PageData<DeptKpiConfigDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<DeptKpiConfigDTO> get(@PathVariable("id") String id){ |
|||
DeptKpiConfigDTO data = deptKpiConfigService.get(id); |
|||
return new Result<DeptKpiConfigDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody DeptKpiConfigDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
deptKpiConfigService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody DeptKpiConfigDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
deptKpiConfigService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
deptKpiConfigService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<DeptKpiConfigDTO> list = deptKpiConfigService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, DeptKpiConfigExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -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.rule.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 考核规则 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-21 |
|||
*/ |
|||
@Mapper |
|||
public interface DeptKpiConfigDao extends BaseDao<DeptKpiConfigEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
/** |
|||
* 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.rule.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 2019-10-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_dept_kpi_config") |
|||
public class DeptKpiConfigEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 绩效指标编码 |
|||
*/ |
|||
private String kpiItemCode; |
|||
|
|||
/** |
|||
* 绩效指标值 |
|||
*/ |
|||
private Integer kpiItemValue; |
|||
|
|||
/** |
|||
* 绩效指标描述 |
|||
*/ |
|||
private String kpiItemDesc; |
|||
|
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
/** |
|||
* 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.rule.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 考核规则 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-21 |
|||
*/ |
|||
@Data |
|||
public class DeptKpiConfigExcel { |
|||
|
|||
@Excel(name = "ID") |
|||
private String id; |
|||
|
|||
@Excel(name = "绩效指标编码") |
|||
private String kpiItemCode; |
|||
|
|||
@Excel(name = "绩效指标值") |
|||
private Integer kpiItemValue; |
|||
|
|||
@Excel(name = "绩效指标描述") |
|||
private String kpiItemDesc; |
|||
|
|||
@Excel(name = "删除标识 0:未删除,1:删除") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* 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.rule.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 考核规则 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-21 |
|||
*/ |
|||
@Component |
|||
public class DeptKpiConfigRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* 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.rule.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.dto.rule.DeptKpiConfigDTO; |
|||
import com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 考核规则 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-21 |
|||
*/ |
|||
public interface DeptKpiConfigService extends BaseService<DeptKpiConfigEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DeptKpiConfigDTO> |
|||
* @author generator |
|||
* @date 2019-10-21 |
|||
*/ |
|||
PageData<DeptKpiConfigDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DeptKpiConfigDTO> |
|||
* @author generator |
|||
* @date 2019-10-21 |
|||
*/ |
|||
List<DeptKpiConfigDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DeptKpiConfigDTO |
|||
* @author generator |
|||
* @date 2019-10-21 |
|||
*/ |
|||
DeptKpiConfigDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-21 |
|||
*/ |
|||
void save(DeptKpiConfigDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-21 |
|||
*/ |
|||
void update(DeptKpiConfigDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-21 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.rule.service.impl; |
|||
|
|||
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.modules.rule.dao.DeptKpiConfigDao; |
|||
import com.elink.esua.epdc.dto.rule.DeptKpiConfigDTO; |
|||
import com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity; |
|||
import com.elink.esua.epdc.modules.rule.redis.DeptKpiConfigRedis; |
|||
import com.elink.esua.epdc.modules.rule.service.DeptKpiConfigService; |
|||
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 2019-10-21 |
|||
*/ |
|||
@Service |
|||
public class DeptKpiConfigServiceImpl extends BaseServiceImpl<DeptKpiConfigDao, DeptKpiConfigEntity> implements DeptKpiConfigService { |
|||
|
|||
@Autowired |
|||
private DeptKpiConfigRedis deptKpiConfigRedis; |
|||
|
|||
@Override |
|||
public PageData<DeptKpiConfigDTO> page(Map<String, Object> params) { |
|||
IPage<DeptKpiConfigEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DeptKpiConfigDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DeptKpiConfigDTO> list(Map<String, Object> params) { |
|||
List<DeptKpiConfigEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DeptKpiConfigDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DeptKpiConfigEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DeptKpiConfigEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DeptKpiConfigDTO get(String id) { |
|||
DeptKpiConfigEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DeptKpiConfigDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DeptKpiConfigDTO dto) { |
|||
DeptKpiConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptKpiConfigEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DeptKpiConfigDTO dto) { |
|||
DeptKpiConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptKpiConfigEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.time.DeptRespondTimeConfigDTO; |
|||
import com.elink.esua.epdc.modules.time.excel.DeptRespondTimeConfigExcel; |
|||
import com.elink.esua.epdc.modules.time.service.DeptRespondTimeConfigService; |
|||
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 2019-10-23 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("deptrespondtimeconfig") |
|||
public class DeptRespondTimeConfigController { |
|||
|
|||
@Autowired |
|||
private DeptRespondTimeConfigService deptRespondTimeConfigService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<DeptRespondTimeConfigDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<DeptRespondTimeConfigDTO> page = deptRespondTimeConfigService.page(params); |
|||
return new Result<PageData<DeptRespondTimeConfigDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<DeptRespondTimeConfigDTO> get(@PathVariable("id") String id){ |
|||
DeptRespondTimeConfigDTO data = deptRespondTimeConfigService.get(id); |
|||
return new Result<DeptRespondTimeConfigDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody DeptRespondTimeConfigDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
deptRespondTimeConfigService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody DeptRespondTimeConfigDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
deptRespondTimeConfigService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
deptRespondTimeConfigService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<DeptRespondTimeConfigDTO> list = deptRespondTimeConfigService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, DeptRespondTimeConfigExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -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.time.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 绩效考核时间规则表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Mapper |
|||
public interface DeptRespondTimeConfigDao extends BaseDao<DeptRespondTimeConfigEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
/** |
|||
* 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.time.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 绩效考核时间规则表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_dept_respond_time_config") |
|||
public class DeptRespondTimeConfigEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 议题或项目类别ID(不可重复) |
|||
*/ |
|||
private String categoryId; |
|||
|
|||
/** |
|||
* 类别名称 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 网格长在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer gridValidRespLimitHour; |
|||
|
|||
/** |
|||
* 网格长在多少小时内关闭算是有效关闭 |
|||
*/ |
|||
private Integer gridValidCloseLimitHour; |
|||
|
|||
/** |
|||
* 社区在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer commValidRespLimitHour; |
|||
|
|||
/** |
|||
* 街道在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer streetValidRespLimitHour; |
|||
|
|||
/** |
|||
* 区直在多少小时内响应算是有效响应 |
|||
*/ |
|||
private Integer districtValidRespLimitHour; |
|||
|
|||
/** |
|||
* 超过多少小时响应算是无效响应。此值应大于各部门的有效响应值。若响应发生在有效响应与无效响应之间,为超时响应。 |
|||
*/ |
|||
private Integer invalidRespLimitHour; |
|||
|
|||
/** |
|||
* 有效响应系数 |
|||
*/ |
|||
private BigDecimal validRespCoefficient; |
|||
|
|||
/** |
|||
* 超时响应系数 |
|||
*/ |
|||
private BigDecimal overtimeRespCoefficient; |
|||
|
|||
/** |
|||
* 无效响应系数 |
|||
*/ |
|||
private BigDecimal invalidRespCoefficient; |
|||
|
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
/** |
|||
* 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.time.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 绩效考核时间规则表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Data |
|||
public class DeptRespondTimeConfigExcel { |
|||
|
|||
@Excel(name = "ID") |
|||
private String id; |
|||
|
|||
@Excel(name = "议题或项目类别ID(不可重复)") |
|||
private String categoryId; |
|||
|
|||
@Excel(name = "类别名称") |
|||
private String categoryName; |
|||
|
|||
@Excel(name = "网格长在多少小时内响应算是有效响应") |
|||
private Integer gridValidRespLimitHour; |
|||
|
|||
@Excel(name = "网格长在多少小时内关闭算是有效关闭") |
|||
private Integer gridValidCloseLimitHour; |
|||
|
|||
@Excel(name = "社区在多少小时内响应算是有效响应") |
|||
private Integer commValidRespLimitHour; |
|||
|
|||
@Excel(name = "街道在多少小时内响应算是有效响应") |
|||
private Integer streetValidRespLimitHour; |
|||
|
|||
@Excel(name = "区直在多少小时内响应算是有效响应") |
|||
private Integer districtValidRespLimitHour; |
|||
|
|||
@Excel(name = "超过多少小时响应算是无效响应。此值应大于各部门的有效响应值。若响应发生在有效响应与无效响应之间,为超时响应。") |
|||
private Integer invalidRespLimitHour; |
|||
|
|||
@Excel(name = "有效响应系数") |
|||
private BigDecimal validRespCoefficient; |
|||
|
|||
@Excel(name = "超时响应系数") |
|||
private BigDecimal overtimeRespCoefficient; |
|||
|
|||
@Excel(name = "无效响应系数") |
|||
private BigDecimal invalidRespCoefficient; |
|||
|
|||
@Excel(name = "删除标识 0:未删除,1:删除") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* 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.time.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 绩效考核时间规则表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Component |
|||
public class DeptRespondTimeConfigRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* 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.time.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.dto.time.DeptRespondTimeConfigDTO; |
|||
import com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 绩效考核时间规则表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
public interface DeptRespondTimeConfigService extends BaseService<DeptRespondTimeConfigEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DeptRespondTimeConfigDTO> |
|||
* @author generator |
|||
* @date 2019-10-23 |
|||
*/ |
|||
PageData<DeptRespondTimeConfigDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DeptRespondTimeConfigDTO> |
|||
* @author generator |
|||
* @date 2019-10-23 |
|||
*/ |
|||
List<DeptRespondTimeConfigDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DeptRespondTimeConfigDTO |
|||
* @author generator |
|||
* @date 2019-10-23 |
|||
*/ |
|||
DeptRespondTimeConfigDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-23 |
|||
*/ |
|||
void save(DeptRespondTimeConfigDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-23 |
|||
*/ |
|||
void update(DeptRespondTimeConfigDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-10-23 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.time.service.impl; |
|||
|
|||
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.modules.time.dao.DeptRespondTimeConfigDao; |
|||
import com.elink.esua.epdc.dto.time.DeptRespondTimeConfigDTO; |
|||
import com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity; |
|||
import com.elink.esua.epdc.modules.time.redis.DeptRespondTimeConfigRedis; |
|||
import com.elink.esua.epdc.modules.time.service.DeptRespondTimeConfigService; |
|||
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 2019-10-23 |
|||
*/ |
|||
@Service |
|||
public class DeptRespondTimeConfigServiceImpl extends BaseServiceImpl<DeptRespondTimeConfigDao, DeptRespondTimeConfigEntity> implements DeptRespondTimeConfigService { |
|||
|
|||
@Autowired |
|||
private DeptRespondTimeConfigRedis deptRespondTimeConfigRedis; |
|||
|
|||
@Override |
|||
public PageData<DeptRespondTimeConfigDTO> page(Map<String, Object> params) { |
|||
IPage<DeptRespondTimeConfigEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DeptRespondTimeConfigDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DeptRespondTimeConfigDTO> list(Map<String, Object> params) { |
|||
List<DeptRespondTimeConfigEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DeptRespondTimeConfigDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DeptRespondTimeConfigEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DeptRespondTimeConfigEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DeptRespondTimeConfigDTO get(String id) { |
|||
DeptRespondTimeConfigEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DeptRespondTimeConfigDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DeptRespondTimeConfigDTO dto) { |
|||
DeptRespondTimeConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondTimeConfigEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DeptRespondTimeConfigDTO dto) { |
|||
DeptRespondTimeConfigEntity entity = ConvertUtils.sourceToTarget(dto, DeptRespondTimeConfigEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
<?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.interfacelog.dao.InterfaceLogDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity" id="interfaceLogMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="referenceId" column="REFERENCE_ID"/> |
|||
<result property="businessType" column="BUSINESS_TYPE"/> |
|||
<result property="interfaceName" column="INTERFACE_NAME"/> |
|||
<result property="successFlag" column="SUCCESS_FLAG"/> |
|||
<result property="callMsgBody" column="CALL_MSG_BODY"/> |
|||
<result property="returnMsgBody" column="RETURN_MSG_BODY"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
<!-- --> |
|||
<select id="listInterfaceLog" parameterType="map" |
|||
resultType="com.elink.esua.epdc.dto.interfacelog.InterfaceLogDTO"> |
|||
select eil.id, |
|||
eil.REFERENCE_ID as referenceId, |
|||
eil.BUSINESS_TYPE as businessType, |
|||
eil.INTERFACE_NAME as interfaceName, |
|||
eil.SUCCESS_FLAG as successFlag, |
|||
eil.CALL_MSG_BODY as callMsgBody, |
|||
eil.RETURN_MSG_BODY as returnMsgBody, |
|||
eil.CREATED_BY as createdBy, |
|||
eil.CREATED_TIME as createdTime, |
|||
eil.UPDATED_BY as updatedBy, |
|||
eil.UPDATED_TIME as updatedTime, |
|||
eil.DEL_FLAG as delFlag |
|||
from epdc_interface_log eil |
|||
where eil.DEL_FLAG='0' |
|||
<if test="businessType != null and businessType != ''"> |
|||
and eil.BUSINESS_TYPE=#{businessType} |
|||
</if> |
|||
<if test="interfaceName != null and interfaceName != ''"> |
|||
and eil.INTERFACE_NAME like concat('%',#{interfaceName},'%') |
|||
</if> |
|||
<if test="successFlag != null and successFlag != ''"> |
|||
and eil.SUCCESS_FLAG=#{successFlag} |
|||
</if> |
|||
<if test="callMsgBody != null and callMsgBody != ''"> |
|||
and eil.CALL_MSG_BODY like concat('%',#{callMsgBody},'%') |
|||
</if> |
|||
<if test="returnMsgBody != null and returnMsgBody != ''"> |
|||
and eil.RETURN_MSG_BODY like concat('%',#{returnMsgBody},'%') |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( eil.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( eil.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
order by eil.CREATED_TIME desc |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,22 @@ |
|||
<?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.log.dao.DeptRespondLogDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.log.entity.DeptRespondLogEntity" id="deptRespondLogMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="referenceId" column="REFERENCE_ID"/> |
|||
<result property="referenceType" column="REFERENCE_TYPE"/> |
|||
<result property="respondDeptId" column="RESPOND_DEPT_ID"/> |
|||
<result property="respondTime" column="RESPOND_TIME"/> |
|||
<result property="respondType" column="RESPOND_TYPE"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,20 @@ |
|||
<?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.DeptKpiConfigDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.rule.entity.DeptKpiConfigEntity" id="deptKpiConfigMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="kpiItemCode" column="KPI_ITEM_CODE"/> |
|||
<result property="kpiItemValue" column="KPI_ITEM_VALUE"/> |
|||
<result property="kpiItemDesc" column="KPI_ITEM_DESC"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,28 @@ |
|||
<?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.time.dao.DeptRespondTimeConfigDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.time.entity.DeptRespondTimeConfigEntity" id="deptRespondTimeConfigMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="categoryId" column="category_id"/> |
|||
<result property="categoryName" column="category_name"/> |
|||
<result property="gridValidRespLimitHour" column="grid_valid_resp_limit_hour"/> |
|||
<result property="gridValidCloseLimitHour" column="grid_valid_close_limit_hour"/> |
|||
<result property="commValidRespLimitHour" column="comm_valid_resp_limit_hour"/> |
|||
<result property="streetValidRespLimitHour" column="street_valid_resp_limit_hour"/> |
|||
<result property="districtValidRespLimitHour" column="district_valid_resp_limit_hour"/> |
|||
<result property="invalidRespLimitHour" column="invalid_resp_limit_hour"/> |
|||
<result property="validRespCoefficient" column="valid_resp_coefficient"/> |
|||
<result property="overtimeRespCoefficient" column="overtime_resp_coefficient"/> |
|||
<result property="invalidRespCoefficient" column="invalid_resp_coefficient"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,42 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>epdc-group</artifactId> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<version>1.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>epdc-group-client</artifactId> |
|||
<packaging>jar</packaging> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-commons-tools</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-admin-client</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-news-client</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-user-client</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-events-client</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
</project> |
|||
@ -0,0 +1,141 @@ |
|||
/** |
|||
* 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.comment; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题评论表 话题评论表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Data |
|||
public class TopicCommentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 评论人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 评论人昵称 |
|||
*/ |
|||
private String username; |
|||
|
|||
/** |
|||
* 评论人头像 |
|||
*/ |
|||
private String userFace; |
|||
|
|||
/** |
|||
* 评论内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 评论类型 0:评论,1:回复,2:回复的回复 |
|||
*/ |
|||
private String commentType; |
|||
|
|||
/** |
|||
* 回复的评论ID |
|||
*/ |
|||
private String commentId; |
|||
|
|||
/** |
|||
* 被回复数 |
|||
*/ |
|||
private Integer replyCount; |
|||
|
|||
/** |
|||
* 被回复人ID |
|||
*/ |
|||
private String replyUserId; |
|||
|
|||
/** |
|||
* 被回复人名称 |
|||
*/ |
|||
private String replyUsername; |
|||
|
|||
/** |
|||
* 被回复人头像 |
|||
*/ |
|||
private String replyUserFace; |
|||
|
|||
/** |
|||
* 点赞数 |
|||
*/ |
|||
private Integer likeCount; |
|||
|
|||
/** |
|||
* 点踩数 |
|||
*/ |
|||
private Integer unLikeCount; |
|||
|
|||
/** |
|||
* 屏蔽标识 0:未屏蔽,1:已屏蔽 |
|||
*/ |
|||
private String shieldFlag; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto.comment; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* 评论议题、提交评论 |
|||
* |
|||
*/ |
|||
@Data |
|||
public class TopicCommentFormDTO { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String topicId; |
|||
|
|||
private String faCommentId; |
|||
|
|||
@Size(min = 1, max = 500, message = "评论内容不能超过500字") |
|||
private String content; |
|||
|
|||
/** |
|||
* 评论人ID |
|||
*/ |
|||
@NotBlank(message = "评论人ID不能为空") |
|||
private String userId; |
|||
|
|||
/** |
|||
* 评论人昵称 |
|||
*/ |
|||
private String userName; |
|||
|
|||
/** |
|||
* 评论人头像 |
|||
*/ |
|||
private String userFace; |
|||
|
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
package com.elink.esua.epdc.dto.comment; |
|||
|
|||
import com.elink.esua.epdc.dto.topic.ReplyCommentDto; |
|||
import com.elink.esua.epdc.dto.topic.UserBaseInfoDto; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/12 10:55 |
|||
*/ |
|||
@Data |
|||
public class TopicCommentListDTO implements Serializable { |
|||
private static final long serialVersionUID = 1678760230045285655L; |
|||
|
|||
/** |
|||
* 评论ID |
|||
*/ |
|||
private String commentId; |
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
/** |
|||
* 用户是否赞过,false未赞 |
|||
*/ |
|||
private boolean userLike; |
|||
/** |
|||
* 用户是否踩过,true踩 |
|||
*/ |
|||
private boolean userDislike; |
|||
/** |
|||
* 评论时间 |
|||
*/ |
|||
private Date commentTime; |
|||
/** |
|||
* 赞数 |
|||
*/ |
|||
private Integer approveNum; |
|||
/** |
|||
* 踩数 |
|||
*/ |
|||
private Integer opposeNum; |
|||
/** |
|||
* 表态次数 |
|||
*/ |
|||
private Integer attitudeNum; |
|||
/** |
|||
* 用户信息 |
|||
*/ |
|||
private UserBaseInfoDto user; |
|||
/** |
|||
* 屏蔽标识 0:未屏蔽,1:已屏蔽 |
|||
*/ |
|||
private String shieldFlag; |
|||
/** |
|||
* 回复评论信息 |
|||
*/ |
|||
private ReplyCommentDto replyComment; |
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* 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.comment; |
|||
|
|||
import java.io.Serializable; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@Data |
|||
public class TopicCommentStatementFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 表态 0赞;1踩;2取消点赞;3取消点踩 |
|||
*/ |
|||
private String attitude; |
|||
|
|||
/** |
|||
* 评论ID |
|||
*/ |
|||
private String commentId; |
|||
|
|||
private String topicId; |
|||
|
|||
private String useId; |
|||
|
|||
private String userName; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* 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.comment; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题评论用户表态表 话题评论用户表态表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-10-23 |
|||
*/ |
|||
@Data |
|||
public class TopicCommentUserAttitudeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 评论ID |
|||
*/ |
|||
private String commentId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 表态标识 0:点赞,1:点踩 |
|||
*/ |
|||
private String attitudeFlag; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
package com.elink.esua.epdc.dto.comment; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 移动端评论表单DTO |
|||
* @Author LC |
|||
* @Date 2019/9/9 15:09 |
|||
*/ |
|||
@Data |
|||
public class TopicCommentsFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -3804142943077174555L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@NotNull(message = "页码不能为空") |
|||
private Integer pageIndex; |
|||
/** |
|||
* 页容量 |
|||
*/ |
|||
@NotNull(message = "分页数量不能为空") |
|||
private Integer pageSize; |
|||
/** |
|||
* 时间戳(yyyy-MM-dd HH:mm:ss) |
|||
*/ |
|||
private String timestamp; |
|||
/** |
|||
* 列表类型 0最新;1最热 |
|||
*/ |
|||
@NotBlank(message = "列表类型不能为空") |
|||
private String orderType; |
|||
|
|||
private String topicId; |
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.elink.esua.epdc.dto.comment; |
|||
|
|||
import com.elink.esua.epdc.dto.topic.TopicCommentsDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 移动端评论列表DTO |
|||
* @Author LC |
|||
* @Date 2019/9/9 14:46 |
|||
*/ |
|||
@Data |
|||
public class TopicCommentsResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -5087234859322214256L; |
|||
|
|||
/** |
|||
* 表态数 |
|||
*/ |
|||
private long statementNum; |
|||
|
|||
/** |
|||
* 评论 |
|||
*/ |
|||
List<TopicCommentsDTO> commentsList; |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
package com.elink.esua.epdc.dto.comment; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/12 11:06 |
|||
*/ |
|||
@Data |
|||
public class TopicDeleteCommentsFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -8359841146893592752L; |
|||
|
|||
private String[] commentIds; |
|||
} |
|||
@ -0,0 +1,161 @@ |
|||
package com.elink.esua.epdc.dto.constant; |
|||
|
|||
/** |
|||
* |
|||
* 发送消息常量 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/21 13:41 |
|||
*/ |
|||
public interface GroupNoticeConstant { |
|||
|
|||
/** |
|||
* 社群审核未通过 |
|||
*/ |
|||
String NOTICE_GROUP_NOT_PASSED = "你创建的社群【审核未通过】"; |
|||
|
|||
/** |
|||
* 社群审核通过 |
|||
*/ |
|||
String NOTICE_GROUP_PASSED = "你创建的社群【审核通过】"; |
|||
|
|||
/** |
|||
* 社群解散 |
|||
*/ |
|||
String NOTICE_GROUP_DISBAND = "你加入的社群已被解散"; |
|||
|
|||
/** |
|||
* 删除社群成员 |
|||
*/ |
|||
String NOTICE_GROUP_USER_REMOVED_MEMBER = "你已被群主移除社群"; |
|||
|
|||
/** |
|||
* 邀请入群 |
|||
*/ |
|||
String NOTICE_GROUP_USER_INVITED = "您已加入社群"; |
|||
|
|||
/** |
|||
* 邀请入群内容 |
|||
*/ |
|||
String NOTICE_GROUP_USER_INVITED_CONTENT = "您已被群主邀请加入groupName社群,快进入社群看看吧。"; |
|||
|
|||
/** |
|||
* 入群申请通过 |
|||
*/ |
|||
String NOTICE_GROUP_USER_REVIEW_PASSED = "入群申请【审核通过】"; |
|||
|
|||
/** |
|||
* 入群申请不通过 |
|||
*/ |
|||
String NOTICE_GROUP_USER_REVIEW_NOT_PASSED = "入群申请【审核不通过】"; |
|||
|
|||
/** |
|||
* 入群申请通过内容 |
|||
*/ |
|||
String NOTICE_GROUP_USER_REVIEW_PASSED_CONTENT = "您加入groupName社群的申请,审核已通过,快进入社群吧。"; |
|||
|
|||
/** |
|||
* 入群申请不通过内容 |
|||
*/ |
|||
String NOTICE_GROUP_USER_REVIEW_NOT_PASSED_CONTENT = "您加入groupName社群的申请,审核未通过,原因:auditOpinion"; |
|||
|
|||
/** |
|||
* 退出社群 |
|||
*/ |
|||
String NOTICE_GROUP_QUIT = "已退出社群"; |
|||
|
|||
/** |
|||
* 话题关闭 |
|||
*/ |
|||
String NOTICE_GROUP_TOPIC_CLOSED = "话题关闭"; |
|||
|
|||
/** |
|||
* 转议题-不通过 |
|||
*/ |
|||
String NOTICE_TOPIC_TO_ISSUE_NOT_PASS = "转议题【审核不通过】"; |
|||
|
|||
/** |
|||
* 转议题-通过 |
|||
*/ |
|||
String NOTICE_TOPIC_TO_ISSUE_PASS = "转议题【审核通过】"; |
|||
|
|||
/** |
|||
* 转议题-通过-内容-群主 |
|||
*/ |
|||
String NOTICE_TOPIC_TO_ISSUE_PASS_LORD_CONTENT = "您转报的话题已经审核通过并成为议题,可在“党群议事”查看。"; |
|||
|
|||
/** |
|||
* 转议题-通过-内容-发布话题用户 |
|||
*/ |
|||
String NOTICE_TOPIC_TO_ISSUE_PASS_TOPIC_USER_CONTENT = "您的话题已经审核通过并成为议题,可在 党群议事查看。"; |
|||
|
|||
/** |
|||
* 我的消息类型:0审核通知 |
|||
*/ |
|||
String NOTICE_TYPE_AUDIT_NOTICE = "0"; |
|||
|
|||
/** |
|||
* 我的消息类型:1互动通知 |
|||
*/ |
|||
String NOTICE_TYPE_INTERACTIVE_NOTICE = "1"; |
|||
|
|||
/** |
|||
* 我的消息类型:2进度通知 |
|||
*/ |
|||
String NOTICE_TYPE_PROGRESS_NOTICE = "2"; |
|||
|
|||
/** |
|||
* 我的消息类型:3社群通知 |
|||
*/ |
|||
String NOTICE_TYPE_GROUP_NOTICE = "3"; |
|||
|
|||
/** |
|||
* 消息所属业务类型:社群审核通过 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_PASSED = "groupPassed"; |
|||
|
|||
/** |
|||
* 消息所属业务类型:社群审核未通过或解散 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_NOT_PASSED_OR_DISBAND = "groupNotPassedOrDisband"; |
|||
|
|||
/** |
|||
* 消息所属业务类型:移除社群成员 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_USER_REMOVED_MEMBER = "groupRemovedMember"; |
|||
|
|||
/** |
|||
* 消息所属业务类型:退出社群 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_USER_QUIT = "groupQuit"; |
|||
|
|||
/** |
|||
* 社群邀请 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_USER_INVITED = "groupInvited"; |
|||
|
|||
/** |
|||
* 入群申请通过 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_USER_REVIEW_PASSED = "groupUserReviewPassed"; |
|||
|
|||
/** |
|||
* 入群申请未通过 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_USER_REVIEW_NOT_PASS = "groupUserReviewNotPass"; |
|||
|
|||
/** |
|||
* 话题关闭 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_GROUP_TOPIC_CLOSED = "groupTopicClosed"; |
|||
|
|||
/** |
|||
* 话题转议题通过 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_TOPIC_TO_ISSUE_PASSED = "topicToIssuePass"; |
|||
|
|||
/** |
|||
* 话题转议题不通过 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_TOPIC_TO_ISSUE_NOT_PASSED = "topicToIssueNotPassed "; |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
package com.elink.esua.epdc.dto.constant; |
|||
|
|||
/** |
|||
* |
|||
* 图片类型 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/11/6 16:17 |
|||
*/ |
|||
public interface TopicImageConstant { |
|||
|
|||
/** |
|||
* 图片类型-事件 |
|||
*/ |
|||
String TYPE_IMAGE_BIZ_TOPIC = "topic"; |
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
package com.elink.esua.epdc.dto.constant; |
|||
|
|||
/** |
|||
* 发送消息常量 |
|||
* @Author LC |
|||
* @Date 2019/9/18 17:26 |
|||
*/ |
|||
public interface TopicNoticeConstant { |
|||
/** |
|||
* 话题被评论 |
|||
*/ |
|||
String NOTICE_TOPIC_COMMENT = "你的话题【有新评论】"; |
|||
/** |
|||
* 评论被回复 |
|||
*/ |
|||
String NOTICE_TOPIC_COMMENT_REPLY = "你的评论【有新回复】"; |
|||
/** |
|||
* 评论支持 |
|||
*/ |
|||
String NOTICE_COMMENT_APPROVE = "你的评论【有新的支持】"; |
|||
/** |
|||
* 评论反对 |
|||
*/ |
|||
String NOTICE_COMMENT_OPPOSE = "你的评论【有新的反对】"; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 我的消息类型:1互动通知 |
|||
*/ |
|||
String NOTICE_TYPE_INTERACTIVE_NOTICE = "1"; |
|||
|
|||
|
|||
/** |
|||
* 消息所属业务类型:话题评论 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT = "topicComment"; |
|||
/** |
|||
* 消息所属业务类型:话题评论回复 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT_REPLY = "topicCommentReply"; |
|||
|
|||
/** |
|||
* 消息所属业务类型:话题评论支持 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT_APPROVE = "topicCommentApprove"; |
|||
|
|||
/** |
|||
* 消息所属业务类型:话题评论反对 |
|||
*/ |
|||
String NOTICE_BUSINESS_TYPE_TOPIC_COMMENT_OPPOSE = "topicCommentOppose"; |
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
package com.elink.esua.epdc.dto.enums; |
|||
|
|||
/** |
|||
* |
|||
* 社群状态枚举 |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2019/10/17 14:15 |
|||
*/ |
|||
public enum GroupStateEnum { |
|||
|
|||
/** |
|||
* 0-待审核 |
|||
*/ |
|||
GROUP_STATE_PENDING_REVIEW(0, "待审核"), |
|||
/** |
|||
* 5-审核不通过 |
|||
*/ |
|||
GROUP_STATE_AUDIT_NOT_PASSED(5, "审核不通过"), |
|||
/** |
|||
* 10-审核通过 |
|||
*/ |
|||
GROUP_STATE_EXAMINATION_PASSED(10, "审核通过"), |
|||
/** |
|||
* 15-禁言 |
|||
*/ |
|||
GROUP_STATE_BANNED(15, "禁言"), |
|||
/** |
|||
* 20-已解散 |
|||
*/ |
|||
GROUP_STATE_DISBANDED(20, "已解散"); |
|||
|
|||
private Integer value; |
|||
private String name; |
|||
|
|||
GroupStateEnum(Integer value, String name) { |
|||
this.value = value; |
|||
this.name = name; |
|||
} |
|||
|
|||
public Integer getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public void setValue(Integer value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue