| | |
| | | @ApiModelProperty(value = "商品参数json") |
| | | private String params; |
| | | |
| | | @ApiModelProperty(value = "商品排序") |
| | | private Integer goodsSort; |
| | | |
| | | |
| | | @ApiModelProperty(value = "预售结束时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | |
| | | * @param queryWrapper 查询条件 |
| | | * @return 售后VO分页 |
| | | */ |
| | | @Select("SELECT *,g.params as params,g.pre_sale_end_date,g.pre_sale_begin_date FROM li_goods_sku gs inner join li_goods g on gs.goods_id = g.id ${ew.customSqlSegment}") |
| | | @Select("SELECT *,g.params as params,g.goods_sort as goodsSort,g.pre_sale_end_date,g.pre_sale_begin_date FROM li_goods_sku gs inner join li_goods g on gs.goods_id = g.id ${ew.customSqlSegment}") |
| | | IPage<GoodsSkuDTO> queryByParams(IPage<GoodsSkuDTO> page, @Param(Constants.WRAPPER) Wrapper<GoodsSkuDTO> queryWrapper); |
| | | |
| | | @Select("SELECT id as sku_id, quantity, goods_id,simple_specs,sn,goods_name FROM li_goods_sku ${ew.customSqlSegment}") |
| | |
| | | import cn.lili.modules.search.service.EsGoodsSearchService; |
| | | import cn.lili.rocketmq.RocketmqSendCallbackBuilder; |
| | | import cn.lili.rocketmq.tags.GoodsTagsEnum; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | if (CollUtil.isNotEmpty(promotionGoods)) { |
| | | esGoodsIndex.setPromotionMapJson(JSONUtil.toJsonStr(promotionService.wrapperPromotionMapList(promotionGoods))); |
| | | } |
| | | |
| | | log.info("构建出es的索引信息为{}", JSON.toJSONString(esGoodsIndex)); |
| | | esGoodsIndex.setGoodsSort(goodsSku.getGoodsSort()); |
| | | esGoodsIndices.add(esGoodsIndex); |
| | | //库存锁是在redis做的,所以生成索引,同时更新一下redis中的库存数量 |
| | | cache.put(GoodsSkuService.getStockCacheKey(goodsSku.getId()), goodsSku.getQuantity()); |