| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.annotation.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.data.DirService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dirService.insertDir(entity); |
| | | dirService.insert(entity); |
| | | |
| | | return success(count); |
| | | return success(entity.getId()); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | |
| | | entity.setCreateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dirService.insertDirs(list); |
| | | int count = dirService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | int count = dirService.updateDir(entity); |
| | | int count = dirService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | int count = dirService.updateDirs(list); |
| | | int count = dirService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | return success(dirEntity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | |
| | | List<DirEntity> list = dirService.selectDirAll(); |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "递归查询数据") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "目录名称", dataType = "String", paramType = "query", required = false, example = "中俄东线管道工程南段") |
| | | }) |
| | | @GetMapping(value = "/selectDirRecursive") |
| | | public ResponseMsg<List<DirEntity>> selectDirRecursive(String name) { |
| | | try { |
| | | if (StringHelper.isEmpty(name)) { |
| | | name = "中俄东线管道工程南段"; |
| | | } |
| | | List<DirEntity> list = dirService.selectDirRecursive(name); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | } |