代码调整
This commit is contained in:
@@ -46,7 +46,7 @@ public class DrawPicUtil {
|
||||
private String drawPic(String option, int width, int height) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set("width", width == 0 ? 925 : width);
|
||||
jsonObject.set("height", height == 0 ? 300 : width);
|
||||
jsonObject.set("height", height == 0 ? 300 : height);
|
||||
jsonObject.set("option", JSONUtil.parseObj(option));
|
||||
ResponseEntity<String> picResult = RestTemplateUtil.post(URL, jsonObject, String.class);
|
||||
return Objects.requireNonNull(picResult.getBody()).indexOf("image/png") > 0 ? picResult.getBody() : "";
|
||||
|
||||
Reference in New Issue
Block a user