|
|
package com.yoho.search.consumer.service.base;
|
|
|
|
|
|
import com.yoho.search.dal.ParameterMakeMapper;
|
|
|
import com.yoho.search.dal.model.ParameterMake;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.yoho.search.dal.ParameterMakeMapper;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
public class ParameterMakeService {
|
|
|
|
|
|
@Autowired
|
|
|
private ParameterMakeMapper parameterMakeMapper;
|
|
|
|
|
|
public ParameterMake getById(Integer id) {
|
|
|
return parameterMakeMapper.selectByPrimaryKey(id);
|
|
|
}
|
|
|
|
|
|
public int insert(ParameterMake parameterMake) {
|
|
|
return parameterMakeMapper.insert(parameterMake);
|
|
|
}
|
|
|
|
|
|
public int update(ParameterMake parameterMake) {
|
|
|
return parameterMakeMapper.updateByPrimaryKeySelective(parameterMake);
|
|
|
}
|
|
|
|
|
|
public int saveOrUpdate(ParameterMake parameterMake) {
|
|
|
if (parameterMake.getId() == null || parameterMakeMapper.selectByPrimaryKey(parameterMake.getId()) == null) {
|
|
|
return parameterMakeMapper.insert(parameterMake);
|
|
|
} else {
|
|
|
return parameterMakeMapper.updateByPrimaryKeySelective(parameterMake);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public int delete(Integer id) {
|
|
|
return parameterMakeMapper.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
|
|
|
public List<ParameterMake> getAll(){
|
|
|
return parameterMakeMapper.getAll();
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
|
private ParameterMakeMapper parameterMakeMapper;
|
|
|
|
|
|
public ParameterMake getById(Integer id) {
|
|
|
return parameterMakeMapper.selectByPrimaryKey(id);
|
|
|
}
|
|
|
|
|
|
public int insert(ParameterMake parameterMake) {
|
|
|
return parameterMakeMapper.insert(parameterMake);
|
|
|
}
|
|
|
|
|
|
public int update(ParameterMake parameterMake) {
|
|
|
return parameterMakeMapper.updateByPrimaryKeySelective(parameterMake);
|
|
|
}
|
|
|
|
|
|
public int saveOrUpdate(ParameterMake parameterMake) {
|
|
|
if (parameterMake.getId() == null || parameterMakeMapper.selectByPrimaryKey(parameterMake.getId()) == null) {
|
|
|
return parameterMakeMapper.insert(parameterMake);
|
|
|
} else {
|
|
|
return parameterMakeMapper.updateByPrimaryKeySelective(parameterMake);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public int delete(Integer id) {
|
|
|
return parameterMakeMapper.deleteByPrimaryKey(id);
|
|
|
}
|
|
|
|
|
|
public List<ParameterMake> getAll() {
|
|
|
return parameterMakeMapper.getAll();
|
|
|
}
|
|
|
|
|
|
public int selectTotalCount() {
|
|
|
return parameterMakeMapper.selectTotalCount();
|
|
|
}
|
|
|
|
|
|
public List<ParameterMake> selectPageLists(int start, int size) {
|
|
|
return parameterMakeMapper.selectPageLists(start, size);
|
|
|
}
|
|
|
} |
...
|
...
|
|