add response parse module

This commit is contained in:
hebo
2019-12-24 22:39:30 +08:00
parent 0ed1b77305
commit 6c2fcd13b2
6 changed files with 141 additions and 18 deletions

View File

@@ -16,6 +16,8 @@ type MysqlQueryPiece struct {
VisitDB *string `json:"db"`
QuerySQL *string `json:"sql"`
CostTimeInMS int64 `json:"cms"`
OK int64 `json:"ok"`
ResponseVal int64 `json:"rv"`
}
func (mqp *MysqlQueryPiece) String() (*string) {
@@ -42,3 +44,8 @@ func (mqp *MysqlQueryPiece) GenerateJsonBytes() {
func (mqp *MysqlQueryPiece) GetSQL() (str *string) {
return mqp.QuerySQL
}
func (mqp *MysqlQueryPiece) SetResponse(ok, respVal int64) {
mqp.OK = ok
mqp.ResponseVal = respVal
}