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