package com.changhong.autoform.service.table.impl;
|
|
import org.springframework.stereotype.Service;
|
|
import com.changhong.autoform.core.spring.SpringContext;
|
import com.changhong.autoform.entity.TableStructure;
|
import com.changhong.autoform.mapper.table.TableMapper;
|
import com.changhong.autoform.service.table.TableService;
|
|
@Service("tableService")
|
public class TableServiceImpl implements TableService{
|
|
@Override
|
public int createTable(TableStructure tableStructure) {
|
return getTableMapper().createTable(tableStructure);
|
}
|
|
@Override
|
public int updateTable(TableStructure tableStructure) {
|
return getTableMapper().updateTable(tableStructure);
|
}
|
|
private TableMapper getTableMapper(){
|
return SpringContext.getBean(TableMapper.class, (key)->{
|
return !key.equals("simpleTableMapper");
|
});
|
}
|
|
}
|