修正R.fail忘记添加return的bug
This commit is contained in:
parent
b06857e8c8
commit
32ef43f198
16
README.md
16
README.md
@ -28,11 +28,23 @@ Ruoyi-Flex秉承“写的更少、性能更好、出错更低、交流通畅、
|
||||
### (4)交流通畅
|
||||
“非我族类,其心必异”。Ruoyi-Flex集成了一大波国产开源软件:MyBatis-Flex、Sa-Token、Hutool、PowerJob、Element-Plus等,同根同源,交流自然顺畅,开发中遇到问题可联系作者快速得到解决。例如,同一个领域的安全框架,一个中国人只需半天就可学会Sa-Token干活,如果是学Spring Security的话,七天也不一定能学会。
|
||||
|
||||
### (5)入门快速
|
||||
### (5)多端同步
|
||||
Ruoyi-Flex提供“1+3”端,1个后台端、3个前台端,熟悉js的可使用flex-elementplus-ui前端,熟悉ts的可使用ruoyiflex-elementplus-ts前端,既熟悉ts有熟悉antdesign的请使用ruoyiflex-antdesign-vben前端,总有一款适合您的前端供您选择!
|
||||
|
||||
### (6)入门快速
|
||||
Ruoyi-Flex已集成各种开源开发框架,扫平了技术障碍,可直接上手干活。使用者只需要设计好数据库表结构,系统能可视化生成前后端本地代码,单表、树表、主子表任你选,10分钟就能开发一个模块,快速入门,开发高效。
|
||||
|
||||
## 3、前端项目
|
||||
Ruoyi-Flex实行前后端分离仓库,本项目是java后端部分,前端项目是flex-elementplus-ui,前端项目地址: [flex-elementplus-ui](https://gitee.com/dataprince/flex-elementplus-ui)
|
||||
Ruoyi-Flex实行前后端分离仓库,本项目是java后端部分,目前有3个前端项目:
|
||||
|
||||
### (1)flex-elementplus-ui
|
||||
使用elementplus、js构建,项目地址: [flex-elementplus-ui](https://gitee.com/dataprince/flex-elementplus-ui)
|
||||
|
||||
### (2)ruoyiflex-elementplus-ts
|
||||
使用elementplus、typescript构建,项目地址: [ruoyiflex-elementplus-ts](https://gitee.com/dataprince/ruoyiflex-elementplus-ts)
|
||||
|
||||
### (3)ruoyiflex-antdesign-vben
|
||||
使用antdesign、vben、typescript构建,项目地址: [ruoyiflex-antdesign-vben](https://gitee.com/dataprince/ruoyiflex-antdesign-vben)
|
||||
|
||||
## 4、内置功能
|
||||
|
||||
|
@ -96,9 +96,9 @@ public class SysClientController {
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated @RequestBody SysClientBo sysClientBo) {
|
||||
Boolean updated = sysClientService.update(sysClientBo);
|
||||
boolean updated = sysClientService.update(sysClientBo);
|
||||
if (!updated) {
|
||||
R.fail("修改客户端管理记录失败!");
|
||||
return R.fail("修改客户端管理记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -110,9 +110,9 @@ public class SysClientController {
|
||||
@Log(title = "客户端管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public R<Void> changeStatus(@RequestBody SysClientBo sysClientBo) {
|
||||
Boolean updated = sysClientService.updateStatus(sysClientBo);
|
||||
boolean updated = sysClientService.updateStatus(sysClientBo);
|
||||
if (!updated) {
|
||||
R.fail("修改客户端管理状态失败!");
|
||||
return R.fail("修改客户端管理状态失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -129,7 +129,7 @@ public class SysClientController {
|
||||
@PathVariable Long[] ids) {
|
||||
boolean deleted = sysClientService.deleteByIds(List.of(ids));
|
||||
if (!deleted) {
|
||||
R.fail("删除客户端管理记录失败!");
|
||||
return R.fail("删除客户端管理记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class SysConfigController extends BaseController {
|
||||
}
|
||||
boolean updated = configService.updateConfig(config);
|
||||
if (!updated) {
|
||||
R.fail("修改参数'" + config.getConfigName() + "'失败!");
|
||||
return R.fail("修改参数'" + config.getConfigName() + "'失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -119,7 +119,7 @@ public class SysConfigController extends BaseController {
|
||||
public R<Void> updateByKey(@RequestBody SysConfigBo config) {
|
||||
boolean updated = configService.updateConfigByKey(config);
|
||||
if (!updated) {
|
||||
R.fail("修改参数'" + config.getConfigName() + "'失败!");
|
||||
return R.fail("修改参数'" + config.getConfigName() + "'失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class SysDictTypeController extends BaseController
|
||||
{
|
||||
boolean deleted = dictTypeService.deleteDictTypeByIds(dictIds);
|
||||
if (!deleted) {
|
||||
R.fail("删除字典类型记录失败!");
|
||||
return R.fail("删除字典类型记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ public class SysMenuController extends BaseController
|
||||
}
|
||||
boolean deleted = menuService.deleteMenuById(menuId);
|
||||
if (!deleted) {
|
||||
R.fail("删除菜单记录失败!");
|
||||
return R.fail("删除菜单记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ public class SysNoticeController extends BaseController
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody SysNoticeBo noticeBo)
|
||||
{
|
||||
Boolean updated = noticeService.updateNotice(noticeBo);
|
||||
boolean updated = noticeService.updateNotice(noticeBo);
|
||||
if (!updated) {
|
||||
R.fail("修改通知公告记录失败!");
|
||||
return R.fail("修改通知公告记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -104,7 +104,7 @@ public class SysNoticeController extends BaseController
|
||||
{
|
||||
boolean deleted = noticeService.deleteNoticeByIds(noticeIds);
|
||||
if (!deleted) {
|
||||
R.fail("删除通知公告记录失败!");
|
||||
return R.fail("删除通知公告记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ public class SysOssConfigController extends BaseController {
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated @RequestBody SysOssConfigBo bo) {
|
||||
Boolean updated = ossConfigService.updateByBo(bo);
|
||||
boolean updated = ossConfigService.updateByBo(bo);
|
||||
if (!updated) {
|
||||
R.fail("修改对象存储配置记录失败!");
|
||||
return R.fail("修改对象存储配置记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -103,7 +103,7 @@ public class SysOssConfigController extends BaseController {
|
||||
@PathVariable Long[] ossConfigIds) {
|
||||
boolean deleted = ossConfigService.deleteWithValidByIds(List.of(ossConfigIds), true);
|
||||
if (!deleted) {
|
||||
R.fail("删除对象存储配置记录失败!");
|
||||
return R.fail("删除对象存储配置记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -117,7 +117,7 @@ public class SysOssConfigController extends BaseController {
|
||||
public R<Void> changeStatus(@RequestBody SysOssConfigBo bo) {
|
||||
boolean updated = ossConfigService.updateOssConfigStatus(bo);
|
||||
if (!updated) {
|
||||
R.fail("状态修改失败!");
|
||||
return R.fail("状态修改失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -100,9 +100,9 @@ public class SysOssController extends BaseController {
|
||||
@DeleteMapping("/{ossIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ossIds) {
|
||||
Boolean deleted = ossService.deleteWithValidByIds(List.of(ossIds), true);
|
||||
boolean deleted = ossService.deleteWithValidByIds(List.of(ossIds), true);
|
||||
if (!deleted) {
|
||||
R.fail("删除OSS对象存储记录失败!");
|
||||
return R.fail("删除OSS对象存储记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -115,9 +115,9 @@ public class SysPostController extends BaseController
|
||||
&& userPostService.countUserPostById(postBo.getPostId()) > 0) {
|
||||
return R.fail("该岗位下存在已分配用户,不能禁用!");
|
||||
}
|
||||
Boolean updated = postService.updatePost(postBo);
|
||||
boolean updated = postService.updatePost(postBo);
|
||||
if (!updated) {
|
||||
R.fail("修改岗位记录失败!");
|
||||
return R.fail("修改岗位记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -132,7 +132,7 @@ public class SysPostController extends BaseController
|
||||
{
|
||||
boolean deleted = postService.deletePostByIds(postIds);
|
||||
if (!deleted) {
|
||||
R.fail("删除岗位记录失败!");
|
||||
return R.fail("删除岗位记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class SysTenantController extends BaseController {
|
||||
tenantService.checkTenantAllowed(sysTenantBo.getTenantId());
|
||||
boolean updated = tenantService.update(sysTenantBo);
|
||||
if (!updated) {
|
||||
R.fail("修改租户记录失败!");
|
||||
return R.fail("修改租户记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -125,7 +125,7 @@ public class SysTenantController extends BaseController {
|
||||
tenantService.checkTenantAllowed(sysTenantBo.getTenantId());
|
||||
boolean updated = tenantService.updateTenantStatus(sysTenantBo);
|
||||
if (!updated) {
|
||||
R.fail("修改租户状态失败!");
|
||||
return R.fail("修改租户状态失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -142,7 +142,7 @@ public class SysTenantController extends BaseController {
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] tenantIds) {
|
||||
boolean deleted = tenantService.deleteByIds(List.of(tenantIds), true);
|
||||
if (!deleted) {
|
||||
R.fail("删除租户记录失败!");
|
||||
return R.fail("删除租户记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -184,7 +184,7 @@ public class SysTenantController extends BaseController {
|
||||
@NotNull(message = "套餐ID不能为空") Long packageId) {
|
||||
boolean synced = tenantService.syncTenantPackage(tenantId, packageId);
|
||||
if (!synced) {
|
||||
R.fail("同步租户套餐失败!");
|
||||
return R.fail("同步租户套餐失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -108,9 +108,9 @@ public class SysTenantPackageController extends BaseController
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated @RequestBody SysTenantPackageBo sysTenantPackageBo) {
|
||||
Boolean updated = tenantPackageService.update(sysTenantPackageBo);
|
||||
boolean updated = tenantPackageService.update(sysTenantPackageBo);
|
||||
if (!updated) {
|
||||
R.fail("修改租户套餐记录失败!");
|
||||
return R.fail("修改租户套餐记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -123,9 +123,9 @@ public class SysTenantPackageController extends BaseController
|
||||
@Log(title = "租户套餐", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public R<Void> changeStatus(@RequestBody SysTenantPackageBo sysTenantPackageBo) {
|
||||
Boolean updated = tenantPackageService.updatePackageStatus(sysTenantPackageBo);
|
||||
boolean updated = tenantPackageService.updatePackageStatus(sysTenantPackageBo);
|
||||
if (!updated) {
|
||||
R.fail("修改租户套餐记录状态失败!");
|
||||
return R.fail("修改租户套餐记录状态失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@ -143,7 +143,7 @@ public class SysTenantPackageController extends BaseController
|
||||
@PathVariable Long[] packageIds) {
|
||||
boolean deleted = tenantPackageService.deleteByIds(packageIds, true);
|
||||
if (!deleted) {
|
||||
R.fail("删除租户套餐记录失败!");
|
||||
return R.fail("删除租户套餐记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
@ -27,13 +27,14 @@ import static com.ruoyi.system.domain.table.SysClientTableDef.SYS_CLIENT;
|
||||
/**
|
||||
* 系统授权表 服务层实现。
|
||||
*
|
||||
* @author dataprince数据小王子
|
||||
* @author dataprince数据小王子
|
||||
*/
|
||||
@Service
|
||||
public class SysClientServiceImpl extends ServiceImpl<SysClientMapper, SysClient> implements ISysClientService {
|
||||
|
||||
@Resource
|
||||
private SysClientMapper clientMapper;
|
||||
private SysClientMapper clientMapper;
|
||||
|
||||
@Override
|
||||
public QueryWrapper query() {
|
||||
return super.query().from(SYS_CLIENT);
|
||||
@ -57,7 +58,7 @@ public class SysClientServiceImpl extends ServiceImpl<SysClientMapper, SysClient
|
||||
|
||||
@Override
|
||||
public SysClient selectByClientId(String clientId) {
|
||||
return this.getOne(query().where(SYS_CLIENT.CLIENT_ID.eq(clientId)));
|
||||
return this.getOne(query().where(SYS_CLIENT.CLIENT_ID.eq(clientId)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -125,7 +126,6 @@ public class SysClientServiceImpl extends ServiceImpl<SysClientMapper, SysClient
|
||||
Date createTime = new Date();
|
||||
sysClient.setUpdateBy(loginUserId);
|
||||
sysClient.setUpdateTime(createTime);
|
||||
|
||||
return this.updateById(sysClient);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user