Authored by LUOXC

fixbug

package com.yohoufo.order.service.handler.transfer;
import com.alibaba.fastjson.JSONObject;
import com.yoho.core.dal.datasource.annotation.Database;
import com.yoho.core.rabbitmq.YhProducer;
import com.yoho.error.exception.ServiceException;
import com.yoho.tools.common.beans.ApiResponse;
... ... @@ -21,6 +22,7 @@ import lombok.val;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
... ... @@ -79,7 +81,8 @@ public class TransferManager {
return rebuild(id).filter(e -> Objects.equals(uid, e.getTradeBills().getUid()));
}
@Transactional
@Transactional(propagation = Propagation.REQUIRES_NEW)
@Database(ForceMaster=true, DataSource="ufo_order")
public ServiceException save(TransferBill transferBill) {
if (Objects.isNull(transferBill.getTradeBills().getId())) {
ServiceException serviceException = transferBill.resetTradeStatus();
... ...