feat: i18n support for export and log
This commit is contained in:
@@ -68,7 +68,7 @@ public class SysDeptController extends BaseController
|
||||
* 新增部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:add")
|
||||
@Log(title = "部门管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.department.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDept dept)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public class SysDeptController extends BaseController
|
||||
* 修改部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:edit")
|
||||
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.department.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDept dept)
|
||||
{
|
||||
@@ -110,7 +110,7 @@ public class SysDeptController extends BaseController
|
||||
* 删除部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:remove")
|
||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.department.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{deptId}")
|
||||
public AjaxResult remove(@PathVariable Long deptId)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ 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.RestController;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
import org.wfc.common.core.utils.poi.ExcelUtil;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
@@ -50,14 +51,14 @@ public class SysDictDataController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:dict:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictData dictData)
|
||||
{
|
||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.dict.data"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,7 +89,7 @@ public class SysDictDataController extends BaseController
|
||||
* 新增字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:add")
|
||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
@@ -100,7 +101,7 @@ public class SysDictDataController extends BaseController
|
||||
* 修改保存字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:edit")
|
||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
@@ -112,7 +113,7 @@ public class SysDictDataController extends BaseController
|
||||
* 删除字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.dict.data", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictCodes}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||
{
|
||||
|
||||
@@ -46,14 +46,14 @@ public class SysDictTypeController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:dict:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictType dictType)
|
||||
{
|
||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
|
||||
util.exportExcel(response, list, "字典类型");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.dict.type"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 新增字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:add")
|
||||
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 修改字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:edit")
|
||||
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 删除字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictIds)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ public class SysDictTypeController extends BaseController
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||
@Log(title = "menu.system.dict.type", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/refreshCache")
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ public class SysEmailController extends BaseController {
|
||||
try {
|
||||
MailUtils.sendText(email, "Registration verification code", "Your verification code is: " + code + ", The validity period is " + Constants.MAIL_CAPTCHA_EXPIRATION + " minutes, please fill in as soon as possible.");
|
||||
} catch (Exception e) {
|
||||
log.error("验证码短信发送异常 => {}", e.getMessage());
|
||||
log.error("Verification code sending exception => {}", e.getMessage());
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
return R.ok();
|
||||
|
||||
@@ -93,7 +93,7 @@ public class SysMenuController extends BaseController {
|
||||
* 新增菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:add")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.menu.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysMenu menu) {
|
||||
if (!menuService.checkMenuNameUnique(menu)) {
|
||||
@@ -109,7 +109,7 @@ public class SysMenuController extends BaseController {
|
||||
* 修改菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:edit")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.menu.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysMenu menu) {
|
||||
if (!menuService.checkMenuNameUnique(menu)) {
|
||||
@@ -127,7 +127,7 @@ public class SysMenuController extends BaseController {
|
||||
* 删除菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:remove")
|
||||
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.menu.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{menuId}")
|
||||
public AjaxResult remove(@PathVariable("menuId") Long menuId) {
|
||||
if (menuService.hasChildByMenuId(menuId)) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.utils.poi.ExcelUtil;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
@@ -33,7 +34,7 @@ public class SysOperlogController extends BaseController
|
||||
@Autowired
|
||||
private ISysOperLogService operLogService;
|
||||
|
||||
@RequiresPermissions("system:operlog:list")
|
||||
// @RequiresPermissions("system:operlog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysOperLog operLog)
|
||||
{
|
||||
@@ -42,26 +43,34 @@ public class SysOperlogController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:operlog:export")
|
||||
@Log(title = "excel.operation.log", businessType = BusinessType.EXPORT)
|
||||
// @RequiresPermissions("system:operlog:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysOperLog operLog)
|
||||
{
|
||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
|
||||
util.exportExcel(response, list, "操作日志");
|
||||
try
|
||||
{
|
||||
util.exportExcel(response, list, MessageUtils.message("excel.operation.log"));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
// util.exportExcel(response, list, MessageUtils.message("excel.operation.log"));
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||
@RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "excel.operation.log", businessType = BusinessType.DELETE)
|
||||
// @RequiresPermissions("system:operlog:remove")
|
||||
@DeleteMapping("/{operIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] operIds)
|
||||
{
|
||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
||||
// @RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "excel.operation.log", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/clean")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SysPostController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:post:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysPost post)
|
||||
@@ -71,7 +71,7 @@ public class SysPostController extends BaseController
|
||||
* 新增岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:add")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysPost post)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public class SysPostController extends BaseController
|
||||
* 修改岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:edit")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysPost post)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ public class SysPostController extends BaseController
|
||||
* 删除岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:remove")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.position.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{postIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] postIds)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.profile", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult updateProfile(@RequestBody SysUser user)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.profile", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updatePwd")
|
||||
public AjaxResult updatePwd(String oldPassword, String newPassword)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 头像上传
|
||||
*/
|
||||
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.avatar", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/avatar")
|
||||
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file)
|
||||
{
|
||||
|
||||
@@ -56,14 +56,14 @@ public class SysRoleController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:role:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysRole role)
|
||||
{
|
||||
List<SysRole> list = roleService.selectRoleList(role);
|
||||
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
|
||||
util.exportExcel(response, list, "角色数据");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.system.role.data"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ public class SysRoleController extends BaseController
|
||||
* 新增角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:add")
|
||||
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ public class SysRoleController extends BaseController
|
||||
* 修改保存角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ public class SysRoleController extends BaseController
|
||||
* 修改保存数据权限
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/dataScope")
|
||||
public AjaxResult dataScope(@RequestBody SysRole role)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ public class SysRoleController extends BaseController
|
||||
* 状态修改
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysRole role)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ public class SysRoleController extends BaseController
|
||||
* 删除角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:remove")
|
||||
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{roleIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] roleIds)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ public class SysRoleController extends BaseController
|
||||
* 取消授权用户
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/cancel")
|
||||
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ public class SysRoleController extends BaseController
|
||||
* 批量取消授权用户
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/cancelAll")
|
||||
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ public class SysRoleController extends BaseController
|
||||
* 批量选择用户授权
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.system.role.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/selectAll")
|
||||
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
|
||||
{
|
||||
|
||||
@@ -132,17 +132,17 @@ public class SysUserController extends BaseController
|
||||
return result;
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:user:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysUser user)
|
||||
{
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
util.exportExcel(response, list, "用户数据");
|
||||
util.exportExcel(response, list, MessageUtils.message("menu.user.data"));
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.IMPORT)
|
||||
@RequiresPermissions("system:user:import")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
@@ -158,7 +158,7 @@ public class SysUserController extends BaseController
|
||||
public void importTemplate(HttpServletResponse response) throws IOException
|
||||
{
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
util.importTemplateExcel(response, "用户数据");
|
||||
util.importTemplateExcel(response, "User Data");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,7 +278,7 @@ public class SysUserController extends BaseController
|
||||
* 新增用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:add")
|
||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
@@ -305,7 +305,7 @@ public class SysUserController extends BaseController
|
||||
* 修改用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
@@ -333,7 +333,7 @@ public class SysUserController extends BaseController
|
||||
* 删除用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:remove")
|
||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ public class SysUserController extends BaseController
|
||||
* 重置密码
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/resetPwd")
|
||||
public AjaxResult resetPwd(@RequestBody SysUser user)
|
||||
{
|
||||
@@ -363,7 +363,7 @@ public class SysUserController extends BaseController
|
||||
* 状态修改
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysUser user)
|
||||
{
|
||||
@@ -392,7 +392,7 @@ public class SysUserController extends BaseController
|
||||
* 用户授权角色
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||
@Log(title = "menu.user.management", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authRole")
|
||||
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SysUserOnlineController extends BaseController
|
||||
* 强退用户
|
||||
*/
|
||||
@RequiresPermissions("monitor:online:forceLogout")
|
||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||
@Log(title = "menu.user.online", businessType = BusinessType.FORCE)
|
||||
@DeleteMapping("/{tokenId}")
|
||||
public AjaxResult forceLogout(@PathVariable String tokenId)
|
||||
{
|
||||
|
||||
@@ -53,19 +53,19 @@ public class UBillRuleController extends BaseController {
|
||||
return success(uBillRuleService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "计费规则", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UBillRule uBillRule) {
|
||||
return toAjax(uBillRuleService.save(uBillRule));
|
||||
}
|
||||
|
||||
@Log(title = "计费规则", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UBillRule uBillRule) {
|
||||
return toAjax(uBillRuleService.updateById(uBillRule));
|
||||
}
|
||||
|
||||
@Log(title = "计费规则", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uBillRuleService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.common.log.annotation.Log;
|
||||
import org.wfc.common.log.enums.BusinessType;
|
||||
import org.wfc.system.domain.UKyc;
|
||||
import org.wfc.system.domain.bo.UKycUserBo;
|
||||
import org.wfc.system.domain.constant.KycStatusEnum;
|
||||
@@ -55,6 +57,7 @@ public class UKycController extends BaseController {
|
||||
return success(uKycService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "menu.user.kyc.management", businessType = BusinessType.APPROVAL)
|
||||
@PutMapping("/approve")
|
||||
public AjaxResult approve(@RequestBody UKyc uKyc) {
|
||||
// set user kyc status to verified
|
||||
@@ -63,6 +66,7 @@ public class UKycController extends BaseController {
|
||||
return toAjax(uKycService.updateKycByUserId(uKyc));
|
||||
}
|
||||
|
||||
@Log(title = "menu.user.kyc.management", businessType = BusinessType.REJECT)
|
||||
@PutMapping("/reject")
|
||||
public AjaxResult reject(@RequestBody UKyc uKyc) {
|
||||
// set kyc request status to rejected and put the description in the database
|
||||
|
||||
@@ -59,19 +59,19 @@ public class UPackageController extends BaseController {
|
||||
return success(uPackageService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "套餐设置", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UPackage uPackage) {
|
||||
return toAjax(uPackageService.save(uPackage));
|
||||
}
|
||||
|
||||
@Log(title = "套餐设置", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UPackage uPackage) {
|
||||
return toAjax(uPackageService.updateById(uPackage));
|
||||
}
|
||||
|
||||
@Log(title = "套餐设置", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uPackageService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
@@ -53,19 +53,19 @@ public class URateLimitController extends BaseController {
|
||||
return success(uRateLimitService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "限速设置", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody URateLimit uRateLimit) {
|
||||
return toAjax(uRateLimitService.save(uRateLimit));
|
||||
}
|
||||
|
||||
@Log(title = "限速设置", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody URateLimit uRateLimit) {
|
||||
return toAjax(uRateLimitService.updateById(uRateLimit));
|
||||
}
|
||||
|
||||
@Log(title = "限速设置", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uRateLimitService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
Reference in New Issue
Block a user