| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- package com.zsElectric.boot.business.service;
- import com.zsElectric.boot.business.model.entity.UserAccount;
- import com.zsElectric.boot.business.model.form.UserAccountForm;
- import com.zsElectric.boot.business.model.query.UserAccountQuery;
- import com.zsElectric.boot.business.model.vo.UserAccountVO;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import com.baomidou.mybatisplus.extension.service.IService;
- /**
- * 个人账户服务类
- *
- * @author zsElectric
- * @since 2025-12-12 10:20
- */
- public interface UserAccountService extends IService<UserAccount> {
- /**
- *个人账户分页列表
- *
- * @return {@link IPage<UserAccountVO>} 个人账户分页列表
- */
- IPage<UserAccountVO> getUserAccountPage(UserAccountQuery queryParams);
- /**
- * 获取个人账户表单数据
- *
- * @param id 个人账户ID
- * @return 个人账户表单数据
- */
- UserAccountForm getUserAccountFormData(Long id);
- /**
- * 新增个人账户
- *
- * @param formData 个人账户表单对象
- * @return 是否新增成功
- */
- boolean saveUserAccount(UserAccountForm formData);
- /**
- * 修改个人账户
- *
- * @param id 个人账户ID
- * @param formData 个人账户表单对象
- * @return 是否修改成功
- */
- boolean updateUserAccount(Long id, UserAccountForm formData);
- /**
- * 删除个人账户
- *
- * @param ids 个人账户ID,多个以英文逗号(,)分割
- * @return 是否删除成功
- */
- boolean deleteUserAccounts(String ids);
- /**
- * 更新账户余额并记录日志
- *
- * @param userId 用户ID
- * @param changeAmount 变更金额(正数为增加,负数为减少)
- * @param changeType 变更类型(1-增加,2-减少)
- * @param changeNote 变更备注
- * @param changeId 变更记录编号(订单号或充电订单号)
- * @return 更新后的用户账户信息
- */
- UserAccount updateAccountBalanceAndLog(Long userId, java.math.BigDecimal changeAmount,
- Integer changeType, String changeNote, Long changeId);
- }
|