Commit 4d740683 authored by 332784038@qq.com's avatar 332784038@qq.com

手动重置订单业绩归属的业务完善

parent 140dacde
package cn.iocoder.yudao.framework.apollo.core.event;
import cn.iocoder.yudao.framework.common.validation.Marks;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
@AllArgsConstructor
public class OrderAssociationOfferInfoEvent {
/**
* 订单ID
*/
private Long orderId;
@ApiModelProperty(value = "主键ID", required = true)
private Long offerId;
}
......@@ -3,11 +3,14 @@ package cn.iocoder.yudao.module.sale.listener;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.apollo.core.event.OrderAssociationOfferCostEvent;
import cn.iocoder.yudao.framework.apollo.core.event.OrderAssociationOfferInfoEvent;
import cn.iocoder.yudao.module.product.dto.FeeDto;
import cn.iocoder.yudao.module.product.enums.FeeTypeEnum;
import cn.iocoder.yudao.module.sale.service.offer.OfferService;
import cn.iocoder.yudao.module.sale.vo.offer.EstCostVO;
import cn.iocoder.yudao.module.sale.vo.offer.OfferRespVO;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
......@@ -53,4 +56,17 @@ public class OrderAssociationOfferListener {
}
}
}
/**
* 根据订单id查询关联报价单信息
*
* @param event 参数与返回值
*/
@EventListener(OrderAssociationOfferInfoEvent.class)
public void selectOfferInfoByOrderId(OrderAssociationOfferInfoEvent event) {
OfferRespVO offerRespVO = offerService.getOfferByOrderId(event.getOrderId());
if (Objects.nonNull(offerRespVO)) {
event.setOfferId(offerRespVO.getOfferId());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment