记得上下班打卡 | git大法好,push需谨慎

Commit 1ffca2b4 authored by 胡佳晨's avatar 胡佳晨

sweet

parent cd75d919
......@@ -200,18 +200,30 @@ public class RedisDataUtils {
SweetArtistsRelationVo vo = getArtistsRelationRedisVo(uid);
vo.setUid(uid);
if (type.equalsIgnoreCase("sign")) {
if (vo.getSignList().contains(artistsId)) {
vo.getSignList().remove(artistsId);
if (vo.getSignList() == null) {
ArrayList<String> signList = new ArrayList<>();
signList.add(artistsId);
vo.setSignList(signList);
} else {
vo.getSignList().add(artistsId);
if (vo.getSignList().contains(artistsId)) {
vo.getSignList().remove(artistsId);
} else {
vo.getSignList().add(artistsId);
}
}
} else if (type.equalsIgnoreCase("watch")) {
if (vo.getSignList() == null) {
ArrayList<String> watchList = new ArrayList<>();
watchList.add(artistsId);
vo.setWatchList(watchList);
}
if (vo.getWatchList().contains(artistsId)) {
vo.getWatchList().remove(artistsId);
} else {
vo.getWatchList().add(artistsId);
}
}
redisUtil.set(redisKey, vo);
}
......@@ -230,7 +242,7 @@ public class RedisDataUtils {
//获取 商铺
public List<SweetManualShop> setManualShopRedisData(String manualId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_SHOP.concat(manualId);
List<SweetManualShop> list = sweetManualShopMapper.selectList(Wrappers.lambdaQuery(SweetManualShop.class).eq(SweetManualShop::getManualId, manualId).orderBy(true,false,SweetManualShop::getSort));
List<SweetManualShop> list = sweetManualShopMapper.selectList(Wrappers.lambdaQuery(SweetManualShop.class).eq(SweetManualShop::getManualId, manualId).orderBy(true, false, SweetManualShop::getSort));
redisUtil.set(redisKey, list);
return list;
}
......
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