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

Commit 7689aa8c authored by zhengfuxin's avatar zhengfuxin

降级查询和修改vo

parent 2d261922
......@@ -30,6 +30,8 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
private BigDecimal price;
@ApiModelProperty(position = 33, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String skuAppear;
@ApiModelProperty(position = 11, value = "商品ID[64]")
private String spuId;
private static final GoblinGoodsSkuInfoDetailVo obj = new GoblinGoodsSkuInfoDetailVo();
......
......@@ -141,7 +141,7 @@ public class GoblinFrontNavigationServiceImpl extends ServiceImpl<GoblinFrontNav
public boolean online(){
LambdaQueryWrapper<GoblinFrontNavigation> queryWrapper = Wrappers.lambdaQuery(GoblinFrontNavigation.class);
queryWrapper.ne(GoblinFrontNavigation::getDelTag,1);
queryWrapper.orderByDesc(GoblinFrontNavigation::getIndexs);
queryWrapper.orderByAsc(GoblinFrontNavigation::getIndexs);
List<GoblinFrontNavigation> list=goblinFrontNavigationMapper.selectList(queryWrapper);
if(list.size()>0){
//mongodb
......
......@@ -11,6 +11,7 @@ import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinFrontBanner;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import com.liquidnet.service.goblin.entity.GoblinFrontNavigation;
import com.mongodb.BasicDBObject;
import com.mongodb.client.model.UpdateOneModel;
import com.mongodb.client.model.WriteModel;
......@@ -902,4 +903,11 @@ public class GoblinMongoUtils {
return mongoTemplate.find(query,
GoblinFrontHotWord.class, GoblinFrontHotWord.class.getSimpleName());
}
public List<GoblinFrontNavigation> getNavigation() {
Query query = Query.query(Criteria.where("delTag").is(0));
query.with(Sort.by(Sort.Order.asc("indexs")));
return mongoTemplate.find(query,
GoblinFrontNavigation.class, GoblinFrontNavigation.class.getSimpleName());
}
}
......@@ -10,6 +10,7 @@ import com.liquidnet.service.goblin.dto.manage.vo.GoblinMgtCategorySpecVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinFrontBanner;
import com.liquidnet.service.goblin.entity.GoblinFrontHotWord;
import com.liquidnet.service.goblin.entity.GoblinFrontNavigation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
......@@ -894,6 +895,15 @@ public class GoblinRedisUtils {
}
return vo;
}
// 导航栏 降级
// List<GoblinFrontNavigation> list = (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION);
public List<GoblinFrontNavigation> getNavigation() {
List<GoblinFrontNavigation> vo= (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION);
if (null == vo ) {
//降级
return goblinMongoUtils.getNavigation();
}
return vo;
}
}
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