Your Name
2023-08-26 7958f1dddb8a7f4e70d232b07a7703955ecedae0
service-common/src/main/java/com/java110/common/cmd/advert/ListAdvertPhotoCmd.java
@@ -11,6 +11,7 @@
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;
@@ -86,7 +87,7 @@
     */
    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();
@@ -96,16 +97,22 @@
            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);
            }
        }