diff --git a/aiyh/utils/fileUtil/WritWatermark.java b/aiyh/utils/fileUtil/WritWatermark.java index a7a2d94..1192799 100644 --- a/aiyh/utils/fileUtil/WritWatermark.java +++ b/aiyh/utils/fileUtil/WritWatermark.java @@ -62,6 +62,10 @@ public class WritWatermark { graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); graphics.drawImage(image, 0, 0, width, height, null); +// 对字体进行限制 + if(fontSize * pressText.length() >= width){ + fontSize = (int) (width / (pressText.length() + 5)); + } Font font = new Font(fontName, fontStyle, fontSize); graphics.setColor(color); graphics.setFont(font); diff --git a/com/api/aiyh_pcn/fadada/util/FaDDRequestUtils.java b/com/api/aiyh_pcn/fadada/util/FaDDRequestUtils.java index 73ead3b..5bc9c3f 100644 --- a/com/api/aiyh_pcn/fadada/util/FaDDRequestUtils.java +++ b/com/api/aiyh_pcn/fadada/util/FaDDRequestUtils.java @@ -10,6 +10,7 @@ import com.api.aiyh_pcn.fadada.dao.FaDDServiceMapping; import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.commons.codec.binary.Hex; import org.apache.http.client.methods.CloseableHttpResponse; +import org.h2.util.StringUtils; import weaver.aiyh_pcn.fadada.entity.FileInfo; import java.io.IOException; @@ -39,7 +40,11 @@ public class FaDDRequestUtils { static { header.put("appId", "100001"); header.put("signType", "SHA256"); - header.put("apikey", "TulQxnZSRKeHoQfmeZzOUzGn6KpTDkDK"); + String apiKey = TOOL_UTIL.getSystemParamValue("FDD_apiKey"); + if(StringUtils.isNullOrEmpty(apiKey)){ + apiKey = "TulQxnZSRKeHoQfmeZzOUzGn6KpTDkDK"; + } + header.put("apikey", apiKey); header.put("Content-Type", HttpArgsType.APPLICATION_JSON); } @@ -158,12 +163,11 @@ public class FaDDRequestUtils { "&bizContent=" + header.get("bizContent") + "&signType=" + header.get("signType") + "×tamp=" + header.get("timestamp"); - System.out.println(signStr); +// System.out.println(signStr); String appKey = "L7P59oqA2An0XgJ1LeMN0fRu1"; String sha256 = string2SHA256(signStr) + appKey; - String sign = Base64.getEncoder().encodeToString(string2SHA256(sha256).getBytes(StandardCharsets.UTF_8)); // System.out.println(sign); - return sign; + return Base64.getEncoder().encodeToString(string2SHA256(sha256).getBytes(StandardCharsets.UTF_8)); } public static String builderBizContent(Map data) { diff --git a/customization/test/NewTest.java b/customization/test/NewTest.java index 94f1d28..c00f170 100644 --- a/customization/test/NewTest.java +++ b/customization/test/NewTest.java @@ -502,6 +502,7 @@ public class NewTest extends BaseTest { // Sheet sheet = sxssfWorkbook.createSheet("人员信息"); // Row desc = sheet.createRow(0); // desc.createCell(1).setCellValue(null); +// System.out.println(i); } }