Commit bcee37b8 authored by RuoYi's avatar RuoYi
Browse files

若依 1.1

parent 85c17f45
...@@ -28,10 +28,10 @@ public interface ISysLogininforService ...@@ -28,10 +28,10 @@ public interface ISysLogininforService
/** /**
* 批量删除系统登录日志 * 批量删除系统登录日志
* *
* @param ids 需要删除的数据 * @param infoIds 需要删除的登录日志ID
* @return * @return
*/ */
public int deleteLogininforByIds(String ids); public int deleteLogininforByIds(Long[] infoIds);
/** /**
* 清空系统登录日志 * 清空系统登录日志
......
...@@ -28,10 +28,10 @@ public interface ISysOperLogService ...@@ -28,10 +28,10 @@ public interface ISysOperLogService
/** /**
* 批量删除系统操作日志 * 批量删除系统操作日志
* *
* @param ids 需要删除的数据 * @param operIds 需要删除的操作日志ID
* @return 结果 * @return 结果
*/ */
public int deleteOperLogByIds(String ids); public int deleteOperLogByIds(Long[] operIds);
/** /**
* 查询操作日志详细 * 查询操作日志详细
......
...@@ -3,7 +3,6 @@ package com.ruoyi.project.monitor.service.impl; ...@@ -3,7 +3,6 @@ package com.ruoyi.project.monitor.service.impl;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.project.monitor.domain.SysLogininfor; import com.ruoyi.project.monitor.domain.SysLogininfor;
import com.ruoyi.project.monitor.mapper.SysLogininforMapper; import com.ruoyi.project.monitor.mapper.SysLogininforMapper;
import com.ruoyi.project.monitor.service.ISysLogininforService; import com.ruoyi.project.monitor.service.ISysLogininforService;
...@@ -46,13 +45,13 @@ public class SysLogininforServiceImpl implements ISysLogininforService ...@@ -46,13 +45,13 @@ public class SysLogininforServiceImpl implements ISysLogininforService
/** /**
* 批量删除系统登录日志 * 批量删除系统登录日志
* *
* @param ids 需要删除的数据 * @param infoIds 需要删除的登录日志ID
* @return * @return
*/ */
@Override @Override
public int deleteLogininforByIds(String ids) public int deleteLogininforByIds(Long[] infoIds)
{ {
return logininforMapper.deleteLogininforByIds(Convert.toStrArray(ids)); return logininforMapper.deleteLogininforByIds(infoIds);
} }
/** /**
......
...@@ -3,7 +3,6 @@ package com.ruoyi.project.monitor.service.impl; ...@@ -3,7 +3,6 @@ package com.ruoyi.project.monitor.service.impl;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.project.monitor.domain.SysOperLog; import com.ruoyi.project.monitor.domain.SysOperLog;
import com.ruoyi.project.monitor.mapper.SysOperLogMapper; import com.ruoyi.project.monitor.mapper.SysOperLogMapper;
import com.ruoyi.project.monitor.service.ISysOperLogService; import com.ruoyi.project.monitor.service.ISysOperLogService;
...@@ -45,13 +44,12 @@ public class SysOperLogServiceImpl implements ISysOperLogService ...@@ -45,13 +44,12 @@ public class SysOperLogServiceImpl implements ISysOperLogService
/** /**
* 批量删除系统操作日志 * 批量删除系统操作日志
* *
* @param ids 需要删除的数据 * @param operIds 需要删除的操作日志ID
* @return * @return 结果
*/ */
@Override public int deleteOperLogByIds(Long[] operIds)
public int deleteOperLogByIds(String ids)
{ {
return operLogMapper.deleteOperLogByIds(Convert.toStrArray(ids)); return operLogMapper.deleteOperLogByIds(operIds);
} }
/** /**
......
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
...@@ -45,6 +47,16 @@ public class SysConfigController extends BaseController ...@@ -45,6 +47,16 @@ public class SysConfigController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:config:export')")
@GetMapping("/export")
public AjaxResult export(SysConfig config)
{
List<SysConfig> list = configService.selectConfigList(config);
ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
return util.exportExcel(list, "参数数据");
}
/** /**
* 根据参数编号获取详细信息 * 根据参数编号获取详细信息
*/ */
...@@ -71,7 +83,7 @@ public class SysConfigController extends BaseController ...@@ -71,7 +83,7 @@ public class SysConfigController extends BaseController
@PreAuthorize("@ss.hasPermi('system:config:add')") @PreAuthorize("@ss.hasPermi('system:config:add')")
@Log(title = "参数管理", businessType = BusinessType.INSERT) @Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysConfig config) public AjaxResult add(@Validated @RequestBody SysConfig config)
{ {
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{ {
...@@ -87,7 +99,7 @@ public class SysConfigController extends BaseController ...@@ -87,7 +99,7 @@ public class SysConfigController extends BaseController
@PreAuthorize("@ss.hasPermi('system:config:edit')") @PreAuthorize("@ss.hasPermi('system:config:edit')")
@Log(title = "参数管理", businessType = BusinessType.UPDATE) @Log(title = "参数管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysConfig config) public AjaxResult edit(@Validated @RequestBody SysConfig config)
{ {
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{ {
...@@ -102,9 +114,9 @@ public class SysConfigController extends BaseController ...@@ -102,9 +114,9 @@ public class SysConfigController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:config:remove')") @PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "参数管理", businessType = BusinessType.DELETE) @Log(title = "参数管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{configId}") @DeleteMapping("/{configIds}")
public AjaxResult remove(@PathVariable Long configId) public AjaxResult remove(@PathVariable Long[] configIds)
{ {
return toAjax(configService.deleteConfigById(configId)); return toAjax(configService.deleteConfigByIds(configIds));
} }
} }
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -10,7 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -10,7 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
...@@ -70,7 +70,6 @@ public class SysDeptController extends BaseController ...@@ -70,7 +70,6 @@ public class SysDeptController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:dept:query')") @PreAuthorize("@ss.hasPermi('system:dept:query')")
@GetMapping(value = "/roleDeptTreeselect/{roleId}") @GetMapping(value = "/roleDeptTreeselect/{roleId}")
@ResponseBody
public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId) public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
{ {
return AjaxResult.success(deptService.selectDeptListByRoleId(roleId)); return AjaxResult.success(deptService.selectDeptListByRoleId(roleId));
...@@ -82,7 +81,7 @@ public class SysDeptController extends BaseController ...@@ -82,7 +81,7 @@ public class SysDeptController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dept:add')") @PreAuthorize("@ss.hasPermi('system:dept:add')")
@Log(title = "部门管理", businessType = BusinessType.INSERT) @Log(title = "部门管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysDept dept) public AjaxResult add(@Validated @RequestBody SysDept dept)
{ {
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{ {
...@@ -98,7 +97,7 @@ public class SysDeptController extends BaseController ...@@ -98,7 +97,7 @@ public class SysDeptController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dept:edit')") @PreAuthorize("@ss.hasPermi('system:dept:edit')")
@Log(title = "部门管理", businessType = BusinessType.UPDATE) @Log(title = "部门管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysDept dept) public AjaxResult edit(@Validated @RequestBody SysDept dept)
{ {
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{ {
......
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -10,9 +11,9 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -10,9 +11,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
...@@ -35,7 +36,6 @@ public class SysDictDataController extends BaseController ...@@ -35,7 +36,6 @@ public class SysDictDataController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dict:list')") @PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list") @GetMapping("/list")
@ResponseBody
public TableDataInfo list(SysDictData dictData) public TableDataInfo list(SysDictData dictData)
{ {
startPage(); startPage();
...@@ -43,6 +43,16 @@ public class SysDictDataController extends BaseController ...@@ -43,6 +43,16 @@ public class SysDictDataController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictData dictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
return util.exportExcel(list, "字典数据");
}
/** /**
* 查询字典数据详细 * 查询字典数据详细
*/ */
...@@ -69,7 +79,7 @@ public class SysDictDataController extends BaseController ...@@ -69,7 +79,7 @@ public class SysDictDataController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dict:add')") @PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "字典数据", businessType = BusinessType.INSERT) @Log(title = "字典数据", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysDictData dict) public AjaxResult add(@Validated @RequestBody SysDictData dict)
{ {
dict.setCreateBy(SecurityUtils.getUsername()); dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictDataService.insertDictData(dict)); return toAjax(dictDataService.insertDictData(dict));
...@@ -81,7 +91,7 @@ public class SysDictDataController extends BaseController ...@@ -81,7 +91,7 @@ public class SysDictDataController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dict:edit')") @PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "字典数据", businessType = BusinessType.UPDATE) @Log(title = "字典数据", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysDictData dict) public AjaxResult edit(@Validated @RequestBody SysDictData dict)
{ {
dict.setUpdateBy(SecurityUtils.getUsername()); dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictDataService.updateDictData(dict)); return toAjax(dictDataService.updateDictData(dict));
...@@ -92,9 +102,9 @@ public class SysDictDataController extends BaseController ...@@ -92,9 +102,9 @@ public class SysDictDataController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:dict:remove')") @PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.DELETE) @Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictCode}") @DeleteMapping("/{dictCodes}")
public AjaxResult remove(@PathVariable Long dictCode) public AjaxResult remove(@PathVariable Long[] dictCodes)
{ {
return toAjax(dictDataService.deleteDictDataById(dictCode)); return toAjax(dictDataService.deleteDictDataByIds(dictCodes));
} }
} }
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -10,10 +11,10 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -10,10 +11,10 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
...@@ -36,7 +37,6 @@ public class SysDictTypeController extends BaseController ...@@ -36,7 +37,6 @@ public class SysDictTypeController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dict:list')") @PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list") @GetMapping("/list")
@ResponseBody
public TableDataInfo list(SysDictType dictType) public TableDataInfo list(SysDictType dictType)
{ {
startPage(); startPage();
...@@ -44,6 +44,16 @@ public class SysDictTypeController extends BaseController ...@@ -44,6 +44,16 @@ public class SysDictTypeController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictType dictType)
{
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
return util.exportExcel(list, "字典类型");
}
/** /**
* 查询字典类型详细 * 查询字典类型详细
*/ */
...@@ -60,7 +70,7 @@ public class SysDictTypeController extends BaseController ...@@ -60,7 +70,7 @@ public class SysDictTypeController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dict:add')") @PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "字典类型", businessType = BusinessType.INSERT) @Log(title = "字典类型", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysDictType dict) public AjaxResult add(@Validated @RequestBody SysDictType dict)
{ {
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{ {
...@@ -76,7 +86,7 @@ public class SysDictTypeController extends BaseController ...@@ -76,7 +86,7 @@ public class SysDictTypeController extends BaseController
@PreAuthorize("@ss.hasPermi('system:dict:edit')") @PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "字典类型", businessType = BusinessType.UPDATE) @Log(title = "字典类型", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysDictType dict) public AjaxResult edit(@Validated @RequestBody SysDictType dict)
{ {
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{ {
...@@ -91,9 +101,9 @@ public class SysDictTypeController extends BaseController ...@@ -91,9 +101,9 @@ public class SysDictTypeController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:dict:remove')") @PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.DELETE) @Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictId}") @DeleteMapping("/{dictIds}")
public AjaxResult remove(@PathVariable Long dictId) public AjaxResult remove(@PathVariable Long[] dictIds)
{ {
return toAjax(dictTypeService.deleteDictTypeById(dictId)); return toAjax(dictTypeService.deleteDictTypeByIds(dictIds));
} }
} }
...@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
...@@ -71,7 +70,6 @@ public class SysMenuController extends BaseController ...@@ -71,7 +70,6 @@ public class SysMenuController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:menu:query')") @PreAuthorize("@ss.hasPermi('system:menu:query')")
@GetMapping(value = "/roleMenuTreeselect/{roleId}") @GetMapping(value = "/roleMenuTreeselect/{roleId}")
@ResponseBody
public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId) public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
{ {
return AjaxResult.success(menuService.selectMenuListByRoleId(roleId)); return AjaxResult.success(menuService.selectMenuListByRoleId(roleId));
...@@ -83,7 +81,7 @@ public class SysMenuController extends BaseController ...@@ -83,7 +81,7 @@ public class SysMenuController extends BaseController
@PreAuthorize("@ss.hasPermi('system:menu:add')") @PreAuthorize("@ss.hasPermi('system:menu:add')")
@Log(title = "菜单管理", businessType = BusinessType.INSERT) @Log(title = "菜单管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody @Validated SysMenu menu) public AjaxResult add(@Validated @RequestBody SysMenu menu)
{ {
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{ {
...@@ -99,7 +97,7 @@ public class SysMenuController extends BaseController ...@@ -99,7 +97,7 @@ public class SysMenuController extends BaseController
@PreAuthorize("@ss.hasPermi('system:menu:edit')") @PreAuthorize("@ss.hasPermi('system:menu:edit')")
@Log(title = "菜单管理", businessType = BusinessType.UPDATE) @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysMenu menu) public AjaxResult edit(@Validated @RequestBody SysMenu menu)
{ {
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{ {
......
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -60,7 +61,7 @@ public class SysNoticeController extends BaseController ...@@ -60,7 +61,7 @@ public class SysNoticeController extends BaseController
@PreAuthorize("@ss.hasPermi('system:notice:add')") @PreAuthorize("@ss.hasPermi('system:notice:add')")
@Log(title = "通知公告", businessType = BusinessType.INSERT) @Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysNotice notice) public AjaxResult add(@Validated @RequestBody SysNotice notice)
{ {
notice.setCreateBy(SecurityUtils.getUsername()); notice.setCreateBy(SecurityUtils.getUsername());
return toAjax(noticeService.insertNotice(notice)); return toAjax(noticeService.insertNotice(notice));
...@@ -72,7 +73,7 @@ public class SysNoticeController extends BaseController ...@@ -72,7 +73,7 @@ public class SysNoticeController extends BaseController
@PreAuthorize("@ss.hasPermi('system:notice:edit')") @PreAuthorize("@ss.hasPermi('system:notice:edit')")
@Log(title = "通知公告", businessType = BusinessType.UPDATE) @Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysNotice notice) public AjaxResult edit(@Validated @RequestBody SysNotice notice)
{ {
notice.setUpdateBy(SecurityUtils.getUsername()); notice.setUpdateBy(SecurityUtils.getUsername());
return toAjax(noticeService.updateNotice(notice)); return toAjax(noticeService.updateNotice(notice));
......
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
...@@ -44,6 +46,16 @@ public class SysPostController extends BaseController ...@@ -44,6 +46,16 @@ public class SysPostController extends BaseController
List<SysPost> list = postService.selectPostList(post); List<SysPost> list = postService.selectPostList(post);
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:config:export')")
@GetMapping("/export")
public AjaxResult export(SysPost post)
{
List<SysPost> list = postService.selectPostList(post);
ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
return util.exportExcel(list, "岗位数据");
}
/** /**
* 根据岗位编号获取详细信息 * 根据岗位编号获取详细信息
...@@ -61,7 +73,7 @@ public class SysPostController extends BaseController ...@@ -61,7 +73,7 @@ public class SysPostController extends BaseController
@PreAuthorize("@ss.hasPermi('system:post:add')") @PreAuthorize("@ss.hasPermi('system:post:add')")
@Log(title = "岗位管理", businessType = BusinessType.INSERT) @Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysPost post) public AjaxResult add(@Validated @RequestBody SysPost post)
{ {
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{ {
...@@ -81,7 +93,7 @@ public class SysPostController extends BaseController ...@@ -81,7 +93,7 @@ public class SysPostController extends BaseController
@PreAuthorize("@ss.hasPermi('system:post:edit')") @PreAuthorize("@ss.hasPermi('system:post:edit')")
@Log(title = "岗位管理", businessType = BusinessType.UPDATE) @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysPost post) public AjaxResult edit(@Validated @RequestBody SysPost post)
{ {
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{ {
...@@ -100,10 +112,10 @@ public class SysPostController extends BaseController ...@@ -100,10 +112,10 @@ public class SysPostController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:post:remove')") @PreAuthorize("@ss.hasPermi('system:post:remove')")
@Log(title = "岗位管理", businessType = BusinessType.DELETE) @Log(title = "岗位管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{postId}") @DeleteMapping("/{postIds}")
public AjaxResult remove(@PathVariable Long postId) public AjaxResult remove(@PathVariable Long[] postIds)
{ {
return toAjax(postService.deletePostById(postId)); return toAjax(postService.deletePostByIds(postIds));
} }
/** /**
......
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
...@@ -42,6 +44,16 @@ public class SysRoleController extends BaseController ...@@ -42,6 +44,16 @@ public class SysRoleController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:role:export')")
@GetMapping("/export")
public AjaxResult export(SysRole role)
{
List<SysRole> list = roleService.selectRoleList(role);
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
return util.exportExcel(list, "角色数据");
}
/** /**
* 根据角色编号获取详细信息 * 根据角色编号获取详细信息
*/ */
...@@ -58,7 +70,7 @@ public class SysRoleController extends BaseController ...@@ -58,7 +70,7 @@ public class SysRoleController extends BaseController
@PreAuthorize("@ss.hasPermi('system:role:add')") @PreAuthorize("@ss.hasPermi('system:role:add')")
@Log(title = "角色管理", businessType = BusinessType.INSERT) @Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysRole role) public AjaxResult add(@Validated @RequestBody SysRole role)
{ {
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{ {
...@@ -79,7 +91,7 @@ public class SysRoleController extends BaseController ...@@ -79,7 +91,7 @@ public class SysRoleController extends BaseController
@PreAuthorize("@ss.hasPermi('system:role:edit')") @PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE) @Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysRole role) public AjaxResult edit(@Validated @RequestBody SysRole role)
{ {
roleService.checkRoleAllowed(role); roleService.checkRoleAllowed(role);
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
...@@ -120,15 +132,14 @@ public class SysRoleController extends BaseController ...@@ -120,15 +132,14 @@ public class SysRoleController extends BaseController
} }
/** /**
* 删除岗位 * 删除角色
*/ */
@PreAuthorize("@ss.hasPermi('system:role:remove')") @PreAuthorize("@ss.hasPermi('system:role:remove')")
@Log(title = "角色管理", businessType = BusinessType.DELETE) @Log(title = "角色管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{roleId}") @DeleteMapping("/{roleIds}")
public AjaxResult remove(@PathVariable Long roleId) public AjaxResult remove(@PathVariable Long[] roleIds)
{ {
roleService.checkRoleAllowed(new SysRole(roleId)); return toAjax(roleService.deleteRoleByIds(roleIds));
return toAjax(roleService.deleteRoleById(roleId));
} }
/** /**
......
...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller; ...@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
...@@ -53,6 +55,16 @@ public class SysUserController extends BaseController ...@@ -53,6 +55,16 @@ public class SysUserController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:user:export')")
@GetMapping("/export")
public AjaxResult export(SysUser user)
{
List<SysUser> list = userService.selectUserList(user);
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.exportExcel(list, "用户数据");
}
/** /**
* 根据用户编号获取详细信息 * 根据用户编号获取详细信息
*/ */
...@@ -72,7 +84,7 @@ public class SysUserController extends BaseController ...@@ -72,7 +84,7 @@ public class SysUserController extends BaseController
@PreAuthorize("@ss.hasPermi('system:user:add')") @PreAuthorize("@ss.hasPermi('system:user:add')")
@Log(title = "用户管理", businessType = BusinessType.INSERT) @Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysUser user) public AjaxResult add(@Validated @RequestBody SysUser user)
{ {
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
{ {
...@@ -97,7 +109,7 @@ public class SysUserController extends BaseController ...@@ -97,7 +109,7 @@ public class SysUserController extends BaseController
@PreAuthorize("@ss.hasPermi('system:user:edit')") @PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE) @Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysUser user) public AjaxResult edit(@Validated @RequestBody SysUser user)
{ {
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
...@@ -117,11 +129,10 @@ public class SysUserController extends BaseController ...@@ -117,11 +129,10 @@ public class SysUserController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:user:remove')") @PreAuthorize("@ss.hasPermi('system:user:remove')")
@Log(title = "用户管理", businessType = BusinessType.DELETE) @Log(title = "用户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{userId}") @DeleteMapping("/{userIds}")
public AjaxResult remove(@PathVariable Long userId) public AjaxResult remove(@PathVariable Long[] userIds)
{ {
userService.checkUserAllowed(new SysUser(userId)); return toAjax(userService.deleteUserByIds(userIds));
return toAjax(userService.deleteUserById(userId));
} }
/** /**
......
...@@ -2,6 +2,10 @@ package com.ruoyi.project.system.domain; ...@@ -2,6 +2,10 @@ package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
...@@ -14,18 +18,23 @@ public class SysConfig extends BaseEntity ...@@ -14,18 +18,23 @@ public class SysConfig extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 参数主键 */ /** 参数主键 */
@Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
private Long configId; private Long configId;
/** 参数名称 */ /** 参数名称 */
@Excel(name = "参数名称")
private String configName; private String configName;
/** 参数键名 */ /** 参数键名 */
@Excel(name = "参数键名")
private String configKey; private String configKey;
/** 参数键值 */ /** 参数键值 */
@Excel(name = "参数键值")
private String configValue; private String configValue;
/** 系统内置(Y是 N否) */ /** 系统内置(Y是 N否) */
@Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
private String configType; private String configType;
public Long getConfigId() public Long getConfigId()
...@@ -83,4 +92,20 @@ public class SysConfig extends BaseEntity ...@@ -83,4 +92,20 @@ public class SysConfig extends BaseEntity
{ {
this.configType = configType; this.configType = configType;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("configId", getConfigId())
.append("configName", getConfigName())
.append("configKey", getConfigKey())
.append("configValue", getConfigValue())
.append("configType", getConfigType())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
...@@ -2,6 +2,11 @@ package com.ruoyi.project.system.domain; ...@@ -2,6 +2,11 @@ package com.ruoyi.project.system.domain;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
...@@ -45,7 +50,7 @@ public class SysDept extends BaseEntity ...@@ -45,7 +50,7 @@ public class SysDept extends BaseEntity
/** 父部门名称 */ /** 父部门名称 */
private String parentName; private String parentName;
/** 子部门 */ /** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>(); private List<SysDept> children = new ArrayList<SysDept>();
...@@ -79,6 +84,8 @@ public class SysDept extends BaseEntity ...@@ -79,6 +84,8 @@ public class SysDept extends BaseEntity
this.ancestors = ancestors; this.ancestors = ancestors;
} }
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
public String getDeptName() public String getDeptName()
{ {
return deptName; return deptName;
...@@ -89,6 +96,7 @@ public class SysDept extends BaseEntity ...@@ -89,6 +96,7 @@ public class SysDept extends BaseEntity
this.deptName = deptName; this.deptName = deptName;
} }
@NotBlank(message = "显示顺序不能为空")
public String getOrderNum() public String getOrderNum()
{ {
return orderNum; return orderNum;
...@@ -109,6 +117,7 @@ public class SysDept extends BaseEntity ...@@ -109,6 +117,7 @@ public class SysDept extends BaseEntity
this.leader = leader; this.leader = leader;
} }
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
public String getPhone() public String getPhone()
{ {
return phone; return phone;
...@@ -119,6 +128,8 @@ public class SysDept extends BaseEntity ...@@ -119,6 +128,8 @@ public class SysDept extends BaseEntity
this.phone = phone; this.phone = phone;
} }
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail() public String getEmail()
{ {
return email; return email;
...@@ -168,4 +179,24 @@ public class SysDept extends BaseEntity ...@@ -168,4 +179,24 @@ public class SysDept extends BaseEntity
{ {
this.children = children; this.children = children;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("deptId", getDeptId())
.append("parentId", getParentId())
.append("ancestors", getAncestors())
.append("deptName", getDeptName())
.append("orderNum", getOrderNum())
.append("leader", getLeader())
.append("phone", getPhone())
.append("email", getEmail())
.append("status", getStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
} }
...@@ -2,7 +2,11 @@ package com.ruoyi.project.system.domain; ...@@ -2,7 +2,11 @@ package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
...@@ -15,18 +19,23 @@ public class SysDictData extends BaseEntity ...@@ -15,18 +19,23 @@ public class SysDictData extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 字典编码 */ /** 字典编码 */
@Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
private Long dictCode; private Long dictCode;
/** 字典排序 */ /** 字典排序 */
@Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
private Long dictSort; private Long dictSort;
/** 字典标签 */ /** 字典标签 */
@Excel(name = "字典标签")
private String dictLabel; private String dictLabel;
/** 字典键值 */ /** 字典键值 */
@Excel(name = "字典键值")
private String dictValue; private String dictValue;
/** 字典类型 */ /** 字典类型 */
@Excel(name = "字典类型")
private String dictType; private String dictType;
/** 样式属性(其他样式扩展) */ /** 样式属性(其他样式扩展) */
...@@ -36,9 +45,11 @@ public class SysDictData extends BaseEntity ...@@ -36,9 +45,11 @@ public class SysDictData extends BaseEntity
private String listClass; private String listClass;
/** 是否默认(Y是 N否) */ /** 是否默认(Y是 N否) */
@Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
private String isDefault; private String isDefault;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
public Long getDictCode() public Long getDictCode()
...@@ -142,4 +153,24 @@ public class SysDictData extends BaseEntity ...@@ -142,4 +153,24 @@ public class SysDictData extends BaseEntity
{ {
this.status = status; this.status = status;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("dictCode", getDictCode())
.append("dictSort", getDictSort())
.append("dictLabel", getDictLabel())
.append("dictValue", getDictValue())
.append("dictType", getDictType())
.append("cssClass", getCssClass())
.append("listClass", getListClass())
.append("isDefault", getIsDefault())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
...@@ -2,6 +2,10 @@ package com.ruoyi.project.system.domain; ...@@ -2,6 +2,10 @@ package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
...@@ -14,15 +18,19 @@ public class SysDictType extends BaseEntity ...@@ -14,15 +18,19 @@ public class SysDictType extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 字典主键 */ /** 字典主键 */
@Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
private Long dictId; private Long dictId;
/** 字典名称 */ /** 字典名称 */
@Excel(name = "字典名称")
private String dictName; private String dictName;
/** 字典类型 */ /** 字典类型 */
@Excel(name = "字典类型")
private String dictType; private String dictType;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
public Long getDictId() public Long getDictId()
...@@ -68,4 +76,19 @@ public class SysDictType extends BaseEntity ...@@ -68,4 +76,19 @@ public class SysDictType extends BaseEntity
{ {
this.status = status; this.status = status;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("dictId", getDictId())
.append("dictName", getDictName())
.append("dictType", getDictType())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
package com.ruoyi.project.system.domain; package com.ruoyi.project.system.domain;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
import java.util.ArrayList;
/** /**
* 菜单权限表 sys_menu * 菜单权限表 sys_menu
...@@ -62,6 +66,8 @@ public class SysMenu extends BaseEntity ...@@ -62,6 +66,8 @@ public class SysMenu extends BaseEntity
this.menuId = menuId; this.menuId = menuId;
} }
@NotBlank(message = "菜单名称不能为空")
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
public String getMenuName() public String getMenuName()
{ {
return menuName; return menuName;
...@@ -92,6 +98,7 @@ public class SysMenu extends BaseEntity ...@@ -92,6 +98,7 @@ public class SysMenu extends BaseEntity
this.parentId = parentId; this.parentId = parentId;
} }
@NotBlank(message = "显示顺序不能为空")
public String getOrderNum() public String getOrderNum()
{ {
return orderNum; return orderNum;
...@@ -102,6 +109,7 @@ public class SysMenu extends BaseEntity ...@@ -102,6 +109,7 @@ public class SysMenu extends BaseEntity
this.orderNum = orderNum; this.orderNum = orderNum;
} }
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
public String getPath() public String getPath()
{ {
return path; return path;
...@@ -112,6 +120,7 @@ public class SysMenu extends BaseEntity ...@@ -112,6 +120,7 @@ public class SysMenu extends BaseEntity
this.path = path; this.path = path;
} }
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
public String getComponent() public String getComponent()
{ {
return component; return component;
...@@ -132,6 +141,7 @@ public class SysMenu extends BaseEntity ...@@ -132,6 +141,7 @@ public class SysMenu extends BaseEntity
this.isFrame = isFrame; this.isFrame = isFrame;
} }
@NotBlank(message = "菜单类型不能为空")
public String getMenuType() public String getMenuType()
{ {
return menuType; return menuType;
...@@ -152,6 +162,7 @@ public class SysMenu extends BaseEntity ...@@ -152,6 +162,7 @@ public class SysMenu extends BaseEntity
this.visible = visible; this.visible = visible;
} }
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
public String getPerms() public String getPerms()
{ {
return perms; return perms;
...@@ -181,4 +192,26 @@ public class SysMenu extends BaseEntity ...@@ -181,4 +192,26 @@ public class SysMenu extends BaseEntity
{ {
this.children = children; this.children = children;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("menuId", getMenuId())
.append("menuName", getMenuName())
.append("parentId", getParentId())
.append("orderNum", getOrderNum())
.append("path", getPath())
.append("component", getComponent())
.append("isFrame", getIsFrame())
.append("menuType", getMenuType())
.append("visible", getVisible())
.append("perms", getPerms())
.append("icon", getIcon())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
package com.ruoyi.project.system.domain; package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
...@@ -41,6 +45,8 @@ public class SysNotice extends BaseEntity ...@@ -41,6 +45,8 @@ public class SysNotice extends BaseEntity
this.noticeTitle = noticeTitle; this.noticeTitle = noticeTitle;
} }
@NotBlank(message = "公告标题不能为空")
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
public String getNoticeTitle() public String getNoticeTitle()
{ {
return noticeTitle; return noticeTitle;
...@@ -75,4 +81,20 @@ public class SysNotice extends BaseEntity ...@@ -75,4 +81,20 @@ public class SysNotice extends BaseEntity
{ {
return status; return status;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("noticeId", getNoticeId())
.append("noticeTitle", getNoticeTitle())
.append("noticeType", getNoticeType())
.append("noticeContent", getNoticeContent())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
...@@ -2,6 +2,10 @@ package com.ruoyi.project.system.domain; ...@@ -2,6 +2,10 @@ package com.ruoyi.project.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
/** /**
...@@ -14,18 +18,23 @@ public class SysPost extends BaseEntity ...@@ -14,18 +18,23 @@ public class SysPost extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 岗位序号 */ /** 岗位序号 */
@Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
private Long postId; private Long postId;
/** 岗位编码 */ /** 岗位编码 */
@Excel(name = "岗位编码")
private String postCode; private String postCode;
/** 岗位名称 */ /** 岗位名称 */
@Excel(name = "岗位名称")
private String postName; private String postName;
/** 岗位排序 */ /** 岗位排序 */
@Excel(name = "岗位排序")
private String postSort; private String postSort;
/** 状态(0正常 1停用) */ /** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 用户是否存在此岗位标识 默认不存在 */ /** 用户是否存在此岗位标识 默认不存在 */
...@@ -95,4 +104,20 @@ public class SysPost extends BaseEntity ...@@ -95,4 +104,20 @@ public class SysPost extends BaseEntity
{ {
this.flag = flag; this.flag = flag;
} }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("postId", getPostId())
.append("postCode", getPostCode())
.append("postName", getPostName())
.append("postSort", getPostSort())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment