package com.test.test.service.impl;

import java.util.List;

import com.test.common.utils.DateUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import com.test.test.mapper.TestHttpMapper;
import com.test.test.domain.TestHttp;
import com.test.test.service.ITestHttpService;

/**
 * http服务Service业务层处理
 */
@Service
public class TestHttpServiceImpl implements ITestHttpService {
    @Resource
    private TestHttpMapper testHttpMapper;

    /**
     * 查询http服务
     */
    @Override
    public TestHttp selectTestHttpById(Long id) {
        return testHttpMapper.selectTestHttpById(id);
    }

    /**
     * 查询http服务列表
     */
    @Override
    public List<TestHttp> selectTestHttpList() {
        return testHttpMapper.selectTestHttpList();
    }

    /**
     * 新增http服务
     */
    @Override
    public TestHttp insertTestHttp(TestHttp testHttp) {
        testHttp.setCreateTime(DateUtils.getNowDate());
        testHttpMapper.insertTestHttp(testHttp);
        return testHttp;
    }

    /**
     * 修改http服务
     */
    @Override
    public int updateTestHttp(TestHttp testHttp) {
        testHttp.setUpdateTime(DateUtils.getNowDate());
        return testHttpMapper.updateTestHttp(testHttp);
    }

    /**
     * 批量删除http服务
     */
    @Override
    public int deleteTestHttpByIds(Long[] ids) {
        return testHttpMapper.deleteTestHttpByIds(ids);
    }

    /**
     * 删除http服务信息
     */
    @Override
    public int deleteTestHttpById(Long id) {
        return testHttpMapper.deleteTestHttpById(id);
    }
}
