package com.friday.custody.service.logicService.impl;

import com.friday.custody.context.DataProcessStrategyContext;
import com.friday.custody.service.logicService.DataProcessService;
import com.friday.custody.utils.R;
import com.friday.custody.req.QueryDataReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("dataProcessService")
@Slf4j
public class DataProcessServiceImpl implements DataProcessService<Object> {

    @Autowired
    private DataProcessStrategyContext dpStrategyContext;
    @Override
    public R saveData(String type, List<Object> datas) {
        return null;
    }

    @Override
    public R queryData(QueryDataReq vo) {
        log.info("查询数据成功：租户：{}，type：{}",vo.getTenantName(),vo.getType());
        return dpStrategyContext.getQueryDataResult(vo);
    }

    @Override
    public R updateData(String type, List<Object> datas) {
        return null;
    }

}
