first commit

This commit is contained in:
cys841515238
2023-03-02 16:13:28 +08:00
commit 2733a60b97
741 changed files with 76931 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
package com.peanut.modules.book.controller;
import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.BookChapterEntity;
import com.peanut.modules.book.service.BookChapterService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import org.springframework.web.multipart.MultipartFile;
/**
*
*
* @author yl
* @email yl328572838@163.com
* @date 2022-08-12 09:53:25
*/
@RestController
@RequestMapping("book/bookchapter")
public class BookChapterController {
@Autowired
private BookChapterService bookChapterService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("book:bookchapter:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = bookChapterService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
// @RequiresPermissions("book:bookchapter:info")
public R info(@PathVariable("id") Integer id){
BookChapterEntity bookChapter = bookChapterService.getById(id);
return R.ok().put("bookChapter", bookChapter);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("book:bookchapter:save")
public R save(@RequestBody BookChapterEntity bookChapter){
bookChapterService.save(bookChapter);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("book:bookchapter:update")
public R update(@RequestBody BookChapterEntity bookChapter){
bookChapterService.updateById(bookChapter);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("book:bookchapter:delete")
public R delete(@RequestBody Integer[] ids){
bookChapterService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}