liujie
2026-09-16 a3a56121a476cd23d0f29bc391c07374dc5008f2
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);
}