Java Code Examples for com.ruoyi.common.enums.BusinessType#INSERT
The following examples show how to use
com.ruoyi.common.enums.BusinessType#INSERT .
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: SysPostController.java From supplierShop with MIT License | 6 votes |
/** * 新增保存岗位 */ @RequiresPermissions("system:post:add") @Log(title = "岗位管理", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(@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.setCreateBy(ShiroUtils.getLoginName()); return toAjax(postService.insertPost(post)); }
Example 2
Source File: SysUserController.java From RuoYi with Apache License 2.0 | 6 votes |
@ApiOperation("新增用户") @ApiImplicitParam(name = "user", value = "新增用户信息", dataType = "SysUser") @RequiresPermissions("system:user:add") @Log(title = "用户管理", businessType = BusinessType.INSERT) @PostMapping("/add") @Transactional(rollbackFor = Exception.class) @ResponseBody public AjaxResult addSave(SysUser user) { if (ObjectUtil.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId())) { return error("不允许修改超级管理员用户"); } if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName()))){ return error("保存用户'" + user.getLoginName() + "'失败,账号已存在"); } user.setSalt(ShiroUtils.randomSalt()); user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); user.setCreateBy(ShiroUtils.getLoginName()); return toAjax(userService.insertUser(user)); }
Example 3
Source File: SysDictDataController.java From ruoyiplus with MIT License | 5 votes |
/** * 新增保存字典类型 */ @Log(title = "字典数据", businessType = BusinessType.INSERT) @RequiresPermissions("system:dict:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysDictData dict) { dict.setCreateBy(ShiroUtils.getLoginName()); return toAjax(dictDataService.insertDictData(dict)); }
Example 4
Source File: StoreCouponController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存优惠券主 */ @RequiresPermissions("shop:coupon:add") @Log(title = "优惠券主", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(StoreCoupon storeCoupon) { return toAjax(storeCouponService.insertStoreCoupon(storeCoupon)); }
Example 5
Source File: SysDictDataController.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 新增保存字典类型 */ @Log(title = "字典数据", businessType = BusinessType.INSERT) @RequiresPermissions("system:dict:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysDictData dict) { dict.setCreateBy(ShiroUtils.getLoginName()); return toAjax(dictDataService.insertDictData(dict)); }
Example 6
Source File: SysDictTypeController.java From ruoyiplus with MIT License | 5 votes |
/** * 新增保存字典类型 */ @Log(title = "字典类型", businessType = BusinessType.INSERT) @RequiresPermissions("system:dict:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysDictType dict) { dict.setCreateBy(ShiroUtils.getLoginName()); return toAjax(dictTypeService.insertDictType(dict)); }
Example 7
Source File: SysDictTypeController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存字典类型 */ @Log(title = "字典类型", businessType = BusinessType.INSERT) @RequiresPermissions("system:dict:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(@Validated SysDictType dict) { if (UserConstants.DICT_TYPE_NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); } dict.setCreateBy(ShiroUtils.getLoginName()); return toAjax(dictTypeService.insertDictType(dict)); }
Example 8
Source File: SysConfigController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存参数配置 */ @RequiresPermissions("system:config:add") @Log(title = "参数管理", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(@Validated SysConfig config) { if (UserConstants.CONFIG_KEY_NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) { return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); } config.setCreateBy(ShiroUtils.getLoginName()); return toAjax(configService.insertConfig(config)); }
Example 9
Source File: SysDictTypeController.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 新增保存字典类型 */ @Log(title = "字典类型", businessType = BusinessType.INSERT) @RequiresPermissions("system:dict:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysDictType dict) { dict.setCreateBy(ShiroUtils.getLoginName()); return toAjax(dictTypeService.insertDictType(dict)); }
Example 10
Source File: SysNoticeController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存公告 */ @RequiresPermissions("system:notice:add") @Log(title = "通知公告", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysNotice notice) { notice.setCreateBy(ShiroUtils.getLoginName()); return toAjax(noticeService.insertNotice(notice)); }
Example 11
Source File: SysDeptController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存部门 */ @Log(title = "部门管理", businessType = BusinessType.INSERT) @RequiresPermissions("system:dept:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(@Validated SysDept dept) { if (UserConstants.DEPT_NAME_NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) { return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); } dept.setCreateBy(ShiroUtils.getLoginName()); return toAjax(deptService.insertDept(dept)); }
Example 12
Source File: SysPostController.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 新增保存岗位 */ @RequiresPermissions("system:post:add") @Log(title = "岗位管理", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysPost post) { post.setCreateBy(ShiroUtils.getLoginName()); return toAjax(postService.insertPost(post)); }
Example 13
Source File: SysJobController.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 新增保存调度 */ @Log(title = "定时任务", businessType = BusinessType.INSERT) @RequiresPermissions("monitor:job:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysJob job) throws SchedulerException, TaskException{ job.setCreateBy(ShiroUtils.getLoginName()); return toAjax(jobService.insertJobCron(job)); }
Example 14
Source File: StoreGoodsCateController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存商城商品分类 */ @RequiresPermissions("shop:cate:add") @Log(title = "商城商品分类", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(StoreGoodsCate storeGoodsCate) { return toAjax(storeGoodsCateService.insertStoreGoodsCate(storeGoodsCate)); }
Example 15
Source File: SysDeptController.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 新增保存部门 */ @Log(title = "部门管理", businessType = BusinessType.INSERT) @RequiresPermissions("system:dept:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysDept dept) { dept.setCreateBy(ShiroUtils.getLoginName()); return toAjax(deptService.insertDept(dept)); }
Example 16
Source File: StoreOrderController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存订单主 */ @RequiresPermissions("shop:order:add") @Log(title = "订单主", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(StoreOrder storeOrder) { return toAjax(storeOrderService.insertStoreOrder(storeOrder)); }
Example 17
Source File: StoreGoodsAttributeController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存商品的属性(独立) */ @RequiresPermissions("shop:attribute:add") @Log(title = "商品的属性(独立)", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(StoreGoodsAttribute storeGoodsAttribute) { return toAjax(storeGoodsAttributeService.insertStoreGoodsAttribute(storeGoodsAttribute)); }
Example 18
Source File: SysDeptController.java From ruoyiplus with MIT License | 5 votes |
/** * 新增保存部门 */ @Log(title = "部门管理", businessType = BusinessType.INSERT) @RequiresPermissions("system:dept:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(SysDept dept) { dept.setCreateBy(ShiroUtils.getLoginName()); return toAjax(deptService.insertDept(dept)); }
Example 19
Source File: StoreMemberController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存商城会员信息 */ @RequiresPermissions("shop:member:add") @Log(title = "商城会员信息", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(StoreMember storeMember) { return toAjax(storeMemberService.insertStoreMember(storeMember)); }
Example 20
Source File: StoreGoodsBrandController.java From supplierShop with MIT License | 5 votes |
/** * 新增保存产品品牌 */ @RequiresPermissions("shop:brand:add") @Log(title = "产品品牌", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(StoreGoodsBrand storeGoodsBrand) { return toAjax(storeGoodsBrandService.insertStoreGoodsBrand(storeGoodsBrand)); }