package com.hzya.frame.sys.testReturn.dao.impl;

import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.sys.testReturn.dao.ITestReturnMapper;
import com.hzya.frame.sys.testReturn.entity.TestReturn;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @description: 系统测试返回  dao
 * @tableName: sys_test_return
 * @entityName: TestReturn
 * @author: gjh
 * @history:1.0
 */
@Service
public class TestReturnMapperImpl extends MybatisGenericDao<TestReturn, String> implements ITestReturnMapper {

    @Override
    public TestReturn entity_get(String id) {

        TestReturn o = (TestReturn) super.selectOne(getSqlIdPrifx() + "entity_get", id);
        return o;

    }

    @Override
    public TestReturn entity_get_by_type(String type) {

        TestReturn o = (TestReturn) super.selectOne(getSqlIdPrifx() + "entity_get_by_type", type);
        return o;

    }

    //查询 采用==查询   entity_list_base
    @Override
    public List<TestReturn> entity_list_base(TestReturn entity) {
        List<TestReturn> o = super.query(getSqlIdPrifx() + "entity_list_base", entity);
        return o;

    }

    //  查询符合条件的数量
    @Override
    public Integer entity_count(TestReturn entity) {
        Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "entity_count", entity);
        return o;

    }

    //分页查询列表 采用like格式 entity_list_like
    @Override
    public List<TestReturn> entity_list_like(TestReturn entity) {
        List<TestReturn> o = super.query(getSqlIdPrifx() + "entity_list_like", entity);
        return o;

    }

    //查询列表 字段采用or格式   entity_list_or
    @Override
    public List<TestReturn> entity_list_or(TestReturn entity) {
        List<TestReturn> o = super.query(getSqlIdPrifx() + "entity_list_or", entity);
        return o;

    }

    //新增  entity_insert
    @Override
    public TestReturn entity_insert(TestReturn entity) {
        entity = super.save(getSqlIdPrifx() + "entity_insert", entity);
        return entity;

    }

    //修改  entity_update
    @Override
    public Integer entity_update(TestReturn entity) {
        Integer o = super.update(getSqlIdPrifx() + "entity_update", entity);
        return o;

    }

    //物理删除
    @Override
    public Integer entity_delete(TestReturn entity) {
        Integer o = super.delete(getSqlIdPrifx() + "entity_delete", entity);
        return o;

    }
}
