VerifyTemplate.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. package controllers
  2. import (
  3. "ColdVerify_server/conf"
  4. "ColdVerify_server/lib"
  5. "ColdVerify_server/models/System"
  6. "ColdVerify_server/models/Task"
  7. "ColdVerify_server/models/VerifyTemplate"
  8. "encoding/json"
  9. beego "github.com/beego/beego/v2/server/web"
  10. "math"
  11. )
  12. type VerifyTemplateController struct {
  13. beego.Controller
  14. }
  15. // 列表 -
  16. func (c *VerifyTemplateController) List() {
  17. // 验证登录 User_is, User_r
  18. _, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  19. if !User_is {
  20. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  21. c.ServeJSON()
  22. return
  23. }
  24. var r_jsons lib.R_JSONS
  25. page, _ := c.GetInt("page")
  26. if page < 1 {
  27. page = 1
  28. }
  29. page_z, _ := c.GetInt("page_z")
  30. if page_z < 1 {
  31. page_z = conf.Page_size
  32. }
  33. T_name := c.GetString("T_name")
  34. var cnt int64
  35. List, cnt := VerifyTemplate.Read_VerifyTemplate_List(T_name, page, page_z)
  36. page_size := math.Ceil(float64(cnt) / float64(page_z))
  37. r_jsons.List = List
  38. r_jsons.Page = page
  39. r_jsons.Page_size = int(page_size)
  40. r_jsons.Pages = lib.Func_page(int64(page), int64(page_size))
  41. r_jsons.Num = int(cnt)
  42. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  43. c.ServeJSON()
  44. return
  45. }
  46. // 添加-
  47. func (c *VerifyTemplateController) Add() {
  48. // 验证登录 User_is, User_r
  49. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  50. if !User_is {
  51. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  52. c.ServeJSON()
  53. return
  54. }
  55. T_name := c.GetString("T_name")
  56. T_sort, _ := c.GetInt("T_sort")
  57. var_ := VerifyTemplate.VerifyTemplate{
  58. T_name: T_name,
  59. T_sort: T_sort,
  60. }
  61. Id, is := VerifyTemplate.Add_VerifyTemplate(var_)
  62. if !is {
  63. c.Data["json"] = lib.JSONS{Code: 202, Msg: "添加失败!"}
  64. c.ServeJSON()
  65. return
  66. }
  67. System.Add_UserLogs_T(User_r.T_uuid, "验证模板", "添加", var_)
  68. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Id}
  69. c.ServeJSON()
  70. return
  71. }
  72. // 修改-
  73. func (c *VerifyTemplateController) Up() {
  74. // 验证登录 User_is, User_r
  75. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  76. if !User_is {
  77. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  78. c.ServeJSON()
  79. return
  80. }
  81. T_name := c.GetString("T_name")
  82. T_sort, T_sort_err := c.GetInt("T_sort")
  83. T_VerifyTemplate_id := c.GetString("T_VerifyTemplate_id")
  84. r, is := VerifyTemplate.Read_VerifyTemplate(T_VerifyTemplate_id)
  85. if !is {
  86. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  87. c.ServeJSON()
  88. return
  89. }
  90. // .......
  91. if len(T_name) > 0 {
  92. r.T_name = T_name
  93. }
  94. if T_sort_err == nil {
  95. r.T_sort = T_sort
  96. }
  97. // .......
  98. if !VerifyTemplate.Update_VerifyTemplate(r, "T_name", "T_sort") {
  99. c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败!"}
  100. c.ServeJSON()
  101. return
  102. }
  103. System.Add_UserLogs_T(User_r.T_uuid, "验证模板", "修改", r)
  104. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  105. c.ServeJSON()
  106. return
  107. }
  108. // 删除-
  109. func (c *VerifyTemplateController) Del() {
  110. // 验证登录 User_is, User_r
  111. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  112. if !User_is {
  113. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  114. c.ServeJSON()
  115. return
  116. }
  117. T_VerifyTemplate_id := c.GetString("T_VerifyTemplate_id")
  118. if r, is := VerifyTemplate.Read_VerifyTemplate(T_VerifyTemplate_id); is {
  119. if !VerifyTemplate.Delete_VerifyTemplate(r) {
  120. c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
  121. c.ServeJSON()
  122. return
  123. }
  124. System.Add_UserLogs_T(User_r.T_uuid, "验证模板", "删除", r)
  125. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  126. c.ServeJSON()
  127. return
  128. }
  129. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  130. c.ServeJSON()
  131. return
  132. }
  133. /// -----------------------------------------------------------------------------
  134. // 标签列表 -
  135. func (c *VerifyTemplateController) Map_List() {
  136. // 验证登录 User_is, User_r
  137. _, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  138. if !User_is {
  139. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  140. c.ServeJSON()
  141. return
  142. }
  143. var r_jsons lib.R_JSONS
  144. page, _ := c.GetInt("page")
  145. if page < 1 {
  146. page = 1
  147. }
  148. page_z, _ := c.GetInt("page_z")
  149. if page_z < 1 {
  150. page_z = conf.Page_size
  151. }
  152. T_VerifyTemplate_id := c.GetString("T_VerifyTemplate_id")
  153. var cnt int64
  154. List, cnt := VerifyTemplate.Read_VerifyTemplateMap_List(T_VerifyTemplate_id, page, page_z)
  155. page_size := math.Ceil(float64(cnt) / float64(page_z))
  156. r_jsons.List = List
  157. r_jsons.Page = page
  158. r_jsons.Page_size = int(page_size)
  159. r_jsons.Pages = lib.Func_page(int64(page), int64(page_size))
  160. r_jsons.Num = int(cnt)
  161. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  162. c.ServeJSON()
  163. return
  164. }
  165. // 标签添加-
  166. func (c *VerifyTemplateController) Map_Add() {
  167. // 验证登录 User_is, User_r
  168. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  169. if !User_is {
  170. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  171. c.ServeJSON()
  172. return
  173. }
  174. T_VerifyTemplate_id := c.GetString("T_VerifyTemplate_id")
  175. T_name := c.GetString("T_name")
  176. T_field := c.GetString("T_field")
  177. T_text := c.GetString("T_text")
  178. T_label, _ := c.GetInt("T_label")
  179. T_source, _ := c.GetInt("T_source")
  180. T_sort, _ := c.GetInt("T_sort")
  181. var_ := VerifyTemplate.VerifyTemplateMap{
  182. T_VerifyTemplate_id: T_VerifyTemplate_id,
  183. T_name: T_name,
  184. T_field: T_field,
  185. T_text: T_text,
  186. T_label: T_label,
  187. T_source: T_source,
  188. T_sort: T_sort,
  189. }
  190. Id, is := VerifyTemplate.Add_VerifyTemplateMap(var_)
  191. if !is {
  192. c.Data["json"] = lib.JSONS{Code: 202, Msg: "添加失败!"}
  193. c.ServeJSON()
  194. return
  195. }
  196. System.Add_UserLogs_T(User_r.T_uuid, "验证模板标签", "添加", var_)
  197. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Id}
  198. c.ServeJSON()
  199. return
  200. }
  201. // 标签修改-
  202. func (c *VerifyTemplateController) Map_Up() {
  203. // 验证登录 User_is, User_r
  204. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  205. if !User_is {
  206. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  207. c.ServeJSON()
  208. return
  209. }
  210. T_name := c.GetString("T_name")
  211. T_field := c.GetString("T_field")
  212. T_text := c.GetString("T_text")
  213. T_label, T_label_err := c.GetInt("T_label")
  214. T_sort, T_sort_err := c.GetInt("T_sort")
  215. T_source, T_source_err := c.GetInt("T_source")
  216. T_id := c.GetString("T_id")
  217. r, is := VerifyTemplate.Read_VerifyTemplateMap(T_id)
  218. if !is {
  219. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  220. c.ServeJSON()
  221. return
  222. }
  223. // .......
  224. if len(T_name) > 0 {
  225. r.T_name = T_name
  226. }
  227. if len(T_field) > 0 {
  228. r.T_field = T_field
  229. }
  230. if len(T_text) > 0 {
  231. r.T_text = T_text
  232. }
  233. if T_label_err == nil {
  234. r.T_label = T_label
  235. }
  236. if T_sort_err == nil {
  237. r.T_sort = T_sort
  238. }
  239. if T_source_err == nil {
  240. r.T_source = T_source
  241. }
  242. // .......
  243. if !VerifyTemplate.Update_VerifyTemplateMap(r, "T_name", "T_label", "T_text", "T_field", "T_sort", "T_source") {
  244. c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败!"}
  245. c.ServeJSON()
  246. return
  247. }
  248. System.Add_UserLogs_T(User_r.T_uuid, "验证模板标签", "修改", r)
  249. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  250. c.ServeJSON()
  251. return
  252. }
  253. // 标签删除-
  254. func (c *VerifyTemplateController) Map_Del() {
  255. // 验证登录 User_is, User_r
  256. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  257. if !User_is {
  258. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  259. c.ServeJSON()
  260. return
  261. }
  262. T_id := c.GetString("T_id")
  263. if r, is := VerifyTemplate.Read_VerifyTemplateMap(T_id); is {
  264. if !VerifyTemplate.Delete_VerifyTemplateMap(r) {
  265. c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
  266. c.ServeJSON()
  267. return
  268. }
  269. System.Add_UserLogs_T(User_r.T_uuid, "验证模板标签", "删除", r)
  270. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  271. c.ServeJSON()
  272. return
  273. }
  274. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  275. c.ServeJSON()
  276. return
  277. }
  278. /// -----------------------------------------------------------------------------
  279. // 标签数据列表 -
  280. func (c *VerifyTemplateController) Map_Data_List() {
  281. //验证登录 User_is, User_r
  282. _, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  283. if !User_is {
  284. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  285. c.ServeJSON()
  286. return
  287. }
  288. T_VerifyTemplate_id := c.GetString("T_VerifyTemplate_id")
  289. T_source, T_source_err := c.GetInt("T_source")
  290. if T_source_err != nil || T_source == 0 {
  291. c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_source 错误!"}
  292. c.ServeJSON()
  293. return
  294. }
  295. T_task_id := c.GetString("T_task_id")
  296. _, is := Task.Read_Task(T_task_id)
  297. if !is {
  298. c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
  299. c.ServeJSON()
  300. return
  301. }
  302. Map_List := VerifyTemplate.Read_VerifyTemplateMap_List_For_Data(T_VerifyTemplate_id, T_source)
  303. Data := VerifyTemplate.Read_VerifyTemplateMapData_List(T_source, T_task_id, T_VerifyTemplate_id, Map_List)
  304. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Data}
  305. c.ServeJSON()
  306. return
  307. }
  308. // 添加标签数据
  309. func (c *VerifyTemplateController) Map_Data_Pu() {
  310. //验证登录 User_is, User_r
  311. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  312. if !User_is {
  313. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  314. c.ServeJSON()
  315. return
  316. }
  317. type RequestBody struct {
  318. T_source int
  319. T_task_id string
  320. T_VerifyTemplate_id string
  321. VerifyTemplateMapData []VerifyTemplate.VerifyTemplateMapData_R
  322. }
  323. var body RequestBody
  324. data := c.Ctx.Input.RequestBody
  325. err := json.Unmarshal(data, &body)
  326. if err != nil {
  327. c.Data["json"] = lib.JSONS{Code: 202, Msg: "json.Unmarshal is err:" + err.Error()}
  328. c.ServeJSON()
  329. }
  330. _, is := Task.Read_Task(body.T_task_id)
  331. if !is {
  332. c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
  333. c.ServeJSON()
  334. return
  335. }
  336. MapDataList := make([]VerifyTemplate.VerifyTemplateMapData, 0)
  337. for _, v := range body.VerifyTemplateMapData {
  338. if len(v.T_value) == 0 {
  339. continue
  340. }
  341. val := VerifyTemplate.VerifyTemplateMapData{
  342. T_source: body.T_source,
  343. T_task_id: body.T_task_id,
  344. T_VerifyTemplate_id: body.T_VerifyTemplate_id,
  345. T_VerifyTemplateMap_id: v.T_VerifyTemplateMap_id,
  346. T_value: v.T_value,
  347. }
  348. MapDataList = append(MapDataList, val)
  349. }
  350. ids, is := VerifyTemplate.AddOrUpdate_VerifyTemplateMapData(MapDataList)
  351. if !is {
  352. c.Data["json"] = lib.JSONS{Code: 202, Msg: "保存失败"}
  353. c.ServeJSON()
  354. return
  355. }
  356. System.Add_UserLogs_T(User_r.T_uuid, "验证模版标签数据", "保存", body)
  357. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: ids}
  358. c.ServeJSON()
  359. return
  360. }
  361. /// -----------------------------------------------------------------------------
  362. // 标签列表 -
  363. func (c *VerifyTemplateController) Time_List() {
  364. // 验证登录 User_is, User_r
  365. _, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  366. if !User_is {
  367. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  368. c.ServeJSON()
  369. return
  370. }
  371. var r_jsons lib.R_JSONS
  372. page, _ := c.GetInt("page")
  373. if page < 1 {
  374. page = 1
  375. }
  376. page_z, _ := c.GetInt("page_z")
  377. if page_z < 1 {
  378. page_z = conf.Page_size
  379. }
  380. T_VerifyTemplateMap_id := c.GetString("T_VerifyTemplateMap_id")
  381. r, is := VerifyTemplate.Read_VerifyTemplateMap(T_VerifyTemplateMap_id)
  382. if !is {
  383. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  384. c.ServeJSON()
  385. return
  386. }
  387. var cnt int64
  388. List, cnt := VerifyTemplate.Read_VerifyTemplateTime_List(T_VerifyTemplateMap_id, r, page, page_z)
  389. page_size := math.Ceil(float64(cnt) / float64(page_z))
  390. r_jsons.List = List
  391. r_jsons.Page = page
  392. r_jsons.Page_size = int(page_size)
  393. r_jsons.Pages = lib.Func_page(int64(page), int64(page_size))
  394. r_jsons.Num = int(cnt)
  395. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  396. c.ServeJSON()
  397. return
  398. }
  399. // 标签添加-
  400. func (c *VerifyTemplateController) Time_Add() {
  401. // 验证登录 User_is, User_r
  402. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  403. if !User_is {
  404. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  405. c.ServeJSON()
  406. return
  407. }
  408. T_VerifyTemplateMap_id := c.GetString("T_VerifyTemplateMap_id")
  409. T_tag := c.GetString("T_tag")
  410. T_step_name := c.GetString("T_step_name")
  411. T_min_time, _ := c.GetInt("T_min_time")
  412. T_max_time, _ := c.GetInt("T_max_time")
  413. T_text := c.GetString("T_text")
  414. T_sort, _ := c.GetInt("T_sort")
  415. var_ := VerifyTemplate.VerifyTemplateTime{
  416. T_VerifyTemplateMap_id: T_VerifyTemplateMap_id,
  417. T_tag: T_tag,
  418. T_step_name: T_step_name,
  419. T_min_time: T_min_time,
  420. T_max_time: T_max_time,
  421. T_text: T_text,
  422. T_sort: T_sort,
  423. }
  424. Id, is := VerifyTemplate.Add_VerifyTemplateTime(var_)
  425. if !is {
  426. c.Data["json"] = lib.JSONS{Code: 202, Msg: "添加失败!"}
  427. c.ServeJSON()
  428. return
  429. }
  430. System.Add_UserLogs_T(User_r.T_uuid, "验证模板标签-时间流程", "添加", var_)
  431. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Id}
  432. c.ServeJSON()
  433. return
  434. }
  435. // 标签修改-
  436. func (c *VerifyTemplateController) Time_Up() {
  437. // 验证登录 User_is, User_r
  438. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  439. if !User_is {
  440. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  441. c.ServeJSON()
  442. return
  443. }
  444. //T_VerifyTemplateMap_id := c.GetString("T_VerifyTemplateMap_id")
  445. T_tag := c.GetString("T_tag")
  446. T_step_name := c.GetString("T_step_name")
  447. T_min_time, T_min_time_err := c.GetInt("T_min_time")
  448. T_max_time, T_max_time_err := c.GetInt("T_max_time")
  449. T_text := c.GetString("T_text")
  450. T_sort, T_sort_err := c.GetInt("T_sort")
  451. T_id := c.GetString("T_id")
  452. r, is := VerifyTemplate.Read_VerifyTemplateTime(T_id)
  453. if !is {
  454. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  455. c.ServeJSON()
  456. return
  457. }
  458. if len(T_tag) > 0 {
  459. r.T_tag = T_tag
  460. }
  461. if len(T_step_name) > 0 {
  462. r.T_step_name = T_step_name
  463. }
  464. if len(T_text) > 0 {
  465. r.T_text = T_text
  466. }
  467. if T_min_time_err == nil {
  468. r.T_min_time = T_min_time
  469. }
  470. if T_max_time_err == nil {
  471. r.T_max_time = T_max_time
  472. }
  473. if len(T_text) > 0 {
  474. r.T_text = T_text
  475. }
  476. if T_sort_err == nil {
  477. r.T_sort = T_sort
  478. }
  479. if !VerifyTemplate.Update_VerifyTemplateTime(r, "T_tag", "T_step_name", "T_min_time", "T_max_time", "T_text", "T_sort") {
  480. c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败!"}
  481. c.ServeJSON()
  482. return
  483. }
  484. System.Add_UserLogs_T(User_r.T_uuid, "验证模板标签-时间流程", "修改", r)
  485. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  486. c.ServeJSON()
  487. return
  488. }
  489. // 标签删除-
  490. func (c *VerifyTemplateController) Time_Del() {
  491. // 验证登录 User_is, User_r
  492. User_r, User_is := lib.Verification_Admin(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  493. if !User_is {
  494. c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登录!"}
  495. c.ServeJSON()
  496. return
  497. }
  498. T_id := c.GetString("T_id")
  499. if r, is := VerifyTemplate.Read_VerifyTemplateTime(T_id); is {
  500. if !VerifyTemplate.Delete_VerifyTemplateTime(r) {
  501. c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
  502. c.ServeJSON()
  503. return
  504. }
  505. System.Add_UserLogs_T(User_r.T_uuid, "验证模板标签-时间流程", "删除", r)
  506. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  507. c.ServeJSON()
  508. return
  509. }
  510. c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id 错误!"}
  511. c.ServeJSON()
  512. return
  513. }