获取token改成非静态方法

This commit is contained in:
xiangerlin 2025-07-18 08:48:44 +08:00
parent 44b57786d0
commit acd48d4a26
1 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,8 @@ public class ApplyInvoiceServiceImpl extends BaseService<ApplyInvoiceEntity,Stri
this.applyInvoiceDao = dao;
this.dao = dao;
}
@Autowired
private OARestUtil oaRestUtil;
@Value("${zt.url}")
private String interfaceUrl;
@ -121,7 +123,7 @@ public class ApplyInvoiceServiceImpl extends BaseService<ApplyInvoiceEntity,Stri
Assert.notEmpty(param,"流程处理时参数不能为空");
Assert.notEmpty(apiCode,"apiCode不能为空");
logger.info("准备提交或退回流程:{},{}",apiCode,param);
String token = OARestUtil.getToken(loginName, "8000590001");
String token = oaRestUtil.getToken(loginName, "8000590001");
String result = HttpRequest.post(interfaceUrl)
.header("appId", "800059")//OA应用
.header("apiCode", apiCode)//流程提交/回退接口