|
@@ -54,6 +54,7 @@ import com.ym.mec.auth.api.entity.SysRole;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.enums.SysUserType;
|
|
import com.ym.mec.auth.api.enums.SysUserType;
|
|
import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
|
|
+import com.ym.mec.biz.dal.dao.SysConfigDao;
|
|
import com.ym.mec.biz.dal.dao.TenantInfoDao;
|
|
import com.ym.mec.biz.dal.dao.TenantInfoDao;
|
|
import com.ym.mec.biz.dal.dto.TenantConfigDto;
|
|
import com.ym.mec.biz.dal.dto.TenantConfigDto;
|
|
import com.ym.mec.biz.dal.dto.TenantInfoDto;
|
|
import com.ym.mec.biz.dal.dto.TenantInfoDto;
|
|
@@ -142,6 +143,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
@Autowired
|
|
@Autowired
|
|
private OrganizationDao organizationDao;
|
|
private OrganizationDao organizationDao;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
|
+ @Autowired
|
|
private PayService payService;
|
|
private PayService payService;
|
|
@Autowired
|
|
@Autowired
|
|
private IdGeneratorService idGenerator;
|
|
private IdGeneratorService idGenerator;
|
|
@@ -792,6 +795,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
//生成订单编号
|
|
//生成订单编号
|
|
String orderNo = idGenerator.generatorId("payment") + "";
|
|
String orderNo = idGenerator.generatorId("payment") + "";
|
|
int orderState = 0;
|
|
int orderState = 0;
|
|
|
|
+
|
|
|
|
+ String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
//消费大于0元则拉起支付
|
|
//消费大于0元则拉起支付
|
|
if (productInfo.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
if (productInfo.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
result = payService.getPayToPlatformMap(tenantId,
|
|
result = payService.getPayToPlatformMap(tenantId,
|
|
@@ -799,8 +804,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
productInfo.getPayAmount(),
|
|
productInfo.getPayAmount(),
|
|
BigDecimal.ZERO,
|
|
BigDecimal.ZERO,
|
|
orderNo,
|
|
orderNo,
|
|
- null,
|
|
|
|
- null,
|
|
|
|
|
|
+ baseApiUrl + "/api-web/tenantInfo/callback",
|
|
|
|
+ baseApiUrl + "/api-web/tenantInfo/paymentResult?orderNo=" + orderNo,
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg()
|
|
tenantEnum.getMsg()
|
|
);
|
|
);
|
|
@@ -837,6 +842,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
//生成订单编号
|
|
//生成订单编号
|
|
String orderNo = idGenerator.generatorId("payment") + "";
|
|
String orderNo = idGenerator.generatorId("payment") + "";
|
|
int orderState = 0;
|
|
int orderState = 0;
|
|
|
|
+
|
|
|
|
+ String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
//消费大于0元则拉起支付
|
|
//消费大于0元则拉起支付
|
|
if (amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
if (amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
result = payService.getPayToPlatformMap(tenantId,
|
|
result = payService.getPayToPlatformMap(tenantId,
|
|
@@ -844,8 +851,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
amount,
|
|
amount,
|
|
BigDecimal.ZERO,
|
|
BigDecimal.ZERO,
|
|
orderNo,
|
|
orderNo,
|
|
- null,
|
|
|
|
- null,
|
|
|
|
|
|
+ baseApiUrl + "/api-web/tenantInfo/callback",
|
|
|
|
+ baseApiUrl + "/api-web/tenantInfo/paymentResult?orderNo=" + orderNo,
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg()
|
|
tenantEnum.getMsg()
|
|
);
|
|
);
|
|
@@ -1121,6 +1128,9 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
TenantOrderRecordEnum tenantEnum = TenantOrderRecordEnum.TENANT_RECHARGE;
|
|
TenantOrderRecordEnum tenantEnum = TenantOrderRecordEnum.TENANT_RECHARGE;
|
|
Map<String, Object> result = new HashMap<>();
|
|
Map<String, Object> result = new HashMap<>();
|
|
int orderState = 0;
|
|
int orderState = 0;
|
|
|
|
+
|
|
|
|
+ String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
|
+
|
|
//消费大于0元则拉起支付
|
|
//消费大于0元则拉起支付
|
|
if (amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
if (amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
result = payService.getPayToPlatformMap(tenantId,
|
|
result = payService.getPayToPlatformMap(tenantId,
|
|
@@ -1128,8 +1138,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
amount,
|
|
amount,
|
|
BigDecimal.ZERO,
|
|
BigDecimal.ZERO,
|
|
orderNo,
|
|
orderNo,
|
|
- null,
|
|
|
|
- null,
|
|
|
|
|
|
+ baseApiUrl + "/api-web/tenantInfo/callback",
|
|
|
|
+ baseApiUrl + "/api-web/tenantInfo/paymentResult?orderNo=" + orderNo,
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg()
|
|
tenantEnum.getMsg()
|
|
);
|
|
);
|