/**
 * @filename:CustomerOperationLogServiceImpl 2024-05-14
 * @project trade-client V1.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.client.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.trade.client.system.domain.CustomerOperationLog;
import com.trade.client.system.mapper.CustomerOperationLogMapper;
import com.trade.client.system.service.CustomerOperationLogService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description:客户操作日志服务实现
 * @version: V1.0
 * @author: wanglang
 * @Date: 2024/5/14
 */
@Service
public class CustomerOperationLogServiceImpl extends ServiceImpl<CustomerOperationLogMapper, CustomerOperationLog> implements CustomerOperationLogService {

    @Async("systemThreadPoolTaskExecutor")
    @Override
    public void sava(CustomerOperationLog operationLog) {
        this.baseMapper.insert(operationLog);
    }

    @Override
    public List<CustomerOperationLog> queryByCustomerUserId(Long customerUserId) {
        QueryWrapper<CustomerOperationLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("customer_user_id", customerUserId);
        return this.baseMapper.selectList(queryWrapper);
    }
}
