package dps import ( "git.sxidc.com/service-supports/dps-sdk/client" "git.sxidc.com/service-supports/fslog" ) func Insert(req *client.InsertRequest, tx client.Transaction) error { var statement string var err error if tx == nil { statement, err = dpsClient.Insert(req) } else { statement, err = tx.InsertTx(req) } if err != nil { return err } fslog.Info(statement) return nil } func InsertBatch(req *client.InsertBatchRequest, tx client.Transaction) error { var statement string var err error if tx == nil { statement, err = dpsClient.InsertBatch(req) } else { statement, err = tx.InsertBatchTx(req) } if err != nil { return err } fslog.Info(statement) return nil } func Delete(req *client.DeleteRequest, tx client.Transaction) error { var statement string var err error if tx == nil { statement, err = dpsClient.Delete(req) } else { statement, err = tx.DeleteTx(req) } if err != nil { return err } fslog.Info(statement) return nil } func DeleteWhere(req *client.DeleteWhereRequest, tx client.Transaction) error { var statement string var err error if tx == nil { statement, err = dpsClient.DeleteWhere(req) } else { statement, err = tx.DeleteWhereTx(req) } if err != nil { return err } fslog.Info(statement) return nil } func Update(req *client.UpdateRequest, tx client.Transaction) error { var statement string var err error if tx == nil { statement, err = dpsClient.Update(req) } else { statement, err = tx.UpdateTx(req) } if err != nil { return err } fslog.Info(statement) return nil } func UpdateWhere(req *client.UpdateWhereRequest, tx client.Transaction) error { var statement string var err error if tx == nil { statement, err = dpsClient.UpdateWhere(req) } else { statement, err = tx.UpdateWhereTx(req) } if err != nil { return err } fslog.Info(statement) return nil } func Replay(req *client.ReplayRequest) error { var statement string var err error statement, err = dpsClient.Replay(req) if err != nil { return err } fslog.Info(statement) return nil }