Commit 69c8b18b by 吴迪

【新增】修改返回格式

parent 60761d39
...@@ -39,28 +39,28 @@ public class BarcodeGenerationController { ...@@ -39,28 +39,28 @@ public class BarcodeGenerationController {
return R.error("参数有误"); return R.error("参数有误");
} }
String url = this.barcodeGenerationService.createPicture(param); String url = this.barcodeGenerationService.createPicture(param);
return R.ok().put("pictureUrl", url); return R.ok().put("data", url);
} }
@Login @Login
@ApiOperation(value = "SSCC方式获取GS1 AI标识符列表", response = GS1CodeListEntity.class) @ApiOperation(value = "SSCC方式获取GS1 AI标识符列表", response = GS1CodeListEntity.class)
@PostMapping("/api/getGS1CodeListSSCC") @PostMapping("/api/getGS1CodeListSSCC")
public R getGS1CodeListSSCC() { public R getGS1CodeListSSCC() {
List<GS1CodeListEntity> ais = barcodeGenerationService.getGS1CodeListSSCC(); List<GS1CodeListEntity> ais = barcodeGenerationService.getGS1CodeListSSCC();
return R.ok().put("ais",ais); return R.ok().put("data",ais);
} }
@Login @Login
@ApiOperation(value = "GRAI方式获取GS1 AI标识符", response = GS1CodeListEntity.class) @ApiOperation(value = "GRAI方式获取GS1 AI标识符", response = GS1CodeListEntity.class)
@PostMapping("/api/getGS1CodeListGRAI") @PostMapping("/api/getGS1CodeListGRAI")
public R getGS1CodeListGRAI() { public R getGS1CodeListGRAI() {
GS1CodeListEntity ai = barcodeGenerationService.getGS1CodeListGRAI(); GS1CodeListEntity ai = barcodeGenerationService.getGS1CodeListGRAI();
return R.ok().put("ai",ai); return R.ok().put("data",ai);
} }
@Login @Login
@ApiOperation(value = "校验GS1 AI标识符") @ApiOperation(value = "校验GS1 AI标识符")
@PostMapping("/api/checkGS1Code") @PostMapping("/api/checkGS1Code")
public R checkGS1Code(@ApiParam(required = true)@Valid @RequestBody CheckAIVo body) { public R checkGS1Code(@ApiParam(required = true)@Valid @RequestBody CheckAIVo body) {
String result = CheckAICodeUtil.ckeckCode(body.getCode(),body.getContent()); String result = CheckAICodeUtil.ckeckCode(body.getCode(),body.getContent());
return R.ok().put("result",result); return R.ok().put("data",result);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment