分账逻辑及逻辑接入及分账记录查询

This commit is contained in:
2025-02-18 10:18:07 +08:00
parent 25e6e6788d
commit 63df84fa7c
13 changed files with 302 additions and 172 deletions

View File

@ -21,6 +21,7 @@ import com.ycwl.basic.model.pc.source.entity.SourceEntity;
import com.ycwl.basic.model.pc.template.resp.TemplateRespVO;
import com.ycwl.basic.model.pc.video.entity.VideoEntity;
import com.ycwl.basic.model.pc.video.resp.VideoRespVO;
import com.ycwl.basic.profitsharing.biz.ProfitSharingBiz;
import com.ycwl.basic.repository.FaceRepository;
import com.ycwl.basic.repository.OrderRepository;
import com.ycwl.basic.repository.ScenicRepository;
@ -61,6 +62,8 @@ public class OrderBiz {
private OrderMapper orderMapper;
@Autowired
private SourceMapper sourceMapper;
@Autowired
private ProfitSharingBiz profitSharingBiz;
public PriceObj queryPrice(Long scenicId, int goodsType, Long goodsId) {
PriceObj priceObj = new PriceObj();
@ -212,6 +215,7 @@ public class OrderBiz {
statisticsRecordAddReq.setScenicId(order.getScenicId());
statisticsRecordAddReq.setMorphId(orderId);
statisticsMapper.addStatisticsRecord(statisticsRecordAddReq);
profitSharingBiz.processProfitSharing(order.getScenicId(), orderId, order.getPayPrice());
}
public void cancelOrder(Long orderId) {
@ -232,6 +236,7 @@ public class OrderBiz {
}
});
orderRepository.clearOrderCache(orderId); // 更新完了,清理下
profitSharingBiz.revokeProfitSharing(order.getScenicId(), orderId);
}
public void refundOrder(Long orderId) {
@ -253,5 +258,6 @@ public class OrderBiz {
}
});
orderRepository.clearOrderCache(orderId); // 更新完了,清理下
profitSharingBiz.revokeProfitSharing(order.getScenicId(), orderId);
}
}