血脉初建
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.PointCategoryEntity;
|
||||
import com.peanut.modules.book.entity.PointEntity;
|
||||
import com.peanut.modules.book.service.PointCategoryService;
|
||||
import com.peanut.modules.book.service.PointService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -61,4 +63,47 @@ public class PointController {
|
||||
pointCategoryService.updateById(p);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取脉穴文章列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getPointList")
|
||||
public R getPointList(@RequestBody Map<String,Object> map){
|
||||
Page<PointEntity> pointList = pointService.getPointList(map);
|
||||
return R.ok().put("page",pointList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加脉穴文章
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/addPoint")
|
||||
public R addPoint(@RequestBody PointEntity pointEntity){
|
||||
pointService.save(pointEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除脉穴文章
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/delPoint")
|
||||
public R delPoint(@RequestBody Map<String,Object> map){
|
||||
Integer pointId = Integer.valueOf(map.get("pointId").toString());
|
||||
pointService.removeById(pointId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改脉穴文章
|
||||
* @param pointEntity
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/editPoint")
|
||||
public R editPoint(@RequestBody PointEntity pointEntity){
|
||||
pointService.updateById(pointEntity);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user