Преглед изворни кода

//sharing

release_toaliyun_real
xhxu пре 3 година
родитељ
комит
46b2c9cd7d
1 измењених фајлова са 32 додато и 0 уклоњено
  1. +32
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitPaymentReceiverServiceImpl.java

+ 32
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxProfitPaymentReceiverServiceImpl.java Прегледај датотеку

@@ -21,6 +21,7 @@ import com.iformall.douyin.pay.preOrder.AppAddSubMerchantResult;
import com.iformall.enums.*; import com.iformall.enums.*;
import com.iformall.exception.MallinkException; import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxProfitPaymentReceiverMapper; import com.iformall.mapper.WxProfitPaymentReceiverMapper;
import com.iformall.mapper.WxProfitSharingReceiverMapper;
import com.iformall.mq.MqBaseProducer; import com.iformall.mq.MqBaseProducer;
import com.iformall.service.*; import com.iformall.service.*;
import com.iformall.service.pay.PayServiceFactory; import com.iformall.service.pay.PayServiceFactory;
@@ -66,6 +67,9 @@ public class WxProfitPaymentReceiverServiceImpl implements WxProfitPaymentReceiv
@Autowired @Autowired
PayServiceFactory payServiceFactory; PayServiceFactory payServiceFactory;


@Autowired
WxProfitSharingReceiverMapper wxProfitSharingReceiverMapper;

@Autowired @Autowired
@Qualifier("objectCommonRedisTemplate") @Qualifier("objectCommonRedisTemplate")
RedisTemplate<String, Object> paymentReceicerRedisTemplate; RedisTemplate<String, Object> paymentReceicerRedisTemplate;
@@ -95,6 +99,34 @@ public class WxProfitPaymentReceiverServiceImpl implements WxProfitPaymentReceiv
wxProfitPaymentReceiverMapper.updateById(record); wxProfitPaymentReceiverMapper.updateById(record);
this.deleteRedis(record.getId()); 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 // @Override


Loading…
Откажи
Сачувај