|
|
@@ -3,6 +3,7 @@ package com.yami.shop.api.controller;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.yami.shop.bean.enums.ReturnMoneyStsType;
|
|
|
import com.yami.shop.bean.model.*;
|
|
|
import com.yami.shop.common.exception.GlobalException;
|
|
|
import com.yami.shop.common.util.PageParam;
|
|
|
@@ -15,6 +16,7 @@ import com.yami.shop.service.RefundDeliveryService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -28,6 +30,7 @@ import java.util.Date;
|
|
|
@RestController
|
|
|
@RequestMapping("/refund/delivery")
|
|
|
@Api(tags = "退货物流信息接口")
|
|
|
+@Slf4j
|
|
|
@AllArgsConstructor
|
|
|
public class RefundDeliveryController {
|
|
|
|
|
|
@@ -76,7 +79,7 @@ public class RefundDeliveryController {
|
|
|
@PostMapping("/save")
|
|
|
@ApiOperation("保存退货物流信息")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public R<?> save(@Valid @RequestBody RefundDelivery refundDelivery) {
|
|
|
+ public synchronized R<?> save(@Valid @RequestBody RefundDelivery refundDelivery) {
|
|
|
|
|
|
|
|
|
//获取门店信息
|
|
|
@@ -99,6 +102,13 @@ public class RefundDeliveryController {
|
|
|
throw new GlobalException("该退款单不存在");
|
|
|
}
|
|
|
|
|
|
+ if (orderRefund.getReturnMoneySts() == null || orderRefund.getReturnMoneySts() == 60) {
|
|
|
+ throw new GlobalException("该退款单状态不对不能提交");
|
|
|
+ }
|
|
|
+
|
|
|
+ orderRefund.setReturnMoneySts(ReturnMoneyStsType.RECEIVE.value());
|
|
|
+ orderRefund.setShipTime(new Date());
|
|
|
+ orderRefund.setUpdateTime(new Date());
|
|
|
orderRefund.setIsReturnLogistics(true);
|
|
|
orderRefundService.updateById(orderRefund);
|
|
|
|
|
|
@@ -111,6 +121,10 @@ public class RefundDeliveryController {
|
|
|
orderRefundRecord.setAuditStatus(7);
|
|
|
orderRefundRecord.setSort(5);
|
|
|
orderRefundRecordMapper.insert(orderRefundRecord);
|
|
|
+
|
|
|
+ log.info("客户填写完成快递信息后海博退款单状态同步65");
|
|
|
+ orderRefundService.changeStatus(orderRefund.getRefundSn(), ReturnMoneyStsType.RECEIVE.value());
|
|
|
+
|
|
|
return R.SUCCESS("添加成功");
|
|
|
}
|
|
|
|