Commit d7c5d76d authored by libin's avatar libin

随车物品

parent 03359b4e
......@@ -41,7 +41,7 @@ public class AccompanyingItemBiz extends BaseBiz<AccompanyingItemMapper, Accompa
@Resource(name = "redisTemplate")
HashOperations itemHashOperations;
private static final String ACCOMPANY_ITEM="accompany:item";
private static final String ACCOMPANY_ITEM="accompany:item";
@Cache(key = RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
public List<AccompanyingItem> getAll(){
......@@ -81,7 +81,7 @@ public class AccompanyingItemBiz extends BaseBiz<AccompanyingItemMapper, Accompa
return PageDataVO.pageInfo(accompanyingItemsPageInfo);
}
@CacheClear(pre= RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
@CacheClear(key= RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
public RestResponse<Integer> add( AddOrUpdateAccompanyingItem addOrUpdateAccompanyingItem) throws Exception{
AccompanyingItem accompanyingItem = new AccompanyingItem();
accompanyingItem.setId(null);
......@@ -91,7 +91,7 @@ public class AccompanyingItemBiz extends BaseBiz<AccompanyingItemMapper, Accompa
return RestResponse.suc();
}
@CacheClear(pre= RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
@CacheClear(key= RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
public RestResponse<Integer> update( AddOrUpdateAccompanyingItem addOrUpdateAccompanyingItem) throws Exception{
AccompanyingItem accompanyingItem = new AccompanyingItem();
BeanUtils.copyProperties(accompanyingItem,addOrUpdateAccompanyingItem);
......@@ -100,14 +100,13 @@ public class AccompanyingItemBiz extends BaseBiz<AccompanyingItemMapper, Accompa
return RestResponse.suc();
}
@CacheClear(pre= RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
@CacheClear(key= RedisKey.ACCOMPANYING_ITEM_CACHE_ALL)
public RestResponse<Integer> del(Integer id){
Integer effected = mapper.deleteByPrimaryKey(id);
redisTemplate.delete(ACCOMPANY_ITEM);
return RestResponse.suc();
}
@Cache(key = RedisKey.ACCOMPANYING_ITEM_CACHE_ALL_APP+ "{1}")
public List<AccompanyingItemVo> listAllItem(List<Integer> types){
String typeKey = null;
if (CollectionUtils.isNotEmpty(types)){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment