Commit 3bf121b6 authored by shiyu's avatar shiyu

显示价格,价格除以100

parent 8a493daf
...@@ -49,7 +49,7 @@ public class CoinVo implements Entity { ...@@ -49,7 +49,7 @@ public class CoinVo implements Entity {
/** /**
* 价格, 要除以100 * 价格, 要除以100
*/ */
private Long price; private Double price;
/** /**
* 创建时间 * 创建时间
......
...@@ -229,6 +229,8 @@ public class ItemServiceImpl implements ItemService { ...@@ -229,6 +229,8 @@ public class ItemServiceImpl implements ItemService {
CoinVo coinVo = new CoinVo(); CoinVo coinVo = new CoinVo();
EntityMapper.copyAttribute(item, coinVo); EntityMapper.copyAttribute(item, coinVo);
coinVo.setStateName(ItemStateEnum.getNameByCode(item.getState())); coinVo.setStateName(ItemStateEnum.getNameByCode(item.getState()));
long price = item.getPrice() == null ? 0 : item.getPrice();
coinVo.setPrice(price / (double)100);
String extra = item.getExtra(); String extra = item.getExtra();
if (StringUtils.hasLength(extra)) { if (StringUtils.hasLength(extra)) {
Map<String, Object> map = JsonUtils.toMap(extra); Map<String, Object> map = JsonUtils.toMap(extra);
......
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