提交代码

yy_dev
胡锐 1 year ago
parent 098b0968d7
commit c0723231d6
  1. 11
      cweb/src/main/java/com/cweb/notify/LaKaLaController.java
  2. 34
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java
  3. 7
      service/src/main/java/com/hfkj/service/BsMerLedgerService.java
  4. 11
      service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java

@ -144,11 +144,20 @@ public class LaKaLaController {
// 审核状态 1:通过,2拒绝
if (respData.getString("auditStatus").equals("1")) {
merLedger.setStatus(MerLedgerStatusEnum.status1.getNumber());
merLedgerService.editMerLedger(merLedger);
// 延迟3秒
Thread.sleep(3000);
// 配置账户自动结算
laKaLaWalletService.ewalletSettleProfile(1,merLedger.getCupNo(), "02", "06");
// 配置分账接收方账户自动结算
laKaLaWalletService.ewalletSettleProfile(2,merLedger.getReceiverNo(), "02", "06");
} else {
merLedger.setStatus(MerLedgerStatusEnum.status3.getNumber());
merLedger.setRejectReason(respData.getString("remark"));
merLedgerService.editMerLedger(merLedger);
}
merLedgerService.editMerLedger(merLedger);
}
}

@ -9,8 +9,10 @@ import com.hfkj.common.utils.GenerateUtil;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.BsMer;
import com.hfkj.entity.BsMerLedger;
import com.hfkj.entity.BsMerPlatformNo;
import com.hfkj.entity.SecDictionary;
import com.hfkj.service.BsMerLedgerService;
import com.hfkj.service.BsMerPlatformNoService;
import com.hfkj.service.BsMerService;
import com.hfkj.service.CommonService;
@ -32,6 +34,8 @@ public class LaKaLaWalletService {
@Resource
private BsMerPlatformNoService merPlatformNoService;
@Resource
private BsMerLedgerService merLedgerService;
@Resource
private BsMerService merService;
@Resource
private CommonService commonService;
@ -248,19 +252,33 @@ public class LaKaLaWalletService {
/**
* 账管家提款模式设置
* @param merCupNo 商户号
* @param merCupType 商户号类型 1商户号 2分账接收方账户
* @param merCupNo 商户号
* @param settleType 提款模式01主动提款 02自动结算
* @param settleTime 结算时间小时- 默认值06如08:00-09:00到账则传入08
* @return
*/
public JSONObject ewalletSettleProfile(String merCupNo, String settleType, String settleTime) {
// 查询平台商户号
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo);
if (merPlatform == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号");
public JSONObject ewalletSettleProfile(Integer merCupType,String merCupNo, String settleType, String settleTime) {
BsMer mer = null;
if (merCupType.equals(1)) {
// 查询平台商户号
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo);
if (merPlatform == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号");
}
// 商户平台
mer = merService.getMer(merPlatform.getMerId());
} else if (merCupType.equals(2)) {
// 查询分账信息
BsMerLedger merLedger = merLedgerService.getMerLedgerByReceiverNo(merCupNo);
if (merLedger == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户分账信息");
}
// 商户平台
mer = merService.getMer(merLedger.getMerId());
}
// 商户平台
BsMer mer = merService.getMer(merPlatform.getMerId());
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}

@ -34,6 +34,13 @@ public interface BsMerLedgerService {
*/
BsMerLedger getMerLedger(Long merId, PlatformTypeEnum platformType);
/**
* 获取商户分账信息
* @param receiverNo
* @return
*/
BsMerLedger getMerLedgerByReceiverNo(String receiverNo);
/**
* 查询商户分账信息
* @param id

@ -69,6 +69,17 @@ public class BsMerLedgerServiceImpl implements BsMerLedgerService {
return null;
}
@Override
public BsMerLedger getMerLedgerByReceiverNo(String receiverNo) {
BsMerLedgerExample example = new BsMerLedgerExample();
example.createCriteria().andReceiverNoEqualTo(receiverNo);
List<BsMerLedger> list = merLedgerMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public BsMerLedger getMerLedgerById(Long id) {
return merLedgerMapper.selectByPrimaryKey(id);

Loading…
Cancel
Save