aa
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/secretNumber"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
type AliApiController struct {
|
||||
@@ -16,7 +18,16 @@ type CallBack struct {
|
||||
}
|
||||
|
||||
func (c *AliApiController) SecretNumberMsg() {
|
||||
fmt.Println(utils.Format4Output(c.Ctx.Request, true))
|
||||
data, _ := ioutil.ReadAll(c.Ctx.Request.Body)
|
||||
values, _ := utils.HTTPBody2Values(data, false)
|
||||
mapData := utils.URLValues2Map(values)
|
||||
//东西在key上
|
||||
var res *secretNumber.SecretNumberMsgRes
|
||||
for k, _ := range mapData {
|
||||
if err := json.Unmarshal([]byte(k), &res); err == nil {
|
||||
secretNumber.CallbackBrandBill(res)
|
||||
}
|
||||
}
|
||||
c.Data["json"] = &CallBack{
|
||||
Code: 0,
|
||||
Msg: "成功",
|
||||
|
||||
Reference in New Issue
Block a user