diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml
index eb473c04..87a89f6f 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,43 +216,110 @@
com.belerweb
pinyin4j
- 2.5.1
+ ${pinyin4j.version}
${project.artifactId}
+
+
+ src/main/resources
+
+
+ application-prod.yml
+
+
+
+ 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/java/io/renren/common/controller/AbilityCenterController.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java
index 16b887b9..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
@@ -80,6 +80,10 @@ public class AbilityCenterController {
tAbilityApplicationDTO.setResourceId(index.get("resourceId"));
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/common/controller/ResourceMountController.java b/renren-admin/src/main/java/io/renren/common/controller/ResourceMountController.java
index 30b9c005..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,6 +74,7 @@ public class ResourceMountController {
tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index));
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
tResourceMountApplyDTO.setResourceDTO(index);
+ 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/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()) { // 已结束
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/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) {
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"),
+ @ApiImplicitParam(name = Constant.SEARCHKEY, value = "模糊查询关键字", paramType = "query", dataType = "String")
+ })
+// @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..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
@@ -1,14 +1,20 @@
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;
/**
* 需求评论
@@ -18,13 +24,33 @@ import java.util.Map;
*/
@Service
public class TDemandCommentServiceImpl extends CrudServiceImpl implements TDemandCommentService {
+ @Autowired
+ private TDemandDataService tDemandDataService;
@Override
public QueryWrapper 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;
+ case Constant.SEARCHKEY: {
+ wrapper
+ .in(StringUtils.isNotBlank(params.get("searchKey").toString()), "target_id", tDemandDataService.list(new HashMap() {
+ {
+ put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString());
+ }
+ }).stream().map(index_ -> index_.getId()).collect(Collectors.toList()).toArray()) // 需求主题
+ .or().like("comment", params.get(Constant.SEARCHKEY).toString()); // 评论内容
+ }
+ break;
+ }
+ });
+ wrapper.orderByDesc("create_date");
return wrapper;
}
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");
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..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,4 +42,13 @@ 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;
+
}
\ 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..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
@@ -38,4 +38,13 @@ public class TAbilityBatchApplicationDTO implements Serializable {
private String resourceId;
@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 9a597057..6ed5f847 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,21 @@ public class TAbilityApplicationEntity {
*/
private String userId;
+ /**
+ * 审核状态:审核中,通过,不通过
+ */
+ private String approveStatus;
+
+ /**
+ * 删除标记:0:正常使用;1:已删除;9:其他
+ */
+ private Integer delFlag;
+
+ /**
+ * 附件
+ */
+ private String enclosure;
+
/**
* 流程通过后api网关注册的认证code,用于三方接口调用
*/
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 0c608559..5b6de29d 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
@@ -1,10 +1,10 @@
package io.renren.modules.processForm.listener;
-import cn.hutool.core.lang.UUID;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.service.ApiGatewayService;
+import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.entity.ResourceEntity;
import io.renren.modules.resource.service.ResourceService;
@@ -57,6 +57,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
@Autowired
private ResourceService resourceService;
+ @Autowired
+ private TAbilityApplicationService tAbilityApplicationService;
@Override
public void notify(DelegateTask delegateTask) {
@@ -66,9 +68,6 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
case EVENTNAME_CREATE:
create(delegateTask);
break;
- case EVENTNAME_COMPLETE:
- complete(delegateTask);
- break;
default:
}
logger.error("-------------------------结束部门动态审批人流程-------------------------------");
@@ -76,12 +75,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
@@ -100,6 +101,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/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")
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
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..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
@@ -77,7 +77,10 @@ public class ResourceServiceImpl extends CrudServiceImpl 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
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 a6f907c5..6472dddf 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,10 +53,11 @@ 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) {
- case EVENTNAME_TAKE: {
+ case EVENTNAME_END: {
endTake(execution.getVariables());
}
break;
@@ -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())); // 发布到应用网关
}
}
@@ -165,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);
@@ -174,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");
@@ -187,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");
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..3915ee0a
--- /dev/null
+++ b/renren-admin/src/main/resources/assembly/assembly.xml
@@ -0,0 +1,67 @@
+
+
+ 1.0
+
+
+ tar.gz
+
+
+
+
+
+
+ false
+ system
+
+ lib
+
+
+
+ false
+ runtime
+
+ lib
+
+
+
+
+
+
+
+ src/main/resources/assembly/bin
+
+
+ 0755
+ unix
+ true
+
+
+
+
+ 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..71e9114b
--- /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 >$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
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
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";
/**