feat:zlb接口

This commit is contained in:
Xiang
2026-05-07 16:38:59 +08:00
parent a1d42a4b27
commit 582beb13db
9 changed files with 454 additions and 39 deletions

View File

@@ -10,7 +10,6 @@ import com.xiang.common.pojo.code.YcCodeRequest;
import com.xiang.common.utils.HttpService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.springframework.stereotype.Service;
import java.util.Arrays;
@@ -52,6 +51,7 @@ public class CodeServiceImpl implements ICodeService {
ycCodeRequest.setImage(image);
ycCodeRequest.setToken("9LQ1ATKVEeO8Arhq-HavXzpHvkzdZz_r7ydmqlYhp9c");
ycCodeRequest.setLabelImage(templateImage);
ycCodeRequest.setType(YcCodeTypeEnum.YC_310700.getType());
String resp = HttpService.doPost(YUN_CODE_API_URL, header, JSON.toJSONString(ycCodeRequest));
YcCodeBaseResponse<YcCodeDataResp> response = JSON.parseObject(resp, new TypeReference<YcCodeBaseResponse<YcCodeDataResp>>() {