liujie
2026-08-21 ad5db85e540947e82c7a4d5612879b3b3ecdf459
backend/src/main/java/com/tourguide/modules/finance/mapper/GuideWithdrawalAccountMapper.java
@@ -2,6 +2,11 @@
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);
}