会员费

pull/1121/head
梁宇奇 2025-06-28 01:09:32 +08:00
parent 49b8fef8c1
commit 3dbfebd5dd
5 changed files with 51 additions and 3 deletions

View File

@ -41,9 +41,6 @@ public class SysLoginService {
@Autowired
private TokenService tokenService;
@Resource
private AuthenticationManager authenticationManager;
@Autowired
private RedisCache redisCache;

View File

@ -18,6 +18,8 @@ public enum EFinBillSrcType {
RECHARGE(5, "充值"),
ADVERT_PAID(6, "推广费"),
ADVERT_REFUND(7, "推广费退款"),
VIP_PAID(8, "会员费"),
VIP_REFUND(9, "会员费退款"),
;
private final Integer value;

View File

@ -123,6 +123,23 @@ public interface IAssetService {
*/
void refundAdvertFee(Long storeId, BigDecimal amount);
/**
*
*
* @param storeId
* @param amount
* @param transactionPassword
*/
void payVipFee(Long storeId, BigDecimal amount, String transactionPassword);
/**
* 退
*
* @param storeId
* @param amount
*/
void refundVipFee(Long storeId, BigDecimal amount);
/**
*
*

View File

@ -255,6 +255,36 @@ public class AssetServiceImpl implements IAssetService {
}
@Transactional(rollbackFor = Exception.class)
@Override
public void payVipFee(Long storeId, BigDecimal amount, String transactionPassword) {
Assert.notNull(storeId);
Assert.notNull(amount);
InternalAccount internalAccount = internalAccountService.getAccountAndCheck(storeId, EAccountOwnerType.STORE);
if (!EAccountStatus.NORMAL.getValue().equals(internalAccount.getAccountStatus())) {
throw new ServiceException("档口账户已冻结");
}
if (StrUtil.isEmpty(internalAccount.getTransactionPassword())) {
throw new ServiceException("请先设置支付密码");
}
if (!StrUtil.equals(SecureUtil.md5(transactionPassword), internalAccount.getTransactionPassword())) {
throw new ServiceException("支付密码错误");
}
financeBillService.createInternalTransferBill(Constants.PLATFORM_INTERNAL_ACCOUNT_ID, internalAccount.getId(),
amount, EFinBillSrcType.VIP_PAID.getValue(), null, null, null, "会员费");
}
@Transactional(rollbackFor = Exception.class)
@Override
public void refundVipFee(Long storeId, BigDecimal amount) {
Assert.notNull(storeId);
Assert.notNull(amount);
InternalAccount internalAccount = internalAccountService.getAccountAndCheck(storeId, EAccountOwnerType.STORE);
financeBillService.createInternalTransferBill(internalAccount.getId(), Constants.PLATFORM_INTERNAL_ACCOUNT_ID,
amount, EFinBillSrcType.VIP_REFUND.getValue(), null, null, null,
"会员费退款");
}
@Override
public Map<EPayChannel, List<WithdrawPrepareResult>> getNeedContinueWithdrawGroupMap(Integer count) {
//TODO 付款单据没有支付渠道和账户快照

View File

@ -25,6 +25,8 @@
WHEN 5 THEN '充值'
WHEN 6 THEN '推广费'
WHEN 7 THEN '推广费退款'
WHEN 8 THEN '会员费'
WHEN 9 THEN '会员费退款'
ELSE '其他' END trans_type,
fb.remark,
fb.bill_type,