package com.gree.mall.miniapp.commonmapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.gree.mall.miniapp.bean.notice.NoticeParamBean;
import com.gree.mall.miniapp.bean.tag.TagGroupBean;
import com.gree.mall.miniapp.bean.tag.UserWxCustomerBean;
import com.gree.mall.miniapp.plus.entity.NoticeParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WxCustomerMapper {

    @SqlParser(filter = true)
    List<UserWxCustomerBean> queryCustomerByUser(@Param("userId") String userId,@Param("workUserId") String workUserId);

    @SqlParser(filter = true)
    List<TagGroupBean> queryTagList(@Param("unionId") String unionId);

    @SqlParser(filter = true)
    List<String> queryCustomTagList(@Param("unionId") String unionId,@Param("workUserId") String workUserId);

    /**
     * 映射小程序与公众号的openid关系
     */
    @SqlParser(filter = true)
    public void updateMpMaRela();

    /**
     * 查询需要推送的通知信息
     */
    @SqlParser(filter = true)
    public List<NoticeParamBean> queryNoticeParam(@Param("type") Integer type, @Param("errNum") Integer errNum, @Param("time") String time);

}
