|
@@ -3,12 +3,11 @@ package com.zhongshu.card.server.core.service.paySetting;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.github.microservice.types.payment.PaymentChannelType;
|
|
import com.github.microservice.types.payment.PaymentChannelType;
|
|
|
import com.github.microservice.types.payment.PaymentType;
|
|
import com.github.microservice.types.payment.PaymentType;
|
|
|
-import com.zhongshu.card.client.model.paySetting.payConfig.LaKaLaCollectionConf;
|
|
|
|
|
|
|
+import com.zhongshu.card.client.model.paySetting.payConfig.LaKaLaCollectionConfig;
|
|
|
import com.zhongshu.card.client.model.paySetting.paySetting.UnionFrictionlessSettingModel;
|
|
import com.zhongshu.card.client.model.paySetting.paySetting.UnionFrictionlessSettingModel;
|
|
|
import com.zhongshu.card.client.model.paySetting.paySetting.UnionFrictionlessSettingParam;
|
|
import com.zhongshu.card.client.model.paySetting.paySetting.UnionFrictionlessSettingParam;
|
|
|
import com.zhongshu.card.server.core.dao.org.OrganizationDao;
|
|
import com.zhongshu.card.server.core.dao.org.OrganizationDao;
|
|
|
import com.zhongshu.card.server.core.dao.projectAbout.UnionFrictionlessSettingDao;
|
|
import com.zhongshu.card.server.core.dao.projectAbout.UnionFrictionlessSettingDao;
|
|
|
-import com.zhongshu.card.server.core.domain.base.SuperMain;
|
|
|
|
|
import com.zhongshu.card.server.core.domain.org.Organization;
|
|
import com.zhongshu.card.server.core.domain.org.Organization;
|
|
|
import com.zhongshu.card.server.core.domain.paySetting.PayChannelConfig;
|
|
import com.zhongshu.card.server.core.domain.paySetting.PayChannelConfig;
|
|
|
import com.zhongshu.card.server.core.domain.paySetting.UnionFrictionlessSetting;
|
|
import com.zhongshu.card.server.core.domain.paySetting.UnionFrictionlessSetting;
|
|
@@ -43,8 +42,11 @@ public class UnionFrictionlessSettingService extends SuperService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrganizationDao organizationDao;
|
|
private OrganizationDao organizationDao;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private OrgPayAccountService orgPayAccountService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
- * 保存数据
|
|
|
|
|
|
|
+ * 保存无感支付数据
|
|
|
*
|
|
*
|
|
|
* @param param
|
|
* @param param
|
|
|
* @return
|
|
* @return
|
|
@@ -73,7 +75,7 @@ public class UnionFrictionlessSettingService extends SuperService {
|
|
|
UnionFrictionlessSetting entity = unionFrictionlessSettingDao
|
|
UnionFrictionlessSetting entity = unionFrictionlessSettingDao
|
|
|
.findTopByProjectInfoAndPaymentType(projectInfo, paymentType);
|
|
.findTopByProjectInfoAndPaymentType(projectInfo, paymentType);
|
|
|
if (paymentType == PaymentType.LakalaFrictionlessPay) {
|
|
if (paymentType == PaymentType.LakalaFrictionlessPay) {
|
|
|
- LaKaLaCollectionConf laKaLaCollectionConf = param.getLaKaLaCollectionConf();
|
|
|
|
|
|
|
+ LaKaLaCollectionConfig laKaLaCollectionConf = param.getLaKaLaCollectionConf();
|
|
|
// 检查数据
|
|
// 检查数据
|
|
|
}
|
|
}
|
|
|
if (entity == null) {
|
|
if (entity == null) {
|
|
@@ -83,10 +85,13 @@ public class UnionFrictionlessSettingService extends SuperService {
|
|
|
entity.setProjectInfo(projectInfo);
|
|
entity.setProjectInfo(projectInfo);
|
|
|
entity.setProjectName(projectInfo.getName());
|
|
entity.setProjectName(projectInfo.getName());
|
|
|
entity.setProjectCode(projectInfo.getCode());
|
|
entity.setProjectCode(projectInfo.getCode());
|
|
|
|
|
+ entity.setOid(projectOid);
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
unionFrictionlessSettingDao.save(entity);
|
|
unionFrictionlessSettingDao.save(entity);
|
|
|
- // 在支付中心开始账号
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 在支付中心 初始账号
|
|
|
|
|
+ orgPayAccountService.initUnionFrictionPayAccount(entity);
|
|
|
|
|
|
|
|
return ResultContent.buildSuccess();
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
}
|
|
@@ -118,6 +123,39 @@ public class UnionFrictionlessSettingService extends SuperService {
|
|
|
return ResultContent.buildSuccess(models);
|
|
return ResultContent.buildSuccess(models);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 得到项目的指定类型的 无感支付配置
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param projectOid
|
|
|
|
|
+ * @param paymentType
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public UnionFrictionlessSetting getProjectPayment(String projectOid, PaymentType paymentType) {
|
|
|
|
|
+ Organization projectInfo = organizationDao.findTopByOid(projectOid);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(projectInfo)) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ return unionFrictionlessSettingDao.findTopByProjectInfoAndPaymentType(projectInfo, paymentType);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 得到项目的 拉卡拉无感支付配置信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param projectOid
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public LaKaLaCollectionConfig getLakaLaConf(String projectOid) {
|
|
|
|
|
+ Organization projectInfo = organizationDao.findTopByOid(projectOid);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(projectInfo)) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ UnionFrictionlessSetting entity = unionFrictionlessSettingDao.findTopByProjectInfoAndPaymentType(
|
|
|
|
|
+ projectInfo, PaymentType.LakalaFrictionlessPay);
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
|
|
+ return entity.getLaKaLaCollectionConf();
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
public UnionFrictionlessSettingModel toModel(UnionFrictionlessSetting entity) {
|
|
public UnionFrictionlessSettingModel toModel(UnionFrictionlessSetting entity) {
|
|
|
UnionFrictionlessSettingModel model = null;
|
|
UnionFrictionlessSettingModel model = null;
|