swagger接口文档

master
shijie 4 years ago
parent b8e8868747
commit 7c1ee361e0
  1. 27
      src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java
  2. 21
      src/main/java/com/yipin/liuwanr/entity/Judgment_Points.java
  3. 9
      src/main/java/com/yipin/liuwanr/entity/ManagementAndPointVo.java
  4. 23
      src/main/java/com/yipin/liuwanr/entity/Project_Management.java
  5. 6
      src/main/java/com/yipin/liuwanr/entity/Role.java

@ -239,6 +239,11 @@ public class Project_ManagementController {
/**
* 添加角色
* {
* "roleNumber": "1",
* "roleType": "0",
* "roleAttribute": "0"
* }
*
* @param role 角色
* @return
@ -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 项目管理信息
* @return

@ -1,20 +1,37 @@
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 {
@ApiModelProperty(value = "判分点主键Id", name = "judgmentPointsId", example = "184", required = true)
private Integer judgmentPointsId;// 判分点主键Id
@ApiModelProperty(value = "判分点名称", name = "judgmentPointsName", example = "列表——元素的修改", required = true)
private String judgmentPointsName;// 判分点名称
@ApiModelProperty(value = "实验要求", name = "experimentalRequirements", example = "新学期开始,老师组织了学习小组,该学习小组有A,B,C,D五个学生\\nList1=[''A'',''B'',''C'',''D'']\\n列表元素-修改-请使用下标索引\\n第三天上课,老师发现把E同学的名字打错了,应该T。请修改并打印本小组的全体学生", required = true)
private String experimentalRequirements;//实验要求
@ApiModelProperty(hidden = true)
private String projectId;//绑定项目管理Id
@ApiModelProperty(hidden = true)
private Integer judgmentPointsType;// 判分点类型(1、编程类 2、交易类 3、工具类 4、业务类)
@ApiModelProperty(hidden = true)
private Integer isdel;// 是否删除(0、未删除 1、已删除)
@ApiModelProperty(hidden = true)
private Integer systemId;
@ApiModelProperty(hidden = true)
private Integer userId;
@ApiModelProperty(value = "判分点指标的分数", name = "score", example = "100", required = true)
private Integer score;//判分点指标的分数
public Integer getSystemId() {

@ -1,17 +1,20 @@
package com.yipin.liuwanr.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@ApiModel(value = "ManagementAndPointVo对象", description = "添加项目管理对象ManagementAndPointVo")
public class ManagementAndPointVo {
@ApiModelProperty(value = "项目管理实体类", name = "management", required = true)
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)
@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
public Project_Management getManagement() {

@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
* 项目管理
*
* @author 86151
*
*/
@ApiModel(value = "Project_Management对象", description = "项目管理对象Project_Management")
public class Project_Management {
@ -15,25 +14,25 @@ public class Project_Management {
@ApiModelProperty(hidden = true)
private Integer projectId;// 项目主键ID
@ApiModelProperty(example = "大庆项目", required = true)
@ApiModelProperty(value = "项目名称", name = "projectName", example = "python教学项目", required = true)
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、竞赛)
@ApiModelProperty(example = "创建人(0、系统 1、老师)", required = true)
@ApiModelProperty(value = "创建人(0、系统 1、老师)", name = "founder", example = "0", required = true)
private Integer founder;// 创建人(0、系统 1、老师)
@ApiModelProperty(hidden = true)
private String creationTime;// 创建时间
@ApiModelProperty(example = "状态(0、草稿箱 1、已发布)", required = true)
@ApiModelProperty(value = "状态(0、草稿箱 1、已发布)", name = "state", example = "0", required = true)
private Integer state;// 状态(0、草稿箱 1、已发布)
@ApiModelProperty(example = "实验目标", required = true)
@ApiModelProperty(value = "实验目标", name = "experimentalGoal", example = "学会十以内加减法", required = true)
private String experimentalGoal;// 实验目标
@ApiModelProperty(example = "案例描述", required = true)
@ApiModelProperty(value = "案例描述", name = "caseDescription", example = "一加一等于二", required = true)
private String caseDescription; // 案例描述
@ApiModelProperty(hidden = true)
@ -42,10 +41,10 @@ public class Project_Management {
@ApiModelProperty(hidden = true)
private String experimentalDataId;// 绑定实验数据ID
@ApiModelProperty(example = "实验提示", required = true)
@ApiModelProperty(value = "实验提示", name = "experimentSuggests", example = "一加一等于二", required = true)
private String experimentSuggests; // 实验提示
@ApiModelProperty(example = "绑定服务配置ID", required = true)
@ApiModelProperty(value = "绑定服务配置ID", name = "systemId", example = "1", required = true)
private Integer systemId;// 绑定服务配置ID
@ApiModelProperty(hidden = true)
@ -54,10 +53,10 @@ public class Project_Management {
@ApiModelProperty(hidden = true)
private Integer isShow;
@ApiModelProperty(example = "是否启用实验数据(0启用 1不启用)", required = true)
@ApiModelProperty(value = "是否启用实验数据(0启用 1不启用)", name = "isstartexperimental", example = "0", required = true)
private Integer isstartexperimental;//是否启用实验数据(0启用 1不启用)
@ApiModelProperty(example = "是否启用实验提示(0启用 1不启用)", required = true)
@ApiModelProperty(value = "是否启用实验提示(0启用 1不启用)", name = "isstartexperimentSuggests", example = "0", required = true)
private Integer isstartexperimentSuggests;
@ApiModelProperty(hidden = true)
@ -66,7 +65,7 @@ public class Project_Management {
@ApiModelProperty(hidden = true)
private Integer isAttendance;
@ApiModelProperty(example = "用户ID", required = true)
@ApiModelProperty(value = "用户ID", name = "userId", example = "4", required = true)
private Integer userId;

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

Loading…
Cancel
Save