package com.gree.mall.miniapp.commonmapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
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 org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WxCustomerMapper {

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<UserWxCustomerBean> queryCustomerByUser(@Param("userId") String userId,@Param("workUserId") String workUserId);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<TagGroupBean> queryTagList(@Param("unionId") String unionId);

    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<String> queryCustomTagList(@Param("unionId") String unionId,@Param("workUserId") String workUserId);

    /**
     * 映射小程序与公众号的openid关系
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public void updateMpMaRela();

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

}
