Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
bcee37b8
Commit
bcee37b8
authored
Nov 11, 2019
by
RuoYi
Browse files
若依 1.1
parent
85c17f45
Changes
93
Hide whitespace changes
Inline
Side-by-side
ruoyi/src/main/java/com/ruoyi/project/monitor/service/ISysLogininforService.java
View file @
bcee37b8
...
...
@@ -28,10 +28,10 @@ public interface ISysLogininforService
/**
* 批量删除系统登录日志
*
* @param ids 需要删除的
数据
* @param i
nfoI
ds 需要删除的
登录日志ID
* @return
*/
public
int
deleteLogininforByIds
(
String
i
ds
);
public
int
deleteLogininforByIds
(
Long
[]
infoI
ds
);
/**
* 清空系统登录日志
...
...
ruoyi/src/main/java/com/ruoyi/project/monitor/service/ISysOperLogService.java
View file @
bcee37b8
...
...
@@ -28,10 +28,10 @@ public interface ISysOperLogService
/**
* 批量删除系统操作日志
*
* @param
i
ds 需要删除的
数据
* @param
operI
ds 需要删除的
操作日志ID
* @return 结果
*/
public
int
deleteOperLogByIds
(
String
i
ds
);
public
int
deleteOperLogByIds
(
Long
[]
operI
ds
);
/**
* 查询操作日志详细
...
...
ruoyi/src/main/java/com/ruoyi/project/monitor/service/impl/SysLogininforServiceImpl.java
View file @
bcee37b8
...
...
@@ -3,7 +3,6 @@ package com.ruoyi.project.monitor.service.impl;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.core.text.Convert
;
import
com.ruoyi.project.monitor.domain.SysLogininfor
;
import
com.ruoyi.project.monitor.mapper.SysLogininforMapper
;
import
com.ruoyi.project.monitor.service.ISysLogininforService
;
...
...
@@ -46,13 +45,13 @@ public class SysLogininforServiceImpl implements ISysLogininforService
/**
* 批量删除系统登录日志
*
* @param ids 需要删除的
数据
* @param i
nfoI
ds 需要删除的
登录日志ID
* @return
*/
@Override
public
int
deleteLogininforByIds
(
String
i
ds
)
public
int
deleteLogininforByIds
(
Long
[]
infoI
ds
)
{
return
logininforMapper
.
deleteLogininforByIds
(
Convert
.
toStrArray
(
i
ds
)
)
;
return
logininforMapper
.
deleteLogininforByIds
(
infoI
ds
);
}
/**
...
...
ruoyi/src/main/java/com/ruoyi/project/monitor/service/impl/SysOperLogServiceImpl.java
View file @
bcee37b8
...
...
@@ -3,7 +3,6 @@ package com.ruoyi.project.monitor.service.impl;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.core.text.Convert
;
import
com.ruoyi.project.monitor.domain.SysOperLog
;
import
com.ruoyi.project.monitor.mapper.SysOperLogMapper
;
import
com.ruoyi.project.monitor.service.ISysOperLogService
;
...
...
@@ -45,13 +44,12 @@ public class SysOperLogServiceImpl implements ISysOperLogService
/**
* 批量删除系统操作日志
*
* @param
i
ds 需要删除的
数据
* @return
* @param
operI
ds 需要删除的
操作日志ID
* @return
结果
*/
@Override
public
int
deleteOperLogByIds
(
String
ids
)
public
int
deleteOperLogByIds
(
Long
[]
operIds
)
{
return
operLogMapper
.
deleteOperLogByIds
(
Convert
.
toStrArray
(
i
ds
)
)
;
return
operLogMapper
.
deleteOperLogByIds
(
operI
ds
);
}
/**
...
...
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysConfigController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
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.enums.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -45,6 +47,16 @@ public class SysConfigController extends BaseController
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
@PreAuthorize
(
"@ss.hasPermi('system:config:add')"
)
@Log
(
title
=
"参数管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysConfig
config
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysConfig
config
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
configService
.
checkConfigKeyUnique
(
config
)))
{
...
...
@@ -87,7 +99,7 @@ public class SysConfigController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:config:edit')"
)
@Log
(
title
=
"参数管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysConfig
config
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysConfig
config
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
configService
.
checkConfigKeyUnique
(
config
)))
{
...
...
@@ -102,9 +114,9 @@ public class SysConfigController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:config:remove')"
)
@Log
(
title
=
"参数管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{configId}"
)
public
AjaxResult
remove
(
@PathVariable
Long
configId
)
@DeleteMapping
(
"/{configId
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
configId
s
)
{
return
toAjax
(
configService
.
deleteConfigById
(
configId
));
return
toAjax
(
configService
.
deleteConfigById
s
(
configId
s
));
}
}
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -10,7 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
import
com.ruoyi.common.utils.SecurityUtils
;
...
...
@@ -70,7 +70,6 @@ public class SysDeptController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:dept:query')"
)
@GetMapping
(
value
=
"/roleDeptTreeselect/{roleId}"
)
@ResponseBody
public
AjaxResult
roleDeptTreeselect
(
@PathVariable
(
"roleId"
)
Long
roleId
)
{
return
AjaxResult
.
success
(
deptService
.
selectDeptListByRoleId
(
roleId
));
...
...
@@ -82,7 +81,7 @@ public class SysDeptController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:dept:add')"
)
@Log
(
title
=
"部门管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysDept
dept
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysDept
dept
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
deptService
.
checkDeptNameUnique
(
dept
)))
{
...
...
@@ -98,7 +97,7 @@ public class SysDeptController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:dept:edit')"
)
@Log
(
title
=
"部门管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysDept
dept
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysDept
dept
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
deptService
.
checkDeptNameUnique
(
dept
)))
{
...
...
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDictDataController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -10,9 +11,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
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.enums.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -35,7 +36,6 @@ public class SysDictDataController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:dict:list')"
)
@GetMapping
(
"/list"
)
@ResponseBody
public
TableDataInfo
list
(
SysDictData
dictData
)
{
startPage
();
...
...
@@ -43,6 +43,16 @@ public class SysDictDataController extends BaseController
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
@PreAuthorize
(
"@ss.hasPermi('system:dict:add')"
)
@Log
(
title
=
"字典数据"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysDictData
dict
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysDictData
dict
)
{
dict
.
setCreateBy
(
SecurityUtils
.
getUsername
());
return
toAjax
(
dictDataService
.
insertDictData
(
dict
));
...
...
@@ -81,7 +91,7 @@ public class SysDictDataController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:dict:edit')"
)
@Log
(
title
=
"字典数据"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysDictData
dict
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysDictData
dict
)
{
dict
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
toAjax
(
dictDataService
.
updateDictData
(
dict
));
...
...
@@ -92,9 +102,9 @@ public class SysDictDataController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:dict:remove')"
)
@Log
(
title
=
"字典类型"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{dictCode}"
)
public
AjaxResult
remove
(
@PathVariable
Long
dictCode
)
@DeleteMapping
(
"/{dictCode
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
dictCode
s
)
{
return
toAjax
(
dictDataService
.
deleteDictDataById
(
dictCode
));
return
toAjax
(
dictDataService
.
deleteDictDataById
s
(
dictCode
s
));
}
}
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysDictTypeController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -10,10 +11,10 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
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.enums.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -36,7 +37,6 @@ public class SysDictTypeController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:dict:list')"
)
@GetMapping
(
"/list"
)
@ResponseBody
public
TableDataInfo
list
(
SysDictType
dictType
)
{
startPage
();
...
...
@@ -44,6 +44,16 @@ public class SysDictTypeController extends BaseController
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
@PreAuthorize
(
"@ss.hasPermi('system:dict:add')"
)
@Log
(
title
=
"字典类型"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysDictType
dict
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysDictType
dict
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
dictTypeService
.
checkDictTypeUnique
(
dict
)))
{
...
...
@@ -76,7 +86,7 @@ public class SysDictTypeController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:dict:edit')"
)
@Log
(
title
=
"字典类型"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysDictType
dict
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysDictType
dict
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
dictTypeService
.
checkDictTypeUnique
(
dict
)))
{
...
...
@@ -91,9 +101,9 @@ public class SysDictTypeController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:dict:remove')"
)
@Log
(
title
=
"字典类型"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{dictId}"
)
public
AjaxResult
remove
(
@PathVariable
Long
dictId
)
@DeleteMapping
(
"/{dictId
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
dictId
s
)
{
return
toAjax
(
dictTypeService
.
deleteDictTypeById
(
dictId
));
return
toAjax
(
dictTypeService
.
deleteDictTypeById
s
(
dictId
s
));
}
}
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysMenuController.java
View file @
bcee37b8
...
...
@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
import
com.ruoyi.common.utils.SecurityUtils
;
...
...
@@ -71,7 +70,6 @@ public class SysMenuController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:menu:query')"
)
@GetMapping
(
value
=
"/roleMenuTreeselect/{roleId}"
)
@ResponseBody
public
AjaxResult
roleMenuTreeselect
(
@PathVariable
(
"roleId"
)
Long
roleId
)
{
return
AjaxResult
.
success
(
menuService
.
selectMenuListByRoleId
(
roleId
));
...
...
@@ -83,7 +81,7 @@ public class SysMenuController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:menu:add')"
)
@Log
(
title
=
"菜单管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
@Validated
SysMenu
menu
)
public
AjaxResult
add
(
@
Validated
@
RequestBody
SysMenu
menu
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
menuService
.
checkMenuNameUnique
(
menu
)))
{
...
...
@@ -99,7 +97,7 @@ public class SysMenuController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:menu:edit')"
)
@Log
(
title
=
"菜单管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysMenu
menu
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysMenu
menu
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
menuService
.
checkMenuNameUnique
(
menu
)))
{
...
...
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -60,7 +61,7 @@ public class SysNoticeController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:notice:add')"
)
@Log
(
title
=
"通知公告"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysNotice
notice
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysNotice
notice
)
{
notice
.
setCreateBy
(
SecurityUtils
.
getUsername
());
return
toAjax
(
noticeService
.
insertNotice
(
notice
));
...
...
@@ -72,7 +73,7 @@ public class SysNoticeController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:notice:edit')"
)
@Log
(
title
=
"通知公告"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysNotice
notice
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysNotice
notice
)
{
notice
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
toAjax
(
noticeService
.
updateNotice
(
notice
));
...
...
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysPostController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
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.enums.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -44,6 +46,16 @@ public class SysPostController extends BaseController
List
<
SysPost
>
list
=
postService
.
selectPostList
(
post
);
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
@PreAuthorize
(
"@ss.hasPermi('system:post:add')"
)
@Log
(
title
=
"岗位管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysPost
post
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysPost
post
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
postService
.
checkPostNameUnique
(
post
)))
{
...
...
@@ -81,7 +93,7 @@ public class SysPostController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:post:edit')"
)
@Log
(
title
=
"岗位管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysPost
post
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysPost
post
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
postService
.
checkPostNameUnique
(
post
)))
{
...
...
@@ -100,10 +112,10 @@ public class SysPostController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:post:remove')"
)
@Log
(
title
=
"岗位管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{postId}"
)
public
AjaxResult
remove
(
@PathVariable
Long
postId
)
@DeleteMapping
(
"/{postId
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
postId
s
)
{
return
toAjax
(
postService
.
deletePostById
(
postId
));
return
toAjax
(
postService
.
deletePostById
s
(
postId
s
));
}
/**
...
...
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysRoleController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
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.enums.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -42,6 +44,16 @@ public class SysRoleController extends BaseController
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
@PreAuthorize
(
"@ss.hasPermi('system:role:add')"
)
@Log
(
title
=
"角色管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysRole
role
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysRole
role
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
roleService
.
checkRoleNameUnique
(
role
)))
{
...
...
@@ -79,7 +91,7 @@ public class SysRoleController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:role:edit')"
)
@Log
(
title
=
"角色管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysRole
role
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysRole
role
)
{
roleService
.
checkRoleAllowed
(
role
);
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
roleService
.
checkRoleNameUnique
(
role
)))
...
...
@@ -120,15 +132,14 @@ public class SysRoleController extends BaseController
}
/**
* 删除
岗位
* 删除
角色
*/
@PreAuthorize
(
"@ss.hasPermi('system:role:remove')"
)
@Log
(
title
=
"角色管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{roleId}"
)
public
AjaxResult
remove
(
@PathVariable
Long
roleId
)
@DeleteMapping
(
"/{roleId
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
roleId
s
)
{
roleService
.
checkRoleAllowed
(
new
SysRole
(
roleId
));
return
toAjax
(
roleService
.
deleteRoleById
(
roleId
));
return
toAjax
(
roleService
.
deleteRoleByIds
(
roleIds
));
}
/**
...
...
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java
View file @
bcee37b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.project.system.controller;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.constant.UserConstants
;
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.enums.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -53,6 +55,16 @@ public class SysUserController extends BaseController
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
@PreAuthorize
(
"@ss.hasPermi('system:user:add')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysUser
user
)
public
AjaxResult
add
(
@Validated
@RequestBody
SysUser
user
)
{
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
userService
.
checkUserNameUnique
(
user
.
getUserName
())))
{
...
...
@@ -97,7 +109,7 @@ public class SysUserController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysUser
user
)
public
AjaxResult
edit
(
@Validated
@RequestBody
SysUser
user
)
{
userService
.
checkUserAllowed
(
user
);
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
userService
.
checkPhoneUnique
(
user
)))
...
...
@@ -117,11 +129,10 @@ public class SysUserController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:remove')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{userId}"
)
public
AjaxResult
remove
(
@PathVariable
Long
userId
)
@DeleteMapping
(
"/{userId
s
}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
userId
s
)
{
userService
.
checkUserAllowed
(
new
SysUser
(
userId
));
return
toAjax
(
userService
.
deleteUserById
(
userId
));
return
toAjax
(
userService
.
deleteUserByIds
(
userIds
));
}
/**
...
...
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysConfig.java
View file @
bcee37b8
...
...
@@ -2,6 +2,10 @@ 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.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType
;
import
com.ruoyi.framework.web.domain.BaseEntity
;
/**
...
...
@@ -14,18 +18,23 @@ public class SysConfig extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
/** 参数主键 */
@Excel
(
name
=
"参数主键"
,
cellType
=
ColumnType
.
NUMERIC
)
private
Long
configId
;
/** 参数名称 */
@Excel
(
name
=
"参数名称"
)
private
String
configName
;
/** 参数键名 */
@Excel
(
name
=
"参数键名"
)
private
String
configKey
;
/** 参数键值 */
@Excel
(
name
=
"参数键值"
)
private
String
configValue
;
/** 系统内置(Y是 N否) */
@Excel
(
name
=
"系统内置"
,
readConverterExp
=
"Y=是,N=否"
)
private
String
configType
;
public
Long
getConfigId
()
...
...
@@ -83,4 +92,20 @@ public class SysConfig extends BaseEntity
{
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
();
}
}
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysDept.java
View file @
bcee37b8
...
...
@@ -2,6 +2,11 @@ package com.ruoyi.project.system.domain;
import
java.util.ArrayList
;
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
;
/**
...
...
@@ -45,7 +50,7 @@ public class SysDept extends BaseEntity
/** 父部门名称 */
private
String
parentName
;
/** 子部门 */
private
List
<
SysDept
>
children
=
new
ArrayList
<
SysDept
>();
...
...
@@ -79,6 +84,8 @@ public class SysDept extends BaseEntity
this
.
ancestors
=
ancestors
;
}
@NotBlank
(
message
=
"部门名称不能为空"
)
@Size
(
min
=
0
,
max
=
30
,
message
=
"部门名称长度不能超过30个字符"
)
public
String
getDeptName
()
{
return
deptName
;
...
...
@@ -89,6 +96,7 @@ public class SysDept extends BaseEntity
this
.
deptName
=
deptName
;
}
@NotBlank
(
message
=
"显示顺序不能为空"
)
public
String
getOrderNum
()
{
return
orderNum
;
...
...
@@ -109,6 +117,7 @@ public class SysDept extends BaseEntity
this
.
leader
=
leader
;
}
@Size
(
min
=
0
,
max
=
11
,
message
=
"联系电话长度不能超过11个字符"
)
public
String
getPhone
()
{
return
phone
;
...
...
@@ -119,6 +128,8 @@ public class SysDept extends BaseEntity
this
.
phone
=
phone
;
}
@Email
(
message
=
"邮箱格式不正确"
)
@Size
(
min
=
0
,
max
=
50
,
message
=
"邮箱长度不能超过50个字符"
)
public
String
getEmail
()
{
return
email
;
...
...
@@ -168,4 +179,24 @@ public class SysDept extends BaseEntity
{
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
();
}
}
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysDictData.java
View file @
bcee37b8
...
...
@@ -2,7 +2,11 @@ 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.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
;
/**
...
...
@@ -15,18 +19,23 @@ public class SysDictData extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
/** 字典编码 */
@Excel
(
name
=
"字典编码"
,
cellType
=
ColumnType
.
NUMERIC
)
private
Long
dictCode
;
/** 字典排序 */
@Excel
(
name
=
"字典排序"
,
cellType
=
ColumnType
.
NUMERIC
)
private
Long
dictSort
;
/** 字典标签 */
@Excel
(
name
=
"字典标签"
)
private
String
dictLabel
;
/** 字典键值 */
@Excel
(
name
=
"字典键值"
)
private
String
dictValue
;
/** 字典类型 */
@Excel
(
name
=
"字典类型"
)
private
String
dictType
;
/** 样式属性(其他样式扩展) */
...
...
@@ -36,9 +45,11 @@ public class SysDictData extends BaseEntity
private
String
listClass
;
/** 是否默认(Y是 N否) */
@Excel
(
name
=
"是否默认"
,
readConverterExp
=
"Y=是,N=否"
)
private
String
isDefault
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
public
Long
getDictCode
()
...
...
@@ -142,4 +153,24 @@ public class SysDictData extends BaseEntity
{
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
();
}
}
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysDictType.java
View file @
bcee37b8
...
...
@@ -2,6 +2,10 @@ 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.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType
;
import
com.ruoyi.framework.web.domain.BaseEntity
;
/**
...
...
@@ -14,15 +18,19 @@ public class SysDictType extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
/** 字典主键 */
@Excel
(
name
=
"字典主键"
,
cellType
=
ColumnType
.
NUMERIC
)
private
Long
dictId
;
/** 字典名称 */
@Excel
(
name
=
"字典名称"
)
private
String
dictName
;
/** 字典类型 */
@Excel
(
name
=
"字典类型"
)
private
String
dictType
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
public
Long
getDictId
()
...
...
@@ -68,4 +76,19 @@ public class SysDictType extends BaseEntity
{
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
();
}
}
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysMenu.java
View file @
bcee37b8
package
com.ruoyi.project.system.domain
;
import
java.util.ArrayList
;
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
java.util.ArrayList
;
/**
* 菜单权限表 sys_menu
...
...
@@ -62,6 +66,8 @@ public class SysMenu extends BaseEntity
this
.
menuId
=
menuId
;
}
@NotBlank
(
message
=
"菜单名称不能为空"
)
@Size
(
min
=
0
,
max
=
50
,
message
=
"菜单名称长度不能超过50个字符"
)
public
String
getMenuName
()
{
return
menuName
;
...
...
@@ -92,6 +98,7 @@ public class SysMenu extends BaseEntity
this
.
parentId
=
parentId
;
}
@NotBlank
(
message
=
"显示顺序不能为空"
)
public
String
getOrderNum
()
{
return
orderNum
;
...
...
@@ -102,6 +109,7 @@ public class SysMenu extends BaseEntity
this
.
orderNum
=
orderNum
;
}
@Size
(
min
=
0
,
max
=
200
,
message
=
"路由地址不能超过200个字符"
)
public
String
getPath
()
{
return
path
;
...
...
@@ -112,6 +120,7 @@ public class SysMenu extends BaseEntity
this
.
path
=
path
;
}
@Size
(
min
=
0
,
max
=
200
,
message
=
"组件路径不能超过255个字符"
)
public
String
getComponent
()
{
return
component
;
...
...
@@ -132,6 +141,7 @@ public class SysMenu extends BaseEntity
this
.
isFrame
=
isFrame
;
}
@NotBlank
(
message
=
"菜单类型不能为空"
)
public
String
getMenuType
()
{
return
menuType
;
...
...
@@ -152,6 +162,7 @@ public class SysMenu extends BaseEntity
this
.
visible
=
visible
;
}
@Size
(
min
=
0
,
max
=
100
,
message
=
"权限标识长度不能超过100个字符"
)
public
String
getPerms
()
{
return
perms
;
...
...
@@ -181,4 +192,26 @@ public class SysMenu extends BaseEntity
{
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
();
}
}
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysNotice.java
View file @
bcee37b8
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
;
/**
...
...
@@ -41,6 +45,8 @@ public class SysNotice extends BaseEntity
this
.
noticeTitle
=
noticeTitle
;
}
@NotBlank
(
message
=
"公告标题不能为空"
)
@Size
(
min
=
0
,
max
=
50
,
message
=
"公告标题不能超过50个字符"
)
public
String
getNoticeTitle
()
{
return
noticeTitle
;
...
...
@@ -75,4 +81,20 @@ public class SysNotice extends BaseEntity
{
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
();
}
}
ruoyi/src/main/java/com/ruoyi/project/system/domain/SysPost.java
View file @
bcee37b8
...
...
@@ -2,6 +2,10 @@ 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.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType
;
import
com.ruoyi.framework.web.domain.BaseEntity
;
/**
...
...
@@ -14,18 +18,23 @@ public class SysPost extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
/** 岗位序号 */
@Excel
(
name
=
"岗位序号"
,
cellType
=
ColumnType
.
NUMERIC
)
private
Long
postId
;
/** 岗位编码 */
@Excel
(
name
=
"岗位编码"
)
private
String
postCode
;
/** 岗位名称 */
@Excel
(
name
=
"岗位名称"
)
private
String
postName
;
/** 岗位排序 */
@Excel
(
name
=
"岗位排序"
)
private
String
postSort
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
/** 用户是否存在此岗位标识 默认不存在 */
...
...
@@ -95,4 +104,20 @@ public class SysPost extends BaseEntity
{
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
();
}
}
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment