| | |
| | | import com.java110.intf.common.IAdvertInnerServiceSMO; |
| | | import com.java110.intf.common.IAdvertItemInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.MappingConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | */ |
| | | private void getAdvertItem(List<AdvertDto> advertDtos, JSONArray advertPhotoAndVideos) { |
| | | JSONObject photoAndVideo = null; |
| | | String imgUrl = MappingCache.getValue("IMG_PATH"); |
| | | String imgUrl = MappingCache.getValue(MappingConstant.FILE_DOMAIN,"IMG_PATH"); |
| | | for (AdvertDto advertDto : advertDtos) { |
| | | |
| | | AdvertItemDto advertItemDto = new AdvertItemDto(); |
| | |
| | | |
| | | for (AdvertItemDto tmpAdvertItemDto : advertItemDtos) { |
| | | //照片 |
| | | if ("8888".equals(tmpAdvertItemDto.getItemTypeCd())) { |
| | | photoAndVideo = new JSONObject(); |
| | | photoAndVideo.put("suffix", "JPEG"); |
| | | //photoAndVideo.put("url", "/callComponent/download/getFile/file?fileId=" + tmpAdvertItemDto.getUrl() + "&communityId=" + advertDto.getCommunityId()); |
| | | photoAndVideo.put("url", imgUrl + tmpAdvertItemDto.getUrl()); |
| | | photoAndVideo.put("seq", tmpAdvertItemDto.getSeq()); |
| | | photoAndVideo.put("advertType", advertDto.getAdvertType()); |
| | | photoAndVideo.put("pageUrl", advertDto.getPageUrl()); |
| | | advertPhotoAndVideos.add(photoAndVideo); |
| | | if (!"8888".equals(tmpAdvertItemDto.getItemTypeCd())) { |
| | | continue; |
| | | } |
| | | |
| | | photoAndVideo = new JSONObject(); |
| | | photoAndVideo.put("suffix", "JPEG"); |
| | | //photoAndVideo.put("url", "/callComponent/download/getFile/file?fileId=" + tmpAdvertItemDto.getUrl() + "&communityId=" + advertDto.getCommunityId()); |
| | | if(tmpAdvertItemDto.getUrl().startsWith("http")){ |
| | | photoAndVideo.put("url", tmpAdvertItemDto.getUrl()); |
| | | }else{ |
| | | photoAndVideo.put("url", imgUrl + tmpAdvertItemDto.getUrl()); |
| | | } |
| | | photoAndVideo.put("seq", tmpAdvertItemDto.getSeq()); |
| | | photoAndVideo.put("advertType", advertDto.getAdvertType()); |
| | | photoAndVideo.put("pageUrl", advertDto.getPageUrl()); |
| | | advertPhotoAndVideos.add(photoAndVideo); |
| | | } |
| | | } |
| | | |