|
@@ -316,6 +316,7 @@ public class APIIndexenterController {
|
|
|
try {
|
|
|
AaCommodity byId = aaCommodityService.getById( aaCommodityDTO.getId() );
|
|
|
byId.setPic( host + "/sys/common/static/"+byId.getPic() );
|
|
|
+ byId.setVideo( host + "/sys/common/static/"+byId.getVideo() );
|
|
|
result.setMessage( "获取商品详细成功" );
|
|
|
result.setResult( byId );
|
|
|
result.setCode( 200 );
|
|
@@ -504,8 +505,22 @@ public class APIIndexenterController {
|
|
|
query.eq( "pid",0 );
|
|
|
List<AaCommodityFl> list = aaCommodityFlService.list(query);
|
|
|
for (int i = 0;i<list.size();i++){
|
|
|
- list.get( i ).setPic( host + "/sys/common/static/"+list.get( i ).getPic() );
|
|
|
- list.get( i ).setAssets( host + "/sys/common/static/"+list.get( i ).getAssets() );
|
|
|
+ AaCommodityFl aaCommodityFl = list.get(i);
|
|
|
+ String pic = aaCommodityFl.getPic();
|
|
|
+ if (!Strings.isNullOrEmpty(pic)) {
|
|
|
+ if (pic.contains(",")) {
|
|
|
+ String[] split = pic.split(",");
|
|
|
+ if (split.length >=2){
|
|
|
+ aaCommodityFl.setPic(host + "/sys/common/static/"+split[0]);
|
|
|
+ aaCommodityFl.setPic2(host + "/sys/common/static/"+split[1]);
|
|
|
+ } else if (split.length == 1){
|
|
|
+ aaCommodityFl.setPic(host + "/sys/common/static/"+split[0]);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ aaCommodityFl.setPic(host + "/sys/common/static/"+aaCommodityFl.getPic());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ aaCommodityFl.setAssets( host + "/sys/common/static/"+ aaCommodityFl.getAssets() );
|
|
|
}
|
|
|
result.setMessage( "获取商品一级分类成功" );
|
|
|
result.setResult( list );
|