|
@@ -5,9 +5,12 @@ import com.github.microservice.auth.security.helper.AuthHelper;
|
|
|
import com.github.microservice.models.type.PaymentType;
|
|
import com.github.microservice.models.type.PaymentType;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.zhongshu.card.client.model.feign.ProjectWxPayParam;
|
|
import com.zhongshu.card.client.model.feign.ProjectWxPayParam;
|
|
|
|
|
+import com.zhongshu.card.client.model.org.OrganizationSimpleModel;
|
|
|
|
|
+import com.zhongshu.card.client.model.org.UserCountModel;
|
|
|
import com.zhongshu.card.client.model.payment.paySetting.WxPayConfigModel;
|
|
import com.zhongshu.card.client.model.payment.paySetting.WxPayConfigModel;
|
|
|
import com.zhongshu.card.client.service.feign.OrganizationFeignService;
|
|
import com.zhongshu.card.client.service.feign.OrganizationFeignService;
|
|
|
import com.zhongshu.card.client.service.feign.ProjectPaySettingFeignService;
|
|
import com.zhongshu.card.client.service.feign.ProjectPaySettingFeignService;
|
|
|
|
|
+import com.zhongshu.card.client.service.feign.UserFeignService;
|
|
|
import com.zhongshu.payment.client.annotation.PayAnnotationService;
|
|
import com.zhongshu.payment.client.annotation.PayAnnotationService;
|
|
|
import com.zhongshu.payment.client.model.WalletModel;
|
|
import com.zhongshu.payment.client.model.WalletModel;
|
|
|
import com.zhongshu.payment.client.model.WalletOrderModel;
|
|
import com.zhongshu.payment.client.model.WalletOrderModel;
|
|
@@ -25,6 +28,7 @@ import com.zhongshu.payment.server.core.service.pay.SuperPayService;
|
|
|
import com.zhongshu.payment.server.core.utils.BeanUtils;
|
|
import com.zhongshu.payment.server.core.utils.BeanUtils;
|
|
|
import groovy.util.logging.Slf4j;
|
|
import groovy.util.logging.Slf4j;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -57,6 +61,9 @@ public class WalletMainService extends SuperPayService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
RechargeRecordDao rechargeRecordDao;
|
|
RechargeRecordDao rechargeRecordDao;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ UserFeignService userFeignService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 创建渠道支付订单
|
|
* 创建渠道支付订单
|
|
|
*
|
|
*
|
|
@@ -164,8 +171,25 @@ public class WalletMainService extends SuperPayService {
|
|
|
wallet.setShopId(shopId);
|
|
wallet.setShopId(shopId);
|
|
|
wallet.setWalletType(walletType);
|
|
wallet.setWalletType(walletType);
|
|
|
if (walletType == WalletType.User) {
|
|
if (walletType == WalletType.User) {
|
|
|
|
|
+ ResultContent<UserCountModel> resultContent = userFeignService.getUserDetailByUserId(userId);
|
|
|
|
|
+ if (resultContent.isSuccess()) {
|
|
|
|
|
+ UserCountModel countModel = resultContent.getContent();
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(countModel)) {
|
|
|
|
|
+ wallet.setUnitName(countModel.getName());
|
|
|
|
|
+ wallet.setPhone(countModel.getPhone());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
wallet.setWalletDataId(userId);
|
|
wallet.setWalletDataId(userId);
|
|
|
} else if (walletType == WalletType.Shop) {
|
|
} else if (walletType == WalletType.Shop) {
|
|
|
|
|
+ ResultContent<OrganizationSimpleModel> resultContent = organizationFeignService.getDetail(shopId);
|
|
|
|
|
+ if (resultContent.isSuccess()) {
|
|
|
|
|
+ OrganizationSimpleModel simpleModel = resultContent.getContent();
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(simpleModel)) {
|
|
|
|
|
+ wallet.setUnitName(simpleModel.getName());
|
|
|
|
|
+ wallet.setPhone(simpleModel.getContactPhone());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ organizationFeignService.getOidAboutOrgInfo(shopId);
|
|
|
wallet.setWalletDataId(shopId);
|
|
wallet.setWalletDataId(shopId);
|
|
|
}
|
|
}
|
|
|
walletDao.save(wallet);
|
|
walletDao.save(wallet);
|