zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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");
        });
    }
    
}