Java Code Examples for com.ruoyi.common.enums.BusinessType#UPDATE

The following examples show how to use com.ruoyi.common.enums.BusinessType#UPDATE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysUserController.java    From supplierShop with MIT License 6 votes vote down vote up
@RequiresPermissions("system:user:resetPwd")
@Log(title = "重置密码", businessType = BusinessType.UPDATE)
@PostMapping("/resetPwd")
@ResponseBody
public AjaxResult resetPwdSave(SysUser user)
{
    user.setSalt(ShiroUtils.randomSalt());
    user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
    if (userService.resetUserPwd(user) > 0)
    {
        if (ShiroUtils.getUserId() == user.getUserId())
        {
            ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
        }
        return success();
    }
    return error();
}
 
Example 2
Source File: SysPostController.java    From supplierShop with MIT License 6 votes vote down vote up
/**
 * 修改保存岗位
 */
@RequiresPermissions("system:post:edit")
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@Validated SysPost post)
{
    if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
    {
        return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
    }
    else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
    {
        return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
    }
    post.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(postService.updatePost(post));
}
 
Example 3
Source File: SysUserController.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 用户状态修改
 */
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:user:edit")
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(SysUser user)
{
    return toAjax(userService.changeStatus(user));
}
 
Example 4
Source File: SysRoleController.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 修改保存角色
 */
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult editSave(SysRole role)
{
    role.setUpdateBy(ShiroUtils.getLoginName());
    ShiroUtils.clearCachedAuthorizationInfo();
    return toAjax(roleService.updateRole(role));
}
 
Example 5
Source File: SysMenuController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 修改保存菜单
 */
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:menu:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysMenu menu) {
    menu.setUpdateBy(ShiroUtils.getLoginName());
    ShiroUtils.clearCachedAuthorizationInfo();
    return toAjax(menuService.updateMenu(menu));
}
 
Example 6
Source File: SysDictDataController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 修改保存字典类型
 */
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:dict:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@Validated SysDictData dict)
{
    dict.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(dictDataService.updateDictData(dict));
}
 
Example 7
Source File: SysNoticeController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 修改保存公告
 */
@RequiresPermissions("system:notice:edit")
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysNotice notice)
{
    notice.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(noticeService.updateNotice(notice));
}
 
Example 8
Source File: SysJobController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 修改保存调度
 */
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
@RequiresPermissions("monitor:job:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysJob job) throws SchedulerException, TaskException {
    job.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(jobService.updateJobCron(job));
}
 
Example 9
Source File: SysNoticeController.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 修改保存公告
 */
@RequiresPermissions("system:notice:edit")
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysNotice notice)
{
    notice.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(noticeService.updateNotice(notice));
}
 
Example 10
Source File: SysJobController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 任务调度立即执行一次
 */
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
@RequiresPermissions("monitor:job:changeStatus")
@PostMapping("/run")
@ResponseBody
public AjaxResult run(SysJob job) throws SchedulerException{
    jobService.run(job);
    return success();
}
 
Example 11
Source File: SysRoleController.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 角色状态修改
 */
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:role:edit")
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(SysRole role)
{
    return toAjax(roleService.changeStatus(role));
}
 
Example 12
Source File: SysJobController.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 任务调度立即执行一次
 */
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
@RequiresPermissions("monitor:job:changeStatus")
@PostMapping("/run")
@ResponseBody
public AjaxResult run(SysJob job)
{
    return toAjax(jobService.run(job));
}
 
Example 13
Source File: SysNoticeController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 修改保存公告
 */
@RequiresPermissions("system:notice:edit")
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysNotice notice) {
    notice.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(noticeService.updateNotice(notice));
}
 
Example 14
Source File: StoreGoodsCateController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 修改保存商城商品分类
 */
@RequiresPermissions("shop:cate:edit")
@Log(title = "商城商品分类", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(StoreGoodsCate storeGoodsCate)
{
    return toAjax(storeGoodsCateService.updateStoreGoodsCate(storeGoodsCate));
}
 
Example 15
Source File: StoreSpecController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 修改保存商品规格(独立)
 */
@RequiresPermissions("shop:spec:edit")
@Log(title = "商品规格(独立)", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(StoreSpec storeSpec)
{
    return toAjax(storeSpecService.updateStoreSpec(storeSpec));
}
 
Example 16
Source File: SysDictDataController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 修改保存字典类型
 */
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:dict:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysDictData dict) {
    dict.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(dictDataService.updateDictData(dict));
}
 
Example 17
Source File: SysJobController.java    From ruoyiplus with MIT License 5 votes vote down vote up
/**
 * 修改保存调度
 */
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
@RequiresPermissions("monitor:job:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysJob job)
{
    job.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(jobService.updateJobCron(job));
}
 
Example 18
Source File: SysRoleController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
/**
 * 修改保存角色
 */
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult editSave(SysRole role) {
    role.setUpdateBy(ShiroUtils.getLoginName());
    ShiroUtils.clearCachedAuthorizationInfo();
    return toAjax(roleService.updateRole(role));
}
 
Example 19
Source File: StoreGoodsBrandController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 修改保存产品品牌
 */
@RequiresPermissions("shop:brand:edit")
@Log(title = "产品品牌", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(StoreGoodsBrand storeGoodsBrand)
{
    return toAjax(storeGoodsBrandService.updateStoreGoodsBrand(storeGoodsBrand));
}
 
Example 20
Source File: SysUserController.java    From RuoYi with Apache License 2.0 5 votes vote down vote up
@ApiOperation("修改用户")
@ApiImplicitParam(name = "user", value = "修改用户信息", dataType = "SysUser")
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult editSave(SysUser user) {
    if (ObjectUtil.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId())) {
        return error("不允许修改超级管理员用户");
    }
    user.setUpdateBy(ShiroUtils.getLoginName());
    return toAjax(userService.updateUser(user));
}