Authored by LUOXC

Revert "寄存订单 NFC转移"

This reverts commit 952ec654.
... ... @@ -386,7 +386,7 @@ public class DepositServiceImpl implements DepositService {
sd.setNewSkup(0);
LOGGER.info("new owner record is sd", sd);
storageDepositMapper.insert(sd);
autoTransfer(orderCode, newUid, buyOrderCode);
autoTransfer(orderCode, newUid);
clearCache(uid, sd.getProductId(), sd.getStorageId());
clearCache(newUid, sd.getProductId(), sd.getStorageId());
return true;
... ... @@ -497,9 +497,9 @@ public class DepositServiceImpl implements DepositService {
.build();
}
private void autoTransfer(Long orderCode, Integer toUid, Long buyOrderCode) {
private void autoTransfer(Long orderCode, Integer toUid) {
try {
ApiResponse resp = ufoServiceCaller.call("ufo.product.autoTransfer", ApiResponse.class, orderCode, toUid, buyOrderCode);
ApiResponse resp = ufoServiceCaller.call("ufo.product.autoTransfer", ApiResponse.class, orderCode, toUid);
LOGGER.info("物权转移接口调用结果:{}", resp);
} catch (Exception e) {
LOGGER.error("物权转移接口调用失败!", e);
... ...
... ... @@ -175,11 +175,10 @@ public class ProductIdentifyController {
@RequestMapping(params = "method=ufo.product.autoTransfer")
public ApiResponse autoTransfer(@RequestParam(value = "orderCode", required = false) Long orderCode,
@RequestParam(value = "toUid",required = false) Integer toUid,
@RequestParam(value = "buyOrderCode",required = false) Long buyOrderCode) throws GatewayException {
@RequestParam(value = "toUid",required = false) Integer toUid) throws GatewayException {
try{
logger.info("method autoTransfer begin! orderCode={}, toUid is{}, buyOrderCode is {}", orderCode, toUid, buyOrderCode);
productIdentifyHandle.autoTransfer(orderCode, toUid, buyOrderCode);
logger.info("method autoTransfer begin! orderCode={}, toUid is{}", orderCode, toUid);
productIdentifyHandle.autoTransfer(orderCode, toUid);
logger.info("method autoTransfer end! orderCode={}, toUid is{}", orderCode, toUid);
return new ApiResponse.ApiResponseBuilder().code(200).build();
}catch (Exception e){
... ...
... ... @@ -23,5 +23,5 @@ public interface ProductIdentifyService {
ProductIdentifyResp queryIdentifyInfoForPlatform(String tagId, String nfcUid) throws GatewayException;
void autoTransfer(Long orderCode, Integer toUid, Long buyerOrderCode); // 自动转移物权所属
void autoTransfer(Long orderCode, Integer toUid); // 自动转移物权所属
}
... ...
... ... @@ -23,8 +23,8 @@ public class ProductIdentifyHandle implements ApplicationContextAware{
ApplicationContext applicationContext;
public void autoTransfer(Long orderCode, Integer toUid, Long buyOrderCode) {
ProductIdentifyVo build = ProductIdentifyVo.builder().orderCode(orderCode).toUid(toUid).buyOrderCode(buyOrderCode).build();
public void autoTransfer(Long orderCode, Integer toUid) {
ProductIdentifyVo build = ProductIdentifyVo.builder().orderCode(orderCode).toUid(toUid).build();
LOGGER.info("ProductIdentifyHandle.autoTransfer run, build is {}", build);
... ...
... ... @@ -1001,7 +1001,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
* @return
* @throws 不能抛异常,影响订单流程
*/
public void autoTransfer(Long orderCode, Integer toUid, Long buyerOrderCode) {
public void autoTransfer(Long orderCode, Integer toUid) {
IdentifyRecord identifyRecord = selectByOrderCode(orderCode);
logger.info("result autoTransfer of selectByOrderCode is identifyRecord {}, orderCode is {}, toUid is {}", identifyRecord, orderCode, toUid);
... ... @@ -1015,7 +1015,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
addTransferRecord(tagId, nfcUid, String.valueOf(identifyRecord.getOwner()), String.valueOf(toUid)); //新增转移记录
//更新identify_record
identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid, buyerOrderCode);
identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid, orderCode);
//发信息
messageFacade.ownerPass(String.valueOf(toUid), identifyRecord.getOrderCode());
... ...
... ... @@ -24,7 +24,7 @@ public class ProductIdentifyListener implements ApplicationListener<ProductIdent
ProductIdentifyVo record = (ProductIdentifyVo)event.getSource();
LOGGER.info("ProductIdentifyListener begin, ProductIdentifyVo is {}", record);
productIdentifyService.autoTransfer(record.getOrderCode(), record.getToUid(), record.getBuyOrderCode());
productIdentifyService.autoTransfer(record.getOrderCode(), record.getToUid());
LOGGER.info("ProductIdentifyListener end , ProductIdentifyVo is {} ", record);
}
... ...