package com.fdkankan.platform.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fdkankan.platform.user.entity.UserIncrement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户增值权益表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2021-12-24
 */
@Mapper
public interface IUserIncrementMapper extends BaseMapper<UserIncrement> {

    @Select("SELECT * FROM t_user_increment x LEFT JOIN t_camera c ON x.camera_id = c.id and c.rec_status = 'A' WHERE c.child_name = #{childName} AND x.rec_status = 'A' ")
    List<UserIncrement> getByChildName(@Param("childName")String childName);
}
