Commit 48d81970 authored by 童得柱's avatar 童得柱

fix资产加商品coin

parent e922f0de
......@@ -70,4 +70,7 @@ public class UserAsset implements Serializable {
@ApiModelProperty(value = "溯源hash")
@TableField(exist = false)
private String hash;
@ApiModelProperty(value = "商品coin")
private String goodsCoin;
}
......@@ -72,6 +72,9 @@ public class UserAssetRecord implements Serializable {
@ApiModelProperty(value = "备注")
private String note;
@ApiModelProperty(value = "商品coin")
private String goodsCoin;
public void init(String uid, String coin, Integer type, BigDecimal amount, Integer status, String otherSide, String hash, String note) {
setFlowId(UUIdUtil.getUUID());
setUid(uid);
......
......@@ -35,5 +35,6 @@ public class AssetTranDTO {
public AssetTranDTO() {
}
@ApiModelProperty(value = "商品coin")
private String goodsCoin;
}
......@@ -97,10 +97,10 @@ public class UserAssetServiceImpl extends ServiceImpl<UserAssetMapper, UserAsset
BigDecimal amount = i.getAmount();
i.setAmount(amount.setScale(2, BigDecimal.ROUND_DOWN));
i.setFrozen(i.getFrozen().setScale(2, BigDecimal.ROUND_DOWN));
if (StringUtil.isNullOrEmpty(i.getCoin())) {
if (StringUtil.isNullOrEmpty(i.getGoodsCoin())) {
continue;
}
SkuVo skuVo = skuService.querySkuByCoin(i.getCoin());
SkuVo skuVo = skuService.querySkuByCoin(i.getGoodsCoin());
if (skuVo != null) {
BigDecimal totalPrice = amount.multiply(skuVo.getOriginalPrice()).setScale(2, BigDecimal.ROUND_DOWN);
i.setTotalPrice(totalPrice);
......
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