Commit 17da138a by jinxin

如果视频的话,取ImgUrl

parent 548fa468
......@@ -162,10 +162,12 @@ public class MaterialServiceImpl implements MaterialService {
JSONResponse jp = new JSONResponse() ;
MaterialDTO old = null ;
TabMaterialContent entity =null ;
Boolean flag = false;
if(from == 1) {
old = this.selectMaterialById(materialId);
}
if(from == 2) {
flag=true;
entity =this.materialContentMapper.selectById(materialId) ;
if(null != entity) {
old = EntityUtil.changeEntityByJSON(MaterialDTO.class, entity) ;
......@@ -192,8 +194,8 @@ public class MaterialServiceImpl implements MaterialService {
if (type == 4) {
fileType = QywxMediaTypeEnum.VIDEO;
url = old.getLink();
//如果from == 2,取ImgUrl
if(from==2){
//如果视频的话,取ImgUrl
if(flag){
url = old.getImgUrl();
}
}
......
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