|
|
|
@ -20,15 +20,14 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description: 评论
|
|
|
|
|
* @Description: 评价
|
|
|
|
|
* @Author: jeecg-boot
|
|
|
|
|
* @Date: 2023-06-05
|
|
|
|
|
* @Date: 2023-06-07
|
|
|
|
|
* @Version: V1.0
|
|
|
|
|
*/
|
|
|
|
|
@Api(tags="评论")
|
|
|
|
|
@Api(tags="评价")
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/erp/bbs")
|
|
|
|
|
@Slf4j
|
|
|
|
@ -45,8 +44,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param req
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
//@AutoLog(value = "评论-分页列表查询")
|
|
|
|
|
@ApiOperation(value="评论-分页列表查询", notes="评论-分页列表查询")
|
|
|
|
|
//@AutoLog(value = "评价-分页列表查询")
|
|
|
|
|
@ApiOperation(value="评价-分页列表查询", notes="评价-分页列表查询")
|
|
|
|
|
@GetMapping(value = "/list")
|
|
|
|
|
public Result<IPage<Bbs>> queryPageList(Bbs bbs,
|
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
|
@ -64,9 +63,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param bbs
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AutoLog(value = "评论-添加")
|
|
|
|
|
@ApiOperation(value="评论-添加", notes="评论-添加")
|
|
|
|
|
//@RequiresPermissions("erp:bbs:add")
|
|
|
|
|
@AutoLog(value = "评价-添加")
|
|
|
|
|
@ApiOperation(value="评价-添加", notes="评价-添加")
|
|
|
|
|
@PostMapping(value = "/add")
|
|
|
|
|
public Result<String> add(@RequestBody Bbs bbs) {
|
|
|
|
|
bbsService.save(bbs);
|
|
|
|
@ -79,9 +77,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param bbs
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AutoLog(value = "评论-编辑")
|
|
|
|
|
@ApiOperation(value="评论-编辑", notes="评论-编辑")
|
|
|
|
|
//@RequiresPermissions("erp:bbs:edit")
|
|
|
|
|
@AutoLog(value = "评价-编辑")
|
|
|
|
|
@ApiOperation(value="评价-编辑", notes="评价-编辑")
|
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
|
|
public Result<String> edit(@RequestBody Bbs bbs) {
|
|
|
|
|
bbsService.updateById(bbs);
|
|
|
|
@ -94,9 +91,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AutoLog(value = "评论-通过id删除")
|
|
|
|
|
@ApiOperation(value="评论-通过id删除", notes="评论-通过id删除")
|
|
|
|
|
//@RequiresPermissions("erp:bbs:delete")
|
|
|
|
|
@AutoLog(value = "评价-通过id删除")
|
|
|
|
|
@ApiOperation(value="评价-通过id删除", notes="评价-通过id删除")
|
|
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
|
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
|
|
bbsService.removeById(id);
|
|
|
|
@ -109,9 +105,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param ids
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AutoLog(value = "评论-批量删除")
|
|
|
|
|
@ApiOperation(value="评论-批量删除", notes="评论-批量删除")
|
|
|
|
|
//@RequiresPermissions("erp:bbs:deleteBatch")
|
|
|
|
|
@AutoLog(value = "评价-批量删除")
|
|
|
|
|
@ApiOperation(value="评价-批量删除", notes="评价-批量删除")
|
|
|
|
|
@DeleteMapping(value = "/deleteBatch")
|
|
|
|
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
|
|
|
this.bbsService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
|
@ -124,8 +119,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
//@AutoLog(value = "评论-通过id查询")
|
|
|
|
|
@ApiOperation(value="评论-通过id查询", notes="评论-通过id查询")
|
|
|
|
|
//@AutoLog(value = "评价-通过id查询")
|
|
|
|
|
@ApiOperation(value="评价-通过id查询", notes="评价-通过id查询")
|
|
|
|
|
@GetMapping(value = "/queryById")
|
|
|
|
|
public Result<Bbs> queryById(@RequestParam(name="id",required=true) String id) {
|
|
|
|
|
Bbs bbs = bbsService.getById(id);
|
|
|
|
@ -141,10 +136,9 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param request
|
|
|
|
|
* @param bbs
|
|
|
|
|
*/
|
|
|
|
|
//@RequiresPermissions("erp:bbs:exportXls")
|
|
|
|
|
@RequestMapping(value = "/exportXls")
|
|
|
|
|
public ModelAndView exportXls(HttpServletRequest request, Bbs bbs) {
|
|
|
|
|
return super.exportXls(request, bbs, Bbs.class, "评论");
|
|
|
|
|
return super.exportXls(request, bbs, Bbs.class, "评价");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -154,7 +148,6 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
|
|
|
|
|
* @param response
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
//@RequiresPermissions("erp:bbs:importExcel")
|
|
|
|
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
|
|
|
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
|
|
|
return super.importExcel(request, response, Bbs.class);
|
|
|
|
|