package com.ruoyi.web.modules.account.mapper;

import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.account.domain.BizMember;

/**
 * 会员 Mapper
 */
public interface BizMemberMapper
{
    BizMember selectById(@Param("memberId") Long memberId);

    BizMember selectByMobile(@Param("mobile") String mobile);

    BizMember selectByMemberCode(@Param("memberCode") String memberCode);

    java.util.List<BizMember> selectList(BizMember query);

    int countByMobile(@Param("mobile") String mobile, @Param("excludeId") Long excludeId);

    int countByByMemberName(@Param("memberName") String memberName);

    int insert(BizMember member);

    int update(BizMember member);

    int updateAccount(BizMember member);

    int updateStatus(@Param("memberId") Long memberId, @Param("status") String status,
            @Param("updateBy") String updateBy);

    int updateConsumption(@Param("memberId") Long memberId, @Param("orderCount") Integer orderCount,
            @Param("totalAmount") java.math.BigDecimal totalAmount);

    Map<String, Object> selectConsumptionFromOrder(@Param("memberId") Long memberId);

    String selectWxOpenid(@Param("memberId") Long memberId);

    int updateWxOpenid(@Param("memberId") Long memberId, @Param("wxOpenid") String wxOpenid);
}
