From 8b4966349e57543ea083b20163f41b8976a1281a Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 09:12:17 +0800 Subject: [PATCH 01/26] =?UTF-8?q?del=5Fflag=20=E7=9A=84=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/resource/service/impl/ResourceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 4861ba98..446db103 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -77,7 +77,7 @@ public class ResourceServiceImpl extends CrudServiceImpl Date: Thu, 5 May 2022 09:54:35 +0800 Subject: [PATCH 02/26] ... --- .../resourceMountApply/listener/ResourceOwnerListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java index b5088653..ac3caccd 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java @@ -53,6 +53,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A @Override public void notify(DelegateExecution execution) throws Exception { logger.error("----------------------进入审批通过节点---------------------------"); + logger.error("事件类型:" + execution.getEventName()); final String eventName = execution.getEventName(); switch (eventName) { @@ -120,6 +121,8 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A if (re != null) { re.setDelFlag(0); resourceService.update(re); + logger.error("审批通过!资源id:" + re.getId()); + apiGatewayService.registerApi2Gateway(String.valueOf(re.getId())); // 发布到应用网关 } } From 113d7b482ab3cf54c98d05ee21602010e252602d Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 10:04:50 +0800 Subject: [PATCH 03/26] =?UTF-8?q?=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resourceMountApply/listener/ResourceOwnerListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java index ac3caccd..7b124bf6 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java @@ -168,7 +168,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); // 搜出审批人 } if (userDTO != null) { - logger.error("审批人id:" + userDTO.getId()); + logger.error("审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); } else { logger.error("未查到该部门对应的 " + roleName); @@ -177,7 +177,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A } else if (resourceMountApplyDTO.getDeptId() != null) { SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(Long.valueOf(resourceMountApplyDTO.getDeptId()), roleDTO.getId()); if (userDTO != null) { - logger.error("审批人id:" + userDTO.getId()); + logger.error("审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); } else { taskService.setAssignee(delegateTask.getId(), "1516728698224427010"); @@ -190,7 +190,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); if (userDTO != null) { - logger.error("大数据审批人id:" + userDTO.getId()); + logger.error("大数据审批人id:" + userDTO.getId() + "姓名:" + userDTO.getRealName()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); } else { taskService.setAssignee(delegateTask.getId(), "1516728698224427010"); From 4785caa2f5f3c6073f981fd856c038f074b41088 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 10:05:58 +0800 Subject: [PATCH 04/26] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=95=B4=E4=B8=AA?= =?UTF-8?q?=E6=B5=81=E7=A8=8Bend=E4=BA=8B=E4=BB=B6=E7=9B=91=E5=90=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resourceMountApply/listener/ResourceOwnerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java index 7b124bf6..69f6bc89 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java @@ -57,7 +57,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A final String eventName = execution.getEventName(); switch (eventName) { - case EVENTNAME_TAKE: { + case EVENTNAME_END: { endTake(execution.getVariables()); } break; From ca33bb0576cbcb2c8fe4c2226660df52848c58ed Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 10:35:02 +0800 Subject: [PATCH 05/26] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=20=E5=AE=A1=E6=89=B9=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/activiti/service/ActHistoryService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java index f8e5c1ad..4604ead3 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java @@ -6,6 +6,8 @@ import io.renren.modules.activiti.dto.ProcessInstanceDTO; import io.renren.modules.activiti.dto.TaskDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.service.TAbilityApplicationService; +import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO; +import io.renren.modules.resourceMountApply.service.TResourceMountApplyService; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.sys.dto.SysUserDTO; import io.renren.modules.sys.service.SysUserService; @@ -65,6 +67,9 @@ public class ActHistoryService { @Autowired protected TaskService taskService; + @Autowired + private TResourceMountApplyService tResourceMountApplyService; + @Autowired private SysUserService sysUserService; @@ -257,6 +262,12 @@ public class ActHistoryService { if (abilityApplicationDTO1 != null) { dto.setName(abilityApplicationDTO1.getSystem()); dto.setResourceId(abilityApplicationDTO.getResourceId()); + } else { + TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(dto.getBusinessKey())); + if (resourceMountApplyDTO != null) { + dto.setName(resourceMountApplyDTO.getResourceDTO().getName()); + dto.setResourceId(resourceMountApplyDTO.getResourceDTO().getId().toString()); + } } } if (dto.isEnded()) { // 已结束 From 45c87076c51559b678a1ceba5400ca00ee607a40 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 10:56:35 +0800 Subject: [PATCH 06/26] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=20=E5=A2=9E=E5=8A=A0=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resourceMountApply/dto/TResourceBatchMountApplyDTO.java | 3 +++ .../resourceMountApply/dto/TResourceMountApplyDTO.java | 3 +++ .../resourceMountApply/entity/TResourceMountApplyEntity.java | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceBatchMountApplyDTO.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceBatchMountApplyDTO.java index 22cd8853..de21eb36 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceBatchMountApplyDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceBatchMountApplyDTO.java @@ -33,4 +33,7 @@ public class TResourceBatchMountApplyDTO implements Serializable { @ApiModelProperty(value = "资源信息的信息") private List resourceDTO; + @ApiModelProperty(value = "附件") + private String enclosure; + } diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceMountApplyDTO.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceMountApplyDTO.java index 7de9393f..f27c946a 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceMountApplyDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/dto/TResourceMountApplyDTO.java @@ -40,6 +40,9 @@ public class TResourceMountApplyDTO implements Serializable { @ApiModelProperty(value = "申请的资源信息") private ResourceDTO resourceDTO; + @ApiModelProperty(value = "附件") + private String enclosure; + public ResourceDTO getResourceDTO() { if (this.parameterContent != null) { return JSON.parseObject(this.parameterContent, ResourceDTO.class); diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/entity/TResourceMountApplyEntity.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/entity/TResourceMountApplyEntity.java index 77796df4..91d5bd00 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/entity/TResourceMountApplyEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/entity/TResourceMountApplyEntity.java @@ -52,4 +52,9 @@ public class TResourceMountApplyEntity extends BaseEntity { * 参数内容 md5 */ private String parameterContentMd5; + + /** + * 附件 + */ + private String enclosure; } \ No newline at end of file From 22415f8a430e27a53b8245ee97191a1ff9f35d54 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 11:28:52 +0800 Subject: [PATCH 07/26] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=94=B3=E8=AF=B7=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renren/common/controller/AbilityCenterController.java | 1 + .../modules/processForm/dto/TAbilityApplicationDTO.java | 3 +++ .../processForm/dto/TAbilityBatchApplicationDTO.java | 3 +++ .../processForm/entity/TAbilityApplicationEntity.java | 6 ++++++ 4 files changed, 13 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java index 16b887b9..b3880a3e 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java @@ -80,6 +80,7 @@ public class AbilityCenterController { tAbilityApplicationDTO.setResourceId(index.get("resourceId")); tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser()); tAbilityApplicationDTO.setSystem(index.get("resourceName")); + tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件 // 仿照请求接口 /processForm/tabilityapplication ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class); tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据 diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java index 261dbafb..19b22051 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java @@ -42,4 +42,7 @@ public class TAbilityApplicationDTO implements Serializable { @ApiModelProperty(value = "用户id") private String userId; + @ApiModelProperty(value = "附件") + private String enclosure; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java index 7edbba6b..1ec3aaff 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java @@ -38,4 +38,7 @@ public class TAbilityBatchApplicationDTO implements Serializable { private String resourceId; @ApiModelProperty(value = "用户id") private String userId; + + @ApiModelProperty(value = "附件") + private String enclosure; } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java index 10bcaa8b..dbb30d6e 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java @@ -66,4 +66,10 @@ public class TAbilityApplicationEntity { * 用户id */ private String userId; + + + /** + * 附件 + */ + private String enclosure; } \ No newline at end of file From 8c333009837a8d9374ee747490152d2398ba042b Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 11:54:43 +0800 Subject: [PATCH 08/26] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/src/main/resources/logback-spring.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/resources/logback-spring.xml b/renren-admin/src/main/resources/logback-spring.xml index 1fcdc4b0..1baa41c2 100644 --- a/renren-admin/src/main/resources/logback-spring.xml +++ b/renren-admin/src/main/resources/logback-spring.xml @@ -12,7 +12,7 @@ ${LOG_HOME}/info.log ${LOG_HOME}/info.%d{yyyy-MM-dd}.%i.log - 120 + 12 50MB @@ -27,9 +27,9 @@ ${LOG_HOME}/error.log ${LOG_HOME}/error.%d{yyyy-MM-dd}.%i.log - 120 + 12 - 500MB + 50MB From 3b0ecebdfb3c676eb547daea713dacf06bf8c14b Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 13:54:07 +0800 Subject: [PATCH 09/26] =?UTF-8?q?=E9=99=84=E4=BB=B6=E7=9A=84=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renren/common/controller/ResourceMountController.java | 1 + .../java/io/renren/modules/resource/dto/ResourceDTO.java | 3 +++ .../io/renren/modules/resource/entity/ResourceEntity.java | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java index 30b9c005..b4d3e53b 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java @@ -74,6 +74,7 @@ public class ResourceMountController { tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index)); tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index))); tResourceMountApplyDTO.setResourceDTO(index); + tResourceMountApplyDTO.setEnclosure(tResourceBatchMountApplyDTO.getEnclosure()); ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class); tResourceMountApplyService.save(tResourceMountApplyDTO); // 保存单条资源申请记录 diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java index e8125bac..ce5bb875 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dto/ResourceDTO.java @@ -90,4 +90,7 @@ public class ResourceDTO implements Serializable { @ApiModelProperty(value = "属性信息") private List infoList; + @ApiModelProperty(value = "附件") + private String enclosure; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java b/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java index 63467f71..4a5d805f 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/entity/ResourceEntity.java @@ -128,4 +128,10 @@ public class ResourceEntity extends BaseEntity { * 备用字段 */ private String note5; + + + /** + * 附件 + */ + private String enclosure; } \ No newline at end of file From b04d8c86c91244a76d1d2ea221bdb51e5e4e512a Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 14:06:27 +0800 Subject: [PATCH 10/26] ... --- .../io/renren/common/controller/ResourceMountController.java | 2 +- .../renren/modules/resource/controller/ResourceController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java index b4d3e53b..8bb305a2 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java @@ -74,7 +74,7 @@ public class ResourceMountController { tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index)); tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index))); tResourceMountApplyDTO.setResourceDTO(index); - tResourceMountApplyDTO.setEnclosure(tResourceBatchMountApplyDTO.getEnclosure()); + tResourceMountApplyDTO.setEnclosure(index.getEnclosure()); ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class); tResourceMountApplyService.save(tResourceMountApplyDTO); // 保存单条资源申请记录 diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index d249bd43..15133d08 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -44,7 +44,7 @@ public class ResourceController { @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = "type", value = "类型", paramType = "query", required = true, dataType = "String"), - @ApiImplicitParam(name = "name", value = "资源名称", paramType = "query", dataType="String") , + @ApiImplicitParam(name = "name", value = "资源名称", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "creator", value = "创建者用户id", paramType = "query", dataType = "String") From d9da76cea0d1d4f454840b97ed2cca2b5dd57b31 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 14:22:14 +0800 Subject: [PATCH 11/26] ... --- .../controller/SysNoticeController.java | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/notice/controller/SysNoticeController.java b/renren-admin/src/main/java/io/renren/modules/notice/controller/SysNoticeController.java index 0c0d7fc8..28061d89 100644 --- a/renren-admin/src/main/java/io/renren/modules/notice/controller/SysNoticeController.java +++ b/renren-admin/src/main/java/io/renren/modules/notice/controller/SysNoticeController.java @@ -17,7 +17,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; @@ -26,13 +25,13 @@ import java.util.Map; /** -* 通知管理 -* -* @author Mark sunlightcs@gmail.com -*/ + * 通知管理 + * + * @author Mark sunlightcs@gmail.com + */ @RestController @RequestMapping("sys/notice") -@Api(tags="通知管理") +@Api(tags = "通知管理") public class SysNoticeController { @Autowired private SysNoticeService sysNoticeService; @@ -42,13 +41,13 @@ public class SysNoticeController { @GetMapping("page") @ApiOperation("分页") @ApiImplicitParams({ - @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") , - @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") , - @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") , - @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String") + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String") }) // @RequiresPermissions("sys:notice:all") - public Result> page(@ApiIgnore @RequestParam Map params){ + public Result> page(@ApiIgnore @RequestParam Map params) { PageData page = sysNoticeService.page(params); return new Result>().ok(page); @@ -57,13 +56,13 @@ public class SysNoticeController { @GetMapping("user/page") @ApiOperation("获取被通知的用户") @ApiImplicitParams({ - @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") , - @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") , - @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") , - @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"), + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), }) // @RequiresPermissions("sys:notice:all") - public Result> userPage(@ApiIgnore @RequestParam Map params){ + public Result> userPage(@ApiIgnore @RequestParam Map params) { PageData page = sysNoticeService.getNoticeUserPage(params); return new Result>().ok(page); @@ -72,12 +71,12 @@ public class SysNoticeController { @GetMapping("mynotice/page") @ApiOperation("获取我的通知") @ApiImplicitParams({ - @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") , - @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") , - @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") , - @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"), + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), }) - public Result> myNoticePage(@ApiIgnore @RequestParam Map params){ + public Result> myNoticePage(@ApiIgnore @RequestParam Map params) { PageData page = sysNoticeService.getMyNoticePage(params); return new Result>().ok(page); @@ -85,7 +84,7 @@ public class SysNoticeController { @PutMapping("mynotice/read/{noticeId}") @ApiOperation("标记我的通知为已读") - public Result read(@PathVariable("noticeId") Long noticeId){ + public Result read(@PathVariable("noticeId") Long noticeId) { sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), noticeId); return new Result(); @@ -93,7 +92,7 @@ public class SysNoticeController { @GetMapping("mynotice/unread") @ApiOperation("我的通知未读读") - public Result unRead(){ + public Result unRead() { int count = sysNoticeUserService.getUnReadNoticeCount(SecurityUser.getUserId()); return new Result().ok(count); @@ -102,7 +101,7 @@ public class SysNoticeController { @GetMapping("{id}") @ApiOperation("信息") // @RequiresPermissions("sys:notice:all") - public Result get(@PathVariable("id") Long id){ + public Result get(@PathVariable("id") Long id) { SysNoticeDTO data = sysNoticeService.get(id); return new Result().ok(data); @@ -112,7 +111,7 @@ public class SysNoticeController { @ApiOperation("保存") @LogOperation("保存") // @RequiresPermissions("sys:notice:all") - public Result save(@RequestBody SysNoticeDTO dto){ + public Result save(@RequestBody SysNoticeDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -125,7 +124,7 @@ public class SysNoticeController { @ApiOperation("修改") @LogOperation("修改") // @RequiresPermissions("sys:notice:all") - public Result update(@RequestBody SysNoticeDTO dto){ + public Result update(@RequestBody SysNoticeDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -138,7 +137,7 @@ public class SysNoticeController { @ApiOperation("删除") @LogOperation("删除") // @RequiresPermissions("sys:notice:all") - public Result delete(@RequestBody Long[] ids){ + public Result delete(@RequestBody Long[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); From efb58708e6c9ed17fb77e44af91811889c6db57e Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 5 May 2022 16:43:58 +0800 Subject: [PATCH 12/26] =?UTF-8?q?pom=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/pom.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index eb473c04..4828f39b 100644 --- a/renren-admin/pom.xml +++ b/renren-admin/pom.xml @@ -29,18 +29,21 @@ 2.2.9 2.7.1 2.0.2 + 2.9.0 + 2.4.17 + 2.5.1 io.renren renren-common - 2.9.0 + ${renren.version} io.renren renren-dynamic-datasource - 2.9.0 + ${renren.version} org.quartz-scheduler @@ -179,7 +182,7 @@ org.codehaus.groovy groovy-all - 2.4.17 + ${groovy-all.version} org.activiti @@ -213,7 +216,7 @@ com.belerweb pinyin4j - 2.5.1 + ${pinyin4j.version} From 01d4ff1157caf38e89668166ac69a0f910690a32 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 09:50:04 +0800 Subject: [PATCH 13/26] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=EF=BC=88=E9=9C=80=E6=B1=82=E8=AF=84=E8=AE=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TDemandCommentController.java | 30 +++++++++++++++++++ .../demandComment/dto/TDemandCommentDTO.java | 14 +++++---- .../impl/TDemandCommentServiceImpl.java | 15 ++++++++-- 3 files changed, 51 insertions(+), 8 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java b/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java index 040be75d..0e951400 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java @@ -15,6 +15,7 @@ import io.renren.modules.demanData.service.TDemandDataService; import io.renren.modules.demandComment.dto.TDemandCommentDTO; import io.renren.modules.demandComment.excel.TDemandCommentExcel; import io.renren.modules.demandComment.service.TDemandCommentService; +import io.renren.modules.security.user.SecurityUser; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -26,6 +27,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** @@ -55,16 +57,44 @@ public class TDemandCommentController { // @RequiresPermissions("demandComment:tdemandcomment:page") public Result> page(@ApiIgnore @RequestParam Map params) { PageData page = tDemandCommentService.page(params); + page.setList(page.getList().stream().map(index -> { + index.setDemandDataDTO(tDemandDataService.get(index.getTargetId())); + return index; + }).collect(Collectors.toList())); return new Result>().ok(page); } + @GetMapping("/myComment/page") + @ApiOperation("我的评论分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long") + }) +// @RequiresPermissions("demandComment:tdemandcomment:page") + public Result> myCommentPage(@ApiIgnore @RequestParam Map params) { + params.put("creator", SecurityUser.getUserId()); // + PageData page = tDemandCommentService.page(params); + page.setList(page.getList().stream().map(index -> { + index.setDemandDataDTO(tDemandDataService.get(index.getTargetId())); + return index; + }).collect(Collectors.toList())); + + return new Result>().ok(page); + } + + @GetMapping("/{id}") @ApiOperation("信息") // @RequiresPermissions("demandComment:tdemandcomment:info") public Result get(@PathVariable("id") Long id) { TDemandCommentDTO data = tDemandCommentService.get(id); + data.setDemandDataDTO(tDemandDataService.get(data.getTargetId())); + return new Result().ok(data); } diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java b/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java index 0496c01d..1adf54c2 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java @@ -1,5 +1,6 @@ package io.renren.modules.demandComment.dto; +import io.renren.modules.demanData.dto.TDemandDataDTO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,11 +9,11 @@ import java.io.Serializable; import java.util.Date; /** -* 需求评论 -* -* @author wangliwen wangliwen2@hisense.com -* @since 1.0 2022-04-26 -*/ + * 需求评论 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-04-26 + */ @Data @ApiModel(value = "需求评论") public class TDemandCommentDTO implements Serializable { @@ -42,4 +43,7 @@ public class TDemandCommentDTO implements Serializable { @ApiModelProperty(value = "备用字段") private String note5; + @ApiModelProperty(value = "评论所属需求主题") + private TDemandDataDTO demandDataDTO; + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java index 6812d950..e6b7472e 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java @@ -1,6 +1,7 @@ package io.renren.modules.demandComment.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import io.renren.common.service.impl.CrudServiceImpl; import io.renren.modules.demandComment.dao.TDemandCommentDao; import io.renren.modules.demandComment.dto.TDemandCommentDTO; @@ -22,9 +23,17 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl getWrapper(Map params) { QueryWrapper wrapper = new QueryWrapper<>(); - if (params.containsKey("targetId")) { - wrapper.eq("target_id", params.get("targetId")); - } + params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> { + switch (index) { + case "targetId": + wrapper.eq("target_id", params.get("targetId")); + break; + case "creator": + wrapper.eq(StringUtils.isNotBlank(params.get("creator").toString()), "creator", params.get("creator").toString()); + break; + } + }); + wrapper.groupBy("target_id"); return wrapper; } From 4566c0303bdcaa0162b8fad556f8d6b8b68568ad Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 10:06:36 +0800 Subject: [PATCH 14/26] ... --- .../demandComment/service/impl/TDemandCommentServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java index e6b7472e..513e13f9 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java @@ -33,7 +33,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl Date: Fri, 6 May 2022 10:59:27 +0800 Subject: [PATCH 15/26] =?UTF-8?q?=E9=9C=80=E6=B1=82=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=E4=B8=8E=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TDemandDataServiceImpl.java | 4 ++++ .../controller/TDemandCommentController.java | 3 ++- .../impl/TDemandCommentServiceImpl.java | 18 +++++++++++++++++- .../io/renren/common/constant/Constant.java | 7 +++++-- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demanData/service/impl/TDemandDataServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/demanData/service/impl/TDemandDataServiceImpl.java index a9f39cfe..53de3468 100644 --- a/renren-admin/src/main/java/io/renren/modules/demanData/service/impl/TDemandDataServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/demanData/service/impl/TDemandDataServiceImpl.java @@ -1,6 +1,7 @@ package io.renren.modules.demanData.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.renren.common.constant.Constant; import io.renren.common.service.impl.CrudServiceImpl; import io.renren.modules.demanData.dao.TDemandDataDao; import io.renren.modules.demanData.dto.TDemandDataDTO; @@ -34,6 +35,9 @@ public class TDemandDataServiceImpl extends CrudServiceImpl> page(@ApiIgnore @RequestParam Map params) { diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java index 513e13f9..87221b58 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java @@ -2,14 +2,19 @@ package io.renren.modules.demandComment.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import io.renren.common.constant.Constant; import io.renren.common.service.impl.CrudServiceImpl; +import io.renren.modules.demanData.service.TDemandDataService; import io.renren.modules.demandComment.dao.TDemandCommentDao; import io.renren.modules.demandComment.dto.TDemandCommentDTO; import io.renren.modules.demandComment.entity.TDemandCommentEntity; import io.renren.modules.demandComment.service.TDemandCommentService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; /** * 需求评论 @@ -19,6 +24,8 @@ import java.util.Map; */ @Service public class TDemandCommentServiceImpl extends CrudServiceImpl implements TDemandCommentService { + @Autowired + private TDemandDataService tDemandDataService; @Override public QueryWrapper getWrapper(Map params) { @@ -31,9 +38,18 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl() { + { + put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString()); + } + }).stream().map(index_ -> index_.getId()).collect(Collectors.toList()).toArray()); + } + break; } }); -// wrapper.groupBy("target_id"); + wrapper.orderByDesc("create_date"); return wrapper; } diff --git a/renren-common/src/main/java/io/renren/common/constant/Constant.java b/renren-common/src/main/java/io/renren/common/constant/Constant.java index 03ad1619..104bc037 100644 --- a/renren-common/src/main/java/io/renren/common/constant/Constant.java +++ b/renren-common/src/main/java/io/renren/common/constant/Constant.java @@ -2,9 +2,12 @@ package io.renren.common.constant; /** * 常量 - * */ public interface Constant { + /** + * 模糊查询时key + */ + String SEARCHKEY = "searchKey"; /** * 成功 */ @@ -34,7 +37,7 @@ public interface Constant { */ Long DICT_ROOT = 0L; /** - * 升序 + * 升序 */ String ASC = "asc"; /** From 953f4b628d5fe1f9087fa7d934f1c678fb3d446b Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 11:04:14 +0800 Subject: [PATCH 16/26] ... --- .../modules/demanData/controller/TDemandDataController.java | 3 ++- .../demandComment/controller/TDemandCommentController.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demanData/controller/TDemandDataController.java b/renren-admin/src/main/java/io/renren/modules/demanData/controller/TDemandDataController.java index f077d19d..3b07af35 100644 --- a/renren-admin/src/main/java/io/renren/modules/demanData/controller/TDemandDataController.java +++ b/renren-admin/src/main/java/io/renren/modules/demanData/controller/TDemandDataController.java @@ -48,7 +48,8 @@ public class TDemandDataController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"), @ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int"), - @ApiImplicitParam(name = "detailsType", value = "需求类型", paramType = "query", dataType = "String") + @ApiImplicitParam(name = "detailsType", value = "需求类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String") }) // @RequiresPermissions("demanData:tdemanddata:page") public Result> page(@ApiIgnore @RequestParam Map params) { diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java b/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java index a2b64551..310de68b 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/controller/TDemandCommentController.java @@ -53,7 +53,7 @@ public class TDemandCommentController { @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long"), - @ApiImplicitParam(name = "searchKey", value = "模糊查询关键字", paramType = "query", dataType = "String") + @ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String") }) // @RequiresPermissions("demandComment:tdemandcomment:page") public Result> page(@ApiIgnore @RequestParam Map params) { @@ -73,7 +73,8 @@ public class TDemandCommentController { @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long") + @ApiImplicitParam(name = "targetId", value = "评论主题id", paramType = "query", dataType = "Long"), + @ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String") }) // @RequiresPermissions("demandComment:tdemandcomment:page") public Result> myCommentPage(@ApiIgnore @RequestParam Map params) { From 5071dfed4a2aa5e090039d5d542623c655175b10 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 11:09:17 +0800 Subject: [PATCH 17/26] npe --- .../demandComment/service/impl/TDemandCommentServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java index 87221b58..f142d0bc 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java @@ -40,7 +40,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl() { + .in(StringUtils.isNotBlank(params.get("searchKey").toString()), "target_id", tDemandDataService.list(new HashMap() { { put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString()); } From 41e0508179bf1c2c1a728f5764cb3bb2ffc6bf28 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 11:15:23 +0800 Subject: [PATCH 18/26] =?UTF-8?q?=E5=AF=B9=E8=AF=84=E8=AE=BA=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B9=9F=E5=81=9A=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandComment/service/impl/TDemandCommentServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java index f142d0bc..17deab03 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/service/impl/TDemandCommentServiceImpl.java @@ -44,7 +44,8 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl index_.getId()).collect(Collectors.toList()).toArray()); + }).stream().map(index_ -> index_.getId()).collect(Collectors.toList()).toArray()) // 需求主题 + .or().like("comment", params.get(Constant.SEARCHKEY).toString()); // 评论内容 } break; } From d957021bd2092a720115d17bfd604a94f1f5aa6d Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 16:35:03 +0800 Subject: [PATCH 19/26] =?UTF-8?q?=E4=BD=BF=E7=94=A8assembly=20=E5=88=86?= =?UTF-8?q?=E7=A6=BB=E4=BE=9D=E8=B5=96=E4=B8=8E=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/pom.xml | 112 ++++++++++++++---- .../src/main/resources/assembly/assembly.xml | 63 ++++++++++ .../resources/assembly/bin/renren-admin.sh | 40 +++++++ 3 files changed, 192 insertions(+), 23 deletions(-) create mode 100644 renren-admin/src/main/resources/assembly/assembly.xml create mode 100644 renren-admin/src/main/resources/assembly/bin/renren-admin.sh diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index 4828f39b..bebc497a 100644 --- a/renren-admin/pom.xml +++ b/renren-admin/pom.xml @@ -222,37 +222,103 @@ ${project.artifactId} + + + src/main/resources + + + + + + src/main/resources + true + + application.properties + application-${profile.env}.properties + + + + - org.springframework.boot - spring-boot-maven-plugin + org.apache.maven.plugins + maven-jar-plugin - true + target/classes/ + + + false + + + io.renren.AdminApplication + false + + true + + lib/ + + + . + + + org.apache.maven.plugins - maven-surefire-plugin - - true - - - - com.spotify - docker-maven-plugin - ${docker.plugin.version} - - renren/${project.artifactId} - ${project.basedir}/ - - - / - ${project.build.directory} - ${project.build.finalName}.jar - - - + maven-assembly-plugin + + + make-tar.gz + + package + + + single + + + + + + + + + src/main/resources/assembly/assembly.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml new file mode 100644 index 00000000..34cb319e --- /dev/null +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -0,0 +1,63 @@ + + + 1.0 + + + tar.gz + + + + + + + true + lib + + + + + + + + src/main/resources/assembly/bin + + + 0755 + unix + true + + + + ${project.basedir}/lib + lib/ + + + + + src/main/resources + + *.yml + *.properties + *.json + + true + ${file.separator}config + + + + + target + / + + *.jar + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/assembly/bin/renren-admin.sh b/renren-admin/src/main/resources/assembly/bin/renren-admin.sh new file mode 100644 index 00000000..2464f423 --- /dev/null +++ b/renren-admin/src/main/resources/assembly/bin/renren-admin.sh @@ -0,0 +1,40 @@ +#! /bin/bash +#chkconfig: 2345 85 15 +#description:auto_run +#processname:zf +#JAR根位置 +JAR_ROOT=`pwd` +#JAR位置 +JAR_PATH="$JAR_ROOT"/renren-admin.jar + +#LOG位置 +LOG_PATH=/dev/null + +#开始方法 +start() { + cd $JAR_ROOT + nohup java -Dfile.encoding=utf-8 -server -Xms256m -Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./ -jar $JAR_PATH --server.port=8888 >$LOG_PATH 2>&1 & + echo "$JAR_PATH start success." +} + +#结束方法 +stop() { + kill -9 `ps -ef|grep $JAR_PATH|grep -v grep|grep -v stop|awk '{print $2}'` + echo "$JAR_PATH stop success." +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + stop + start + ;; +*) + echo "Userage: $0 {start|stop|restart}" + exit 1 +esac From 048861c2c62fbe0dbe8f2fac486ddb366bbb1328 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 16:49:14 +0800 Subject: [PATCH 20/26] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/src/main/resources/assembly/bin/renren-admin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/resources/assembly/bin/renren-admin.sh b/renren-admin/src/main/resources/assembly/bin/renren-admin.sh index 2464f423..71e9114b 100644 --- a/renren-admin/src/main/resources/assembly/bin/renren-admin.sh +++ b/renren-admin/src/main/resources/assembly/bin/renren-admin.sh @@ -13,7 +13,7 @@ LOG_PATH=/dev/null #开始方法 start() { cd $JAR_ROOT - nohup java -Dfile.encoding=utf-8 -server -Xms256m -Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./ -jar $JAR_PATH --server.port=8888 >$LOG_PATH 2>&1 & + nohup java -Dfile.encoding=utf-8 -server -Xms256m -Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./ -jar $JAR_PATH >$LOG_PATH 2>&1 & echo "$JAR_PATH start success." } From 25baa8b7751a852d5a0f76aff0590a2f0d1d9bb8 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 17:00:37 +0800 Subject: [PATCH 21/26] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E6=8A=8A=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=A1=B9=E7=9B=AE=E7=9A=84=E8=BE=93=E5=87=BAjar?= =?UTF-8?q?=E5=8C=85=E5=B9=B6=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/assembly/assembly.xml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml index 34cb319e..8edcf41e 100644 --- a/renren-admin/src/main/resources/assembly/assembly.xml +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -12,8 +12,17 @@ - - true + + false + system + + lib + + + + false + runtime + lib From 497a9b6d43fb5e4f503aa91297432f37a9b58fbf Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 17:03:05 +0800 Subject: [PATCH 22/26] ... --- renren-admin/src/main/resources/assembly/assembly.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml index 8edcf41e..525963e5 100644 --- a/renren-admin/src/main/resources/assembly/assembly.xml +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -43,10 +43,10 @@ true - - ${project.basedir}/lib - lib/ - + + + + From 4a94caddd3996c11855e8ed55907dd488873f65c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 20:32:36 +0800 Subject: [PATCH 23/26] ... --- .../modules/resource/service/impl/ResourceServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 446db103..626a9654 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -77,7 +77,10 @@ public class ResourceServiceImpl extends CrudServiceImpl Date: Fri, 6 May 2022 20:33:48 +0800 Subject: [PATCH 24/26] ... --- .../modules/resource/service/impl/ResourceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 626a9654..2dd7d33b 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -79,7 +79,7 @@ public class ResourceServiceImpl extends CrudServiceImpl Date: Sat, 7 May 2022 10:18:39 +0800 Subject: [PATCH 25/26] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=80=85=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87=E5=90=8E=20?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=94=B3=E8=AF=B7=E5=AE=A1=E6=A0=B8=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AbilityCenterController.java | 3 ++ .../dto/TAbilityApplicationDTO.java | 6 ++++ .../dto/TAbilityBatchApplicationDTO.java | 6 ++++ .../entity/TAbilityApplicationEntity.java | 9 +++++ .../listener/CorrectionListener.java | 35 +++++++++++++++---- .../src/main/resources/assembly/assembly.xml | 5 --- 6 files changed, 53 insertions(+), 11 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java index b3880a3e..20bbcc25 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java @@ -81,6 +81,9 @@ public class AbilityCenterController { tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser()); tAbilityApplicationDTO.setSystem(index.get("resourceName")); tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件 + tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId()); + tAbilityApplicationDTO.setApproveStatus("审核中"); + tAbilityApplicationDTO.setDelFlag(0); // 仿照请求接口 /processForm/tabilityapplication ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class); tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据 diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java index 19b22051..48fcc350 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java @@ -42,6 +42,12 @@ public class TAbilityApplicationDTO implements Serializable { @ApiModelProperty(value = "用户id") private String userId; + @ApiModelProperty(value = "审核状态:审核中,通过,不通过") + private String approveStatus; + + @ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他") + private Integer delFlag; + @ApiModelProperty(value = "附件") private String enclosure; diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java index 1ec3aaff..e5d54d1b 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java @@ -39,6 +39,12 @@ public class TAbilityBatchApplicationDTO implements Serializable { @ApiModelProperty(value = "用户id") private String userId; + @ApiModelProperty(value = "审核状态:审核中,通过,不通过") + private String approveStatus; + + @ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他") + private Integer delFlag; + @ApiModelProperty(value = "附件") private String enclosure; } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java index dbb30d6e..5ceb42dc 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java @@ -67,6 +67,15 @@ public class TAbilityApplicationEntity { */ private String userId; + /** + * 审核状态:审核中,通过,不通过 + */ + private String approveStatus; + + /** + * 删除标记:0:正常使用;1:已删除;9:其他 + */ + private Integer delFlag; /** * 附件 diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java index ef2b3809..82b6acbd 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java @@ -3,6 +3,7 @@ package io.renren.modules.processForm.listener; import com.google.gson.Gson; import com.google.gson.JsonElement; import io.renren.modules.processForm.dto.TAbilityApplicationDTO; +import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.sys.dto.SysDeptDTO; @@ -49,6 +50,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti @Autowired private ResourceService resourceService; + @Autowired + private TAbilityApplicationService tAbilityApplicationService; @Override public void notify(DelegateTask delegateTask) { @@ -65,12 +68,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti @Override public void notify(DelegateExecution delegateExecution) throws Exception { -// logger.error("事件:" + delegateExecution.getEventName()); -// delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index)); -// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString())); -// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置 -// -// logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey()); + logger.error("----------------------进入部门审批结束节点---------------------------"); + delegateExecution.getProcessBusinessKey(); + final String eventName = delegateExecution.getEventName(); + switch (eventName) { + case EVENTNAME_END: + endTake(delegateExecution.getVariables()); + break; + } } @Override @@ -89,6 +94,24 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti logger.error("异常", delegateExecution); } + + /** + * 结束审批 + * + * @param kv + */ + private void endTake(Map kv) { // 进入最后结束节点 + Gson gson = new Gson(); + JsonElement jsonElement = gson.toJsonTree(kv); + TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class); + if (abilityApplicationDTO != null) { + abilityApplicationDTO.setDelFlag(0); + abilityApplicationDTO.setApproveStatus("通过"); + tAbilityApplicationService.update(abilityApplicationDTO); + logger.error("审批通过!申请id:" + abilityApplicationDTO.getId()); + } + } + /** * 节点创建时动态分配资源部门审核人 * diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml index 525963e5..3915ee0a 100644 --- a/renren-admin/src/main/resources/assembly/assembly.xml +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -43,11 +43,6 @@ true - - - - - src/main/resources From 6e5d988f16308310a156c79b795a418a7cb4e6f7 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 9 May 2022 10:47:03 +0800 Subject: [PATCH 26/26] =?UTF-8?q?=E6=89=93=E5=8C=85=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8C=85=E6=97=B6=20=E6=8E=92=E9=99=A4prod=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index bebc497a..87a89f6f 100644 --- a/renren-admin/pom.xml +++ b/renren-admin/pom.xml @@ -226,7 +226,8 @@ src/main/resources - + + application-prod.yml