/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.model.UserExtension;
import com.yami.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户扩展信息
 *
 * @author LGH
 * @date 2020-02-26 16:03:14
 */
public interface UserExtensionMapper extends BaseMapper<UserExtension> {

    void updateByVersion(@Param("userExtension") UserExtension userExtension);

    Page<UserExtension> getPage(PageParam<UserExtension> page, @Param("userExtension") UserExtension userExtension);

    void setUserLevelBylevelId(@Param("level")Integer level);

    void serMaxUserLavelByLevelId(@Param("level")Integer level,@Param("minNeedGrowth")Integer minNeedGrowth, @Param("maxNeedGrowth")Integer maxNeedGrowth);

    void updateBatchByUserId(@Param("userExtensions") List<UserExtension> userExtensions);
}
