package com.jeequan.jeepay.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeequan.jeepay.db.entity.AccountInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 账户表 Mapper 接口
 * </p>
 *
 * @author [mybatis plus generator]
 * @since 2023-12-11
 */
public interface AccountInfoMapper extends BaseMapper<AccountInfo> {

    /**
     * 修改账户余额
     * @param change
     * @param accountNo
     */
    @Select(" UPDATE t_account_info set balacne = balacne + #{change}  where  account_no = #{accountNo}")
    void updateAccount(@Param("change") Long change, @Param("accountNo") String accountNo) throws Exception;
}
