|
@@ -94,6 +94,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
private SysMessageService sysMessageService;
|
|
private SysMessageService sysMessageService;
|
|
@Autowired
|
|
@Autowired
|
|
private TenantInfoSendMsgService tenantInfoSendMsgService;
|
|
private TenantInfoSendMsgService tenantInfoSendMsgService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 新增机构
|
|
* 新增机构
|
|
@@ -440,12 +442,16 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
* 机构开通缴费
|
|
* 机构开通缴费
|
|
*/
|
|
*/
|
|
public Map<String, Object> tenantOpenPay(Integer tenantId) throws Exception {
|
|
public Map<String, Object> tenantOpenPay(Integer tenantId) throws Exception {
|
|
|
|
+ SysConfig config = sysConfigService.findByParamName("platform_collection_organ");
|
|
|
|
+ if(Objects.isNull(config)){
|
|
|
|
+ throw new BizException("未查询到机构收款分部信息!");
|
|
|
|
+ }
|
|
|
|
+
|
|
TenantOrderRecordEnum tenantEnum = TenantOrderRecordEnum.TENANT_OPEN;
|
|
TenantOrderRecordEnum tenantEnum = TenantOrderRecordEnum.TENANT_OPEN;
|
|
Map<String, Object> result = new HashMap<>();
|
|
Map<String, Object> result = new HashMap<>();
|
|
TenantProductInfo productInfo = getProductInfo(tenantId);
|
|
TenantProductInfo productInfo = getProductInfo(tenantId);
|
|
//生成订单编号
|
|
//生成订单编号
|
|
String orderNo = idGenerator.generatorId("payment") + "";
|
|
String orderNo = idGenerator.generatorId("payment") + "";
|
|
- String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
|
int orderState = 0;
|
|
int orderState = 0;
|
|
//消费大于0元则拉起支付
|
|
//消费大于0元则拉起支付
|
|
if (productInfo.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
if (productInfo.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
@@ -453,11 +459,11 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
productInfo.getPayAmount(),
|
|
productInfo.getPayAmount(),
|
|
BigDecimal.ZERO,
|
|
BigDecimal.ZERO,
|
|
orderNo,
|
|
orderNo,
|
|
- baseApiUrl + "/api-web/tenantInfo/notify",
|
|
|
|
- baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
|
|
|
|
|
|
+ null,
|
|
|
|
+ null,
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
- 1,//todo 机构开通付款临时写死
|
|
|
|
|
|
+ config.getParanValue(Integer.class),
|
|
tenantEnum.getCode()
|
|
tenantEnum.getCode()
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
@@ -482,6 +488,11 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
* @param val 购买周期
|
|
* @param val 购买周期
|
|
*/
|
|
*/
|
|
public Map<String, Object> tenantRenewPay(Integer tenantId, Integer val) throws Exception {
|
|
public Map<String, Object> tenantRenewPay(Integer tenantId, Integer val) throws Exception {
|
|
|
|
+ SysConfig config = sysConfigService.findByParamName("platform_collection_organ");
|
|
|
|
+ if(Objects.isNull(config)){
|
|
|
|
+ throw new BizException("未查询到机构收款分部信息!");
|
|
|
|
+ }
|
|
|
|
+
|
|
TenantOrderRecordEnum tenantEnum = TenantOrderRecordEnum.TENANT_RENEW;
|
|
TenantOrderRecordEnum tenantEnum = TenantOrderRecordEnum.TENANT_RENEW;
|
|
Map<String, Object> result = new HashMap<>();
|
|
Map<String, Object> result = new HashMap<>();
|
|
TenantProductInfo productInfo = getProductInfo(tenantId);
|
|
TenantProductInfo productInfo = getProductInfo(tenantId);
|
|
@@ -500,7 +511,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
null,
|
|
null,
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
- 1,//临时写死
|
|
|
|
|
|
+ config.getParanValue(Integer.class),
|
|
tenantEnum.getCode()
|
|
tenantEnum.getCode()
|
|
);
|
|
);
|
|
//操作续费信息,把续费周期存起来
|
|
//操作续费信息,把续费周期存起来
|
|
@@ -695,6 +706,10 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> recharge(Integer tenantId, BigDecimal amount) throws Exception {
|
|
public Map<String, Object> recharge(Integer tenantId, BigDecimal amount) throws Exception {
|
|
|
|
+ SysConfig config = sysConfigService.findByParamName("platform_collection_organ");
|
|
|
|
+ if(Objects.isNull(config)){
|
|
|
|
+ throw new BizException("未查询到机构收款分部信息!");
|
|
|
|
+ }
|
|
log.error("机构 " + tenantId.toString() + "充值");
|
|
log.error("机构 " + tenantId.toString() + "充值");
|
|
Optional.of(tenantId)
|
|
Optional.of(tenantId)
|
|
.map(baseMapper::selectById)
|
|
.map(baseMapper::selectById)
|
|
@@ -720,7 +735,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
null,
|
|
null,
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
tenantEnum.getMsg(),
|
|
- 1,//临时写死
|
|
|
|
|
|
+ config.getParanValue(Integer.class),
|
|
tenantEnum.getCode()
|
|
tenantEnum.getCode()
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|