123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- 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
- }
|