swagger接口文档

master
shijie 4 years ago
parent b8e8868747
commit 7c1ee361e0
  1. 33
      src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java
  2. 183
      src/main/java/com/yipin/liuwanr/entity/Judgment_Points.java
  3. 11
      src/main/java/com/yipin/liuwanr/entity/ManagementAndPointVo.java
  4. 307
      src/main/java/com/yipin/liuwanr/entity/Project_Management.java
  5. 6
      src/main/java/com/yipin/liuwanr/entity/Role.java

@ -198,8 +198,8 @@ public class Project_ManagementController {
@ApiOperation(value = "实验任务列表", notes = "实验任务列表") @ApiOperation(value = "实验任务列表", notes = "实验任务列表")
@GetMapping("/getByjudgmentPointsId") @GetMapping("/getByjudgmentPointsId")
Response getByjudgmentPointsId(@ApiParam(name = "judgmentPointsIds", value = "判分点主键id", required = true) @RequestParam List<Integer> judgmentPointsIds, Response getByjudgmentPointsId(@ApiParam(name = "judgmentPointsIds", value = "判分点主键id", required = true) @RequestParam List<Integer> judgmentPointsIds,
@ApiParam(name = "projectId", value = "项目主键ID", required = false) @RequestParam(required = false) Integer projectId, @ApiParam(name = "projectId", value = "项目主键ID", required = false) @RequestParam(required = false) Integer projectId,
@ApiParam(name = "userId", value = "用户主键ID", required = false) @RequestParam(required = false) Integer userId) { @ApiParam(name = "userId", value = "用户主键ID", required = false) @RequestParam(required = false) Integer userId) {
Response resp = new Response(); Response resp = new Response();
HashMap<String, Object> ret = service.getByjudgmentPointsId(judgmentPointsIds, projectId, userId); HashMap<String, Object> ret = service.getByjudgmentPointsId(judgmentPointsIds, projectId, userId);
int status = (int) ret.get("retcode"); int status = (int) ret.get("retcode");
@ -239,6 +239,11 @@ public class Project_ManagementController {
/** /**
* 添加角色 * 添加角色
* {
* "roleNumber": "1",
* "roleType": "0",
* "roleAttribute": "0"
* }
* *
* @param role 角色 * @param role 角色
* @return * @return
@ -268,7 +273,7 @@ public class Project_ManagementController {
*/ */
@ApiOperation(value = "实验数据列表", notes = "实验数据列表") @ApiOperation(value = "实验数据列表", notes = "实验数据列表")
@GetMapping("/getByRoleId") @GetMapping("/getByRoleId")
Response getByRoleId(@ApiParam(name = "roleId", value = "角色id", required = true) @RequestParam List<Integer> roleId) { Response getByRoleId(@ApiParam(name = "roleId", value = "角色id", required = true) @RequestParam List<Integer> roleId) {
Response resp = new Response(); Response resp = new Response();
HashMap<String, Object> ret = service.getByRoleId(roleId); HashMap<String, Object> ret = service.getByRoleId(roleId);
int status = (int) ret.get("retcode"); int status = (int) ret.get("retcode");
@ -284,6 +289,28 @@ public class Project_ManagementController {
/** /**
* 添加创建项目管理信息 * 添加创建项目管理信息
* {
* "management": {
* "projectName": "111",
* "projectPermissions": 0,
* "experimentalGoal": "111",
* "caseDescription": "111",
* "systemId": "1",
* "userId": "4",
* "experimentSuggests": "111",
* "state": 1,
* "founder": 1,
* "isstartexperimental": 0,
* "isstartexperimentSuggests": 0
* },
* "pooints": [{
* "judgmentPointsId": 184,
* "judgmentPointsName": "列表——元素的修改 ",
* "experimentalRequirements": "新学期开始,老师组织了学习小组,该学习小组有A,B,C,D五个学生\nList1=[''A'',''B'',''C'',''D'']\n列表元素-修改-请使用下标索引\n第三天上课,老师发现把E同学的名字打错了,应该T。请修改并打印本小组的全体学生",
* "score": "100"
* }],
* "roleId": [403]
* }
* *
* @param vo 项目管理信息 * @param vo 项目管理信息
* @return * @return

@ -1,93 +1,110 @@
package com.yipin.liuwanr.entity; package com.yipin.liuwanr.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/** /**
* 判分表 * 判分表
* "pooints": [{
* "judgmentPointsId": 184,
* "judgmentPointsName": "列表——元素的修改 ",
* "experimentalRequirements": "新学期开始,老师组织了学习小组,该学习小组有A,B,C,D五个学生\nList1=[''A'',''B'',''C'',''D'']\n列表元素-修改-请使用下标索引\n第三天上课,老师发现把E同学的名字打错了,应该T。请修改并打印本小组的全体学生",
* "score": "100"
* }],
*/ */
@ApiModel(value = "Judgment_Points对象", description = "判分点对象Judgment_Points")
public class Judgment_Points { public class Judgment_Points {
@ApiModelProperty(value = "判分点主键Id", name = "judgmentPointsId", example = "184", required = true)
private Integer judgmentPointsId;// 判分点主键Id private Integer judgmentPointsId;// 判分点主键Id
private String judgmentPointsName;// 判分点名称 @ApiModelProperty(value = "判分点名称", name = "judgmentPointsName", example = "列表——元素的修改", required = true)
private String experimentalRequirements;//实验要求 private String judgmentPointsName;// 判分点名称
private String projectId;//绑定项目管理Id @ApiModelProperty(value = "实验要求", name = "experimentalRequirements", example = "新学期开始,老师组织了学习小组,该学习小组有A,B,C,D五个学生\\nList1=[''A'',''B'',''C'',''D'']\\n列表元素-修改-请使用下标索引\\n第三天上课,老师发现把E同学的名字打错了,应该T。请修改并打印本小组的全体学生", required = true)
private Integer judgmentPointsType;// 判分点类型(1、编程类 2、交易类 3、工具类 4、业务类) private String experimentalRequirements;//实验要求
private Integer isdel;// 是否删除(0、未删除 1、已删除) @ApiModelProperty(hidden = true)
private Integer systemId; private String projectId;//绑定项目管理Id
private Integer userId; @ApiModelProperty(hidden = true)
private Integer judgmentPointsType;// 判分点类型(1、编程类 2、交易类 3、工具类 4、业务类)
private Integer score;//判分点指标的分数 @ApiModelProperty(hidden = true)
private Integer isdel;// 是否删除(0、未删除 1、已删除)
public Integer getSystemId() { @ApiModelProperty(hidden = true)
return systemId; private Integer systemId;
} @ApiModelProperty(hidden = true)
private Integer userId;
public void setSystemId(Integer systemId) { @ApiModelProperty(value = "判分点指标的分数", name = "score", example = "100", required = true)
this.systemId = systemId; private Integer score;//判分点指标的分数
}
public Integer getSystemId() {
public Integer getUserId() { return systemId;
return userId; }
}
public void setSystemId(Integer systemId) {
public void setUserId(Integer userId) { this.systemId = systemId;
this.userId = userId; }
}
public Integer getUserId() {
public Integer getScore() { return userId;
return score; }
}
public void setUserId(Integer userId) {
public void setScore(Integer score) { this.userId = userId;
this.score = score; }
}
public Integer getScore() {
public Integer getJudgmentPointsId() { return score;
return judgmentPointsId; }
}
public void setScore(Integer score) {
public void setJudgmentPointsId(Integer judgmentPointsId) { this.score = score;
this.judgmentPointsId = judgmentPointsId; }
}
public Integer getJudgmentPointsId() {
public String getJudgmentPointsName() { return judgmentPointsId;
return judgmentPointsName; }
}
public void setJudgmentPointsId(Integer judgmentPointsId) {
public void setJudgmentPointsName(String judgmentPointsName) { this.judgmentPointsId = judgmentPointsId;
this.judgmentPointsName = judgmentPointsName; }
}
public String getJudgmentPointsName() {
public String getExperimentalRequirements() { return judgmentPointsName;
return experimentalRequirements; }
}
public void setJudgmentPointsName(String judgmentPointsName) {
public void setExperimentalRequirements(String experimentalRequirements) { this.judgmentPointsName = judgmentPointsName;
this.experimentalRequirements = experimentalRequirements; }
}
public String getExperimentalRequirements() {
public String getProjectId() { return experimentalRequirements;
return projectId; }
}
public void setExperimentalRequirements(String experimentalRequirements) {
public void setProjectId(String projectId) { this.experimentalRequirements = experimentalRequirements;
this.projectId = projectId; }
}
public String getProjectId() {
public Integer getJudgmentPointsType() { return projectId;
return judgmentPointsType; }
}
public void setProjectId(String projectId) {
public void setJudgmentPointsType(Integer judgmentPointsType) { this.projectId = projectId;
this.judgmentPointsType = judgmentPointsType; }
}
public Integer getJudgmentPointsType() {
public Integer getIsdel() { return judgmentPointsType;
return isdel; }
}
public void setJudgmentPointsType(Integer judgmentPointsType) {
public void setIsdel(Integer isdel) { this.judgmentPointsType = judgmentPointsType;
this.isdel = isdel; }
}
public Integer getIsdel() {
return isdel;
}
public void setIsdel(Integer isdel) {
this.isdel = isdel;
}
} }

@ -1,17 +1,20 @@
package com.yipin.liuwanr.entity; package com.yipin.liuwanr.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.List; import java.util.List;
@ApiModel(value = "ManagementAndPointVo对象", description = "添加项目管理对象ManagementAndPointVo")
public class ManagementAndPointVo { public class ManagementAndPointVo {
@ApiModelProperty(value = "项目管理实体类", name = "management", required = true)
private Project_Management management;//项目管理 private Project_Management management;//项目管理
@ApiModelProperty(example = "key:判分点主键 value:分数", required = true) //@ApiModelProperty(value = "判分点信息列表,key:判分点主键 value:分数", name = "pooints", example = "[{\"judgmentPointsId\":184,\"judgmentPointsName\":\"列表——元素的修改 \",\"experimentalRequirements\":\"新学期开始,老师组织了学习小组,该学习小组有A,B,C,D五个学生\\nList1=[''A'',''B'',''C'',''D'']\\n列表元素-修改-请使用下标索引\\n第三天上课,老师发现把E同学的名字打错了,应该T。请修改并打印本小组的全体学生\",\"score\":\"100\"}]", required = true)
private List<Judgment_Points> pooints;//判分点信息 @ApiModelProperty(value = "判分点信息列表,key:判分点主键 value:分数", name = "pooints", required = true)
private List<Judgment_Points> pooints;//判分点信息
@ApiModelProperty(example = "角色id", required = true) @ApiModelProperty(value = "角色id列表", name = "roleId", example = "[403]", required = true)
private List<Integer> roleId;//存储角色id private List<Integer> roleId;//存储角色id
public Project_Management getManagement() { public Project_Management getManagement() {

@ -5,222 +5,221 @@ import io.swagger.annotations.ApiModelProperty;
/** /**
* 项目管理 * 项目管理
*
* @author 86151
* *
* @author 86151
*/ */
@ApiModel(value = "Project_Management对象", description = "项目管理对象Project_Management") @ApiModel(value = "Project_Management对象", description = "项目管理对象Project_Management")
public class Project_Management { public class Project_Management {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private Integer projectId;// 项目主键ID private Integer projectId;// 项目主键ID
@ApiModelProperty(example = "大庆项目", required = true) @ApiModelProperty(value = "项目名称", name = "projectName", example = "python教学项目", required = true)
private String projectName;// 项目名称 private String projectName;// 项目名称
@ApiModelProperty(example = "(0、练习 1、考核 2、竞赛)", required = true) @ApiModelProperty(value = "项目权限(0、练习 1、考核 2、竞赛)", name = "projectPermissions", example = "0", required = true)
private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛) private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛)
@ApiModelProperty(example = "创建人(0、系统 1、老师)", required = true) @ApiModelProperty(value = "创建人(0、系统 1、老师)", name = "founder", example = "0", required = true)
private Integer founder;// 创建人(0、系统 1、老师) private Integer founder;// 创建人(0、系统 1、老师)
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private String creationTime;// 创建时间 private String creationTime;// 创建时间
@ApiModelProperty(example = "状态(0、草稿箱 1、已发布)", required = true) @ApiModelProperty(value = "状态(0、草稿箱 1、已发布)", name = "state", example = "0", required = true)
private Integer state;// 状态(0、草稿箱 1、已发布) private Integer state;// 状态(0、草稿箱 1、已发布)
@ApiModelProperty(example = "实验目标", required = true) @ApiModelProperty(value = "实验目标", name = "experimentalGoal", example = "学会十以内加减法", required = true)
private String experimentalGoal;// 实验目标 private String experimentalGoal;// 实验目标
@ApiModelProperty(example = "案例描述", required = true) @ApiModelProperty(value = "案例描述", name = "caseDescription", example = "一加一等于二", required = true)
private String caseDescription; // 案例描述 private String caseDescription; // 案例描述
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private String experimentTask;// 实验任务 private String experimentTask;// 实验任务
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private String experimentalDataId;// 绑定实验数据ID private String experimentalDataId;// 绑定实验数据ID
@ApiModelProperty(example = "实验提示", required = true) @ApiModelProperty(value = "实验提示", name = "experimentSuggests", example = "一加一等于二", required = true)
private String experimentSuggests; // 实验提示 private String experimentSuggests; // 实验提示
@ApiModelProperty(example = "绑定服务配置ID", required = true) @ApiModelProperty(value = "绑定服务配置ID", name = "systemId", example = "1", required = true)
private Integer systemId;// 绑定服务配置ID private Integer systemId;// 绑定服务配置ID
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private Integer isdel; private Integer isdel;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private Integer isShow; private Integer isShow;
@ApiModelProperty(example = "是否启用实验数据(0启用 1不启用)", required = true) @ApiModelProperty(value = "是否启用实验数据(0启用 1不启用)", name = "isstartexperimental", example = "0", required = true)
private Integer isstartexperimental;//是否启用实验数据(0启用 1不启用) private Integer isstartexperimental;//是否启用实验数据(0启用 1不启用)
@ApiModelProperty(example = "是否启用实验提示(0启用 1不启用)", required = true) @ApiModelProperty(value = "是否启用实验提示(0启用 1不启用)", name = "isstartexperimentSuggests", example = "0", required = true)
private Integer isstartexperimentSuggests; private Integer isstartexperimentSuggests;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private Integer isExperiment; private Integer isExperiment;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private Integer isAttendance; private Integer isAttendance;
@ApiModelProperty(example = "用户ID", required = true) @ApiModelProperty(value = "用户ID", name = "userId", example = "4", required = true)
private Integer userId; private Integer userId;
public Integer getUserId() { public Integer getUserId() {
return userId; return userId;
} }
public void setUserId(Integer userId) { public void setUserId(Integer userId) {
this.userId = userId; this.userId = userId;
} }
public Integer getIsstartexperimental() { public Integer getIsstartexperimental() {
return isstartexperimental; return isstartexperimental;
} }
public void setIsstartexperimental(Integer isstartexperimental) { public void setIsstartexperimental(Integer isstartexperimental) {
this.isstartexperimental = isstartexperimental; this.isstartexperimental = isstartexperimental;
} }
public Integer getIsstartexperimentSuggests() { public Integer getIsstartexperimentSuggests() {
return isstartexperimentSuggests; return isstartexperimentSuggests;
} }
public void setIsstartexperimentSuggests(Integer isstartexperimentSuggests) { public void setIsstartexperimentSuggests(Integer isstartexperimentSuggests) {
this.isstartexperimentSuggests = isstartexperimentSuggests; this.isstartexperimentSuggests = isstartexperimentSuggests;
} }
public Integer getProjectId() { public Integer getProjectId() {
return projectId; return projectId;
} }
public void setProjectId(Integer projectId) { public void setProjectId(Integer projectId) {
this.projectId = projectId; this.projectId = projectId;
} }
public String getProjectName() { public String getProjectName() {
return projectName; return projectName;
} }
public void setProjectName(String projectName) { public void setProjectName(String projectName) {
this.projectName = projectName; this.projectName = projectName;
} }
public Integer getProjectPermissions() { public Integer getProjectPermissions() {
return projectPermissions; return projectPermissions;
} }
public void setProjectPermissions(Integer projectPermissions) { public void setProjectPermissions(Integer projectPermissions) {
this.projectPermissions = projectPermissions; this.projectPermissions = projectPermissions;
} }
public Integer getFounder() { public Integer getFounder() {
return founder; return founder;
} }
public void setFounder(Integer founder) { public void setFounder(Integer founder) {
this.founder = founder; this.founder = founder;
} }
public String getCreationTime() { public String getCreationTime() {
return creationTime; return creationTime;
} }
public void setCreationTime(String creationTime) { public void setCreationTime(String creationTime) {
this.creationTime = creationTime; this.creationTime = creationTime;
} }
public Integer getState() { public Integer getState() {
return state; return state;
} }
public void setState(Integer state) { public void setState(Integer state) {
this.state = state; this.state = state;
} }
public String getExperimentalGoal() { public String getExperimentalGoal() {
return experimentalGoal; return experimentalGoal;
} }
public void setExperimentalGoal(String experimentalGoal) { public void setExperimentalGoal(String experimentalGoal) {
this.experimentalGoal = experimentalGoal; this.experimentalGoal = experimentalGoal;
} }
public String getCaseDescription() { public String getCaseDescription() {
return caseDescription; return caseDescription;
} }
public void setCaseDescription(String caseDescription) { public void setCaseDescription(String caseDescription) {
this.caseDescription = caseDescription; this.caseDescription = caseDescription;
} }
public String getExperimentTask() { public String getExperimentTask() {
return experimentTask; return experimentTask;
} }
public void setExperimentTask(String experimentTask) { public void setExperimentTask(String experimentTask) {
this.experimentTask = experimentTask; this.experimentTask = experimentTask;
} }
public Integer getIsdel() { public Integer getIsdel() {
return isdel; return isdel;
} }
public void setIsdel(Integer isdel) { public void setIsdel(Integer isdel) {
this.isdel = isdel; this.isdel = isdel;
} }
public Integer getIsShow() { public Integer getIsShow() {
return isShow; return isShow;
} }
public void setIsShow(Integer isShow) { public void setIsShow(Integer isShow) {
this.isShow = isShow; this.isShow = isShow;
} }
public String getExperimentalDataId() { public String getExperimentalDataId() {
return experimentalDataId; return experimentalDataId;
} }
public void setExperimentalDataId(String experimentalDataId) { public void setExperimentalDataId(String experimentalDataId) {
this.experimentalDataId = experimentalDataId; this.experimentalDataId = experimentalDataId;
} }
public String getExperimentSuggests() { public String getExperimentSuggests() {
return experimentSuggests; return experimentSuggests;
} }
public void setExperimentSuggests(String experimentSuggests) { public void setExperimentSuggests(String experimentSuggests) {
this.experimentSuggests = experimentSuggests; this.experimentSuggests = experimentSuggests;
} }
public Integer getSystemId() { public Integer getSystemId() {
return systemId; return systemId;
} }
public void setSystemId(Integer systemId) { public void setSystemId(Integer systemId) {
this.systemId = systemId; this.systemId = systemId;
} }
public Integer getIsExperiment() { public Integer getIsExperiment() {
return isExperiment; return isExperiment;
} }
public void setIsExperiment(Integer isExperiment) { public void setIsExperiment(Integer isExperiment) {
this.isExperiment = isExperiment; this.isExperiment = isExperiment;
} }
public Integer getIsAttendance() { public Integer getIsAttendance() {
return isAttendance; return isAttendance;
} }
public void setIsAttendance(Integer isAttendance) { public void setIsAttendance(Integer isAttendance) {
this.isAttendance = isAttendance; this.isAttendance = isAttendance;
} }
} }

@ -18,11 +18,11 @@ public class Role implements Serializable {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private String roleName;// 角色名称 private String roleName;// 角色名称
//@ApiModelProperty(value = "角色数量", name = "roleNumber", example = "角色数量", required = true) //@ApiModelProperty(value = "角色数量", name = "roleNumber", example = "角色数量", required = true)
@ApiModelProperty(example = "角色数量", required = true) @ApiModelProperty(value = "角色数量", name = "roleNumber", example = "2", required = true)
private Integer roleNumber;// 角色数量 private Integer roleNumber;// 角色数量
@ApiModelProperty(example = "角色类型(0借款人 1贷款人 2保荐人)", required = true) @ApiModelProperty(value = "角色类型(0借款人 1贷款人 2保荐人)", name = "roleType", example = "0", required = true)
private Integer roleType;// 角色类型 private Integer roleType;// 角色类型
@ApiModelProperty(example = "角色属性(0个人 1公司)", required = true) @ApiModelProperty(value = "角色属性(0个人 1公司)", name = "roleAttribute", example = "0", required = true)
private Integer roleAttribute;// 角色属性 private Integer roleAttribute;// 角色属性
public Integer getRoleId() { public Integer getRoleId() {

Loading…
Cancel
Save