...
|
...
|
@@ -2,10 +2,10 @@ package controllers |
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
"github.com/tiptok/gocomm/pkg/log"
|
|
|
"github.com/tiptok/gocomm/pkg/mybeego"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/ab/protocol"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/ab/services/history"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/mybeego"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
|
|
|
)
|
|
|
|
|
|
type HistoryController struct {
|
...
|
...
|
@@ -13,18 +13,18 @@ type HistoryController struct { |
|
|
}
|
|
|
|
|
|
//SuccessList
|
|
|
func(this *HistoryController)SuccessList(){
|
|
|
func (this *HistoryController) SuccessList() {
|
|
|
var msg *mybeego.Message
|
|
|
defer func(){
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.SuccessListRequest
|
|
|
if err:=json.Unmarshal(this.ByteBody,&request);err!=nil{
|
|
|
if err := json.Unmarshal(this.ByteBody, &request); err != nil {
|
|
|
log.Error(err)
|
|
|
msg = mybeego.NewMessage(1)
|
|
|
return
|
|
|
}
|
|
|
if b,m :=this.Valid(request);!b{
|
|
|
if b, m := this.Valid(request); !b {
|
|
|
msg = m
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -32,18 +32,18 @@ func(this *HistoryController)SuccessList(){ |
|
|
}
|
|
|
|
|
|
//GetRequest
|
|
|
func(this *HistoryController)GetRequest(){
|
|
|
func (this *HistoryController) GetRequest() {
|
|
|
var msg *mybeego.Message
|
|
|
defer func(){
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.GetRequestRequest
|
|
|
if err:=json.Unmarshal(this.ByteBody,&request);err!=nil{
|
|
|
if err := json.Unmarshal(this.ByteBody, &request); err != nil {
|
|
|
log.Error(err)
|
|
|
msg = mybeego.NewMessage(1)
|
|
|
return
|
|
|
}
|
|
|
if b,m :=this.Valid(request);!b{
|
|
|
if b, m := this.Valid(request); !b {
|
|
|
msg = m
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -51,18 +51,18 @@ func(this *HistoryController)GetRequest(){ |
|
|
}
|
|
|
|
|
|
//Retry
|
|
|
func(this *HistoryController)Retry(){
|
|
|
func (this *HistoryController) Retry() {
|
|
|
var msg *mybeego.Message
|
|
|
defer func(){
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.RetryRequest
|
|
|
if err:=json.Unmarshal(this.ByteBody,&request);err!=nil{
|
|
|
if err := json.Unmarshal(this.ByteBody, &request); err != nil {
|
|
|
log.Error(err)
|
|
|
msg = mybeego.NewMessage(1)
|
|
|
return
|
|
|
}
|
|
|
if b,m :=this.Valid(request);!b{
|
|
|
if b, m := this.Valid(request); !b {
|
|
|
msg = m
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -70,18 +70,18 @@ func(this *HistoryController)Retry(){ |
|
|
}
|
|
|
|
|
|
//DeleteHistory
|
|
|
func(this *HistoryController)DeleteHistory(){
|
|
|
func (this *HistoryController) DeleteHistory() {
|
|
|
var msg *mybeego.Message
|
|
|
defer func(){
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.DeleteHistoryRequest
|
|
|
if err:=json.Unmarshal(this.ByteBody,&request);err!=nil{
|
|
|
if err := json.Unmarshal(this.ByteBody, &request); err != nil {
|
|
|
log.Error(err)
|
|
|
msg = mybeego.NewMessage(1)
|
|
|
return
|
|
|
}
|
|
|
if b,m :=this.Valid(request);!b{
|
|
|
if b, m := this.Valid(request); !b {
|
|
|
msg = m
|
|
|
return
|
|
|
}
|
...
|
...
|
|