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

Commit cf058708 authored by 姜秀龙's avatar 姜秀龙

sqb 关联商品售价错误修复

parent 7c8b5759
......@@ -28,8 +28,8 @@ public class GoblinSqbPerfLinkedGoodsVo implements Serializable {
@ApiModelProperty(value = "商品头图(本地)")
private String coverPic;
@ApiModelProperty(value = "商品售价(分,本地)")
private Long price;
@ApiModelProperty(value = "商品售价(元,与 goblin_goods_sku.price 一致)")
private BigDecimal price;
@ApiModelProperty(value = "商品库存(本地)")
private Integer stock;
......
......@@ -141,7 +141,8 @@
}
var html = '';
linkedGoods.forEach(function (item, idx) {
var priceYuan = item.price ? (item.price / 100).toFixed(2) : '-';
// 与接口一致:price 已为「元」(BigDecimal 序列化),不再按「分」/100
var priceYuan = (item.price != null && item.price !== '') ? Number(item.price).toFixed(2) : '-';
var settlementVal = item.settlementPrice || '';
var imgHtml = item.coverPic
? '<img src="' + item.coverPic + '" class="img-thumb"/>'
......
......@@ -214,7 +214,7 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
vo.setSkuName(sku.getName());
vo.setSpuName(sku.getName());
vo.setCoverPic(sku.getSkuPic());
vo.setPrice(sku.getPrice() != null ? sku.getPrice().longValue() : null);
vo.setPrice(sku.getPrice());
vo.setStock(sku.getSkuStock());
}
goodsList.add(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