From e8d98e5849524f3da0067531d2682492f4b42164 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Mon, 27 Jul 2020 19:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=96=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Project_ManagementController.java | 641 +++++++++--------- .../liuwanr/entity/ManagementAndPointVo.java | 6 + .../liuwanr/entity/Project_Management.java | 43 +- .../java/com/yipin/liuwanr/entity/Role.java | 88 +-- 4 files changed, 432 insertions(+), 346 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java b/src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java index f149435..8b46a12 100644 --- a/src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java +++ b/src/main/java/com/yipin/liuwanr/controller/Project_ManagementController.java @@ -5,6 +5,7 @@ import java.util.List; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.CrossOrigin; @@ -27,319 +28,345 @@ import com.yipin.liuwanr.service.Project_ManagementService; @RequestMapping("/ProjectManagement") @CrossOrigin public class Project_ManagementController { - - @Autowired - private Project_ManagementService service; - - /** - * 查询用户角色 - * @param userId - * @return - */ - @ApiOperation(value = "查询角色", notes = "查询角色") - @GetMapping("/queryRole") - Response queryRole(Integer userId) { - Response resp = new Response(); - HashMap ret = service.queryRole(userId); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - - /** - * 首页面查询 - * @param projectPermissions:权限 - * @param founder:创建人 - * @param state:状态 - * @param projectName:项目名称 - * @param systemId - * @return - */ - @ApiOperation(value = "首页面查询", notes = "首页面查询") - @GetMapping("/queryAllManagements") - Response queryAllManagements(@RequestParam Integer projectPermissions,@RequestParam Integer founder,@RequestParam Integer state,@RequestParam String projectName, - @RequestParam Integer systemId,@RequestParam Integer userId,@RequestParam Integer pageNo,@RequestParam Integer pageSize){ - Response resp = new Response(); - Project_Management vo=new Project_Management(); - if(null!=projectPermissions) { - vo.setProjectPermissions(projectPermissions); - }if(null!=founder) { - vo.setFounder(founder); - }if(null!=state) { - vo.setState(state); - }if(null!=systemId) { - vo.setSystemId(systemId); - }if(null!=projectName&&projectName!="") { - vo.setProjectName(projectName); - }if(null!=userId) { - vo.setUserId(userId); - } - HashMap ret = service.queryAllManagements(vo,pageNo,pageSize); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - /** - * 批量删除 - * @param point 项目id集合 - * @return - */ - @ApiOperation(value = "批量删除", notes = "批量删除") - @PostMapping("/removeProjectManagement") - Response removeProjectManagement(@RequestBody List point) { - Response resp = new Response(); - HashMap ret = service.deleteProjectManagement(point); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - - /** - * 根据项目管理id查询对应信息 - * @param projectId - * @return - */ - @ApiOperation(value = "根据项目管理id查询对应信息", notes = "根据项目管理id查询对应信息") - @GetMapping("/getProjectId") - Response getProjectId(Integer projectId) { - Response resp = new Response(); - HashMap ret = service.getProjectId(projectId); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - /** - * 添加点面板的数据展示+条件筛选 - * @param judgmentPointsName 判分点名称 - * @return - */ - @ApiOperation(value = "添加点面板的数据展示+条件筛选", notes = "添加点面板的数据展示+条件筛选") - @GetMapping("/queryAllJudgmentPoints") - Response queryAllJudgmentPoints(@RequestParam String judgmentPointsName,@RequestParam Integer systemId) { - Response resp = new Response(); - Judgment_Points points=new Judgment_Points(); - if(StringUtils.isEmpty(systemId)) { - resp.setStatus(300); - resp.setMessage("systemId cannot be empty"); - }else { - if(!StringUtils.isEmpty(judgmentPointsName)) { - points.setJudgmentPointsName(judgmentPointsName); - } - points.setSystemId(systemId); - - HashMap ret = service.queryAllJudgmentPoints(points); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - } - return resp; - } + @Autowired + private Project_ManagementService service; - - /** - * 实验任务表格信息的展示,根据判分点id和项目 - * @param judgmentPointsIds 判分点id - * @return - */ - @ApiOperation(value = "实验任务表格信息的展示,根据判分点id和项目", notes = "实验任务表格信息的展示,根据判分点id和项目") - @GetMapping("/getByjudgmentPointsId") - Response getByjudgmentPointsId(@RequestParam List judgmentPointsIds,Integer projectId,Integer userId) { - Response resp = new Response(); - HashMap ret = service.getByjudgmentPointsId(judgmentPointsIds,projectId,userId); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - - /** - * 平均分配分值 - * @param number 判分点数量 - * @return - */ - @ApiOperation(value = "平均分配分值", notes = "平均分配分值") - @GetMapping("/avgValues") - Response avgValues(Integer number) { - Response resp = new Response(); - HashMap ret = service.avgValues(number); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - - /** - * 添加角色 - * @param role 角色 - * @return - */ - @ApiOperation(value = "添加角色", notes = "添加角色") - @PostMapping("/addRole") - Response addRole(@RequestBody Role role) { - Response resp = new Response(); - HashMap ret = service.insertRole(role); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - - - /** - * 实验数据表格信息的展示,根据角色id - * @param roleId 角色Id - * @return - */ - @ApiOperation(value = "实验数据表格信息的展示,根据角色id", notes = "实验数据表格信息的展示,根据角色id") - @GetMapping("/getByRoleId") - Response getByRoleId(@RequestParam List roleId) { - Response resp = new Response(); - HashMap ret = service.getByRoleId(roleId); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } + /** + * 查询用户角色 + * + * @param userId + * @return + */ + @ApiOperation(value = "查询用户角色信息", notes = "查询用户角色信息") + @GetMapping("/queryRole") + Response queryRole(@ApiParam(name = "userId", value = "用户id", required = true) Integer userId) { + Response resp = new Response(); + HashMap ret = service.queryRole(userId); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } - /** - * 添加创建项目管理信息 - * @param vo 项目管理信息 - * @return - */ - @ApiOperation(value = "新增项目管理信息", notes = "新增项目管理信息") - @PostMapping("/addProjectManagement") - Response insertProjectManagement(@RequestBody ManagementAndPointVo vo) { - Response resp = new Response(); - Project_Management pro = vo.getManagement(); - List points=vo.getPooints(); - List roles = vo.getRoleId(); - if(StringUtils.isEmpty(pro)) { - resp.setStatus(300); - resp.setMessage("management cannot be empty"); - return resp; - } - if(points.isEmpty()||points.size()<=0) { - resp.setStatus(300); - resp.setMessage("pooints cannot be empty"); - return resp; - } - if (pro.getIsstartexperimental()==0){//开启实验数据 - if(roles.isEmpty()||roles.size()<=0) { - resp.setStatus(300); - resp.setMessage("roleId cannot be empty"); - return resp; - } - } + /** + * 首页面查询 + *

+ * + * @param projectPermissions:权限 + * @param founder:创建人 + * @param state:状态 + * @param projectName:项目名称 + * @param systemId + * @return + */ + @ApiOperation(value = "项目管理列表", notes = "项目管理列表") + @GetMapping("/queryAllManagements") + Response queryAllManagements(@ApiParam(name = "projectPermissions", value = "项目权限(0、练习 1、考核 2、竞赛)", required = false) @RequestParam(required = false) Integer projectPermissions, + @ApiParam(name = "founder", value = "项目创建人(0、系统 1、老师)", required = false) @RequestParam(required = false) Integer founder, + @ApiParam(name = "state", value = "项目状态(0、草稿箱 1、已发布)", required = false) @RequestParam(required = false) Integer state, + @ApiParam(name = "projectName", value = "项目名称", required = false) @RequestParam(required = false) String projectName, + @ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId, + @ApiParam(name = "userId", value = "用户id", required = true) @RequestParam Integer userId, + @ApiParam(name = "pageNo", value = "第几页,页码", required = true) @RequestParam Integer pageNo, + @ApiParam(name = "pageSize", value = "每页展示的数据条数", required = true) @RequestParam Integer pageSize) { + Response resp = new Response(); + Project_Management vo = new Project_Management(); + if (null != projectPermissions) { + vo.setProjectPermissions(projectPermissions); + } + if (null != founder) { + vo.setFounder(founder); + } + if (null != state) { + vo.setState(state); + } + if (null != systemId) { + vo.setSystemId(systemId); + } + if (null != projectName && projectName != "") { + vo.setProjectName(projectName); + } + if (null != userId) { + vo.setUserId(userId); + } + HashMap ret = service.queryAllManagements(vo, pageNo, pageSize); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } - HashMap ret = service.insertProjectManagement(pro,points,roles); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } - /** - * 修改项目管理信息 - * @param vo - * @return - */ - @ApiOperation(value = "修改项目管理信息", notes = "修改项目管理信息") - @PostMapping("/updateProjectManagement") - Response updateProjectManagement(@RequestBody ManagementAndPointVo vo) { - Response resp = new Response(); - Project_Management pro = vo.getManagement(); - List points=vo.getPooints(); - List roles = vo.getRoleId(); - if(StringUtils.isEmpty(pro)) { - resp.setStatus(300); - resp.setMessage("management cannot be empty"); - return resp; - } - if(points.isEmpty()||points.size()<=0) { - resp.setStatus(300); - resp.setMessage("pooints cannot be empty"); - return resp; - } + /** + * 批量删除 + * + * @param point 项目id集合 + * @return + */ + @ApiOperation(value = "批量删除", notes = "批量删除") + @PostMapping("/removeProjectManagement") + Response removeProjectManagement(@ApiParam(name = "point", value = "项目主键Id", required = true) @RequestBody List point) { + Response resp = new Response(); + HashMap ret = service.deleteProjectManagement(point); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } - if (pro.getIsstartexperimental()==0){//开启实验数据 - if(roles.isEmpty()||roles.size()<=0) { - resp.setStatus(300); - resp.setMessage("roleId cannot be empty"); - return resp; - } - } - HashMap ret = service.updateProjectManagement(pro,points,roles); - int status = (int) ret.get("retcode"); - if (status == 200) { - resp.setStatus(status); - resp.setMessage(ret.get("retvalue")); - } else { - resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); - } - return resp; - } + /** + * 根据项目管理id查询对应信息 + * + * @param projectId + * @return + */ + @ApiOperation(value = "获取点击编辑的对应信息", notes = "获取点击编辑的对应信息") + @GetMapping("/getProjectId") + Response getProjectId(@ApiParam(name = "projectId", value = "项目主键ID", required = true) Integer projectId) { + Response resp = new Response(); + HashMap ret = service.getProjectId(projectId); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + + /** + * 添加点面板的数据展示+条件筛选 + * + * @param judgmentPointsName 判分点名称 + * @return + */ + @ApiOperation(value = "判分点列表", notes = "判分点列表") + @GetMapping("/queryAllJudgmentPoints") + Response queryAllJudgmentPoints(@ApiParam(name = "judgmentPointsName", value = "判分点名称", required = false) @RequestParam(required = false) String judgmentPointsName, + @ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId) { + Response resp = new Response(); + Judgment_Points points = new Judgment_Points(); + if (StringUtils.isEmpty(systemId)) { + resp.setStatus(300); + resp.setMessage("systemId cannot be empty"); + } else { + if (!StringUtils.isEmpty(judgmentPointsName)) { + points.setJudgmentPointsName(judgmentPointsName); + } + points.setSystemId(systemId); + + HashMap ret = service.queryAllJudgmentPoints(points); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + } + return resp; + } + + + /** + * 实验任务表格信息的展示,根据判分点id和项目 + * + * @param judgmentPointsIds 判分点id + * @return + */ + @ApiOperation(value = "实验任务列表", notes = "实验任务列表") + @GetMapping("/getByjudgmentPointsId") + Response getByjudgmentPointsId(@ApiParam(name = "judgmentPointsIds", value = "判分点主键id", required = true) @RequestParam List judgmentPointsIds, + @ApiParam(name = "projectId", value = "项目主键ID", required = false) @RequestParam(required = false) Integer projectId, + @ApiParam(name = "userId", value = "用户主键ID", required = false) @RequestParam(required = false) Integer userId) { + Response resp = new Response(); + HashMap ret = service.getByjudgmentPointsId(judgmentPointsIds, projectId, userId); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + + + /** + * 平均分配分值 + * + * @param number 判分点数量 + * @return + */ + @ApiOperation(value = "平均分配分值", notes = "平均分配分值") + @GetMapping("/avgValues") + Response avgValues(@ApiParam(name = "number", value = "判分点数量", required = true) Integer number) { + Response resp = new Response(); + HashMap ret = service.avgValues(number); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + + + /** + * 添加角色 + * + * @param role 角色 + * @return + */ + @ApiOperation(value = " 新增案例数据对象", notes = " 新增案例数据对象") + @PostMapping("/addRole") + Response addRole(@ApiParam(name = "Role", value = "角色对象,传入json格式", required = true) @RequestBody Role role) { + Response resp = new Response(); + HashMap ret = service.insertRole(role); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + + + /** + * 实验数据表格信息的展示,根据角色id + * + * @param roleId 角色Id + * @return + */ + @ApiOperation(value = "实验数据列表", notes = "实验数据列表") + @GetMapping("/getByRoleId") + Response getByRoleId(@ApiParam(name = "roleId", value = "角色id", required = true) @RequestParam List roleId) { + Response resp = new Response(); + HashMap ret = service.getByRoleId(roleId); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + + /** + * 添加创建项目管理信息 + * + * @param vo 项目管理信息 + * @return + */ + @ApiOperation(value = "创建项目", notes = "创建项目") + @PostMapping("/addProjectManagement") + Response insertProjectManagement(@RequestBody @ApiParam(name = "新建项目管理所需类", value = "传入json格式", required = true) ManagementAndPointVo vo) { + Response resp = new Response(); + Project_Management pro = vo.getManagement(); + List points = vo.getPooints(); + List roles = vo.getRoleId(); + if (StringUtils.isEmpty(pro)) { + resp.setStatus(300); + resp.setMessage("management cannot be empty"); + return resp; + } + if (points.isEmpty() || points.size() <= 0) { + resp.setStatus(300); + resp.setMessage("pooints cannot be empty"); + return resp; + } + + if (pro.getIsstartexperimental() == 0) {//开启实验数据 + if (roles.isEmpty() || roles.size() <= 0) { + resp.setStatus(300); + resp.setMessage("roleId cannot be empty"); + return resp; + } + } + + HashMap ret = service.insertProjectManagement(pro, points, roles); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + + /** + * 修改项目管理信息 + * + * @param vo + * @return + */ + @ApiOperation(value = "编辑项目", notes = "编辑项目") + @PostMapping("/updateProjectManagement") + Response updateProjectManagement(@ApiParam(name = "新建项目管理所需类", value = "传入json格式", required = true) @RequestBody ManagementAndPointVo vo) { + Response resp = new Response(); + Project_Management pro = vo.getManagement(); + List points = vo.getPooints(); + List roles = vo.getRoleId(); + if (StringUtils.isEmpty(pro)) { + resp.setStatus(300); + resp.setMessage("management cannot be empty"); + return resp; + } + if (points.isEmpty() || points.size() <= 0) { + resp.setStatus(300); + resp.setMessage("pooints cannot be empty"); + return resp; + } + + if (pro.getIsstartexperimental() == 0) {//开启实验数据 + if (roles.isEmpty() || roles.size() <= 0) { + resp.setStatus(300); + resp.setMessage("roleId cannot be empty"); + return resp; + } + } + + HashMap ret = service.updateProjectManagement(pro, points, roles); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } } diff --git a/src/main/java/com/yipin/liuwanr/entity/ManagementAndPointVo.java b/src/main/java/com/yipin/liuwanr/entity/ManagementAndPointVo.java index fc22c04..f1fb029 100644 --- a/src/main/java/com/yipin/liuwanr/entity/ManagementAndPointVo.java +++ b/src/main/java/com/yipin/liuwanr/entity/ManagementAndPointVo.java @@ -1,11 +1,17 @@ package com.yipin.liuwanr.entity; +import io.swagger.annotations.ApiModelProperty; + import java.util.List; public class ManagementAndPointVo { private Project_Management management;//项目管理 + + @ApiModelProperty(example = "key:判分点主键 value:分数", required = true) private List pooints;//判分点信息 + + @ApiModelProperty(example = "角色id", required = true) private List roleId;//存储角色id public Project_Management getManagement() { diff --git a/src/main/java/com/yipin/liuwanr/entity/Project_Management.java b/src/main/java/com/yipin/liuwanr/entity/Project_Management.java index fa1fb7d..1143a2b 100644 --- a/src/main/java/com/yipin/liuwanr/entity/Project_Management.java +++ b/src/main/java/com/yipin/liuwanr/entity/Project_Management.java @@ -1,31 +1,72 @@ package com.yipin.liuwanr.entity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * 项目管理 * * @author 86151 * */ +@ApiModel(value = "Project_Management对象", description = "项目管理对象Project_Management") public class Project_Management { - + + @ApiModelProperty(hidden = true) private Integer projectId;// 项目主键ID + + @ApiModelProperty(example = "大庆项目", required = true) private String projectName;// 项目名称 + + @ApiModelProperty(example = "(0、练习 1、考核 2、竞赛)", required = true) private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛) + + @ApiModelProperty(example = "创建人(0、系统 1、老师)", required = true) private Integer founder;// 创建人(0、系统 1、老师) + + @ApiModelProperty(hidden = true) private String creationTime;// 创建时间 + + @ApiModelProperty(example = "状态(0、草稿箱 1、已发布)", required = true) private Integer state;// 状态(0、草稿箱 1、已发布) + + @ApiModelProperty(example = "实验目标", required = true) private String experimentalGoal;// 实验目标 + + @ApiModelProperty(example = "案例描述", required = true) private String caseDescription; // 案例描述 + + @ApiModelProperty(hidden = true) private String experimentTask;// 实验任务 + + @ApiModelProperty(hidden = true) private String experimentalDataId;// 绑定实验数据ID + + @ApiModelProperty(example = "实验提示", required = true) private String experimentSuggests; // 实验提示 + + @ApiModelProperty(example = "绑定服务配置ID", required = true) private Integer systemId;// 绑定服务配置ID + + @ApiModelProperty(hidden = true) private Integer isdel; + + @ApiModelProperty(hidden = true) private Integer isShow; + + @ApiModelProperty(example = "是否启用实验数据(0启用 1不启用)", required = true) private Integer isstartexperimental;//是否启用实验数据(0启用 1不启用) + + @ApiModelProperty(example = "是否启用实验提示(0启用 1不启用)", required = true) private Integer isstartexperimentSuggests; + + @ApiModelProperty(hidden = true) private Integer isExperiment; + + @ApiModelProperty(hidden = true) private Integer isAttendance; + + @ApiModelProperty(example = "用户ID", required = true) private Integer userId; diff --git a/src/main/java/com/yipin/liuwanr/entity/Role.java b/src/main/java/com/yipin/liuwanr/entity/Role.java index 288a222..493564d 100644 --- a/src/main/java/com/yipin/liuwanr/entity/Role.java +++ b/src/main/java/com/yipin/liuwanr/entity/Role.java @@ -1,56 +1,68 @@ package com.yipin.liuwanr.entity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + /** - * 角色表 - * @author 86151 + * 角色表 * + * @author 86151 */ -public class Role { +@ApiModel(value = "Role对象", description = "角色对象Role") +public class Role implements Serializable { - private Integer roleId;// 角色ID - private String roleName;// 角色名称 - private Integer roleNumber;// 角色数量 - private Integer roleType;// 角色类型 - private Integer roleAttribute;// 角色属性 + @ApiModelProperty(hidden = true) + protected Integer roleId;// 角色ID + @ApiModelProperty(hidden = true) + private String roleName;// 角色名称 + //@ApiModelProperty(value = "角色数量", name = "roleNumber", example = "角色数量", required = true) + @ApiModelProperty(example = "角色数量", required = true) + private Integer roleNumber;// 角色数量 + @ApiModelProperty(example = "角色类型(0借款人 1贷款人 2保荐人)", required = true) + private Integer roleType;// 角色类型 + @ApiModelProperty(example = "角色属性(0个人 1公司)", required = true) + private Integer roleAttribute;// 角色属性 - public Integer getRoleId() { - return roleId; - } + public Integer getRoleId() { + return roleId; + } - public void setRoleId(Integer roleId) { - this.roleId = roleId; - } + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } - public String getRoleName() { - return roleName; - } + public String getRoleName() { + return roleName; + } - public void setRoleName(String roleName) { - this.roleName = roleName; - } + public void setRoleName(String roleName) { + this.roleName = roleName; + } - public Integer getRoleNumber() { - return roleNumber; - } + public Integer getRoleNumber() { + return roleNumber; + } - public void setRoleNumber(Integer roleNumber) { - this.roleNumber = roleNumber; - } + public void setRoleNumber(Integer roleNumber) { + this.roleNumber = roleNumber; + } - public Integer getRoleType() { - return roleType; - } + public Integer getRoleType() { + return roleType; + } - public void setRoleType(Integer roleType) { - this.roleType = roleType; - } + public void setRoleType(Integer roleType) { + this.roleType = roleType; + } - public Integer getRoleAttribute() { - return roleAttribute; - } + public Integer getRoleAttribute() { + return roleAttribute; + } - public void setRoleAttribute(Integer roleAttribute) { - this.roleAttribute = roleAttribute; - } + public void setRoleAttribute(Integer roleAttribute) { + this.roleAttribute = roleAttribute; + } }