fix:利盟服务返回值中的数据增加使用泛型进行接收

This commit is contained in:
2025-02-08 17:20:50 +08:00
parent fc1e02264d
commit ed61a25ac4
3 changed files with 51 additions and 17 deletions

View File

@@ -26,7 +26,7 @@ public class RegisterServiceImpl implements PrintService {
private ThirdService thirdService;
@Override
public LexMarkResultDTO printImage(JSONObject data, String template, int width, int height, String saveDir) {
public LexMarkResultDTO<LexMarkResultDTO.Param> printImage(JSONObject data, String template, int width, int height, String saveDir) {
StringBuilder filePath = new StringBuilder(saveDir);
// 校验是否选中了模板,如果没选中模板的话则不需要另外生成了
if ( !StringUtils.isEmpty(template) && !StringUtils.isEmpty(saveDir)){
@@ -48,7 +48,7 @@ public class RegisterServiceImpl implements PrintService {
param.put("mediaCtrl", 1);
param.put("fields", "LOGO=" + filePath);
lexMarkDTO.setParam(param.toJSONString());
return thirdService.callDevice(lexMarkDTO);
return thirdService.callDevice(lexMarkDTO, LexMarkResultDTO.Param.class);
}
}