package dps import ( "git.sxidc.com/service-supports/dps-sdk/client" "git.sxidc.com/service-supports/fslog" ) func QueryByWhereAndOrderBy(req *client.QueryByWhereAndOrderByRequest) ([]client.TableRow, int64, error) { statement, tableRows, totalCount, err := dpsClient.QueryByWhereAndOrderBy(req) if err != nil { return nil, 0, err } fslog.Info(statement) return tableRows, totalCount, nil } func CommonQuery(req *client.CommonQueryRequest) ([]client.TableRow, int64, error) { statement, tableRows, totalCount, err := dpsClient.CommonQuery(req) if err != nil { return nil, 0, err } fslog.Info(statement) return tableRows, totalCount, nil } func QueryOnlyByWhereAndOrderBy(req *client.QueryByWhereAndOrderByRequest) ([]client.TableRow, error) { statement, tableRows, err := dpsClient.QueryOnlyByWhereAndOrderBy(req) if err != nil { return nil, err } fslog.Info(statement) return tableRows, nil } func CommonQueryOnly(req *client.CommonQueryRequest) ([]client.TableRow, error) { statement, tableRows, err := dpsClient.CommonQueryOnly(req) if err != nil { return nil, err } fslog.Info(statement) return tableRows, nil } func QueryByKeys(req *client.QueryByKeysRequest) (*client.TableRow, error) { statement, dataMap, err := dpsClient.QueryByKeys(req) if err != nil { return nil, err } fslog.Info(statement) return dataMap, nil } func CountWhere(req *client.CountWhereRequest) (int64, error) { statement, count, err := dpsClient.CountWhere(req) if err != nil { return 0, err } fslog.Info(statement) return count, nil } func CommonCount(req *client.CommonCountRequest) (int64, error) { statement, count, err := dpsClient.CommonCount(req) if err != nil { return 0, err } fslog.Info(statement) return count, nil } func CheckExistWhere(req *client.CountWhereRequest) (bool, error) { statement, count, err := dpsClient.CountWhere(req) if err != nil { return false, err } fslog.Info(statement) if count <= 0 { return false, nil } return true, nil } func CommonCheckExist(req *client.CommonCountRequest) (bool, error) { statement, count, err := dpsClient.CommonCount(req) if err != nil { return false, err } fslog.Info(statement) if count <= 0 { return false, nil } return true, nil }