Browse Source

更新nacos、sentinel依赖

test
smallchill 6 years ago
parent
commit
d19b396535
  1. 5
      blade-service/blade-desk/pom.xml
  2. 13
      blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java
  3. 5
      pom.xml

5
blade-service/blade-desk/pom.xml

@ -37,6 +37,11 @@
<artifactId>blade-dict-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-user-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-flow-api</artifactId>

13
blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java

@ -20,12 +20,10 @@ import lombok.AllArgsConstructor;
import org.springblade.common.cache.CacheNames;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.desk.entity.ProcessLeave;
import org.springblade.desk.service.ILeaveService;
import org.springblade.flowable.core.constant.ProcessConstant;
import org.springblade.flowable.core.entity.BladeFlow;
import org.springblade.flowable.core.feign.IFlowClient;
import org.springblade.system.user.cache.UserCache;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@ -41,21 +39,16 @@ import springfox.documentation.annotations.ApiIgnore;
public class LeaveController extends BladeController implements CacheNames {
private ILeaveService leaveService;
private IFlowClient flowClient;
/**
* 详情
*
* @param taskId 任务主键
* @param businessId 主键
*/
@GetMapping("detail")
public R<ProcessLeave> detail(String taskId, Integer businessId) {
public R<ProcessLeave> detail(Integer businessId) {
ProcessLeave detail = leaveService.getById(businessId);
R<Object> result = flowClient.taskVariable(taskId, ProcessConstant.TASK_VARIABLE_CREATE_USER);
if (result.isSuccess()) {
detail.getFlow().setAssigneeName(Func.toStr(result.getData(), "暂无"));
}
detail.getFlow().setAssigneeName(UserCache.getUser(detail.getCreateUser()).getName());
return R.data(detail);
}

5
pom.xml

@ -20,11 +20,12 @@
<curator.framework.version>4.0.1</curator.framework.version>
<protostuff.version>1.6.0</protostuff.version>
<flowable.version>6.4.1</flowable.version>
<alibaba.cloud.version>0.2.1.RELEASE</alibaba.cloud.version>
<spring.boot.admin.version>2.1.2</spring.boot.admin.version>
<alibaba.cloud.version>0.9.0.RELEASE</alibaba.cloud.version>
<spring.boot.version>2.1.3.RELEASE</spring.boot.version>
<spring.cloud.version>Greenwich.RELEASE</spring.cloud.version>
<spring.cloud.version>Greenwich.SR1</spring.cloud.version>
<spring.platform.version>Cairo-SR7</spring.platform.version>
<!-- 推荐使用Harbor -->

Loading…
Cancel
Save