123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- package dps
- import (
- "git.sxidc.com/service-supports/dps-sdk/client"
- "git.sxidc.com/service-supports/fslog"
- )
- func EventQueryByKeys(req *client.EventQueryByKeysRequest) ([]client.EventInfo, int64, error) {
- statement, infos, totalCount, err := dpsClient.EventQueryByKeys(req)
- if err != nil {
- return nil, 0, err
- }
- fslog.Info(statement)
- return infos, totalCount, nil
- }
- func CommonEventQuery(req *client.CommonEventQueryRequest) ([]client.EventInfo, int64, error) {
- statement, infos, totalCount, err := dpsClient.CommonEventQuery(req)
- if err != nil {
- return nil, 0, err
- }
- fslog.Info(statement)
- return infos, totalCount, nil
- }
- func EventQueryOnlyByKeys(req *client.EventQueryByKeysRequest) ([]client.EventInfo, error) {
- statement, infos, err := dpsClient.EventQueryOnlyByKeys(req)
- if err != nil {
- return nil, err
- }
- fslog.Info(statement)
- return infos, nil
- }
- func CommonEventQueryOnly(req *client.CommonEventQueryRequest) ([]client.EventInfo, error) {
- statement, infos, err := dpsClient.CommonEventQueryOnly(req)
- if err != nil {
- return nil, err
- }
- fslog.Info(statement)
- return infos, nil
- }
- func CountEventByKeys(req *client.CountEventByKeysRequest) (int64, error) {
- statement, count, err := dpsClient.CountEventByKeys(req)
- if err != nil {
- return 0, err
- }
- fslog.Info(statement)
- return count, nil
- }
- func CommonCountEvent(req *client.CommonCountEventRequest) (int64, error) {
- statement, count, err := dpsClient.CommonCountEvent(req)
- if err != nil {
- return 0, err
- }
- fslog.Info(statement)
- return count, nil
- }
- func CheckEventExistByKeys(req *client.CountEventByKeysRequest) (bool, error) {
- statement, count, err := dpsClient.CountEventByKeys(req)
- if err != nil {
- return false, err
- }
- fslog.Info(statement)
- if count <= 0 {
- return false, nil
- }
- return true, nil
- }
- func CommonCheckEventExist(req *client.CommonCountEventRequest) (bool, error) {
- statement, count, err := dpsClient.CommonCountEvent(req)
- if err != nil {
- return false, err
- }
- fslog.Info(statement)
- if count <= 0 {
- return false, nil
- }
- return true, nil
- }
- func EventHistoryQueryByKeys(req *client.EventQueryByKeysRequest) ([]client.EventInfo, int64, error) {
- statement, infos, totalCount, err := dpsClient.EventHistoryQueryByKeys(req)
- if err != nil {
- return nil, 0, err
- }
- fslog.Info(statement)
- return infos, totalCount, nil
- }
- func CommonEventHistoryQuery(req *client.CommonEventQueryRequest) ([]client.EventInfo, int64, error) {
- statement, infos, totalCount, err := dpsClient.CommonEventHistoryQuery(req)
- if err != nil {
- return nil, 0, err
- }
- fslog.Info(statement)
- return infos, totalCount, nil
- }
- func EventHistoryQueryOnlyByKeys(req *client.EventQueryByKeysRequest) ([]client.EventInfo, error) {
- statement, infos, err := dpsClient.EventHistoryQueryOnlyByKeys(req)
- if err != nil {
- return nil, err
- }
- fslog.Info(statement)
- return infos, nil
- }
- func CommonEventHistoryQueryOnly(req *client.CommonEventQueryRequest) ([]client.EventInfo, error) {
- statement, infos, err := dpsClient.CommonEventHistoryQueryOnly(req)
- if err != nil {
- return nil, err
- }
- fslog.Info(statement)
- return infos, nil
- }
- func CountEventHistoryByKeys(req *client.CountEventByKeysRequest) (int64, error) {
- statement, count, err := dpsClient.CountEventHistoryByKeys(req)
- if err != nil {
- return 0, err
- }
- fslog.Info(statement)
- return count, nil
- }
- func CommonCountEventHistory(req *client.CommonCountEventRequest) (int64, error) {
- statement, count, err := dpsClient.CommonCountEventHistory(req)
- if err != nil {
- return 0, err
- }
- fslog.Info(statement)
- return count, nil
- }
- func CheckEventHistoryExistByKeys(req *client.CountEventByKeysRequest) (bool, error) {
- statement, count, err := dpsClient.CountEventHistoryByKeys(req)
- if err != nil {
- return false, err
- }
- fslog.Info(statement)
- if count <= 0 {
- return false, nil
- }
- return true, nil
- }
- func CommonCheckEventHistoryExist(req *client.CommonCountEventRequest) (bool, error) {
- statement, count, err := dpsClient.CommonCountEventHistory(req)
- if err != nil {
- return false, err
- }
- fslog.Info(statement)
- if count <= 0 {
- return false, nil
- }
- return true, nil
- }
|