|
|
|
@@ -21,6 +21,7 @@ import com.iformall.douyin.pay.preOrder.AppAddSubMerchantResult; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.WxProfitPaymentReceiverMapper; |
|
|
|
import com.iformall.mapper.WxProfitSharingReceiverMapper; |
|
|
|
import com.iformall.mq.MqBaseProducer; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.service.pay.PayServiceFactory; |
|
|
|
@@ -66,6 +67,9 @@ public class WxProfitPaymentReceiverServiceImpl implements WxProfitPaymentReceiv |
|
|
|
@Autowired |
|
|
|
PayServiceFactory payServiceFactory; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxProfitSharingReceiverMapper wxProfitSharingReceiverMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Qualifier("objectCommonRedisTemplate") |
|
|
|
RedisTemplate<String, Object> paymentReceicerRedisTemplate; |
|
|
|
@@ -95,6 +99,34 @@ public class WxProfitPaymentReceiverServiceImpl implements WxProfitPaymentReceiv |
|
|
|
wxProfitPaymentReceiverMapper.updateById(record); |
|
|
|
this.deleteRedis(record.getId()); |
|
|
|
} |
|
|
|
//抖音的进件商户同步到 分账账户表 |
|
|
|
//微信因为需要同步微信所以分开处理 |
|
|
|
if(EnumAppPlat.TOUTIAO.getCode().equals(record.getPlat()) |
|
|
|
&& EnumProfitPaymentReceiverType.tt_merchant_number.getCode().equals(record.getReceiverType())){ |
|
|
|
WxProfitSharingReceiver sharingReceiver = wxProfitSharingReceiverMapper.selectById(record); |
|
|
|
boolean isCreate = false; |
|
|
|
if(sharingReceiver == null){ |
|
|
|
sharingReceiver = new WxProfitSharingReceiver(); |
|
|
|
isCreate = true; |
|
|
|
} |
|
|
|
sharingReceiver.setId(record.getId()); |
|
|
|
sharingReceiver.updateTenantInfo(record); |
|
|
|
sharingReceiver.setReceiverType(record.getReceiverType()); |
|
|
|
sharingReceiver.setReceiverAccount(record.getReceiverAccount()); |
|
|
|
sharingReceiver.setReceiverComments(record.getReceiverComments()); |
|
|
|
sharingReceiver.setCreateTime(record.getCreateTime()); |
|
|
|
sharingReceiver.setUpdateTime(record.getUpdateTime()); |
|
|
|
sharingReceiver.setStatus(record.getStatus()); |
|
|
|
sharingReceiver.setPlat(record.getPlat()); |
|
|
|
sharingReceiver.setTtImportStatus(record.getTtImportStatus()); |
|
|
|
sharingReceiver.setTtImportUrl(record.getTtImportUrl()); |
|
|
|
sharingReceiver.setTtBalanceUrl(record.getTtBalanceUrl()); |
|
|
|
if(isCreate){ |
|
|
|
wxProfitSharingReceiverMapper.insert(sharingReceiver); |
|
|
|
}else{ |
|
|
|
wxProfitSharingReceiverMapper.updateById(sharingReceiver); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// @Override |
|
|
|
|