暂时提交,无意义
diff --git a/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/controller/Api1AuditNodeController.java b/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/controller/Api1AuditNodeController.java
index 68a081a..0da6b5e 100644
--- a/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/controller/Api1AuditNodeController.java
+++ b/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/controller/Api1AuditNodeController.java
@@ -1,13 +1,23 @@
package com.supwisdom.leaveschool.leaving.controller;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.util.MimeTypeUtils;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.supwisdom.leaveschool.common.controller.api.CrudApiController;
+import com.supwisdom.leaveschool.common.model.PagerRequestModel;
+import com.supwisdom.leaveschool.common.model.PagerResponseModel;
import com.supwisdom.leaveschool.leaving.domain.AuditNode;
import com.supwisdom.leaveschool.leaving.repository.AuditNodeRepository;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+
@RestController
@RequestMapping("/api/v1/leaving/audit_node")
public class Api1AuditNodeController extends CrudApiController<AuditNode, AuditNodeRepository>{
@@ -20,6 +30,41 @@
return auditNodeRepository;
}
+ @GetMapping(path = "/getById",produces = MimeTypeUtils.APPLICATION_JSON_VALUE)
+ @ResponseStatus(value = HttpStatus.OK)
+ @ApiOperation(value="根据ID获取审核环节",notes="注意问题点")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "ID", required = false, dataType = "string", paramType = "query", defaultValue = "")
+ })
+ public AuditNode getById(String id) {
+ if (id == null || id.length() == 0) {
+ throw new RuntimeException("exception.get.id.must.not.empty"); // FIXME: RestException
+ }
+ AuditNode auditNode = auditNodeRepository.selectById(id);
+ if(auditNode==null) {
+ throw new RuntimeException("exception.get.domain.not.exist"); // FIXME: RestException
+ }else {
+ return auditNode;
+ }
+ }
+
+ @GetMapping(path = "/pageList",produces = MimeTypeUtils.APPLICATION_JSON_VALUE)
+ @ResponseStatus(value = HttpStatus.OK)
+ @ApiOperation(value="根据查询条件获取审核环节列表",notes="注意问题点")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "pageIndex", value = "当前第页数,默认0,为第一页", dataType = "int",required = true, paramType = "query", defaultValue = "0"),
+ @ApiImplicitParam(name = "pageSize", value = "每页条数,默认20", dataType = "int",required = true, paramType = "query", defaultValue = "20"),
+ @ApiImplicitParam(name = "name", value = "审核环节名称", dataType = "string",required = false, paramType = "query", defaultValue = ""),
+ @ApiImplicitParam(name = "auditType", value = "审核方式", dataType = "string",required = false, paramType = "query", defaultValue = "")
+ })
+ public PagerResponseModel<AuditNode> list(String name,String auditType, PagerRequestModel pagerRequestModel){
+
+
+ return null;
+
+ }
+
+
diff --git a/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/domain/AuditNode.java b/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/domain/AuditNode.java
index f2663c7..1448365 100644
--- a/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/domain/AuditNode.java
+++ b/leaveschool/leaving/src/main/java/com/supwisdom/leaveschool/leaving/domain/AuditNode.java
@@ -2,7 +2,6 @@
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -95,6 +94,14 @@
this.contact = contact;
}
+ public Department getDepartment() {
+ return department;
+ }
+
+ public void setDepartment(Department department) {
+ this.department = department;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -143,5 +150,4 @@
this.auditNodeAddress = auditNodeAddress;
}
-
}