hbyb_controller.go 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. package hb
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "gdyb/controllers"
  6. "gdyb/models"
  7. "gdyb/service"
  8. "gdyb/utils"
  9. "github.com/astaxie/beego"
  10. "io/ioutil"
  11. )
  12. type HBybController struct {
  13. controllers.BaseAuthAPIController
  14. }
  15. func HbybRegistRouters() {
  16. beego.Router("/hbyb/1101", &HBybController{}, "get:PostOne")
  17. beego.Router("/hbyb/2201", &HBybController{}, "get:PostTwo")
  18. beego.Router("/hbyb/2202", &HBybController{}, "get:PostThree")
  19. beego.Router("/hbyb/2203", &HBybController{}, "post:PostFour")
  20. beego.Router("/hbyb/2204", &HBybController{}, "post:PostFive")
  21. beego.Router("/hbyb/2205", &HBybController{}, "get:PostSix")
  22. beego.Router("/hbyb/2206", &HBybController{}, "get:PostSeven")
  23. beego.Router("/hbyb/2207", &HBybController{}, "get:PostEight")
  24. beego.Router("/hbyb/2208", &HBybController{}, "get:PostNine")
  25. beego.Router("/hbyb/5203", &HBybController{}, "get:PostTen")
  26. beego.Router("/hbyb/2001", &HBybController{}, "get:Post2001")
  27. beego.Router("/hbyb/3202", &HBybController{}, "post:Post3202a")
  28. beego.Router("/hbyb/4101", &HBybController{}, "post:Post4101")
  29. }
  30. func (c *HBybController) Post3202a() {
  31. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  32. var respJSON map[string]interface{}
  33. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  34. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  35. return
  36. }
  37. userJSONBytes, _ := json.Marshal(respJSON["bps"])
  38. var bps []models.BusinessParams
  39. if err := json.Unmarshal(userJSONBytes, &bps); err != nil {
  40. utils.ErrorLog("解析失败:%v", err)
  41. return
  42. }
  43. var baseParams models.BaseParams
  44. baseParams.InsuplcAdmdvs = respJSON["insuplc_admdvs"].(string)
  45. baseParams.MdtrtareaAdmvs = respJSON["mdtrtarea_admvs"].(string)
  46. baseParams.SecretKey = respJSON["secret_key"].(string)
  47. baseParams.OrgName = respJSON["org_name"].(string)
  48. baseParams.Doctor = respJSON["doctor"].(string)
  49. baseParams.FixmedinsCode = respJSON["fixmedins_code"].(string)
  50. result := service.Hbyb3202a(baseParams, bps)
  51. var dat map[string]interface{}
  52. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  53. fmt.Println(dat)
  54. } else {
  55. fmt.Println(err)
  56. }
  57. c.ServeSuccessJSON(map[string]interface{}{
  58. "pre": dat,
  59. })
  60. }
  61. func (c *HBybController) Post4101() {
  62. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  63. var respJSON map[string]interface{}
  64. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  65. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  66. return
  67. }
  68. userJSONBytes, _ := json.Marshal(respJSON["struct4101"])
  69. var struct4101 service.Struct4101
  70. if err := json.Unmarshal(userJSONBytes, &struct4101); err != nil {
  71. utils.ErrorLog("解析失败:%v", err)
  72. return
  73. }
  74. result, inputLog := service.Hbyb4101(struct4101, respJSON["secret_key"].(string), respJSON["org_name"].(string), respJSON["opera"].(string), respJSON["code"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string))
  75. var dat map[string]interface{}
  76. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  77. } else {
  78. }
  79. var dat2 map[string]interface{}
  80. if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil {
  81. } else {
  82. }
  83. c.ServeSuccessJSON(map[string]interface{}{
  84. "pre": dat,
  85. "log": dat2,
  86. })
  87. }
  88. func (c *HBybController) Post2001() {
  89. org_name := c.GetString("org_name")
  90. doctor := c.GetString("doctor")
  91. fixmedins_code := c.GetString("fixmedins_code")
  92. insuplc_admdvs := c.GetString("insuplc_admdvs")
  93. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  94. secret_key := c.GetString("secret_key")
  95. psn_no := c.GetString("psn_no")
  96. insutype := c.GetString("insutype")
  97. med_type := c.GetString("med_type")
  98. result, inputLog := service.Hbyb2001(secret_key, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, psn_no, insutype, med_type)
  99. fmt.Println(result)
  100. fmt.Println(inputLog)
  101. var dat map[string]interface{}
  102. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  103. } else {
  104. }
  105. var dat2 map[string]interface{}
  106. if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil {
  107. } else {
  108. }
  109. c.ServeSuccessJSON(map[string]interface{}{
  110. "pre": dat,
  111. "log": dat2,
  112. })
  113. }
  114. func (c *HBybController) PostOne() {
  115. certNo := c.GetString("cert_no")
  116. org_name := c.GetString("org_name")
  117. doctor := c.GetString("doctor")
  118. fixmedins_code := c.GetString("fixmedins_code")
  119. insuplc_admdvs := c.GetString("insuplc_admdvs")
  120. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  121. secret_key := c.GetString("secret_key")
  122. id_card_type, _ := c.GetInt64("id_card_type")
  123. card_sn := c.GetString("card_sn")
  124. certificates := c.GetString("certificates")
  125. fmt.Println(certNo)
  126. fmt.Println(org_name)
  127. fmt.Println(doctor)
  128. fmt.Println(fixmedins_code)
  129. fmt.Println(insuplc_admdvs)
  130. fmt.Println(mdtrtarea_admvs)
  131. fmt.Println(secret_key)
  132. fmt.Println(id_card_type)
  133. fmt.Println(card_sn)
  134. fmt.Println(certificates)
  135. result, inputLog := service.Hbyb1101(certNo, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, card_sn, certificates)
  136. fmt.Println(result)
  137. fmt.Println(inputLog)
  138. var dat map[string]interface{}
  139. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  140. } else {
  141. }
  142. var dat2 map[string]interface{}
  143. if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil {
  144. } else {
  145. }
  146. c.ServeSuccessJSON(map[string]interface{}{
  147. "pre": dat,
  148. "log": dat2,
  149. })
  150. }
  151. func (c *HBybController) PostTwo() {
  152. psnNo := c.GetString("psn_no")
  153. insutype := c.GetString("insutype")
  154. certNo := c.GetString("cert_no")
  155. org_name := c.GetString("org_name")
  156. doctor := c.GetString("doctor")
  157. ipt_otp_no := c.GetString("ipt_otp_no")
  158. dept := c.GetString("dept")
  159. fixmedins_code := c.GetString("fixmedins_code")
  160. opter := c.GetString("opter")
  161. dept_code := c.GetString("dept_code")
  162. doctor_id := c.GetString("doctor_id")
  163. doctor_name := c.GetString("doctor_name")
  164. insuplc_admdvs := c.GetString("insuplc_admdvs")
  165. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  166. secret_key := c.GetString("secret_key")
  167. id_card_type, _ := c.GetInt64("id_card_type")
  168. result, _ := service.Hbyb2201(psnNo, insutype, certNo, org_name, doctor, ipt_otp_no, dept, fixmedins_code, dept_code, doctor_id, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, opter, doctor_name)
  169. var dat map[string]interface{}
  170. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  171. //fmt.Println(dat["status"])
  172. } else {
  173. }
  174. c.ServeSuccessJSON(map[string]interface{}{
  175. "pre": dat,
  176. })
  177. }
  178. func (c *HBybController) PostThree() {
  179. psnNo := c.GetString("psn_no")
  180. mdtrtId := c.GetString("mdtrt_id")
  181. iptOtpNo := c.GetString("ipt_otp_no")
  182. org_name := c.GetString("org_name")
  183. doctor := c.GetString("doctor")
  184. insuplc_admdvs := c.GetString("insuplc_admdvs")
  185. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  186. secret_key := c.GetString("secret_key")
  187. fixmedins_code := c.GetString("fixmedins_code")
  188. result, requestLog := service.Hbyb2202(psnNo, mdtrtId, iptOtpNo, org_name, doctor, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code)
  189. var dat map[string]interface{}
  190. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  191. } else {
  192. }
  193. c.ServeSuccessJSON(map[string]interface{}{
  194. "pre": dat,
  195. "request_log": requestLog,
  196. })
  197. }
  198. func (c *HBybController) PostFour() {
  199. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  200. var respJSON map[string]interface{}
  201. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  202. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  203. return
  204. }
  205. userJSONBytes, _ := json.Marshal(respJSON["config"])
  206. var config []*models.HisXtDiagnoseConfig
  207. if err := json.Unmarshal(userJSONBytes, &config); err != nil {
  208. utils.ErrorLog("解析失败:%v", err)
  209. return
  210. }
  211. psnNo := respJSON["psn_no"].(string)
  212. mdtrtId := respJSON["mdtrt_id"].(string)
  213. opter := respJSON["opter"].(string)
  214. org_name := respJSON["org_name"].(string)
  215. med_type := respJSON["med_type"].(string)
  216. doctor_id := respJSON["doctor_id"].(string)
  217. doctor_name := respJSON["doctor_name"].(string)
  218. department := respJSON["department"].(string)
  219. fixmedins_code := respJSON["fixmedins_code"].(string)
  220. insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
  221. mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
  222. secret_key := respJSON["secret_key"].(string)
  223. sick_code := respJSON["sick_code"].(string)
  224. sick_name := respJSON["sick_name"].(string)
  225. dept := respJSON["dept"].(string)
  226. begin_time := respJSON["begin_time"].(string)
  227. result, request_log := service.Hbyb2203(psnNo, mdtrtId, dept, department, org_name, med_type, doctor_id, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_code, sick_name, dept, config, begin_time, doctor_name, opter)
  228. fmt.Println(request_log)
  229. var dat map[string]interface{}
  230. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  231. } else {
  232. }
  233. c.ServeSuccessJSON(map[string]interface{}{
  234. "pre": dat,
  235. })
  236. }
  237. type All struct {
  238. HisPrescription HisPrescription
  239. mdtrt_id string
  240. psn_no string
  241. }
  242. type HisPrescription struct {
  243. ID int64 `gorm:"column:id" json:"id" form:"id"`
  244. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  245. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  246. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  247. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  248. Status int64 `gorm:"column:status" json:"status" form:"status"`
  249. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  250. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  251. Number string `gorm:"column:number" json:"number" form:"number"`
  252. Type int64 `gorm:"column:type" json:"type" form:"type"`
  253. Doctor int64 `gorm:"column:doctor" json:"doctor" form:"doctor"`
  254. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  255. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  256. HisDoctorAdviceInfo []*models.HisDoctorAdviceInfo `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"advices"`
  257. HisPrescriptionProject []*models.HisPrescriptionProject `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"project"`
  258. }
  259. func (c *HBybController) PostFive() {
  260. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  261. var respJSON map[string]interface{}
  262. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  263. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  264. return
  265. }
  266. userJSONBytes, _ := json.Marshal(respJSON["pre"])
  267. var hp []*models.HisPrescription
  268. if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
  269. utils.ErrorLog("解析失败:%v", err)
  270. return
  271. }
  272. fmt.Println(respJSON["psn_no"].(string))
  273. fmt.Println(respJSON["mdtrt_id"].(string))
  274. fmt.Println(respJSON["chrg_bchno"].(string))
  275. fmt.Println(respJSON["org_name"].(string))
  276. fmt.Println(respJSON["doctor"].(string))
  277. fmt.Println(respJSON["doctor_id"].(string))
  278. fmt.Println(respJSON["dept"].(string))
  279. fmt.Println(respJSON["fixmedins_code"].(string))
  280. fmt.Println(respJSON["dept_code"].(string))
  281. fmt.Println(respJSON["insuplc_admdvs"].(string))
  282. fmt.Println(respJSON["mdtrtarea_admvs"].(string))
  283. fmt.Println(respJSON["secret_key"].(string))
  284. result, requestLog := service.Hbyb2204(respJSON["psn_no"].(string), respJSON["mdtrt_id"].(string), hp, respJSON["chrg_bchno"].(string), respJSON["org_name"].(string),
  285. respJSON["doctor"].(string), respJSON["dept"].(string), respJSON["fixmedins_code"].(string), respJSON["dept_code"].(string), respJSON["doctor_id"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string), respJSON["secret_key"].(string), respJSON["balance_accounts_type"].(string), respJSON["opter"].(string))
  286. var dat map[string]interface{}
  287. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  288. fmt.Println(dat)
  289. } else {
  290. fmt.Println(err)
  291. }
  292. var dat2 map[string]interface{}
  293. if err := json.Unmarshal([]byte(requestLog), &dat2); err == nil {
  294. fmt.Println(dat2)
  295. } else {
  296. fmt.Println(err)
  297. }
  298. c.ServeSuccessJSON(map[string]interface{}{
  299. "pre": dat,
  300. "request_log": requestLog,
  301. })
  302. }
  303. func (c *HBybController) PostSix() {
  304. psnNo := c.GetString("psn_no")
  305. mdtrtId := c.GetString("mdtrt_id")
  306. chrgBchno := c.GetString("chrg_bchno")
  307. org_name := c.GetString("org_name")
  308. doctor := c.GetString("doctor")
  309. insuplc_admdvs := c.GetString("insuplc_admdvs")
  310. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  311. secret_key := c.GetString("secret_key")
  312. fixmedins_code := c.GetString("fixmedins_code")
  313. result, requestlog := service.Hbyb2205(psnNo, mdtrtId, chrgBchno, org_name, doctor, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code)
  314. fmt.Println(requestlog)
  315. var dat map[string]interface{}
  316. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  317. fmt.Println(dat)
  318. } else {
  319. fmt.Println(err)
  320. }
  321. c.ServeSuccessJSON(map[string]interface{}{
  322. "pre": dat,
  323. })
  324. }
  325. func (c *HBybController) PostSeven() {
  326. psnNo := c.GetString("psn_no")
  327. mdtrtId := c.GetString("mdtrt_id")
  328. chrgBchno := c.GetString("chrg_bchno")
  329. certNo := c.GetString("cert_no")
  330. insutype := c.GetString("insutype")
  331. total := c.GetString("total")
  332. org_name := c.GetString("org_name")
  333. doctor := c.GetString("doctor")
  334. fixmedins_code := c.GetString("fixmedins_code")
  335. insuplc_admdvs := c.GetString("insuplc_admdvs")
  336. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  337. secret_key := c.GetString("secret_key")
  338. med_type := c.GetString("med_type")
  339. id_card_type, _ := c.GetInt64("id_card_type")
  340. certificates, _ := c.GetInt64("certificates")
  341. result, requestlog := service.Hbyb2206(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, 0, 0, 0, 0, certificates)
  342. fmt.Println(requestlog)
  343. var dat map[string]interface{}
  344. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  345. fmt.Println(dat)
  346. } else {
  347. fmt.Println(err)
  348. }
  349. c.ServeSuccessJSON(map[string]interface{}{
  350. "pre": dat,
  351. })
  352. }
  353. func (c *HBybController) PostEight() {
  354. psnNo := c.GetString("psn_no")
  355. mdtrtId := c.GetString("mdtrt_id")
  356. chrgBchno := c.GetString("chrg_bchno")
  357. certNo := c.GetString("cert_no")
  358. insutype := c.GetString("insutype")
  359. total := c.GetString("total")
  360. org_name := c.GetString("org_name")
  361. doctor := c.GetString("doctor")
  362. fixmedins_code := c.GetString("fixmedins_code")
  363. insuplc_admdvs := c.GetString("insuplc_admdvs")
  364. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  365. secret_key := c.GetString("secret_key")
  366. med_type := c.GetString("med_type")
  367. id_card_type, _ := c.GetInt64("id_card_type")
  368. certificates, _ := c.GetInt64("certificates")
  369. fulamt_ownpay_amt, _ := c.GetFloat("fulamt_ownpay_amt")
  370. overlmt_selfpay, _ := c.GetFloat("overlmt_selfpay")
  371. preselfpay_amt, _ := c.GetFloat("preselfpay_amt")
  372. inscp_scp_amt, _ := c.GetFloat("inscp_scp_amt")
  373. acct_used_flag, _ := c.GetInt64("acct_used_flag")
  374. result, srcRequest := service.Hbyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, certificates, acct_used_flag)
  375. var dat map[string]interface{}
  376. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  377. fmt.Println(dat)
  378. } else {
  379. fmt.Println(err)
  380. }
  381. var dat2 map[string]interface{}
  382. if err := json.Unmarshal([]byte(srcRequest), &dat2); err == nil {
  383. fmt.Println(dat2)
  384. } else {
  385. fmt.Println(err)
  386. }
  387. c.ServeSuccessJSON(map[string]interface{}{
  388. "pre": dat,
  389. "pre2": dat2,
  390. })
  391. }
  392. func (c *HBybController) PostNine() {
  393. psnNo := c.GetString("psn_no")
  394. mdtrtId := c.GetString("mdtrt_id")
  395. setlId := c.GetString("setl_id")
  396. org_name := c.GetString("org_name")
  397. doctor := c.GetString("doctor")
  398. secret_key := c.GetString("secret_key")
  399. fixmedins_code := c.GetString("fixmedins_code")
  400. insuplc_admdvs := c.GetString("insuplc_admdvs")
  401. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  402. result, src_request := service.Hbyb2208(psnNo, mdtrtId, setlId, org_name, doctor, secret_key, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
  403. fmt.Println(src_request)
  404. var dat map[string]interface{}
  405. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  406. fmt.Println(dat)
  407. } else {
  408. fmt.Println(err)
  409. }
  410. c.ServeSuccessJSON(map[string]interface{}{
  411. "pre": dat,
  412. })
  413. }
  414. func (c *HBybController) PostTen() {
  415. psnNo := c.GetString("psn_no")
  416. mdtrtId := c.GetString("mdtrt_id")
  417. setlId := c.GetString("setl_id")
  418. org_name := c.GetString("org_name")
  419. doctor := c.GetString("doctor")
  420. med_type := c.GetString("med_type")
  421. secret_key := c.GetString("secret_key")
  422. fixmedins_code := c.GetString("fixmedins_code")
  423. insuplc_admdvs := c.GetString("insuplc_admdvs")
  424. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  425. baseParams := models.BaseParams{
  426. SecretKey: secret_key,
  427. FixmedinsCode: fixmedins_code,
  428. InsuplcAdmdvs: insuplc_admdvs,
  429. MdtrtareaAdmvs: mdtrtarea_admvs,
  430. OrgName: org_name,
  431. Doctor: doctor,
  432. }
  433. businessParams := models.BusinessParams{
  434. PsnNo: psnNo,
  435. MdtrtId: mdtrtId,
  436. SetlId: setlId,
  437. }
  438. result := service.Hbyb5203(baseParams, businessParams, med_type)
  439. var dat map[string]interface{}
  440. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  441. fmt.Println(dat)
  442. } else {
  443. fmt.Println(err)
  444. }
  445. c.ServeSuccessJSON(map[string]interface{}{
  446. "pre": dat,
  447. })
  448. }