🎨 Improving structure / format of the code. 格式化代码

This commit is contained in:
lbw 2023-04-27 14:56:39 +08:00
parent 0454a69e49
commit 8f026ada0f

View File

@ -75,9 +75,10 @@ public class SysDictController {
*/ */
@GetMapping("/page") @GetMapping("/page")
public R<IPage<SysDict>> getDictPage(Page page, SysDict sysDict) { public R<IPage<SysDict>> getDictPage(Page page, SysDict sysDict) {
return R.ok(sysDictService.page(page, Wrappers.<SysDict>lambdaQuery() return R.ok(sysDictService.page(page,
.like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey()) Wrappers.<SysDict>lambdaQuery()
.orderByDesc(SysDict::getUpdateTime))); .like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey())
.orderByDesc(SysDict::getUpdateTime)));
} }
/** /**
@ -88,7 +89,10 @@ public class SysDictController {
@GetMapping("/key/{key}") @GetMapping("/key/{key}")
@Cacheable(value = CacheConstants.DICT_DETAILS, key = "#key") @Cacheable(value = CacheConstants.DICT_DETAILS, key = "#key")
public R<List<SysDictItem>> getDictByKey(@PathVariable String key) { public R<List<SysDictItem>> getDictByKey(@PathVariable String key) {
return R.ok(sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getDictKey, key).orderByAsc(SysDictItem::getSortOrder))); return R.ok(sysDictItemService.list(Wrappers.<SysDictItem>query()
.lambda()
.eq(SysDictItem::getDictKey, key)
.orderByAsc(SysDictItem::getSortOrder)));
} }
/** /**