nili
5 months ago
9 changed files with 113 additions and 8 deletions
@ -0,0 +1,45 @@ |
|||||
|
package awesome.group.game.service.bo.citrus; |
||||
|
|
||||
|
import awesome.group.game.dao.bean.MatrixApp; |
||||
|
import awesome.group.game.service.bo.matrix.MarketConfigBo; |
||||
|
import com.google.gson.Gson; |
||||
|
import org.springframework.util.StringUtils; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public class MarketBo { |
||||
|
public String name; |
||||
|
public String code; |
||||
|
public String img; |
||||
|
public String url; |
||||
|
public String fileSize; |
||||
|
public Integer version; |
||||
|
public List<String> images; |
||||
|
public String packageName; |
||||
|
public String author; |
||||
|
public int downloadTimes; |
||||
|
public String desc; |
||||
|
public long updatedAt; |
||||
|
|
||||
|
public MarketBo() { |
||||
|
} |
||||
|
|
||||
|
public MarketBo(MatrixApp app) { |
||||
|
this.name = app.getName(); |
||||
|
this.url = app.getUrl(); |
||||
|
this.img = app.getImg(); |
||||
|
this.version = app.getVersion(); |
||||
|
this.updatedAt = app.getUpdatedAt().getTime(); |
||||
|
|
||||
|
if(StringUtils.hasText(app.getMarketConfig())) { |
||||
|
Gson gson = new Gson(); |
||||
|
MarketConfigBo bo = gson.fromJson(app.getMarketConfig(), MarketConfigBo.class); |
||||
|
this.author = bo.author; |
||||
|
this.images = bo.images; |
||||
|
this.fileSize = bo.fileSize; |
||||
|
this.packageName = bo.packageName; |
||||
|
this.desc = bo.desc; |
||||
|
this.downloadTimes = bo.downloadTimes; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package awesome.group.game.service.bo.matrix; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public class MarketConfigBo { |
||||
|
public String packageName; |
||||
|
public String author; |
||||
|
public String fileSize; |
||||
|
public String desc; |
||||
|
public List<String> images; |
||||
|
public int downloadTimes; |
||||
|
|
||||
|
public MarketConfigBo() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue