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

Commit 7689aa8c authored by zhengfuxin's avatar zhengfuxin

降级查询和修改vo

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