Commit c3327171 authored by shiyu's avatar shiyu

钱币列表

parent 0eb9817c
......@@ -3,12 +3,13 @@ package com.wwdz.ch.admin.entity.vo;
import com.qiniu.util.StringUtils;
import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.db.domain.Item;
import java.io.Serializable;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Arrays;
import java.util.Objects;
public class ItemVo implements Serializable {
@Data
public class ItemVo implements Entity {
private static final long serialVersionUID = 3840196224538738818L;
......@@ -55,6 +56,8 @@ public class ItemVo implements Serializable {
*/
private Boolean isStd;
private String topImage;
public Integer getCid() {
return cid;
......@@ -135,6 +138,11 @@ public class ItemVo implements Serializable {
itemVo.setIsStd(item.getIsStd());
itemVo.setIsOnSale(item.getIsOnSale());
itemVo.setPrice(Double.parseDouble(PriceUtil.convertPrice(item.getPrice())));
String topImage = item.getTopImage();
if (org.springframework.util.StringUtils.isEmpty(topImage)) {
topImage = item.getImages().split(";")[0];
}
itemVo.setTopImage(topImage);
return itemVo;
}
......
......@@ -61,11 +61,6 @@ public class ItemServiceImpl implements ItemService {
Long itemId = coinRequestDto.getId();
if (!ObjectUtils.isEmpty(itemId)) {
item = itemManager.findDetails(coinRequestDto.getId());
String topImage = item.getTopImage();
if (StringUtils.isEmpty(topImage)) {
topImage = item.getImages().split(";")[0];
item.setTopImage(topImage);
}
} else {
item = itemManager.findOne(coinRequestDto);
}
......
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