package com.platform.yijia.service.impl;

import com.platform.yijia.dao.LabelMapper;
import com.platform.yijia.pojo.CustomerLabel;
import com.platform.yijia.pojo.LabelRule;
import com.platform.yijia.service.LabelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("labelService")
public class LabelServiceImpl implements LabelService {
    @Resource
    private LabelMapper labelMapper;

    //获取标签优惠规则
    @Override
    public List<LabelRule> getLabelRuleList(LabelRule labelRule) {
        return labelMapper.getLabelRuleList(labelRule);
    }

    //新增标签用户
    @Override
    public void insertCustomerLabel(CustomerLabel customerLabel) {
        labelMapper.insertCustomerLabel(customerLabel);
    }

    //更新用户新标签组
    @Override
    public void updateCustomerLabel(CustomerLabel customerLabel) {
        labelMapper.updateCustomerLabel(customerLabel);
    }

    //获取标签用户信息
    @Override
    public CustomerLabel getCustomerLabel(CustomerLabel customerLabel) {
        return labelMapper.getCustomerLabel(customerLabel);
    }
}
