Commit 537d2b62d0f4e32286b21c0d5e43155bdc602599

Authored by 房远帅
2 parents 2aaa902e b6c4afe1

Merge branch 'master_chujiang_0805' into master_quotation

... ... @@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
38 38 import org.springframework.transaction.annotation.Propagation;
39 39 import org.springframework.transaction.annotation.Transactional;
40 40
  41 +import org.springframework.context.ApplicationContext;
41 42 import javax.annotation.Resource;
42 43 import java.io.Serializable;
43 44 import java.util.ArrayList;
... ... @@ -60,6 +61,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
60 61 private ShipmentsPlanDetailService shipmentsPlanDetailService;
61 62 @Resource
62 63 private MqProducerService mqProducerService;
  64 + @Resource
  65 + private ApplicationContext applicationContext;
63 66
64 67 @Override
65 68 public PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo) {
... ... @@ -326,7 +329,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
326 329 */
327 330 @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
328 331 public void createDraftAndNotify(CreateDraftRequestCarTicketVo vo) {
329   - this.create(vo);
  332 + // 通过 Spring 代理调用 create,确保 @OpLog 切面生效,避免 OpLogUtil 空指针
  333 + applicationContext.getBean(DraftRequestCarTicketServiceImpl.class).create(vo);
330 334 PurchaseOrderInfo info = purchaseOrderInfoService.findById(vo.getPurchaseOrderId());
331 335 if (info == null) {
332 336 return;
... ...