| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package dps
- import (
- "git.sxidc.com/service-supports/dps-sdk/client"
- "git.sxidc.com/service-supports/fslog"
- )
- func QueryByWhereAndOrderBy(req *client.QueryByWhereAndOrderByRequest) ([]map[string]any, int64, error) {
- statement, dataMaps, totalCount, err := dpsClient.QueryByWhereAndOrderBy(req)
- if err != nil {
- return nil, 0, err
- }
- fslog.Info(statement)
- return dataMaps, totalCount, nil
- }
- func CommonQuery(req *client.CommonQueryRequest) ([]map[string]any, int64, error) {
- statement, dataMaps, totalCount, err := dpsClient.CommonQuery(req)
- if err != nil {
- return nil, 0, err
- }
- fslog.Info(statement)
- return dataMaps, totalCount, nil
- }
- func QueryByKeys(req *client.QueryByKeysRequest) (map[string]any, 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
- }
|