Commit fdb35fb2 authored by luzhuang's avatar luzhuang

api编辑

parent 2450d510
...@@ -48,6 +48,7 @@ import java.util.Map; ...@@ -48,6 +48,7 @@ import java.util.Map;
/** /**
* Created by gwf on 2017-7-21 15:08:47. * Created by gwf on 2017-7-21 15:08:47.
*/ */
@Api(tags = "2 章节")
@RestController @RestController
@RequestMapping("/BChapter") @RequestMapping("/BChapter")
@Slf4j @Slf4j
...@@ -63,7 +64,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -63,7 +64,7 @@ public class BChapterController extends PaginationController<BChapter> {
@Autowired @Autowired
private Global global; private Global global;
@ApiOperation(value = "添加/编辑章节", notes = "businessId为空时是添加方法,不为空时是修改方法") @ApiOperation(value = "201 添加/编辑章节", notes = "businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "课程id 修改章节时传入", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "课程id 修改章节时传入", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID", required = true, dataType = "varchar"), @ApiImplicitParam(name = "lessonId", value = "课程ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "chapterName", value = "章节名", required = true, dataType = "varchar"), @ApiImplicitParam(name = "chapterName", value = "章节名", required = true, dataType = "varchar"),
...@@ -80,7 +81,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -80,7 +81,7 @@ public class BChapterController extends PaginationController<BChapter> {
} }
@ApiOperation(value = "删除章节", notes = "根据ID删除一条记录") @ApiOperation(value = "202 删除章节", notes = "根据ID删除一条记录")
@ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/remove") @PostMapping(value = "/remove")
public Result remove(CurUser curUser,@Valid String id,BindingResult br) { public Result remove(CurUser curUser,@Valid String id,BindingResult br) {
...@@ -91,7 +92,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -91,7 +92,7 @@ public class BChapterController extends PaginationController<BChapter> {
id); id);
} }
@ApiOperation(value = "分页查询章节", notes = "根据条件分页查询章节") @ApiOperation(value = "203 分页查询章节", notes = "根据条件分页查询章节")
@PostMapping(value = "/queryBChaptersByPagination") @PostMapping(value = "/queryBChaptersByPagination")
public Result queryBChaptersByPagination(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) { public Result queryBChaptersByPagination(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) {
bChapterService.queryBChaptersByPagination(getPaginationUtility(), param); bChapterService.queryBChaptersByPagination(getPaginationUtility(), param);
...@@ -102,7 +103,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -102,7 +103,7 @@ public class BChapterController extends PaginationController<BChapter> {
gridModel); gridModel);
} }
@ApiOperation(value = "查询章节", notes = "根据lessonId查询章节") @ApiOperation(value = "204 查询章节", notes = "根据lessonId查询章节")
@GetMapping(value = "/queryBChaptersWithoutAuth") @GetMapping(value = "/queryBChaptersWithoutAuth")
public Result queryBChapters(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) { public Result queryBChapters(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) {
Map<String, Object> map = new HashedMap(); Map<String, Object> map = new HashedMap();
......
package org.rcisoft.business.bfile.controller; package org.rcisoft.business.bfile.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -28,6 +29,7 @@ import java.util.List; ...@@ -28,6 +29,7 @@ import java.util.List;
/** /**
* Created by gaowenfneg on 2017-10-9 14:34:56. * Created by gaowenfneg on 2017-10-9 14:34:56.
*/ */
@Api(tags = "4 文件")
@RestController @RestController
@RequestMapping("/BVideo") @RequestMapping("/BVideo")
public class BFileController extends PaginationController<BFile> { public class BFileController extends PaginationController<BFile> {
...@@ -102,7 +104,7 @@ public class BFileController extends PaginationController<BFile> { ...@@ -102,7 +104,7 @@ public class BFileController extends PaginationController<BFile> {
// } // }
@ApiOperation(value="上传文件", notes="上传文件") @ApiOperation(value="401 上传文件", notes="上传文件")
@ApiImplicitParams({@ApiImplicitParam(name = "chapterId", value = "章节ID", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "chapterId", value = "章节ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "0视频 1音频 2ppt 3pdf 4附件", required = true, dataType = "varchar"), @ApiImplicitParam(name = "type", value = "0视频 1音频 2ppt 3pdf 4附件", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "章节所在课程id", required = true, dataType = "varchar"), @ApiImplicitParam(name = "lessonId", value = "章节所在课程id", required = true, dataType = "varchar"),
......
package org.rcisoft.business.blabel.controller; package org.rcisoft.business.blabel.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -21,14 +22,14 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -21,14 +22,14 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
@Api(tags = "5 标签")
@RestController @RestController
@RequestMapping("/BLabel") @RequestMapping("/BLabel")
public class BLabelController extends PaginationController<BLabel> { public class BLabelController extends PaginationController<BLabel> {
@Autowired @Autowired
private BLabelService bLabelService; private BLabelService bLabelService;
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询标签") @ApiOperation(value="501 根据条件分页查询", notes="根据条件分页查询标签")
@ApiImplicitParam(name = "lName", value = "(标签名)模糊查询条件", required = false, dataType = "varchar") @ApiImplicitParam(name = "lName", value = "(标签名)模糊查询条件", required = false, dataType = "varchar")
@GetMapping(value = "/queryBlabelsByPagination") @GetMapping(value = "/queryBlabelsByPagination")
public GridModel queryBlabelsByPagination(CurUser curUser, @Valid String lName, BindingResult br){ public GridModel queryBlabelsByPagination(CurUser curUser, @Valid String lName, BindingResult br){
...@@ -37,7 +38,7 @@ public class BLabelController extends PaginationController<BLabel> { ...@@ -37,7 +38,7 @@ public class BLabelController extends PaginationController<BLabel> {
return gridModel; return gridModel;
} }
@ApiOperation(value="物理删除", notes="根据ID删除一条记录") @ApiOperation(value="502 物理删除", notes="根据ID删除一条记录")
@ApiImplicitParam(name = "id", value = "ID", required = true, dataType = "varchar") @ApiImplicitParam(name = "id", value = "ID", required = true, dataType = "varchar")
@PostMapping(value = "/remove") @PostMapping(value = "/remove")
public Result remove(CurUser curUser,@Valid String id,BindingResult br) { public Result remove(CurUser curUser,@Valid String id,BindingResult br) {
...@@ -48,7 +49,7 @@ public class BLabelController extends PaginationController<BLabel> { ...@@ -48,7 +49,7 @@ public class BLabelController extends PaginationController<BLabel> {
id); id);
} }
@ApiOperation(value="更新标签名", notes="根据businessId更新标签名") @ApiOperation(value="503 更新标签名", notes="根据businessId更新标签名")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "标签id", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "标签id", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lName", value = "标签名", required = true, dataType = "varchar")}) @ApiImplicitParam(name = "lName", value = "标签名", required = true, dataType = "varchar")})
@PostMapping(value = "/update") @PostMapping(value = "/update")
...@@ -60,10 +61,10 @@ public class BLabelController extends PaginationController<BLabel> { ...@@ -60,10 +61,10 @@ public class BLabelController extends PaginationController<BLabel> {
bLabel.getBusinessId()); bLabel.getBusinessId());
} }
@ApiOperation(value="插入新标签", notes="根据businessId插入新标签") @ApiOperation(value="504 添加新标签", notes="根据businessId插入新标签")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "标签id", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "lName", required = true, dataType = "varchar")}) @ApiImplicitParam(name = "lName", value = "标签名", required = true, dataType = "varchar")})
@PostMapping(value = "/insert") @PostMapping(value = "/add")
public Result insert(CurUser curUser,@Valid BLabel bLabel,BindingResult br){ public Result insert(CurUser curUser,@Valid BLabel bLabel,BindingResult br){
PersistModel data = bLabelService.insertLabel(bLabel); PersistModel data = bLabelService.insertLabel(bLabel);
return Result.builder(data, return Result.builder(data,
......
...@@ -33,7 +33,7 @@ import java.util.List; ...@@ -33,7 +33,7 @@ import java.util.List;
/** /**
* Created by Andrew on 2017/7/6. * Created by Andrew on 2017/7/6.
*/ */
@Api(tags = "用户管理") @Api(tags = "7 用户管理")
@RestController @RestController
@RequestMapping(value = "/user") @RequestMapping(value = "/user")
public class SysUserController extends PaginationController<SysUser> { public class SysUserController extends PaginationController<SysUser> {
...@@ -44,7 +44,7 @@ public class SysUserController extends PaginationController<SysUser> { ...@@ -44,7 +44,7 @@ public class SysUserController extends PaginationController<SysUser> {
@Autowired @Autowired
private Global global; private Global global;
@ApiOperation(value = "分页查询用户", notes = "分页查询用户") @ApiOperation(value = "701 分页查询用户", notes = "分页查询用户")
@ApiImplicitParams({@ApiImplicitParam(name = "name", value = "用户名(模糊查询条件)", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "name", value = "用户名(模糊查询条件)", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "flag", value = "用户启用状态 0未启用 1启用", required = false, dataType = "varchar"), @ApiImplicitParam(name = "flag", value = "用户启用状态 0未启用 1启用", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "roleName", value = "用户角色", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "roleName", value = "用户角色", required = false, dataType = "varchar")})
...@@ -55,7 +55,7 @@ public class SysUserController extends PaginationController<SysUser> { ...@@ -55,7 +55,7 @@ public class SysUserController extends PaginationController<SysUser> {
return gridModel; return gridModel;
} }
@ApiOperation(value = "分配角色", notes = "分配角色") @ApiOperation(value = "702 分配角色", notes = "分配角色")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "用户id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path"), @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "用户id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path"),
@ApiImplicitParam(name = "roleId", value = "角色id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path")}) @ApiImplicitParam(name = "roleId", value = "角色id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path")})
@PostMapping(value = "/AssignRoles") @PostMapping(value = "/AssignRoles")
...@@ -67,18 +67,18 @@ public class SysUserController extends PaginationController<SysUser> { ...@@ -67,18 +67,18 @@ public class SysUserController extends PaginationController<SysUser> {
id); id);
} }
@ApiOperation(value = "删除用户", notes = "删除用户") @ApiOperation(value = "703 删除用户", notes = "删除用户")
@ApiImplicitParam(name = "id", value = "用户id", required = true, dataType = "varchar", paramType = "path") @ApiImplicitParam(name = "businessId", value = "用户id", required = true, dataType = "varchar", paramType = "path")
@PostMapping(value = "/delete") @PostMapping(value = "/delete")
public Result roleDelete(CurUser curUser, @Valid String id, BindingResult br) { public Result roleDelete(CurUser curUser, @Valid String businessId, BindingResult br) {
int line = userServiceImpl.removeUser(id); int line = userServiceImpl.removeUser(businessId);
return Result.builder(new PersistModel(line), return Result.builder(new PersistModel(line),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
id); businessId);
} }
@ApiOperation(value = "停用用户", notes = "停用用户") @ApiOperation(value = "704 停用用户", notes = "停用用户")
@ApiImplicitParam(name = "businessId", value = "用户Id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path") @ApiImplicitParam(name = "businessId", value = "用户Id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path")
@PostMapping(value = "/stop") @PostMapping(value = "/stop")
public Result stop(CurUser curUser, @Valid String businessId, BindingResult br) { public Result stop(CurUser curUser, @Valid String businessId, BindingResult br) {
...@@ -89,7 +89,7 @@ public class SysUserController extends PaginationController<SysUser> { ...@@ -89,7 +89,7 @@ public class SysUserController extends PaginationController<SysUser> {
businessId); businessId);
} }
@ApiOperation(value = "启用用户", notes = "启用用户") @ApiOperation(value = "705 启用用户", notes = "启用用户")
@ApiImplicitParam(name = "businessId", value = "用户Id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path") @ApiImplicitParam(name = "businessId", value = "用户Id(批量操作时 id用,隔开)", required = true, dataType = "varchar", paramType = "path")
@PostMapping(value = "/start") @PostMapping(value = "/start")
public Result Start(CurUser curUser, @Valid String businessId, BindingResult br) { public Result Start(CurUser curUser, @Valid String businessId, BindingResult br) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment