mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-23 05:00:23 +08:00
commit
0454a69e49
@ -76,7 +76,8 @@ public class SysDictController {
|
||||
@GetMapping("/page")
|
||||
public R<IPage<SysDict>> getDictPage(Page page, SysDict sysDict) {
|
||||
return R.ok(sysDictService.page(page, Wrappers.<SysDict>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey())));
|
||||
.like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey())
|
||||
.orderByDesc(SysDict::getUpdateTime)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,7 +88,7 @@ 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)));
|
||||
return R.ok(sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getDictKey, key).orderByAsc(SysDictItem::getSortOrder)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@CacheEvict(value = CacheConstants.DICT_DETAILS, key = "#item.type")
|
||||
@CacheEvict(value = CacheConstants.DICT_DETAILS, key = "#item.dictKey")
|
||||
public void updateDictItem(SysDictItem item) {
|
||||
// 查询字典
|
||||
SysDict dict = dictService.getById(item.getDictId());
|
||||
|
Loading…
Reference in New Issue
Block a user