Commit 6bea40c0 by 水库浪子

Merge remote-tracking branch 'origin/back_end_dev' into back_end_dev

2 parents fa7805fd 4ccbc181
......@@ -46,4 +46,9 @@ public class WeChatSideVo {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
/**
* 封面地址
*/
private String coverUrl;
}
......@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
......@@ -141,7 +142,8 @@ public class WeMaterialServiceImpl implements IWeMaterialService {
conn = (HttpURLConnection) materialUrl.openConnection();
conn.setRequestMethod("GET");
conn.setConnectTimeout(20 * 1000);
return weMediaClient.upload(conn.getInputStream(), name, type);
InputStream inputStream = conn.getInputStream();
return weMediaClient.upload(inputStream, name, type);
}catch (Exception e){
e.printStackTrace();
log.error("上传临时文件失败......url:{},type:{},name:{},ex:{},st:{}",url,type,name,e.getMessage(),e.getStackTrace());
......
......@@ -30,7 +30,8 @@
wm.material_url,
wm.content,
wc.media_type,
wcc.create_time
wcc.create_time,
wm.cover_url
FROM
we_chat_collection wcc
LEFT JOIN we_material wm ON wcc.material_id = wm.id
......
......@@ -28,6 +28,7 @@
wm.material_url,
wm.content,
wc.media_type,
wm.cover_url,
(
SELECT
COUNT(1)
......
......@@ -31,8 +31,9 @@
FROM
we_chat_side
<where>
del_flag=0
<if test="h5!=null and h5!='' and h5=='1'.toString()">
`using`=0
AND `using`=0
</if>
</where>
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!