liujie
2026-09-14 15defa991fcd30b9fa60bab17d2230b5929bf2a2
1
2
3
4
5
6
7
8
9
10
11
12
package com.tourguide.modules.finance.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tourguide.modules.finance.entity.GuideWithdrawalAccount;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
public interface GuideWithdrawalAccountMapper extends BaseMapper<GuideWithdrawalAccount> {
    @Select("SELECT * FROM t_user_withdrawal WHERE userId = #{guideId} AND userType = 2 " +
            "AND type = 1 AND status = 1 ORDER BY id DESC LIMIT 1 FOR UPDATE")
    GuideWithdrawalAccount selectCurrentForUpdate(@Param("guideId") int guideId);
}