Selaa lähdekoodia

[支付][修改]:商户编辑中分账接收方添加和更改

release_toaliyun_real
hupeng 7 vuotta sitten
vanhempi
commit
842fc41328
1 muutettua tiedostoa jossa 22 lisäystä ja 2 poistoa
  1. +22
    -2
      mallinkService/src/main/java/com/simple/service/impl/WxMerchantServiceImpl.java

+ 22
- 2
mallinkService/src/main/java/com/simple/service/impl/WxMerchantServiceImpl.java Näytä tiedosto

@@ -8,6 +8,7 @@ import com.simple.enums.EnumAppType;
import com.simple.enums.EnumCarVendor; import com.simple.enums.EnumCarVendor;
import com.simple.mapper.*; import com.simple.mapper.*;
import com.simple.service.WxMerchantService; import com.simple.service.WxMerchantService;
import com.simple.service.WxProfitSharingReceiverService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -193,6 +194,14 @@ public class WxMerchantServiceImpl implements WxMerchantService {
user.setStatus(0); user.setStatus(0);
wxMerchantBUserMapper.insertSelective(user); wxMerchantBUserMapper.insertSelective(user);


} //添加商户的分账账户(不是必选)
if(wxMerchant.getAccountId() != null && wxMerchant.getAccountName() != null) {
WxProfitSharingReceiver receiver = new WxProfitSharingReceiver();
receiver.setReceiverAccount(wxMerchant.getAccountId());
receiver.setReceiverComments(wxMerchant.getName());
receiver.setReceiverType(wxMerchant.getAccountTypeValue());
receiver.setTrueName(wxMerchant.getAccountName());
wxRentContractMapperService.addReceiver(wxMerchant, receiver);
} }


} else { } else {
@@ -291,11 +300,22 @@ public class WxMerchantServiceImpl implements WxMerchantService {
wxMerchantBUserMapper.updateByPrimaryKeySelective(user); wxMerchantBUserMapper.updateByPrimaryKeySelective(user);
} }



} }


}


//添加商户的分账账户(不是必选)
if(wxMerchant.getAccountId() != null && wxMerchant.getAccountName() != null
&& !wxMerchant.getAccountId().isEmpty() && !wxMerchant.getAccountName().isEmpty()) {
WxProfitSharingReceiver receiver = new WxProfitSharingReceiver();
receiver.setReceiverAccount(wxMerchant.getAccountId());
receiver.setReceiverComments(wxMerchant.getName());
receiver.setReceiverType(wxMerchant.getAccountTypeValue());
receiver.setTrueName(wxMerchant.getAccountName());
wxRentContractMapperService.updateReceiver(wxMerchant, receiver);
} else {
wxRentContractMapperService.delReceiver(wxMerchant);
}
}


} }




Ladataan…
Peruuta
Tallenna