DeteMin
2020-01-15 7584a724d8ff312cae1ae57c6918df10ea72b686
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
package com.basic.security.manager;
 
import com.basic.security.model.Model;
import com.basic.security.model.ModelAdapter;
import com.basic.security.model.SerfToRow;
import com.basic.security.utils.SqlSplit;
 
import java.util.Map;
 
public class SerfToRowManager extends BaseManager {
    public static void addSerfToRow(String sql) {
        if (1 == 1) {
            return;
        }
        String row_table = SqlSplit.getTableName(sql);
        String row_operate_type = SqlSplit.getRowSqlOperateType(sql);
        Map<String, String> rowDataMap = SqlSplit.getRowDataMap(sql);
        ModelAdapter serfToRow = new ModelAdapter();
        serfToRow.setString(SerfToRow.company_id, CompanyManager.getCompanyId());
        serfToRow.setString(SerfToRow.device_id, DeviceManager.getDeviceId());
        serfToRow.setString(SerfToRow.row_id, rowDataMap.get(Model.id));
        serfToRow.setString(SerfToRow.row_sql, sql);
        serfToRow.setString(SerfToRow.row_table, row_table);
        serfToRow.setString(SerfToRow.row_operate_type, row_operate_type);
        serfToRow.setString(com.basic.security.utils.Constants.TABLE, SerfToRow.tableName);
    }
}