Authored by LUOXC

Revert "寄存订单 NFC转移"

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