1
|
package com.yohoufo.order.service.impl;
|
1
|
package com.yohoufo.order.service.impl;
|
2
|
|
2
|
|
3
|
-import com.alibaba.fastjson.JSON;
|
|
|
4
|
import com.alibaba.fastjson.JSONObject;
|
3
|
import com.alibaba.fastjson.JSONObject;
|
|
|
4
|
+import com.google.common.annotations.VisibleForTesting;
|
5
|
import com.google.common.collect.Lists;
|
5
|
import com.google.common.collect.Lists;
|
6
|
import com.google.common.collect.Sets;
|
6
|
import com.google.common.collect.Sets;
|
7
|
import com.yoho.core.rabbitmq.YhProducer;
|
7
|
import com.yoho.core.rabbitmq.YhProducer;
|
|
@@ -821,7 +821,7 @@ public class AppraiseService { |
|
@@ -821,7 +821,7 @@ public class AppraiseService { |
821
|
public ApiResponse miniFaultReject(Long orderCode, OrderStatus targetStatus, boolean outTimeFlag) {
|
821
|
public ApiResponse miniFaultReject(Long orderCode, OrderStatus targetStatus, boolean outTimeFlag) {
|
822
|
LOGGER.info("miniFaultReject enter , orderCode {} ,targetStatus {},outTimeFlag {}", orderCode, targetStatus, outTimeFlag);
|
822
|
LOGGER.info("miniFaultReject enter , orderCode {} ,targetStatus {},outTimeFlag {}", orderCode, targetStatus, outTimeFlag);
|
823
|
OrderStatus expectStatus = OrderStatus.MINI_FAULT_WAITING;
|
823
|
OrderStatus expectStatus = OrderStatus.MINI_FAULT_WAITING;
|
824
|
- ApiResponse apiResponse = new ApiResponse();
|
824
|
+
|
825
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
825
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
826
|
|
826
|
|
827
|
if (buyerOrder == null) {
|
827
|
if (buyerOrder == null) {
|
|
@@ -841,99 +841,195 @@ public class AppraiseService { |
|
@@ -841,99 +841,195 @@ public class AppraiseService { |
841
|
DateUtil.getCurrentTimeSecond());
|
841
|
DateUtil.getCurrentTimeSecond());
|
842
|
|
842
|
|
843
|
if (rows > 0) {
|
843
|
if (rows > 0) {
|
844
|
- //refund coupons of buyer
|
|
|
845
|
- BuyerRefundCouponEvent brce = BuyerRefundCouponEvent.builder().bizCase(BuyerRefundCouponEvent.BizCase.APPRAISE_FAIL)
|
|
|
846
|
- .uid(buyerUid).orderCode(orderCode).build();
|
|
|
847
|
- EventBusPublisher.publishEvent(brce);
|
|
|
848
|
- //
|
|
|
849
|
- int sellerUid = buyerOrder.getSellerUid();
|
|
|
850
|
- BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(buyerUid, orderCode);
|
|
|
851
|
- int skup = bog.getSkup();
|
844
|
+ return miniFaultRejected(orderCode, targetStatus, outTimeFlag, buyerOrder, buyerUid);
|
|
|
845
|
+ } else {
|
|
|
846
|
+ ApiResponse apiResponse = new ApiResponse();
|
|
|
847
|
+ LOGGER.warn("in miniFaultReject, buyer Order now status {}, expect expectStatus {}",
|
|
|
848
|
+ buyerOrder.getStatus(), expectStatus);
|
|
|
849
|
+ apiResponse.setCode(400);
|
|
|
850
|
+ apiResponse.setMessage("订单状态发生变化");
|
|
|
851
|
+ return apiResponse;
|
|
|
852
|
+ }
|
|
|
853
|
+ }
|
852
|
|
854
|
|
853
|
- SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(skup);
|
|
|
854
|
- long sellerOrderCode = sellerOrder.getOrderCode();
|
855
|
+ private ApiResponse miniFaultRejected(Long orderCode, OrderStatus targetStatus, boolean outTimeFlag, BuyerOrder buyerOrder, int buyerUid) {
|
855
|
|
856
|
|
|
|
857
|
+ BuyerRefundCouponEvent brce = BuyerRefundCouponEvent.builder().bizCase(BuyerRefundCouponEvent.BizCase.APPRAISE_FAIL)
|
|
|
858
|
+ .uid(buyerUid).orderCode(orderCode).build();
|
|
|
859
|
+ EventBusPublisher.publishEvent(brce);
|
|
|
860
|
+ //
|
|
|
861
|
+ int sellerUid = buyerOrder.getSellerUid();
|
|
|
862
|
+ BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(buyerUid, orderCode);
|
|
|
863
|
+ int skup = bog.getSkup();
|
856
|
|
864
|
|
857
|
- SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
858
|
- //async refund seller coupon
|
|
|
859
|
- sellerOrderServiceDelegate.getSellerOrderService()
|
|
|
860
|
- .asyncCancelWithCouponIfPresent(orderCode, targetStatus.getCode(), sellerOrderGoods);
|
865
|
+ SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(skup);
|
|
|
866
|
+ long sellerOrderCode = sellerOrder.getOrderCode();
|
861
|
|
867
|
|
862
|
- final SellerOrderStatus expectSOStatus = SellerOrderStatus.HAS_PAYED;
|
|
|
863
|
- final SellerOrderStatus targetSoStatus = SellerOrderStatus.MINI_FAULT_REJECT;
|
|
|
864
|
|
868
|
|
865
|
- int ucnt = updateSellerOrderStatusAndCleanCache(sellerUid, sellerOrderCode, expectSOStatus, targetSoStatus,
|
|
|
866
|
- skup, orderCode, buyerUid);
|
|
|
867
|
- //将卖家的保证金扣掉10元后,剩余的钱退回给卖家
|
|
|
868
|
- BigDecimal earnestMoney = sellerOrder.getEarnestMoney().subtract(new BigDecimal(miniFaultRejectPunishFee));
|
|
|
869
|
- PaymentRequest refundReqOfSeller = refundEarnestMoney(SellerWalletDetail.Type.MINI_FAULT_REJECT, orderCode, sellerUid, sellerOrder, buyerUid, targetSoStatus, earnestMoney.doubleValue());
|
|
|
870
|
- LOGGER.info("in miniFaultReject,refund ok, refundReqOfSeller {}", refundReqOfSeller);
|
|
|
871
|
-
|
|
|
872
|
- //退买家的钱
|
|
|
873
|
- BigDecimal goodsMoney = buyerOrder.getAmount();
|
|
|
874
|
- boolean refundGoodsMoneyFlag = new RefundGoodsMoneyHandler()
|
|
|
875
|
- .loadPaymentRequest(buyerUid, orderCode, buyerOrder.getPayment(), goodsMoney)
|
|
|
876
|
- .loadTargetOrderStatus(targetStatus)
|
|
|
877
|
- .loadRefundAction(payRefundService::refund)
|
|
|
878
|
- .loadLogger(LOGGER)
|
|
|
879
|
- .loadSellerOrderGoods(sellerUid, skup)
|
|
|
880
|
- .refund();
|
|
|
881
|
- if (!refundGoodsMoneyFlag) {
|
|
|
882
|
- apiResponse.setCode(400);
|
|
|
883
|
- String content = "瑕疵不接受时,退用户" + sellerUid + "货款订单" + orderCode + "失败";
|
|
|
884
|
- apiResponse.setMessage(content);
|
|
|
885
|
- }
|
869
|
+ SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
870
|
+ //async refund seller coupon
|
|
|
871
|
+ sellerOrderServiceDelegate.getSellerOrderService()
|
|
|
872
|
+ .asyncCancelWithCouponIfPresent(orderCode, targetStatus.getCode(), sellerOrderGoods);
|
886
|
|
873
|
|
887
|
- //记录订单的状态变更信息
|
|
|
888
|
- LOGGER.info("in miniFaultReject record status change, orderCode {},uid {} ,sellerUid {}", orderCode, buyerUid, sellerUid);
|
|
|
889
|
- try {
|
|
|
890
|
- //记录订单状态流转
|
|
|
891
|
- orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
|
874
|
+ final SellerOrderStatus expectSOStatus = SellerOrderStatus.HAS_PAYED;
|
|
|
875
|
+ final SellerOrderStatus targetSoStatus = SellerOrderStatus.MINI_FAULT_REJECT;
|
892
|
|
876
|
|
893
|
- //瑕疵不接受(用户不接受和超时不接受),只给买家发消息
|
|
|
894
|
- buyerNoticeFacade.miniFaultUnAccept(buyerOrder, sellerOrderGoods, outTimeFlag);
|
|
|
895
|
- sellerNoticeFacade.sellerMiniFaultUnAccept(sellerOrderGoods, orderCode, outTimeFlag);
|
877
|
+ int ucnt = updateSellerOrderStatusAndCleanCache(sellerUid, sellerOrderCode, expectSOStatus, targetSoStatus,
|
|
|
878
|
+ skup, orderCode, buyerUid);
|
|
|
879
|
+ //将卖家的保证金扣掉10元后,剩余的钱退回给卖家
|
|
|
880
|
+ BigDecimal earnestMoney = sellerOrder.getEarnestMoney().subtract(new BigDecimal(miniFaultRejectPunishFee));
|
|
|
881
|
+ PaymentRequest refundReqOfSeller = refundEarnestMoney(SellerWalletDetail.Type.MINI_FAULT_REJECT, orderCode, sellerUid, sellerOrder, buyerUid, targetSoStatus, earnestMoney.doubleValue());
|
|
|
882
|
+ LOGGER.info("in miniFaultReject,refund ok, refundReqOfSeller {}", refundReqOfSeller);
|
896
|
|
883
|
|
897
|
- } catch (Exception ex) {
|
|
|
898
|
- LOGGER.warn("in miniFaultReject orderStatusFlowService or notice fail orderCode {}", orderCode, ex);
|
|
|
899
|
- } finally {
|
|
|
900
|
- /// 物流信息异步执行
|
|
|
901
|
- executorService.execute(() -> {
|
884
|
+ //退买家的钱
|
|
|
885
|
+ BigDecimal goodsMoney = buyerOrder.getAmount();
|
|
|
886
|
+ boolean refundGoodsMoneyFlag = new RefundGoodsMoneyHandler()
|
|
|
887
|
+ .loadPaymentRequest(buyerUid, orderCode, buyerOrder.getPayment(), goodsMoney)
|
|
|
888
|
+ .loadTargetOrderStatus(targetStatus)
|
|
|
889
|
+ .loadRefundAction(payRefundService::refund)
|
|
|
890
|
+ .loadLogger(LOGGER)
|
|
|
891
|
+ .loadSellerOrderGoods(sellerUid, skup)
|
|
|
892
|
+ .refund();
|
|
|
893
|
+ if (!refundGoodsMoneyFlag) {
|
|
|
894
|
+ ApiResponse apiResponse = new ApiResponse();
|
|
|
895
|
+ apiResponse.setCode(400);
|
|
|
896
|
+ String content = "瑕疵不接受时,退用户" + sellerUid + "货款订单" + orderCode + "失败";
|
|
|
897
|
+ apiResponse.setMessage(content);
|
|
|
898
|
+ return apiResponse;
|
|
|
899
|
+ }
|
902
|
|
900
|
|
903
|
- //记下订单的操作记录
|
|
|
904
|
- if (outTimeFlag) {
|
|
|
905
|
- //更新瑕疵确认结果
|
|
|
906
|
- int updateNum = qualityCheckMapper.updateByOrderCode(orderCode, EnumQualityCheckStatus.REJECT_BY_OUTER_TIME.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
907
|
- LOGGER.info("Buyer Order miniFaultReject by auto orderCode {} ,update quality check record status num {} ", orderCode, updateNum);
|
|
|
908
|
- orderOperateRecordService.addRecord(orderCode, "系统操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_REJECT_BY_OUT_TIME);
|
|
|
909
|
- } else {
|
|
|
910
|
- //更新瑕疵确认结果
|
|
|
911
|
- int updateNum = qualityCheckMapper.updateByOrderCode(orderCode, EnumQualityCheckStatus.REJECT_BY_BUYER.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
912
|
- LOGGER.info("Buyer Order miniFaultReject by buyer orderCode {} ,update quality check record status num {} ", orderCode, updateNum);
|
|
|
913
|
- orderOperateRecordService.addRecord(orderCode, "买家操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_REJECT);
|
|
|
914
|
- }
|
901
|
+ //记录订单的状态变更信息
|
|
|
902
|
+ LOGGER.info("in miniFaultReject record status change, orderCode {},uid {} ,sellerUid {}", orderCode, buyerUid, sellerUid);
|
|
|
903
|
+ try {
|
|
|
904
|
+ //记录订单状态流转
|
|
|
905
|
+ orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
|
915
|
|
906
|
|
916
|
- //更新物流信息,写到最后
|
|
|
917
|
- //先补加一条鉴定中物流
|
|
|
918
|
- EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
919
|
- EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
920
|
- EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.mini_fault_reject;
|
|
|
921
|
- expressInfoService.saveOperateTransferExpressInfo(sellerUid, orderCode, expressType.getCode(), expressDataType, operateTransferCode);
|
907
|
+ //瑕疵不接受(用户不接受和超时不接受),只给买家发消息
|
|
|
908
|
+ buyerNoticeFacade.miniFaultUnAccept(buyerOrder, sellerOrderGoods, outTimeFlag);
|
|
|
909
|
+ sellerNoticeFacade.sellerMiniFaultUnAccept(sellerOrderGoods, orderCode, outTimeFlag);
|
922
|
|
910
|
|
923
|
- operateTransferCode = EnumExpressDataOperateTransferCode.mini_fault_not_pass;
|
|
|
924
|
- expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
925
|
- expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
926
|
- expressInfoService.saveOperateTransferExpressInfo(sellerUid, orderCode, expressType.getCode(), expressDataType, operateTransferCode);
|
|
|
927
|
- });
|
911
|
+ } catch (Exception ex) {
|
|
|
912
|
+ LOGGER.warn("in miniFaultReject orderStatusFlowService or notice fail orderCode {}", orderCode, ex);
|
|
|
913
|
+ } finally {
|
|
|
914
|
+ /// 物流信息异步执行
|
|
|
915
|
+ executorService.execute(() -> {
|
928
|
|
916
|
|
929
|
- }
|
917
|
+ //记下订单的操作记录
|
|
|
918
|
+ if (outTimeFlag) {
|
|
|
919
|
+ //更新瑕疵确认结果
|
|
|
920
|
+ int updateNum = qualityCheckMapper.updateByOrderCode(orderCode, EnumQualityCheckStatus.REJECT_BY_OUTER_TIME.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
921
|
+ LOGGER.info("Buyer Order miniFaultReject by auto orderCode {} ,update quality check record status num {} ", orderCode, updateNum);
|
|
|
922
|
+ orderOperateRecordService.addRecord(orderCode, "系统操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_REJECT_BY_OUT_TIME);
|
|
|
923
|
+ } else {
|
|
|
924
|
+ //更新瑕疵确认结果
|
|
|
925
|
+ int updateNum = qualityCheckMapper.updateByOrderCode(orderCode, EnumQualityCheckStatus.REJECT_BY_BUYER.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
926
|
+ LOGGER.info("Buyer Order miniFaultReject by buyer orderCode {} ,update quality check record status num {} ", orderCode, updateNum);
|
|
|
927
|
+ orderOperateRecordService.addRecord(orderCode, "买家操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_REJECT);
|
|
|
928
|
+ }
|
930
|
|
929
|
|
931
|
- } else {
|
|
|
932
|
- LOGGER.warn("in miniFaultReject, buyer Order now status {}, expect expectStatus {}",
|
|
|
933
|
- buyerOrder.getStatus(), expectStatus);
|
930
|
+ //更新物流信息,写到最后
|
|
|
931
|
+ //先补加一条鉴定中物流
|
|
|
932
|
+ EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
933
|
+ EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
934
|
+ EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.mini_fault_reject;
|
|
|
935
|
+ expressInfoService.saveOperateTransferExpressInfo(sellerUid, orderCode, expressType.getCode(), expressDataType, operateTransferCode);
|
|
|
936
|
+
|
|
|
937
|
+ operateTransferCode = EnumExpressDataOperateTransferCode.mini_fault_not_pass;
|
|
|
938
|
+ expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
939
|
+ expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
940
|
+ expressInfoService.saveOperateTransferExpressInfo(sellerUid, orderCode, expressType.getCode(), expressDataType, operateTransferCode);
|
|
|
941
|
+ });
|
|
|
942
|
+
|
|
|
943
|
+ }
|
|
|
944
|
+ ApiResponse apiResponse = new ApiResponse();
|
|
|
945
|
+ return apiResponse;
|
|
|
946
|
+ }
|
|
|
947
|
+
|
|
|
948
|
+
|
|
|
949
|
+
|
|
|
950
|
+
|
|
|
951
|
+ @VisibleForTesting
|
|
|
952
|
+ public ApiResponse miniFaultRejectedHelp0407(Long orderCode, OrderStatus targetStatus, boolean outTimeFlag) {
|
|
|
953
|
+
|
|
|
954
|
+ BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
955
|
+ Integer buyerUid = buyerOrder.getUid();
|
|
|
956
|
+ int sellerUid = buyerOrder.getSellerUid();
|
|
|
957
|
+ BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(buyerUid, orderCode);
|
|
|
958
|
+ int skup = bog.getSkup();
|
|
|
959
|
+
|
|
|
960
|
+ SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(skup);
|
|
|
961
|
+
|
|
|
962
|
+
|
|
|
963
|
+ SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
964
|
+
|
|
|
965
|
+ final SellerOrderStatus targetSoStatus = SellerOrderStatus.MINI_FAULT_REJECT;
|
|
|
966
|
+
|
|
|
967
|
+ //将卖家的保证金扣掉10元后,剩余的钱退回给卖家
|
|
|
968
|
+ BigDecimal earnestMoney = sellerOrder.getEarnestMoney().subtract(new BigDecimal(miniFaultRejectPunishFee));
|
|
|
969
|
+ PaymentRequest refundReqOfSeller = refundEarnestMoney(SellerWalletDetail.Type.MINI_FAULT_REJECT, orderCode, sellerUid, sellerOrder, buyerUid, targetSoStatus, earnestMoney.doubleValue());
|
|
|
970
|
+ LOGGER.info("in miniFaultReject,refund ok, refundReqOfSeller {}", refundReqOfSeller);
|
|
|
971
|
+
|
|
|
972
|
+ //退买家的钱
|
|
|
973
|
+ BigDecimal goodsMoney = buyerOrder.getAmount();
|
|
|
974
|
+ boolean refundGoodsMoneyFlag = new RefundGoodsMoneyHandler()
|
|
|
975
|
+ .loadPaymentRequest(buyerUid, orderCode, buyerOrder.getPayment(), goodsMoney)
|
|
|
976
|
+ .loadTargetOrderStatus(targetStatus)
|
|
|
977
|
+ .loadRefundAction(payRefundService::refund)
|
|
|
978
|
+ .loadLogger(LOGGER)
|
|
|
979
|
+ .loadSellerOrderGoods(sellerUid, skup)
|
|
|
980
|
+ .refund();
|
|
|
981
|
+ if (!refundGoodsMoneyFlag) {
|
|
|
982
|
+ ApiResponse apiResponse = new ApiResponse();
|
934
|
apiResponse.setCode(400);
|
983
|
apiResponse.setCode(400);
|
935
|
- apiResponse.setMessage("订单状态发生变化");
|
984
|
+ String content = "瑕疵不接受时,退用户" + sellerUid + "货款订单" + orderCode + "失败";
|
|
|
985
|
+ apiResponse.setMessage(content);
|
|
|
986
|
+ return apiResponse;
|
936
|
}
|
987
|
}
|
|
|
988
|
+
|
|
|
989
|
+ //记录订单的状态变更信息
|
|
|
990
|
+ LOGGER.info("in miniFaultReject record status change, orderCode {},uid {} ,sellerUid {}", orderCode, buyerUid, sellerUid);
|
|
|
991
|
+ try {
|
|
|
992
|
+ //记录订单状态流转
|
|
|
993
|
+ orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
|
|
|
994
|
+
|
|
|
995
|
+ //瑕疵不接受(用户不接受和超时不接受),只给买家发消息
|
|
|
996
|
+ buyerNoticeFacade.miniFaultUnAccept(buyerOrder, sellerOrderGoods, outTimeFlag);
|
|
|
997
|
+ sellerNoticeFacade.sellerMiniFaultUnAccept(sellerOrderGoods, orderCode, outTimeFlag);
|
|
|
998
|
+
|
|
|
999
|
+ } catch (Exception ex) {
|
|
|
1000
|
+ LOGGER.warn("in miniFaultReject orderStatusFlowService or notice fail orderCode {}", orderCode, ex);
|
|
|
1001
|
+ } finally {
|
|
|
1002
|
+ /// 物流信息异步执行
|
|
|
1003
|
+ executorService.execute(() -> {
|
|
|
1004
|
+
|
|
|
1005
|
+ //记下订单的操作记录
|
|
|
1006
|
+ if (outTimeFlag) {
|
|
|
1007
|
+ //更新瑕疵确认结果
|
|
|
1008
|
+ int updateNum = qualityCheckMapper.updateByOrderCode(orderCode, EnumQualityCheckStatus.REJECT_BY_OUTER_TIME.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
1009
|
+ LOGGER.info("Buyer Order miniFaultReject by auto orderCode {} ,update quality check record status num {} ", orderCode, updateNum);
|
|
|
1010
|
+ orderOperateRecordService.addRecord(orderCode, "系统操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_REJECT_BY_OUT_TIME);
|
|
|
1011
|
+ } else {
|
|
|
1012
|
+ //更新瑕疵确认结果
|
|
|
1013
|
+ int updateNum = qualityCheckMapper.updateByOrderCode(orderCode, EnumQualityCheckStatus.REJECT_BY_BUYER.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
1014
|
+ LOGGER.info("Buyer Order miniFaultReject by buyer orderCode {} ,update quality check record status num {} ", orderCode, updateNum);
|
|
|
1015
|
+ orderOperateRecordService.addRecord(orderCode, "买家操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_REJECT);
|
|
|
1016
|
+ }
|
|
|
1017
|
+
|
|
|
1018
|
+ //更新物流信息,写到最后
|
|
|
1019
|
+ //先补加一条鉴定中物流
|
|
|
1020
|
+ EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
1021
|
+ EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
1022
|
+ EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.mini_fault_reject;
|
|
|
1023
|
+ expressInfoService.saveOperateTransferExpressInfo(sellerUid, orderCode, expressType.getCode(), expressDataType, operateTransferCode);
|
|
|
1024
|
+
|
|
|
1025
|
+ operateTransferCode = EnumExpressDataOperateTransferCode.mini_fault_not_pass;
|
|
|
1026
|
+ expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
1027
|
+ expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
1028
|
+ expressInfoService.saveOperateTransferExpressInfo(sellerUid, orderCode, expressType.getCode(), expressDataType, operateTransferCode);
|
|
|
1029
|
+ });
|
|
|
1030
|
+
|
|
|
1031
|
+ }
|
|
|
1032
|
+ ApiResponse apiResponse = new ApiResponse();
|
937
|
return apiResponse;
|
1033
|
return apiResponse;
|
938
|
}
|
1034
|
}
|
939
|
|
1035
|
|