package cn.reghao.tnb.file.app.zoss.db.mapper;

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.tnb.file.app.zoss.model.dto.NodeUpdateDto;
import cn.reghao.tnb.file.app.zoss.model.po.UserNode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2025-10-16 14:13:20
 */
@Mapper
public interface UserNodeMapper extends BaseMapper<UserNode> {
    /*void updateUserNode(@Param("userNodeId") int userNodeId,
                        @Param("domain") int domain,
                        @Param("referer") int referer,
                        @Param("secretKey") int secretKey);*/
    void updateUserNode(NodeUpdateDto nodeUpdateDto);

    int countByStoreNodeId(int storeNodeId);
    UserNode findByCreateByAndStoreNodeId(@Param("createBy") long createBy, @Param("storeNodeId") int storeNodeId);
    List<UserNode> findByCreateBy(long createBy);
    UserNode findByDomain(String domain);
    UserNode findById(int id);
}
