增加了套餐包的相关功能, 待测试
This commit is contained in:
parent
fbc1d91587
commit
8ed2df072b
@ -64,6 +64,16 @@ public class AccountRechargeDTO {
|
|||||||
private String rechargeRemark;
|
private String rechargeRemark;
|
||||||
@ApiModelProperty(name = "selfData", value = "平台账户/自定义数据")
|
@ApiModelProperty(name = "selfData", value = "平台账户/自定义数据")
|
||||||
private String selfData;
|
private String selfData;
|
||||||
|
@ApiModelProperty(name = "packageInfoId", value = "套餐包")
|
||||||
|
private String packageInfoId;
|
||||||
|
|
||||||
|
public String getPackageInfoId() {
|
||||||
|
return packageInfoId == null ? "" : packageInfoId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackageInfoId(String packageInfoId) {
|
||||||
|
this.packageInfoId = packageInfoId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOrgName() {
|
public String getOrgName() {
|
||||||
return orgName == null ? "" : orgName.trim();
|
return orgName == null ? "" : orgName.trim();
|
||||||
|
@ -53,6 +53,16 @@ public class AccountRechargeVO {
|
|||||||
private String rechargeRemark;
|
private String rechargeRemark;
|
||||||
@ApiModelProperty(name = "selfData", value = "平台账户/自定义数据")
|
@ApiModelProperty(name = "selfData", value = "平台账户/自定义数据")
|
||||||
private String selfData;
|
private String selfData;
|
||||||
|
@ApiModelProperty(name = "packageInfoId", value = "自定义回调函数/2025年2月28日10:03:44/CBC新增")
|
||||||
|
private String packageInfoId;
|
||||||
|
|
||||||
|
public String getPackageInfoId() {
|
||||||
|
return packageInfoId == null ? "" : packageInfoId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackageInfoId(String packageInfoId) {
|
||||||
|
this.packageInfoId = packageInfoId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId == null ? "" : userId.trim();
|
return userId == null ? "" : userId.trim();
|
||||||
|
@ -8,6 +8,7 @@ import ink.wgink.annotation.rpc.rest.params.RemoteJsonBodyParams;
|
|||||||
import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
|
import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
|
||||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
|
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
|
||||||
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
|
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
|
||||||
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -15,6 +16,16 @@ import java.util.List;
|
|||||||
@RemoteService
|
@RemoteService
|
||||||
public interface IOperatorPluginRemoteService {
|
public interface IOperatorPluginRemoteService {
|
||||||
|
|
||||||
|
@RemotePostMethod("/resource/packageorder/update")
|
||||||
|
SuccessResult updateOrder(@RemoteServerParams String server,
|
||||||
|
@RemoteJsonBodyParams PackageOrderAppVO appVO,
|
||||||
|
@RemoteQueryParams("access_token") String accessToken);
|
||||||
|
|
||||||
|
@RemotePostMethod("/resource/packageorder/save")
|
||||||
|
SuccessResult saveOrder(@RemoteServerParams String server,
|
||||||
|
@RemoteJsonBodyParams PackageOrderAppVO appVO,
|
||||||
|
@RemoteQueryParams("access_token") String accessToken);
|
||||||
|
|
||||||
@RemoteGetMethod("/resource/useric/get/{usericId}")
|
@RemoteGetMethod("/resource/useric/get/{usericId}")
|
||||||
UsericDTO getUseric(@RemoteServerParams String server,
|
UsericDTO getUseric(@RemoteServerParams String server,
|
||||||
@RemotePathParams("usericId") String usericId,
|
@RemotePathParams("usericId") String usericId,
|
||||||
@ -31,4 +42,5 @@ public interface IOperatorPluginRemoteService {
|
|||||||
@RemoteQueryParams("access_token") String accessToken,
|
@RemoteQueryParams("access_token") String accessToken,
|
||||||
@RemoteQueryParams("page") int page,
|
@RemoteQueryParams("page") int page,
|
||||||
@RemoteQueryParams("rows") int rows);
|
@RemoteQueryParams("rows") int rows);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
package cn.com.tenlion.operator.remote;
|
||||||
|
|
||||||
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName: PackageOrderAppVO
|
||||||
|
* @Description: 套餐包-订单
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2025-02-26 14:48:15
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@ApiModel
|
||||||
|
public class PackageOrderAppVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "packageInfoId", value = "套餐ID")
|
||||||
|
@CheckEmptyAnnotation(name = "套餐ID")
|
||||||
|
private String packageInfoId;
|
||||||
|
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||||
|
@CheckEmptyAnnotation(name = "用户ID")
|
||||||
|
private String userId;
|
||||||
|
@ApiModelProperty(name = "accountRechargeId", value = "用户充值记录ID")
|
||||||
|
@CheckEmptyAnnotation(name = "用户充值记录")
|
||||||
|
private String accountRechargeId;
|
||||||
|
@ApiModelProperty(name = "accountItemId", value = "用户充值流水记录ID")
|
||||||
|
private String accountItemId;
|
||||||
|
|
||||||
|
public String getAccountItemId() {
|
||||||
|
return accountItemId == null ? "" : accountItemId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountItemId(String accountItemId) {
|
||||||
|
this.accountItemId = accountItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccountRechargeId() {
|
||||||
|
return accountRechargeId == null ? "" : accountRechargeId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountRechargeId(String accountRechargeId) {
|
||||||
|
this.accountRechargeId = accountRechargeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId == null ? "" : userId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPackageInfoId() {
|
||||||
|
return packageInfoId == null ? "" : packageInfoId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackageInfoId(String packageInfoId) {
|
||||||
|
this.packageInfoId = packageInfoId;
|
||||||
|
}
|
||||||
|
}
|
@ -7,8 +7,11 @@ import cn.com.tenlion.operator.enums.ThirdPartyEnum;
|
|||||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
||||||
|
import cn.com.tenlion.operator.pojo.dtos.ic.UsericDTO;
|
||||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemVO;
|
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemVO;
|
||||||
import cn.com.tenlion.operator.properties.SystemApiPathProperties;
|
import cn.com.tenlion.operator.properties.SystemApiPathProperties;
|
||||||
|
import cn.com.tenlion.operator.remote.IOperatorPluginRemoteService;
|
||||||
|
import cn.com.tenlion.operator.remote.PackageOrderAppVO;
|
||||||
import cn.com.tenlion.operator.service.account.IAccountService;
|
import cn.com.tenlion.operator.service.account.IAccountService;
|
||||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||||
import cn.com.tenlion.operator.service.accountitem.IAccountItemService;
|
import cn.com.tenlion.operator.service.accountitem.IAccountItemService;
|
||||||
@ -27,8 +30,10 @@ import ink.wgink.exceptions.ParamsException;
|
|||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.interfaces.user.IUserBaseService;
|
import ink.wgink.interfaces.user.IUserBaseService;
|
||||||
|
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.util.date.DateUtil;
|
import ink.wgink.util.date.DateUtil;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
@ -79,6 +84,8 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
|||||||
private SysCallbackService sysCallbackService;
|
private SysCallbackService sysCallbackService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemApiPathProperties systemApiPathProperties;
|
private SystemApiPathProperties systemApiPathProperties;
|
||||||
|
@Autowired
|
||||||
|
private IOperatorPluginRemoteService operatorPluginRemoteService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(AccountRechargeVO accountRechargeVO) {
|
public void save(AccountRechargeVO accountRechargeVO) {
|
||||||
@ -337,8 +344,22 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
|||||||
}
|
}
|
||||||
params.put("gmtModified", DateUtil.getTime());
|
params.put("gmtModified", DateUtil.getTime());
|
||||||
accountRechargeDao.updateCheck(params);
|
accountRechargeDao.updateCheck(params);
|
||||||
}
|
|
||||||
|
|
||||||
|
// 2025年2月28日11:12:47 CBC 新增 套餐包 逻辑
|
||||||
|
AccountRechargeDTO dto = get(accountRechargeId);
|
||||||
|
// 绑定了套餐包 & 已对账 & 已到账
|
||||||
|
if(!StringUtils.isEmpty(dto.getPackageInfoId()) && dto.getReconciliationStatus().equals("1") && dto.getRechargeCheck().equals("2")) {
|
||||||
|
// 远程更改套餐包的到账状态
|
||||||
|
PackageOrderAppVO appVO = new PackageOrderAppVO();
|
||||||
|
appVO.setAccountItemId(dto.getAccountItemId());
|
||||||
|
appVO.setPackageInfoId(dto.getPackageInfoId());
|
||||||
|
appVO.setUserId(dto.getCreator());
|
||||||
|
appVO.setAccountRechargeId(dto.getAccountRechargeId());
|
||||||
|
|
||||||
|
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||||
|
operatorPluginRemoteService.updateOrder(systemApiPathProperties.getOperatorPlugin(), appVO, accessToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AccountRechargePayDTO saveAccount(String thirdParty, AccountRechargeVO accountRechargeVO) {
|
public AccountRechargePayDTO saveAccount(String thirdParty, AccountRechargeVO accountRechargeVO) {
|
||||||
@ -392,6 +413,17 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
|||||||
params.put("gmtModified", currentDate);
|
params.put("gmtModified", currentDate);
|
||||||
params.put("isDelete", 0);
|
params.put("isDelete", 0);
|
||||||
accountRechargeDao.save(params);
|
accountRechargeDao.save(params);
|
||||||
|
|
||||||
|
// 创建套餐包购买记录
|
||||||
|
if(!StringUtils.isEmpty(accountRechargeVO.getPackageInfoId())) {
|
||||||
|
PackageOrderAppVO appVO = new PackageOrderAppVO();
|
||||||
|
appVO.setPackageInfoId(accountRechargeVO.getPackageInfoId());
|
||||||
|
appVO.setUserId(userId);
|
||||||
|
appVO.setAccountRechargeId(payDTO.getAccountRechargeId());
|
||||||
|
|
||||||
|
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||||
|
operatorPluginRemoteService.saveOrder(systemApiPathProperties.getOperatorPlugin(), appVO, accessToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return payDTO;
|
return payDTO;
|
||||||
}
|
}
|
||||||
@ -568,6 +600,9 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
|||||||
updateCheck(dto.getAccountRechargeId(), RechargeCheckEnum.RECHARGE_SUCCESS, "线上充值", accountItemId, orderId, successTime);
|
updateCheck(dto.getAccountRechargeId(), RechargeCheckEnum.RECHARGE_SUCCESS, "线上充值", accountItemId, orderId, successTime);
|
||||||
// 3. 调用第三方接口, 告知充值到账
|
// 3. 调用第三方接口, 告知充值到账
|
||||||
sysCallbackService.save("项目充值到账", systemApiPathProperties.getCopyright() + "api/pay/recharge-success/user-id/" + dto.getAccountId(), null);
|
sysCallbackService.save("项目充值到账", systemApiPathProperties.getCopyright() + "api/pay/recharge-success/user-id/" + dto.getAccountId(), null);
|
||||||
|
// 2025年2月28日10:34:10 CBC 新增 套餐包购买
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<result column="reconciliation_status" property="reconciliationStatus"/>
|
<result column="reconciliation_status" property="reconciliationStatus"/>
|
||||||
<result column="reconciliation_time" property="reconciliationTime"/>
|
<result column="reconciliation_time" property="reconciliationTime"/>
|
||||||
<result column="account_item_id" property="accountItemId"/>
|
<result column="account_item_id" property="accountItemId"/>
|
||||||
|
<result column="package_info_id" property="packageInfoId"/>
|
||||||
<result column="org_name" property="orgName"/>
|
<result column="org_name" property="orgName"/>
|
||||||
<result column="org_bank" property="orgBank"/>
|
<result column="org_bank" property="orgBank"/>
|
||||||
<result column="org_number" property="orgNumber"/>
|
<result column="org_number" property="orgNumber"/>
|
||||||
@ -79,6 +80,7 @@
|
|||||||
reconciliation_status,
|
reconciliation_status,
|
||||||
reconciliation_time,
|
reconciliation_time,
|
||||||
account_item_id,
|
account_item_id,
|
||||||
|
package_info_id,
|
||||||
org_name,
|
org_name,
|
||||||
org_bank,
|
org_bank,
|
||||||
org_number,
|
org_number,
|
||||||
@ -103,6 +105,7 @@
|
|||||||
#{reconciliationStatus},
|
#{reconciliationStatus},
|
||||||
#{reconciliationTime},
|
#{reconciliationTime},
|
||||||
#{accountItemId},
|
#{accountItemId},
|
||||||
|
#{packageInfoId},
|
||||||
#{orgName},
|
#{orgName},
|
||||||
#{orgBank},
|
#{orgBank},
|
||||||
#{orgNumber},
|
#{orgNumber},
|
||||||
@ -268,13 +271,15 @@
|
|||||||
t1.reconciliation_status,
|
t1.reconciliation_status,
|
||||||
t1.reconciliation_time,
|
t1.reconciliation_time,
|
||||||
t1.account_item_id,
|
t1.account_item_id,
|
||||||
|
t1.package_info_id,
|
||||||
t1.account_recharge_id,
|
t1.account_recharge_id,
|
||||||
t1.recharge_money,
|
t1.recharge_money,
|
||||||
t1.org_name,
|
t1.org_name,
|
||||||
t1.org_bank,
|
t1.org_bank,
|
||||||
t1.org_number,
|
t1.org_number,
|
||||||
t1.self_data,
|
t1.self_data,
|
||||||
t1.recharge_remark
|
t1.recharge_remark,
|
||||||
|
t1.creator
|
||||||
FROM
|
FROM
|
||||||
operator_account_recharge t1
|
operator_account_recharge t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -428,6 +433,7 @@
|
|||||||
t1.reconciliation_status,
|
t1.reconciliation_status,
|
||||||
t1.reconciliation_time,
|
t1.reconciliation_time,
|
||||||
t1.account_item_id,
|
t1.account_item_id,
|
||||||
|
t1.package_info_id,
|
||||||
t1.creator,
|
t1.creator,
|
||||||
t1.gmt_create,
|
t1.gmt_create,
|
||||||
t1.modifier,
|
t1.modifier,
|
||||||
|
Loading…
Reference in New Issue
Block a user