update 资料中心-文件夹
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
|
|||||||
public IPage<LawsAsmsOpenApi> queryPage(LawsAsmsOpenApi lawsAsmsOpenApi, Integer pageNo, Integer pageSize,
|
public IPage<LawsAsmsOpenApi> queryPage(LawsAsmsOpenApi lawsAsmsOpenApi, Integer pageNo, Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<LawsAsmsOpenApi> queryWrapper = QueryGenerator.initQueryWrapper(lawsAsmsOpenApi, req.getParameterMap());
|
QueryWrapper<LawsAsmsOpenApi> queryWrapper = QueryGenerator.initQueryWrapper(lawsAsmsOpenApi, req.getParameterMap());
|
||||||
queryWrapper.orderByDesc("id");
|
queryWrapper.orderByAsc("api_name");
|
||||||
Page<LawsAsmsOpenApi> page = new Page<>(pageNo, pageSize);
|
Page<LawsAsmsOpenApi> page = new Page<>(pageNo, pageSize);
|
||||||
return page(page, queryWrapper);
|
return page(page, queryWrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.jero.modules.laws.common.util;
|
||||||
|
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/10/26 16:55
|
||||||
|
* @Description: 当前用户工具类
|
||||||
|
*/
|
||||||
|
public class CurrentUserUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/10/26 16:58
|
||||||
|
* @Description: 获取当前用户id
|
||||||
|
**/
|
||||||
|
public static String getId() {
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
return loginUser.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/10/26 16:58
|
||||||
|
* @Description: 获取当前用户名
|
||||||
|
**/
|
||||||
|
public static String getUsername() {
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
return loginUser.getUsername();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+111
-108
@@ -5,7 +5,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.util.MessageUtils;
|
||||||
|
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFile;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFile;
|
||||||
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFileService;
|
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFileService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -22,132 +25,132 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 资料中心-文件数据
|
* @Description: 资料中心-文件数据
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-10-26
|
* @Date: 2023-10-26
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="资料中心-文件数据")
|
@Api(tags = "资料中心-文件数据")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/laws/dataCenter/lawsDataCenterFile")
|
@RequestMapping("/laws/dataCenter/lawsDataCenterFile")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class LawsDataCenterFileController extends JeroController<LawsDataCenterFile, ILawsDataCenterFileService> {
|
public class LawsDataCenterFileController extends JeroController<LawsDataCenterFile, ILawsDataCenterFileService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILawsDataCenterFileService lawsDataCenterFileService;
|
private ILawsDataCenterFileService lawsDataCenterFileService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param lawsDataCenterFile
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "资料中心-文件数据-分页列表查询")
|
|
||||||
@ApiOperation(value="资料中心-文件数据-分页列表查询", notes="资料中心-文件数据-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<IPage<LawsDataCenterFile>> queryPageList(LawsDataCenterFile lawsDataCenterFile,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
IPage<LawsDataCenterFile> pageList = lawsDataCenterFileService.queryPage(lawsDataCenterFile, pageNo, pageSize, req);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @param lawsDataCenterFile
|
* @param lawsDataCenterFile
|
||||||
* @param req
|
* @param pageNo
|
||||||
* @return
|
* @param pageSize
|
||||||
*/
|
* @param req
|
||||||
@AutoLog(value = "资料中心-文件数据-列表查询")
|
* @return
|
||||||
@ApiOperation(value="资料中心-文件数据-列表查询", notes="资料中心-文件数据-列表查询")
|
*/
|
||||||
@GetMapping(value = "/list")
|
@AutoLog(value = "资料中心-文件数据-分页列表查询")
|
||||||
public Result<List<LawsDataCenterFile>> queryList(LawsDataCenterFile lawsDataCenterFile, HttpServletRequest req) {
|
@ApiOperation(value = "资料中心-文件数据-分页列表查询", notes = "资料中心-文件数据-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<IPage<LawsDataCenterFile>> queryPageList(LawsDataCenterFile lawsDataCenterFile,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
IPage<LawsDataCenterFile> pageList = lawsDataCenterFileService.queryPage(lawsDataCenterFile, pageNo, pageSize, req);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param lawsDataCenterFile
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "资料中心-文件数据-列表查询")
|
||||||
|
@ApiOperation(value = "资料中心-文件数据-列表查询", notes = "资料中心-文件数据-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<LawsDataCenterFile>> queryList(LawsDataCenterFile lawsDataCenterFile, HttpServletRequest req) {
|
||||||
List<LawsDataCenterFile> list = lawsDataCenterFileService.queryList(lawsDataCenterFile, req);
|
List<LawsDataCenterFile> list = lawsDataCenterFileService.queryList(lawsDataCenterFile, req);
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
* @param lawsDataCenterFile
|
* @param lawsDataCenterFile
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件数据-添加")
|
@AutoLog(value = "资料中心-文件数据-添加")
|
||||||
@ApiOperation(value="资料中心-文件数据-添加", notes="资料中心-文件数据-添加")
|
@ApiOperation(value = "资料中心-文件数据-添加", notes = "资料中心-文件数据-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<T> add(@Validated @RequestBody LawsDataCenterFile lawsDataCenterFile) {
|
public Result<T> add(@Validated @RequestBody LawsDataCenterFile lawsDataCenterFile) {
|
||||||
lawsDataCenterFileService.add(lawsDataCenterFile);
|
lawsDataCenterFileService.add(lawsDataCenterFile);
|
||||||
return Result.OK("操作成功!");
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
* @param lawsDataCenterFile
|
* @param lawsDataCenterFile
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件数据-编辑")
|
@AutoLog(value = "资料中心-文件数据-编辑")
|
||||||
@ApiOperation(value="资料中心-文件数据-编辑", notes="资料中心-文件数据-编辑")
|
@ApiOperation(value = "资料中心-文件数据-编辑", notes = "资料中心-文件数据-编辑")
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
public Result<T> edit(@Validated @RequestBody LawsDataCenterFile lawsDataCenterFile) {
|
public Result<T> edit(@Validated @RequestBody LawsDataCenterFile lawsDataCenterFile) {
|
||||||
lawsDataCenterFileService.editById(lawsDataCenterFile);
|
lawsDataCenterFileService.editById(lawsDataCenterFile);
|
||||||
return Result.OK("操作成功!");
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件数据-通过id删除")
|
@AutoLog(value = "资料中心-文件数据-通过id删除")
|
||||||
@ApiOperation(value="资料中心-文件数据-通过id删除", notes="资料中心-文件数据-通过id删除")
|
@ApiOperation(value = "资料中心-文件数据-通过id删除", notes = "资料中心-文件数据-通过id删除")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
if (!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))) {
|
||||||
return Result.error("请选择数据!");
|
return Result.error("请选择数据!");
|
||||||
}
|
}
|
||||||
lawsDataCenterFileService.deleteById(map.get("id"));
|
lawsDataCenterFileService.deleteById(map.get("id"));
|
||||||
return Result.OK("删除成功!");
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件数据-批量删除")
|
@AutoLog(value = "资料中心-文件数据-批量删除")
|
||||||
@ApiOperation(value="资料中心-文件数据-批量删除", notes="资料中心-文件数据-批量删除")
|
@ApiOperation(value = "资料中心-文件数据-批量删除", notes = "资料中心-文件数据-批量删除")
|
||||||
@PostMapping(value = "/deleteBatch")
|
@PostMapping(value = "/deleteBatch")
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
if (!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))) {
|
||||||
return Result.error("请选择数据!");
|
return Result.error("请选择数据!");
|
||||||
}
|
}
|
||||||
this.lawsDataCenterFileService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
this.lawsDataCenterFileService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件数据-通过id查询")
|
@AutoLog(value = "资料中心-文件数据-通过id查询")
|
||||||
@ApiOperation(value="资料中心-文件数据-通过id查询", notes="资料中心-文件数据-通过id查询")
|
@ApiOperation(value = "资料中心-文件数据-通过id查询", notes = "资料中心-文件数据-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<LawsDataCenterFile> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<LawsDataCenterFile> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
LawsDataCenterFile lawsDataCenterFile = lawsDataCenterFileService.queryById(id);
|
LawsDataCenterFile lawsDataCenterFile = lawsDataCenterFileService.queryById(id);
|
||||||
if(lawsDataCenterFile==null) {
|
if (lawsDataCenterFile == null) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
}
|
}
|
||||||
return Result.OK(lawsDataCenterFile);
|
return Result.OK(lawsDataCenterFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+65
-116
@@ -3,18 +3,18 @@ package com.jero.modules.laws.dataCenter.controller;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import com.jero.common.util.MessageUtils;
|
||||||
|
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
||||||
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFolderService;
|
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFolderService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
@@ -22,132 +22,81 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 资料中心-文件夹
|
* @Description: 资料中心-文件夹
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-10-26
|
* @Date: 2023-10-26
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="资料中心-文件夹")
|
@Api(tags = "资料中心-文件夹")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/laws/dataCenter/lawsDataCenterFolder")
|
@RequestMapping("/laws/dataCenter/lawsDataCenterFolder")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class LawsDataCenterFolderController extends JeroController<LawsDataCenterFolder, ILawsDataCenterFolderService> {
|
public class LawsDataCenterFolderController extends JeroController<LawsDataCenterFolder, ILawsDataCenterFolderService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILawsDataCenterFolderService lawsDataCenterFolderService;
|
private ILawsDataCenterFolderService lawsDataCenterFolderService;
|
||||||
|
|
||||||
/**
|
@AutoLog(value = "资料中心-文件夹-获取树型列表")
|
||||||
* 分页列表查询
|
@ApiOperation(value = "资料中心-文件夹-获取树型列表", notes = "资料中心-文件夹-获取树型列表")
|
||||||
*
|
@GetMapping(value = "/getTreeList")
|
||||||
* @param lawsDataCenterFolder
|
public Result<List<LawsDataCenterFolder>> getTreeList() {
|
||||||
* @param pageNo
|
List<LawsDataCenterFolder> treeList = lawsDataCenterFolderService.getTreeList();
|
||||||
* @param pageSize
|
return Result.OK(treeList);
|
||||||
* @param req
|
}
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "资料中心-文件夹-分页列表查询")
|
|
||||||
@ApiOperation(value="资料中心-文件夹-分页列表查询", notes="资料中心-文件夹-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<IPage<LawsDataCenterFolder>> queryPageList(LawsDataCenterFolder lawsDataCenterFolder,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
IPage<LawsDataCenterFolder> pageList = lawsDataCenterFolderService.queryPage(lawsDataCenterFolder, pageNo, pageSize, req);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 新增同级
|
||||||
*
|
*
|
||||||
* @param lawsDataCenterFolder
|
* @param lawsDataCenterFolder
|
||||||
* @param req
|
* @return
|
||||||
* @return
|
*/
|
||||||
*/
|
@AutoLog(value = "资料中心-文件夹-新增同级")
|
||||||
@AutoLog(value = "资料中心-文件夹-列表查询")
|
@ApiOperation(value = "资料中心-文件夹-新增同级", notes = "资料中心-文件夹-新增同级")
|
||||||
@ApiOperation(value="资料中心-文件夹-列表查询", notes="资料中心-文件夹-列表查询")
|
@PostMapping(value = "/addBrother")
|
||||||
@GetMapping(value = "/list")
|
public Result<T> addBrother(@Validated @RequestBody LawsDataCenterFolder lawsDataCenterFolder) {
|
||||||
public Result<List<LawsDataCenterFolder>> queryList(LawsDataCenterFolder lawsDataCenterFolder, HttpServletRequest req) {
|
lawsDataCenterFolderService.add(lawsDataCenterFolder);
|
||||||
List<LawsDataCenterFolder> list = lawsDataCenterFolderService.queryList(lawsDataCenterFolder, req);
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
return Result.OK(list);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
@AutoLog(value = "资料中心-文件夹-新增子级")
|
||||||
* 添加
|
@ApiOperation(value = "资料中心-文件夹-新增子级", notes = "资料中心-文件夹-新增子级")
|
||||||
*
|
@PostMapping(value = "/addChild")
|
||||||
* @param lawsDataCenterFolder
|
public Result<T> addChild(@Validated @RequestBody LawsDataCenterFolder lawsDataCenterFolder) {
|
||||||
* @return
|
if (StringUtils.isBlank(lawsDataCenterFolder.getParentId())) {
|
||||||
*/
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "parentId");
|
||||||
@AutoLog(value = "资料中心-文件夹-添加")
|
}
|
||||||
@ApiOperation(value="资料中心-文件夹-添加", notes="资料中心-文件夹-添加")
|
lawsDataCenterFolderService.add(lawsDataCenterFolder);
|
||||||
@PostMapping(value = "/add")
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
public Result<T> add(@Validated @RequestBody LawsDataCenterFolder lawsDataCenterFolder) {
|
}
|
||||||
lawsDataCenterFolderService.add(lawsDataCenterFolder);
|
|
||||||
return Result.OK("操作成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
* @param lawsDataCenterFolder
|
* @param lawsDataCenterFolder
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件夹-编辑")
|
@AutoLog(value = "资料中心-文件夹-编辑")
|
||||||
@ApiOperation(value="资料中心-文件夹-编辑", notes="资料中心-文件夹-编辑")
|
@ApiOperation(value = "资料中心-文件夹-编辑", notes = "资料中心-文件夹-编辑")
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
public Result<T> edit(@Validated @RequestBody LawsDataCenterFolder lawsDataCenterFolder) {
|
public Result<T> edit(@Validated @RequestBody LawsDataCenterFolder lawsDataCenterFolder) {
|
||||||
lawsDataCenterFolderService.editById(lawsDataCenterFolder);
|
lawsDataCenterFolderService.editById(lawsDataCenterFolder);
|
||||||
return Result.OK("操作成功!");
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "资料中心-文件夹-通过id删除")
|
@AutoLog(value = "资料中心-文件夹-通过id删除")
|
||||||
@ApiOperation(value="资料中心-文件夹-通过id删除", notes="资料中心-文件夹-通过id删除")
|
@ApiOperation(value = "资料中心-文件夹-通过id删除", notes = "资料中心-文件夹-通过id删除")
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
if (!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))) {
|
||||||
return Result.error("请选择数据!");
|
return Result.error("请选择数据!");
|
||||||
}
|
}
|
||||||
lawsDataCenterFolderService.deleteById(map.get("id"));
|
lawsDataCenterFolderService.deleteById(map.get("id"));
|
||||||
return Result.OK("删除成功!");
|
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param map
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "资料中心-文件夹-批量删除")
|
|
||||||
@ApiOperation(value="资料中心-文件夹-批量删除", notes="资料中心-文件夹-批量删除")
|
|
||||||
@PostMapping(value = "/deleteBatch")
|
|
||||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
|
||||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
|
||||||
return Result.error("请选择数据!");
|
|
||||||
}
|
|
||||||
this.lawsDataCenterFolderService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "资料中心-文件夹-通过id查询")
|
|
||||||
@ApiOperation(value="资料中心-文件夹-通过id查询", notes="资料中心-文件夹-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<LawsDataCenterFolder> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
LawsDataCenterFolder lawsDataCenterFolder = lawsDataCenterFolderService.queryById(id);
|
|
||||||
if(lawsDataCenterFolder==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(lawsDataCenterFolder);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+67
-30
@@ -4,7 +4,10 @@ import java.io.Serializable;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -18,80 +21,114 @@ import lombok.EqualsAndHashCode;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 资料中心-文件夹
|
* @Description: 资料中心-文件夹
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-10-26
|
* @Date: 2023-10-26
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("laws_data_center_folder")
|
@TableName("laws_data_center_folder")
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value="laws_data_center_folder对象", description="资料中心-文件夹")
|
@ApiModel(value = "laws_data_center_folder对象", description = "资料中心-文件夹")
|
||||||
public class LawsDataCenterFolder implements Serializable {
|
public class LawsDataCenterFolder implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**主键ID*/
|
/**
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "主键ID")
|
@ApiModelProperty(value = "主键ID")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
/**创建人*/
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
private java.lang.String createBy;
|
private java.lang.String createBy;
|
||||||
/**创建时间*/
|
/**
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
* 创建时间
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private java.util.Date createTime;
|
private java.util.Date createTime;
|
||||||
/**更新人*/
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "更新人")
|
@ApiModelProperty(value = "更新人")
|
||||||
private java.lang.String updateBy;
|
private java.lang.String updateBy;
|
||||||
/**更新时间*/
|
/**
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
* 更新时间
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "更新时间")
|
@ApiModelProperty(value = "更新时间")
|
||||||
private java.util.Date updateTime;
|
private java.util.Date updateTime;
|
||||||
/**所属部门*/
|
/**
|
||||||
@Excel(name = "所属部门", width = 15)
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@Excel(name = "所属部门", width = 15)
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String orgCode;
|
private java.lang.String orgCode;
|
||||||
/**0表示未删除,1表示删除*/
|
/**
|
||||||
@Excel(name = "0表示未删除,1表示删除", width = 15)
|
* 0表示未删除,1表示删除
|
||||||
|
*/
|
||||||
|
@Excel(name = "0表示未删除,1表示删除", width = 15)
|
||||||
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||||
private java.lang.Integer delFlag;
|
private java.lang.Integer delFlag;
|
||||||
/**文件夹名称*/
|
/**
|
||||||
@Excel(name = "文件夹名称", width = 15)
|
* 文件夹名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "文件夹名称", width = 15)
|
||||||
@ApiModelProperty(value = "文件夹名称")
|
@ApiModelProperty(value = "文件夹名称")
|
||||||
@NotBlank(message = "文件夹名称不能为空")
|
@NotBlank(message = "文件夹名称不能为空")
|
||||||
@Size(max = 50, message = "文件夹名称超出最大限度")
|
@Size(max = 50, message = "文件夹名称超出最大限度")
|
||||||
private java.lang.String folderName;
|
private java.lang.String folderName;
|
||||||
/**管理权限(用户id逗号拼接)*/
|
/**
|
||||||
@Excel(name = "管理权限(用户id逗号拼接)", width = 15)
|
* 管理权限(用户id逗号拼接)
|
||||||
|
*/
|
||||||
|
@Excel(name = "管理权限(用户id逗号拼接)", width = 15)
|
||||||
@ApiModelProperty(value = "管理权限(用户id逗号拼接)")
|
@ApiModelProperty(value = "管理权限(用户id逗号拼接)")
|
||||||
@Size(max = 2000, message = "管理权限超出最大限度")
|
@Size(max = 2000, message = "管理权限超出最大限度")
|
||||||
private java.lang.String authManageIds;
|
private java.lang.String authManageIds;
|
||||||
/**查看权限(用户id逗号拼接)*/
|
/**
|
||||||
@Excel(name = "查看权限(用户id逗号拼接)", width = 15)
|
* 查看权限(用户id逗号拼接)
|
||||||
|
*/
|
||||||
|
@Excel(name = "查看权限(用户id逗号拼接)", width = 15)
|
||||||
@ApiModelProperty(value = "查看权限(用户id逗号拼接)")
|
@ApiModelProperty(value = "查看权限(用户id逗号拼接)")
|
||||||
@Size(max = 2000, message = "查看权限超出最大限度")
|
@Size(max = 2000, message = "查看权限超出最大限度")
|
||||||
private java.lang.String authViewIds;
|
private java.lang.String authViewIds;
|
||||||
/**文件夹顺序*/
|
/**
|
||||||
@Excel(name = "文件夹顺序", width = 15)
|
* 文件夹顺序
|
||||||
|
*/
|
||||||
|
@Excel(name = "文件夹顺序", width = 15)
|
||||||
@ApiModelProperty(value = "文件夹顺序")
|
@ApiModelProperty(value = "文件夹顺序")
|
||||||
@NotNull(message = "文件夹顺序不能为空")
|
@NotNull(message = "文件夹顺序不能为空")
|
||||||
|
@Max(value = 999999999, message = "文件夹顺序超出最大限度")
|
||||||
|
@Min(value = 0, message = "文件夹顺序不能小于0")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**父id*/
|
/**
|
||||||
@Excel(name = "父id", width = 15)
|
* 父id
|
||||||
|
*/
|
||||||
|
@Excel(name = "父id", width = 15)
|
||||||
@ApiModelProperty(value = "父id")
|
@ApiModelProperty(value = "父id")
|
||||||
private java.lang.String parentId;
|
private java.lang.String parentId;
|
||||||
/**拥有者id*/
|
/**
|
||||||
|
* 拥有者id
|
||||||
|
*/
|
||||||
@Excel(name = "拥有者id", width = 15)
|
@Excel(name = "拥有者id", width = 15)
|
||||||
@ApiModelProperty(value = "拥有者id")
|
@ApiModelProperty(value = "拥有者id")
|
||||||
private java.lang.String ownerId;
|
private java.lang.String ownerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子集
|
||||||
|
*/
|
||||||
|
@Excel(name = "子集", width = 15)
|
||||||
|
@ApiModelProperty(value = "子集")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<LawsDataCenterFolder> children;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -2,6 +2,7 @@ package com.jero.modules.laws.dataCenter.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@@ -12,6 +13,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
* @Date: 2023-10-26
|
* @Date: 2023-10-26
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface LawsDataCenterFolderMapper extends BaseMapper<LawsDataCenterFolder> {
|
public interface LawsDataCenterFolderMapper extends BaseMapper<LawsDataCenterFolder> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/10/26 17:33
|
||||||
|
* @Description: 获取全部文件夹集合
|
||||||
|
**/
|
||||||
|
List<LawsDataCenterFolder> getAllFolderList(@Param("userId") String userId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -16,4 +16,14 @@
|
|||||||
<result column="parent_id" property="parentId" />
|
<result column="parent_id" property="parentId" />
|
||||||
<result column="owner_id" property="ownerId" />
|
<result column="owner_id" property="ownerId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="getAllFolderList" resultType="com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder">
|
||||||
|
SELECT
|
||||||
|
ldcf.id,
|
||||||
|
ldcf.folder_name,
|
||||||
|
ldcf.auth_manage_ids,
|
||||||
|
ldcf.auth_view_ids,
|
||||||
|
ldcf.parent_id
|
||||||
|
FROM
|
||||||
|
laws_data_center_folder ldcf
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+6
-37
@@ -2,8 +2,6 @@ package com.jero.modules.laws.dataCenter.service;
|
|||||||
|
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,25 +12,12 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface ILawsDataCenterFolderService extends IService<LawsDataCenterFolder> {
|
public interface ILawsDataCenterFolderService extends IService<LawsDataCenterFolder> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* @Author: liao
|
||||||
*
|
* @Date: 2023/10/26 17:16
|
||||||
* @param lawsDataCenterFolder
|
* @Description: 获取树型列表
|
||||||
* @param pageNo
|
**/
|
||||||
* @param pageSize
|
List<LawsDataCenterFolder> getTreeList();
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
IPage<LawsDataCenterFolder> queryPage(LawsDataCenterFolder lawsDataCenterFolder, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
*
|
|
||||||
* @param lawsDataCenterFolder
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<LawsDataCenterFolder> queryList(LawsDataCenterFolder lawsDataCenterFolder, HttpServletRequest req);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -57,20 +42,4 @@ public interface ILawsDataCenterFolderService extends IService<LawsDataCenterFol
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
void deleteByIds(List<String> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
LawsDataCenterFolder queryById(String id);
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-5
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.laws.dataCenter.service.impl;
|
package com.jero.modules.laws.dataCenter.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFile;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFile;
|
||||||
import com.jero.modules.laws.dataCenter.mapper.LawsDataCenterFileMapper;
|
import com.jero.modules.laws.dataCenter.mapper.LawsDataCenterFileMapper;
|
||||||
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFileService;
|
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFileService;
|
||||||
@@ -64,9 +65,7 @@ public class LawsDataCenterFileServiceImpl extends ServiceImpl<LawsDataCenterFil
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(LawsDataCenterFile lawsDataCenterFile) {
|
public void add(LawsDataCenterFile lawsDataCenterFile) {
|
||||||
Date now = new Date();
|
lawsDataCenterFile.setOwnerId(CurrentUserUtil.getId());
|
||||||
lawsDataCenterFile.setCreateTime(now);
|
|
||||||
lawsDataCenterFile.setUpdateTime(now);
|
|
||||||
save(lawsDataCenterFile);
|
save(lawsDataCenterFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,8 +77,6 @@ public class LawsDataCenterFileServiceImpl extends ServiceImpl<LawsDataCenterFil
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(LawsDataCenterFile lawsDataCenterFile) {
|
public void editById(LawsDataCenterFile lawsDataCenterFile) {
|
||||||
Date now = new Date();
|
|
||||||
lawsDataCenterFile.setUpdateTime(now);
|
|
||||||
saveOrUpdate(lawsDataCenterFile);
|
saveOrUpdate(lawsDataCenterFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-55
@@ -1,9 +1,12 @@
|
|||||||
package com.jero.modules.laws.dataCenter.service.impl;
|
package com.jero.modules.laws.dataCenter.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
|
||||||
import com.jero.modules.laws.dataCenter.mapper.LawsDataCenterFolderMapper;
|
import com.jero.modules.laws.dataCenter.mapper.LawsDataCenterFolderMapper;
|
||||||
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFolderService;
|
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFolderService;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
@@ -26,35 +29,20 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
@Transactional(rollbackFor = JeroBootException.class)
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterFolderMapper, LawsDataCenterFolder> implements ILawsDataCenterFolderService {
|
public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterFolderMapper, LawsDataCenterFolder> implements ILawsDataCenterFolderService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LawsDataCenterFolderMapper lawsDataCenterFolderMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* @Author: liao
|
||||||
*
|
* @Date: 2023/10/26 17:17
|
||||||
* @param lawsDataCenterFolder
|
* @Description: 获取树型列表
|
||||||
* @param pageNo
|
**/
|
||||||
* @param pageSize
|
@Override
|
||||||
* @param req
|
public List<LawsDataCenterFolder> getTreeList() {
|
||||||
* @return
|
// 获取全部文件夹集合
|
||||||
*/
|
List<LawsDataCenterFolder> allFolderList = lawsDataCenterFolderMapper.getAllFolderList(CurrentUserUtil.getId());
|
||||||
@Override
|
return allFolderList;
|
||||||
public IPage<LawsDataCenterFolder> queryPage(LawsDataCenterFolder lawsDataCenterFolder, Integer pageNo, Integer pageSize,
|
}
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<LawsDataCenterFolder> queryWrapper = QueryGenerator.initQueryWrapper(lawsDataCenterFolder, req.getParameterMap());
|
|
||||||
Page<LawsDataCenterFolder> page = new Page<>(pageNo, pageSize);
|
|
||||||
return page(page, queryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
*
|
|
||||||
* @param lawsDataCenterFolder
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<LawsDataCenterFolder> queryList(LawsDataCenterFolder lawsDataCenterFolder, HttpServletRequest req) {
|
|
||||||
return list(QueryGenerator.initQueryWrapper(lawsDataCenterFolder, req.getParameterMap()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -64,9 +52,7 @@ public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterF
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(LawsDataCenterFolder lawsDataCenterFolder) {
|
public void add(LawsDataCenterFolder lawsDataCenterFolder) {
|
||||||
Date now = new Date();
|
lawsDataCenterFolder.setOwnerId(CurrentUserUtil.getId());
|
||||||
lawsDataCenterFolder.setCreateTime(now);
|
|
||||||
lawsDataCenterFolder.setUpdateTime(now);
|
|
||||||
save(lawsDataCenterFolder);
|
save(lawsDataCenterFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,8 +64,6 @@ public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterF
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(LawsDataCenterFolder lawsDataCenterFolder) {
|
public void editById(LawsDataCenterFolder lawsDataCenterFolder) {
|
||||||
Date now = new Date();
|
|
||||||
lawsDataCenterFolder.setUpdateTime(now);
|
|
||||||
saveOrUpdate(lawsDataCenterFolder);
|
saveOrUpdate(lawsDataCenterFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,26 +77,4 @@ public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterF
|
|||||||
public void deleteById(String id) {
|
public void deleteById(String id) {
|
||||||
removeById(id);
|
removeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void deleteByIds(List<String> ids) {
|
|
||||||
removeByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public LawsDataCenterFolder queryById(String id) {
|
|
||||||
return getById(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user