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

Commit 38b1182c authored by 姜秀龙's avatar 姜秀龙

Merge branch 'refs/heads/dev-1.6-shouqianba' into container-test

parents ff33c406 d462685c
......@@ -32,9 +32,9 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
private String skuAppear;
@ApiModelProperty(position = 11, value = "商品ID[64]")
private String spuId;
@ApiModelProperty(position = 12, value = "true 没有库存了, false 有库存")
@ApiModelProperty(position = 12, value = "是否无库存(实时:Redis 库存 getSkuStock,stock<=0 为 true;售罄判断优先用此字段或 restStock)")
private boolean stockLess;
@ApiModelProperty(position = 13, value = "可以购买数量")
@ApiModelProperty(position = 13, value = "限购维度可买数:buyLimit=0 时为 -9999 表示不限购;否则为 buyLimit-用户已购数(与 restStock 无强制取小,下单仍以库存为准)")
private int canBuy;
@ApiModelProperty(position = 13, value = "单品的名称[100]")
private String name;
......@@ -43,8 +43,12 @@ public class GoblinGoodsSkuInfoDetailVo implements Serializable, Cloneable {
@ApiModelProperty(position = 26, value = "限量[0-无限制|X:限购数量]")
private Integer buyLimit;
@ApiModelProperty(position = 27, value = "剩余库存")
@ApiModelProperty(position = 27, value = "剩余库存(实时:Redis getSkuStock)")
private Integer restStock;
@ApiModelProperty(position = 28, value = "单品是否可买[0-否|1-是](来自 Redis/Mongo SKU 文档,BeanUtils 拷贝;与 stockLess 可能不同步时以 stockLess/restStock 为准)")
private String skuCanbuy;
@ApiModelProperty(position = 29, value = "是否售罄标记[0-否|1-是](SKU 主数据字段;列表/详情中实时售罄以 stockLess、restStock 为准)")
private String soldoutStatus;
@ApiModelProperty(position = 51, value = "是否实名[0-否|1-是,表示该商品需要实名关联]")
private Integer isTrueName;
......
package com.liquidnet.service.goblin.dto.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 收钱吧-按演出查询关联商品列表(与 {@link GoblinFrontSelectGoodVo} 字段名一致,便于前端复用同一解析逻辑)
*/
@ApiModel(value = "GoblinSqbPerformanceSelectGoodVo", description = "收钱吧-演出关联商品列表")
@Data
public class GoblinSqbPerformanceSelectGoodVo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "满足展示条件、分页前的商品总数(按 SPU 去重后)")
private int count;
@ApiModelProperty(value = "商品列表,元素为 GoblinSqbPerformanceGoodsInfoVo(含 price/settlementPrice、goblinGoodsSkuInfoVolist 等)")
private List<GoblinSqbPerformanceGoodsInfoVo> goblinGoodsInfoVoList;
public static GoblinSqbPerformanceSelectGoodVo getNew() {
GoblinSqbPerformanceSelectGoodVo vo = new GoblinSqbPerformanceSelectGoodVo();
vo.setGoblinGoodsInfoVoList(new ArrayList<GoblinSqbPerformanceGoodsInfoVo>());
return vo;
}
}
......@@ -45,7 +45,7 @@ public interface GoblinFrontService {
/**
* 按演出ID查询已关联商品列表
*/
GoblinFrontSelectGoodVo getPerformanceSelectGoods(String performancesId, int page, int pageSize);
GoblinSqbPerformanceSelectGoodVo getPerformanceSelectGoods(String performancesId, int page, int pageSize);
//根据艺人标签和演出id查询商品列表
List<GoblinGoodsInfoVo> getGoodByMusicTagP(String musicTag, String performanceId);
......
......@@ -2,7 +2,7 @@ package com.liquidnet.service.goblin.controller;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.vo.GoblinFrontSelectGoodVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSqbPerformanceSelectGoodVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSqbCouponVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSqbOrderDetailVo;
import com.liquidnet.service.goblin.service.GoblinFrontService;
......@@ -108,7 +108,7 @@ public class GoblinSqbController {
@ApiImplicitParam(paramType = "query", required = true, dataType = "int", name = "pageSize", value = "分页大小"),
@ApiImplicitParam(paramType = "query", required = true, dataType = "int", name = "pageNumber", value = "页码(从0开始)")
})
public ResponseDto<GoblinFrontSelectGoodVo> getPerformanceSelectGoods(
public ResponseDto<GoblinSqbPerformanceSelectGoodVo> getPerformanceSelectGoods(
@RequestParam(name = "performancesId", required = true) String performancesId,
@RequestParam(name = "pageSize", required = true) int pageSize,
@RequestParam(name = "pageNumber", required = true) int pageNumber) {
......
......@@ -1120,11 +1120,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
@Override
public GoblinFrontSelectGoodVo getPerformanceSelectGoods(String performancesId, int page, int pageSize) {
GoblinFrontSelectGoodVo respVo = GoblinFrontSelectGoodVo.getNew();
public GoblinSqbPerformanceSelectGoodVo getPerformanceSelectGoods(String performancesId, int page, int pageSize) {
GoblinSqbPerformanceSelectGoodVo respVo = GoblinSqbPerformanceSelectGoodVo.getNew();
if (StringUtil.isBlank(performancesId)) {
respVo.setCount(0);
respVo.setGoblinGoodsInfoVoList(ObjectUtil.goblinGoodsInfoVoArrayList());
respVo.setGoblinGoodsInfoVoList(new ArrayList<GoblinSqbPerformanceGoodsInfoVo>());
return respVo;
}
......@@ -1141,7 +1141,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
String nowTimeStr = DateUtil.getNowTime();
if (1 == DateUtil.compareStrDay(nowTimeStr, perfVo.getTimeEnd())) {
respVo.setCount(0);
respVo.setGoblinGoodsInfoVoList(ObjectUtil.goblinGoodsInfoVoArrayList());
respVo.setGoblinGoodsInfoVoList(new ArrayList<GoblinSqbPerformanceGoodsInfoVo>());
return respVo;
}
} catch (Exception e) {
......@@ -1170,7 +1170,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
// 4. 每次请求都实时校验商品状态(delFlg, shelvesStatus 等)
// 这样如果商品在 SPU 层面下架,虽然关联关系还在缓存,但这里会动态过滤掉
ArrayList<GoblinGoodsInfoVo> allGoods = ObjectUtil.goblinGoodsInfoVoArrayList();
ArrayList<GoblinSqbPerformanceGoodsInfoVo> allGoods = new ArrayList<GoblinSqbPerformanceGoodsInfoVo>();
if (!CollectionUtils.isEmpty(relations)) {
// 说明:relations 关联的是 SKU(同一 SPU 可能多条),下单侧需要完整 SKU 关系,所以 Redis 缓存必须保留全量。
// 前端“推荐商品列表”展示按 SPU 去重:取排序最靠前的一条关联作为该 SPU 的展示代表。
......@@ -1226,7 +1226,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
return respVo;
}
int end = Math.min(start + safePageSize, total);
ArrayList<GoblinGoodsInfoVo> pageList = ObjectUtil.goblinGoodsInfoVoArrayList();
ArrayList<GoblinSqbPerformanceGoodsInfoVo> pageList = new ArrayList<GoblinSqbPerformanceGoodsInfoVo>();
pageList.addAll(allGoods.subList(start, end));
respVo.setGoblinGoodsInfoVoList(pageList);
......
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