Commit 182f551b by 朱亚洁

feat:[none]作品默认大图

parent f568fa2f
...@@ -57,6 +57,7 @@ import com.pcloud.channelcenter.qrcode.dto.QrcodeSceneDto; ...@@ -57,6 +57,7 @@ import com.pcloud.channelcenter.qrcode.dto.QrcodeSceneDto;
import com.pcloud.channelcenter.wechat.dto.AccountSettingDto; import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
import com.pcloud.channelcenter.wechat.dto.MessageDto; import com.pcloud.channelcenter.wechat.dto.MessageDto;
import com.pcloud.common.core.aspect.ParamLog; import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.core.constant.ProductTypeConstant;
import com.pcloud.common.exceptions.BizException; import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBeanNew; import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam; import com.pcloud.common.page.PageParam;
...@@ -644,7 +645,6 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -644,7 +645,6 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
ProductDto productDto = productDtoMap.get(itemVO.getServeId()); ProductDto productDto = productDtoMap.get(itemVO.getServeId());
itemVO.setServeName(productDto.getProductName()); itemVO.setServeName(productDto.getProductName());
itemVO.setServePic(productDto.getCoverImg()); itemVO.setServePic(productDto.getCoverImg());
itemVO.setTransverseImg(productDto.getPicture1());
if (productDto.getProductTypeDto() != null) { if (productDto.getProductTypeDto() != null) {
itemVO.setTypeCode(productDto.getProductTypeDto().getTypeCode()); itemVO.setTypeCode(productDto.getProductTypeDto().getTypeCode());
itemVO.setTypeName(productDto.getProductTypeDto().getTypeName()); itemVO.setTypeName(productDto.getProductTypeDto().getTypeName());
...@@ -652,6 +652,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -652,6 +652,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
if (!ListUtils.isEmpty(productDto.getSpecification())) { if (!ListUtils.isEmpty(productDto.getSpecification())) {
itemVO.setPrice(productDto.getSpecification().get(0).getAdvisePrice()); itemVO.setPrice(productDto.getSpecification().get(0).getAdvisePrice());
} }
itemVO.setTransverseImg(StringUtil.isEmpty(productDto.getPicture1())?
getDefaultBigPic(itemVO.getTypeCode()): productDto.getPicture1());
itemVO.setHasThirdLink(!StringUtil.isEmpty(productDto.getSkipUrl())?true:false); itemVO.setHasThirdLink(!StringUtil.isEmpty(productDto.getSkipUrl())?true:false);
} else { } else {
continue; continue;
...@@ -1350,4 +1352,20 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -1350,4 +1352,20 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
return resourcePageVO; return resourcePageVO;
} }
private String getDefaultBigPic(String productTypeCode) {
if (StringUtil.isEmpty(productTypeCode)) {
return null;
}
if (ProductTypeConstant.ATTENDANCE_TASK.equalsIgnoreCase(productTypeCode)) {
return "https://oss.5rs.me/oss/uploadfe/jpg/439fc2ce08a39581591f0d51784cf1ce.jpg";
} else if (ProductTypeConstant.QANEWS.equalsIgnoreCase(productTypeCode)) {
return "https://file.5rs.me/oss/uploadfe/jpg/9476eaf59a23eef05e67b10fb8c3e987.jpg";
} else if (ProductTypeConstant.SUBJECTNOTE_APP.equalsIgnoreCase(productTypeCode)) {
return "https://oss.5rs.me/oss/uploadfe/png/7828df80a6f236f5c5534152a2371075.png";
} else if (ProductTypeConstant.LIVE.equalsIgnoreCase(productTypeCode)) {
return "https://oss.5rs.me/oss/uploadfe/jpg/675e741e5a40e01b9fc4dd22de6f6bc4.jpg";
}
return null;
}
} }
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