123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- package com.zhongzheng.controller.user;
- import java.util.List;
- import java.util.Arrays;
- import com.zhongzheng.modules.user.vo.UserDateNoteVo;
- import lombok.RequiredArgsConstructor;
- import org.springframework.security.access.prepost.PreAuthorize;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.PutMapping;
- import org.springframework.web.bind.annotation.DeleteMapping;
- 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.RestController;
- import com.zhongzheng.common.annotation.Log;
- import com.zhongzheng.common.core.controller.BaseController;
- import com.zhongzheng.common.core.domain.AjaxResult;
- import com.zhongzheng.common.enums.BusinessType;
- import com.zhongzheng.modules.user.vo.UserNoteVo;
- import com.zhongzheng.modules.user.bo.UserNoteQueryBo;
- import com.zhongzheng.modules.user.bo.UserNoteAddBo;
- import com.zhongzheng.modules.user.bo.UserNoteEditBo;
- import com.zhongzheng.modules.user.service.IUserNoteService;
- import com.zhongzheng.common.utils.poi.ExcelUtil;
- import com.zhongzheng.common.core.page.TableDataInfo;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- /**
- * 用户笔记记录Controller
- *
- * @author ruoyi
- * @date 2021-12-14
- */
- @Api(value = "用户笔记记录控制器", tags = {"用户笔记记录管理"})
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @RestController
- @RequestMapping("/user/note")
- public class UserNoteController extends BaseController {
- private final IUserNoteService iUserNoteService;
- /**
- * 查询用户笔记记录列表
- */
- @ApiOperation("查询用户笔记记录列表")
- @PreAuthorize("@ss.hasPermi('system:note:list')")
- @GetMapping("/listDate")
- public TableDataInfo<UserDateNoteVo> listDate(UserNoteQueryBo bo) {
- startPage();
- List<UserDateNoteVo> list = iUserNoteService.listDate(bo);
- return getDataTable(list);
- }
- /**
- * 新增用户笔记记录
- */
- @ApiOperation("新增用户笔记记录")
- @PreAuthorize("@ss.hasPermi('system:note:add')")
- @Log(title = "用户笔记记录", businessType = BusinessType.INSERT)
- @PostMapping()
- public AjaxResult<Void> add(@RequestBody UserNoteAddBo bo) {
- return toAjax(iUserNoteService.insertByAddBo(bo) ? 1 : 0);
- }
- /**
- * 修改用户笔记记录
- */
- @ApiOperation("修改用户笔记记录")
- @PreAuthorize("@ss.hasPermi('system:note:edit')")
- @Log(title = "用户笔记记录", businessType = BusinessType.UPDATE)
- @PostMapping("edit")
- public AjaxResult<Void> edit(@RequestBody UserNoteEditBo bo) {
- return toAjax(iUserNoteService.updateByEditBo(bo) ? 1 : 0);
- }
-
- }
|