🎨 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,7 +75,8 @@ public class SysDictController {
*/
@GetMapping("/page")
public R<IPage<SysDict>> getDictPage(Page page, SysDict sysDict) {
return R.ok(sysDictService.page(page, Wrappers.<SysDict>lambdaQuery()
return R.ok(sysDictService.page(page,
Wrappers.<SysDict>lambdaQuery()
.like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey())
.orderByDesc(SysDict::getUpdateTime)));
}
@ -88,7 +89,10 @@ public class SysDictController {
@GetMapping("/key/{key}")
@Cacheable(value = CacheConstants.DICT_DETAILS, key = "#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)));
}
/**