revert yzt-20250303-问题清单序号546-接口报错问题日志打印2
ht
yzt 3 months ago
parent 61b9792388
commit 8cb7b51816

@ -13,7 +13,6 @@ import com.weaver.verupgrade.conn.CONN_TYPE;
import com.weaver.verupgrade.conn.RecordSet;
import org.apache.axis.encoding.Base64;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.hc.client5.http.utils.Hex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -187,8 +186,6 @@ public class DocUtil {
"AND c.delete_type = 0 " +
"AND c.tenant_key = '"+tenantKey+"';";
rs.executeSql(sql, poolname);
log.error("sql--",sql);
if(rs.next()){
String imagefileid = Util.null2String(rs.getString("imagefileid"));
String filerealpath = Util.null2String(rs.getString("file_path"))+"/"+Util.null2String(rs.getString("file_url"));
@ -198,20 +195,16 @@ public class DocUtil {
InputStream fi = getFile(filerealpath,iszip);
docmap.put("imagefileid",imagefileid);
docmap.put("filename",imagefilename);
log.error("fi-- {}",fi);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int count = 0;
while((count = fi.read(buffer)) >= 0){
baos.write(buffer, 0, count);
}
log.error("baos-- {}", Hex.encodeHexString(baos.toByteArray()));
uploadBuffer = Base64.encode(baos.toByteArray());
docmap.put("base64str",uploadBuffer);
docmap.put("filesize",filesize);
log.error("docmap-- {}", docmap);
baos.close();
//这里就可以封装 文件名和文件内容 传给第三方系统
}

Loading…
Cancel
Save