package test.com.philisense.www.controller.http.app;

import com.alibaba.fastjson.JSON;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;


import test.base.HttpUtilsForm;

import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.philisense.www.common.config.CommonConst;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.ResponseEntity;

public class TestSystemNoticeFileControllerWithHttpClientForApp  {




            @BeforeEach
            public void setUpTestDataWithinTransaction() {

            // set up test data within the transaction

            }

            @AfterEach
            public void tearDownWithinTransaction() {

            // execute "tear down" logic within the transaction

            }

            @Test
            @Disabled
            public void testSystemNoticeFileDeleteByPrimaryKeyForApp(){
                String id = UUID.randomUUID().toString().replaceAll("-","");
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/delete?recordid="+id;
            	String charset = HttpUtilsForm.UTF8;
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doGet(url, charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testSystemNoticeFileSelectByPrimaryKeyForApp(){
                String id = UUID.randomUUID().toString().replaceAll("-","");
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/get?recordid="+id;
            	String charset = HttpUtilsForm.UTF8;
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doGet(url, charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testSystemNoticeFileInsertForApp(){
            	
            	Map<String, Object> headerMap = new HashMap<String, Object>();
            	
            	headerMap.put("Content-Type", "application/json");
            	
            	
            	
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/insert";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                }               
                
            }

            @Test
            @Disabled
            public void testSystemNoticeFileUpdateForApp(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/update";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testSystemNoticeFileDeleteByMapForApp(){
	        	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/deleteByMap";
	        	String charset = HttpUtilsForm.UTF8;
	        	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
	            try {
	                //括号里的是前台发送的url连接
	                String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
	                System.out.println(body);                                                       
	            } catch (Exception e) {
	                e.printStackTrace();
	            } 
                
            }

            @Test
            @Disabled
            public void testSystemNoticeFileUpdateByMapForApp(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/updateByMap";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testSystemNoticeFileGetOneForApp(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/getOne";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testSystemNoticeFileGetAllForApp(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/getAll";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testSystemNoticeFileCountForApp(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/count";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testSystemNoticeFileQueryPageForApp(){
            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/queryPage";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> params = new HashMap<String, Object>();
                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testSystemNoticeFileInsertBatchForApp(){

                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();


                Map<String, Object> params = new HashMap<String, Object>();



                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户



                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


               	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/insertBatch";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
            	paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            @Test
            @Disabled
            public void testSystemNoticeFileDeleteBatchForApp(){

                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();


                Map<String, Object> params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户

                list.add(params);


            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/deleteBatch";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
            	paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }

            @Test
            @Disabled
            public void testSystemNoticeFileUpdateBatchForApp(){

                List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();


                Map<String, Object> params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


                params = new HashMap<String, Object>();


                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


                params = new HashMap<String, Object>();

                //设置 请求参数
                params.put("id","id");//id
                params.put("noticeid","noticeid");//主表外键ID
                params.put("filename","filename");//文件名称
                params.put("newfilename","newfilename");//新文件名称
                params.put("filepath","filepath");//附件路径
                params.put("fileurl","fileurl");//附件地址
                params.put("filetype","filetype");//文件类型
                params.put("filesuffix","filesuffix");//文件后缀名
                params.put("filesize",0);//文件大小 单位b
                params.put("mimetype","mimetype");//MIME 类型
                params.put("uploadtime",new Date());//上传时间
                params.put("businessfiletype","businessfiletype");//业务附件类型
                params.put("storagetype","storagetype");//存储类型
                params.put("apply_user_id","apply_user_id");//上传用户id
                params.put("apply_user","apply_user");//上传用户


                list.add(params);


            	String url = HttpUtilsForm.WebconnectURL+CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/updateBatch";
            	String charset = HttpUtilsForm.UTF8;
            	Map<String, Object> paramsbody = new HashMap<String, Object>();
                //设置 请求参数
            	paramsbody.put("list",list);//用户Id
                try {
                    //括号里的是前台发送的url连接
                    String body = HttpUtilsForm.doPost(url, JSON.toJSONString(params), charset);
                    System.out.println(body);                                                       
                } catch (Exception e) {
                    e.printStackTrace();
                } 
            }


            @Test
            @Disabled
            public void testexportForSystemNoticeFileForApp() throws IOException {
                    /*
                    // 待下载的文件地址
                    String url = CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/export";
                    ResponseEntity<byte[]> rsp = template.getForEntity(url, byte[].class);
                    System.out.println("文件下载请求结果状态码：" + rsp.getStatusCode());

                    String filename = "客户用户表";
                    // 将下载下来的文件内容保存到本地
                    String targetPath = "path_xxx/"+filename+"_SystemNoticeFile.xlsx";
                    Files.write(Paths.get(targetPath), Objects.requireNonNull(rsp.getBody(),
                    "未获取到下载文件"));
                    */
            }

            @Test
            @Disabled
            public void testexportTemplateForSystemNoticeFileForApp() throws IOException {
                    /*
            	    // 待下载的文件地址
                    String url = CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/exportTemplate";
                    ResponseEntity<byte[]> rsp = template.getForEntity(url, byte[].class);
                    System.out.println("文件下载请求结果状态码：" + rsp.getStatusCode());

                    // 将下载下来的文件内容保存到本地
                    String filename = "客户用户表";
                    // 将下载下来的文件内容保存到本地
                    String targetPath = "path_xxx/"+filename+"_SystemNoticeFile.xlsx";
                    Files.write(Paths.get(targetPath), Objects.requireNonNull(rsp.getBody(),
                    "未获取到下载文件"));
                    */
            }

            @Test
            @Disabled
            public void testimportExcelForSystemNoticeFileForApp()  {
                /*
            	// 文件上传服务上传接口
                String url = CommonConst.APP_REST_SERVICE_PREFICX+"systemnoticefile/importExcel";
                // 待上传的文件（存在客户端本地磁盘）
                String filename = "客户用户表";
                // 将下载下来的文件内容保存到本地
                String targetPath = "path_xxx/"+filename+"_SystemNoticeFile.xlsx";
                // 封装请求参数
                FileSystemResource resource = new FileSystemResource(new File(targetPath));
                MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
                param.add("file", resource);  //服务端MultipartFile uploadFile
                //param.add("param1", "test");   //服务端如果接受额外参数，可以传递


                // 发送请求并输出结果
                System.out.println("--- 开始上传文件 ---");
                String result = template.postForObject(url, param, String.class);
                System.out.println("--- 访问地址：" + result);
                */
            }

}
