@Service
@Transactional
public class ItemsServiceImpl implements ItemsService {

@Autowired
private ItemsMapper itemsMapper;


@Override
public List<Items> getAllItems() {
    ItemsExample example = new ItemsExample();
    List<Items> selectByExampleWithBLOBs = itemsMapper.selectByExampleWithBLOBs(example);
    return selectByExampleWithBLOBs;
}


@Override
public Items selectItemByPrimaryKey(Integer id) {
    Items selectByPrimaryKey = itemsMapper.selectByPrimaryKey(id);
    return selectByPrimaryKey;
}


/**
 * 数据库的更新操作
 */
@Override
public void updateItem(Items items) {
    itemsMapper.updateByPrimaryKeySelective(items);
    
}

}

评论已关闭

暂无评论