...
|
...
|
@@ -85,4 +85,53 @@ public class ProductIdentifyController { |
|
|
return new ApiResponse.ApiResponseBuilder().code(402).message("查询失败,请稍后重试").build();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.applyToBeOwner", desc="申请成为物权所有人")
|
|
|
@ApiParam(name="tagId",required = true,desc="NFC标签id",type=Integer.class)
|
|
|
@ApiParam(name="nfcUid",required = false,desc="NFC芯片id",type=Integer.class)
|
|
|
@ApiParam(name="uid",required = true,desc="有货uid",type=Integer.class)
|
|
|
@ApiResp(dataClazz=ProductIdentifyResp.class, desc="申请成为物权所有人")
|
|
|
@ApiRespCode(code=200,desc="操作成功")
|
|
|
@ApiRespCode(code=402,desc="操作失败")
|
|
|
@IgnoreSignature
|
|
|
@RequestMapping(params = "method=ufo.product.applyToBeOwner")
|
|
|
public ApiResponse applyToBeOwner(@RequestParam(value = "tagId", required = true) String tagId,
|
|
|
@RequestParam(value = "nfcUid",required = false) String nfcUid,
|
|
|
@RequestParam(value = "uid", required = true) Integer uid) throws GatewayException {
|
|
|
try{
|
|
|
int result = identifyService.applyToBeOwner(tagId, nfcUid, uid);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
|
|
|
}catch (Exception e){
|
|
|
logger.warn("applyToBeOwner error! tagId={}, nfcUid={}, uid={}, e is {}", tagId, nfcUid, uid, e);
|
|
|
if( e instanceof GatewayException){
|
|
|
throw e;
|
|
|
}
|
|
|
return new ApiResponse.ApiResponseBuilder().code(402).message("申请失败,请稍后重试").build();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// @ApiOperation(name = "ufo.product.confirmTransferOwner", desc="确认物权转移")
|
|
|
// @ApiParam(name="tagId",required = true,desc="NFC标签id",type=Integer.class)
|
|
|
// @ApiParam(name="nfcUid",required = false,desc="NFC芯片id",type=Integer.class)
|
|
|
// @ApiParam(name="uid",required = true,desc="有货uid",type=Integer.class)
|
|
|
// @ApiResp(dataClazz=ProductIdentifyResp.class, desc="申请成为物权所有人")
|
|
|
// @ApiRespCode(code=200,desc="操作成功")
|
|
|
// @ApiRespCode(code=402,desc="操作失败")
|
|
|
// @IgnoreSignature
|
|
|
// @RequestMapping(params = "method=ufo.product.confirmTransferOwner")
|
|
|
// public ApiResponse confirmTransferOwner(@RequestParam(value = "tagId", required = true) String tagId,
|
|
|
// @RequestParam(value = "nfcUid",required = false) String nfcUid,
|
|
|
// @RequestParam(value = "from_uid", required = true) Integer fromUid,
|
|
|
// @RequestParam(value = "to_uid", required = true) Integer toUid) throws GatewayException {
|
|
|
// try{
|
|
|
// int result = identifyService.applyToBeOwner(tagId, nfcUid, uid);
|
|
|
// return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
|
|
|
// }catch (Exception e){
|
|
|
// logger.warn("applyToBeOwner error! tagId={}, nfcUid={}, uid={}, e is {}", tagId, nfcUid, uid, e);
|
|
|
// if( e instanceof GatewayException){
|
|
|
// throw e;
|
|
|
// }
|
|
|
// return new ApiResponse.ApiResponseBuilder().code(402).message("申请失败,请稍后重试").build();
|
|
|
// }
|
|
|
// }
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|