Pu Zhibing
2025-04-22 fd7b8fb7c89832c28a838b0449bbb8a392433ee2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/weChat/WeChatUtil.java
@@ -7,6 +7,7 @@
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.account.util.ObsUploadUtil;
import com.ruoyi.common.redis.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
@@ -221,8 +222,6 @@
            HttpResponse execute = post.execute();
            byte[] bytes = execute.bodyBytes();
            String body1 = execute.body();
            System.err.println(body1);
            System.err.println(Base64.encodeBase64String(bytes));
            return new ByteArrayInputStream(bytes);
        }catch (Exception e){
            e.printStackTrace();
@@ -240,7 +239,8 @@
     */
    public String getwxacodeunlimit(String page, String scene, EnvVersion env_version, String filePath){
        InputStream getwxacodeunlimit = getwxacodeunlimit(page, scene, env_version);
        File file = FileUtil.writeFromStream(getwxacodeunlimit, new File(filePath));
        return file.getPath();
//        File file = FileUtil.writeFromStream(getwxacodeunlimit, new File(filePath));
//        return file.getPath();
        return ObsUploadUtil.obsUpload("png", getwxacodeunlimit);
    }
}