custom_api_controller.go 35KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141
  1. package admin_api_controllers
  2. import (
  3. "XT_Admin_Api/enums"
  4. "XT_Admin_Api/models"
  5. "XT_Admin_Api/service"
  6. "fmt"
  7. "time"
  8. )
  9. type CustomAPIController struct {
  10. AdminBaseAPIAuthController
  11. }
  12. func (this *CustomAPIController) CheckCustom() {
  13. id, _ := this.GetInt64("id")
  14. ci, _ := service.FindCustomInfoByIDTwo(id)
  15. if ci.ID == 0 {
  16. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  17. return
  18. }
  19. ci.IsCheck = 1
  20. ci.CheckPerson = this.GetAdminInfo().Name
  21. err := service.SaveCustomTwo(ci)
  22. if err != nil {
  23. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  24. return
  25. }
  26. this.ServeSuccessJSON(map[string]interface{}{
  27. "msg": "审核成功",
  28. })
  29. }
  30. func (this *CustomAPIController) CreateCustom() {
  31. name := this.GetString("name")
  32. //xtOrgID := this.GetString("xt_org_id")
  33. customType, _ := this.GetInt64("custom_type")
  34. salesperson := this.GetString("salesperson")
  35. signTime := this.GetString("sign_time")
  36. contractPrice := this.GetString("contract_price")
  37. softwarePrice := this.GetString("software_price")
  38. hardwarePrice := this.GetString("hardware_price")
  39. yearCostPrice := this.GetString("year_cost_price")
  40. address := this.GetString("address")
  41. isImplement, _ := this.GetInt64("is_implement")
  42. lisStatus, _ := this.GetInt64("lis_status")
  43. lisContact := this.GetString("lis_contact")
  44. lisTime := this.GetString("lis_time")
  45. lisRemark := this.GetString("lis_remark")
  46. qcStatus, _ := this.GetInt64("qc_status")
  47. ybStatus, _ := this.GetInt64("yb_status")
  48. remark := this.GetString("remark")
  49. weightScaleStatus, _ := this.GetInt64("weight_scale_status")
  50. weightScaleBrand := this.GetString("weight_scale_brand")
  51. weightScaleRemark := this.GetString("weight_scale_remark")
  52. sphygmomanometerStatus, _ := this.GetInt64("sphygmomanometer_status")
  53. sphygmomanometerBrand := this.GetString("sphygmomanometer_brand")
  54. sphygmomanometerRemark := this.GetString("sphygmomanometer_remark")
  55. scannerStatus, _ := this.GetInt64("scanner_status")
  56. scannerBrand := this.GetString("scanner_brand")
  57. scannerRemark := this.GetString("scanner_remark")
  58. facialRecognitionDeviceStatus, _ := this.GetInt64("facial_recognition_device_status")
  59. facialRecognitionDeviceBrand := this.GetString("facial_recognition_device_brand")
  60. facialRecognitionDeviceRemark := this.GetString("facial_recognition_device_remark")
  61. printerStatus, _ := this.GetInt64("printer_status")
  62. printerBrand := this.GetString("printer_brand")
  63. printerRemark := this.GetString("printer_remark")
  64. hardwareRemark := this.GetString("hardware_remark")
  65. implement_time := this.GetString("implement_time")
  66. implement_person := this.GetString("implement_person")
  67. implement_remark := this.GetString("implement_remark")
  68. yb_time := this.GetString("yb_time")
  69. yb_person := this.GetString("yb_person")
  70. yb_remark := this.GetString("yb_remark")
  71. qc_time := this.GetString("qc_time")
  72. qc_person := this.GetString("qc_person")
  73. qc_remark := this.GetString("qc_remark")
  74. client_remark := this.GetString("client_remark")
  75. topline_time := this.GetString("topline_time")
  76. sign_end_time := this.GetString("sign_end_time")
  77. kyyChargeCustom := &models.KyyChargeCustom{
  78. ImplementTime: implement_time,
  79. ImplementPerson: implement_person,
  80. ImplementRemark: implement_remark,
  81. YbTime: yb_time,
  82. YbRemark: yb_remark,
  83. YbPerson: yb_person,
  84. QcTime: qc_time,
  85. QcPerson: qc_person,
  86. QcRemark: qc_remark,
  87. Name: name,
  88. Status: 1,
  89. Ctime: time.Now().Unix(),
  90. Mtime: time.Now().Unix(),
  91. Creator: 0,
  92. Modifier: 0,
  93. CustomType: customType,
  94. Salesperson: salesperson,
  95. SignTime: signTime,
  96. ContractPrice: contractPrice,
  97. SoftwarePrice: softwarePrice,
  98. HardwarePrice: hardwarePrice,
  99. YearCostPrice: yearCostPrice,
  100. Address: address,
  101. IsImplement: isImplement,
  102. LisStatus: lisStatus,
  103. LisContact: lisContact,
  104. LisTime: lisTime,
  105. LisRemark: lisRemark,
  106. QcStatus: qcStatus,
  107. YbStatus: ybStatus,
  108. Remark: remark,
  109. WeightScaleStatus: weightScaleStatus,
  110. WeightScaleBrand: weightScaleBrand,
  111. WeightScaleRemark: weightScaleRemark,
  112. SphygmomanometerStatus: sphygmomanometerStatus,
  113. SphygmomanometerBrand: sphygmomanometerBrand,
  114. SphygmomanometerRemark: sphygmomanometerRemark,
  115. ScannerStatus: scannerStatus,
  116. ScannerBrand: scannerBrand,
  117. ScannerRemark: scannerRemark,
  118. FacialRecognitionDeviceStatus: facialRecognitionDeviceStatus,
  119. FacialRecognitionDeviceBrand: facialRecognitionDeviceBrand,
  120. FacialRecognitionDeviceRemark: facialRecognitionDeviceRemark,
  121. PrinterStatus: printerStatus,
  122. PrinterBrand: printerBrand,
  123. PrinterRemark: printerRemark,
  124. HardwareRemark: hardwareRemark,
  125. ClientRemark: client_remark,
  126. ToplineTime: topline_time,
  127. SignEndTime: sign_end_time,
  128. }
  129. //custom, _ := service.FindCustomInfo(xtOrgID)
  130. //if custom.ID > 0 {
  131. // this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNameException)
  132. // return
  133. //}
  134. err := service.CreateCustom(kyyChargeCustom)
  135. if err == nil {
  136. this.ServeSuccessJSON(map[string]interface{}{
  137. "custom": kyyChargeCustom,
  138. })
  139. }
  140. }
  141. func (this *CustomAPIController) GetCustomList() {
  142. types, _ := this.GetInt64("type")
  143. list, _ := service.GetAllCustoms(types)
  144. this.ServeSuccessJSON(map[string]interface{}{
  145. "list": list,
  146. })
  147. }
  148. // func (this *CustomAPIController) DeleteAdmin() {
  149. // id, _ := this.GetInt64("id")
  150. // err := service.DeleteAdmin(id)
  151. // if err == nil {
  152. // this.ServeSuccessJSON(map[string]interface{}{
  153. // "msg": "删除成功",
  154. // })
  155. // }
  156. // }
  157. func (this *CustomAPIController) ModifyCustom() {
  158. id, _ := this.GetInt64("id")
  159. module, _ := this.GetInt64("module")
  160. custom, _ := service.FindCustomInfoByIDTwo(id)
  161. switch module {
  162. case 1: //编辑基本信息
  163. name := this.GetString("name")
  164. customType, _ := this.GetInt64("custom_type")
  165. salesperson := this.GetString("salesperson")
  166. signTime := this.GetString("sign_time")
  167. sign_end_time := this.GetString("sign_end_time")
  168. contractPrice := this.GetString("contract_price")
  169. softwarePrice := this.GetString("software_price")
  170. hardwarePrice := this.GetString("hardware_price")
  171. yearCostPrice := this.GetString("year_cost_price")
  172. address := this.GetString("address")
  173. client_remark := this.GetString("client_remark")
  174. topline_time := this.GetString("topline_time")
  175. custom.CustomType = customType
  176. custom.Salesperson = salesperson
  177. custom.SignEndTime = sign_end_time
  178. custom.SignTime = signTime
  179. custom.ContractPrice = contractPrice
  180. custom.SoftwarePrice = softwarePrice
  181. custom.HardwarePrice = hardwarePrice
  182. custom.YearCostPrice = yearCostPrice
  183. custom.Address = address
  184. custom.Name = name
  185. custom.ID = id
  186. custom.Mtime = time.Now().Unix()
  187. custom.ClientRemark = client_remark
  188. custom.ToplineTime = topline_time
  189. err := service.UpdateCustomTwo(custom)
  190. if err != nil {
  191. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  192. return
  193. }
  194. this.ServeSuccessJSON(map[string]interface{}{
  195. "msg": "修改成功",
  196. })
  197. break
  198. case 2: //编辑实施信息
  199. isImplement, _ := this.GetInt64("is_implement")
  200. implementTime := this.GetString("implement_time")
  201. implementPerson := this.GetString("implement_person")
  202. implementRemark := this.GetString("implement_remark")
  203. custom.IsImplement = isImplement
  204. custom.ImplementTime = implementTime
  205. custom.ImplementPerson = implementPerson
  206. custom.ImplementRemark = implementRemark
  207. custom.ID = id
  208. custom.Mtime = time.Now().Unix()
  209. err := service.UpdateCustomTwo(custom)
  210. if err != nil {
  211. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  212. return
  213. }
  214. this.ServeSuccessJSON(map[string]interface{}{
  215. "msg": "修改成功",
  216. })
  217. break
  218. case 3: //编辑LIS对接
  219. lisStatus, _ := this.GetInt64("lis_status")
  220. lisContact := this.GetString("lis_contact")
  221. lisTime := this.GetString("lis_time")
  222. lisRemark := this.GetString("lis_remark")
  223. custom.LisStatus = lisStatus
  224. custom.LisTime = lisTime
  225. custom.LisRemark = lisRemark
  226. custom.LisContact = lisContact
  227. custom.ID = id
  228. custom.Mtime = time.Now().Unix()
  229. err := service.UpdateCustomTwo(custom)
  230. if err != nil {
  231. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  232. return
  233. }
  234. this.ServeSuccessJSON(map[string]interface{}{
  235. "msg": "修改成功",
  236. })
  237. break
  238. case 4: //编辑医保对接
  239. ybStatus, _ := this.GetInt64("yb_status")
  240. ybPerson := this.GetString("yb_person")
  241. ybTime := this.GetString("yb_time")
  242. ybRemark := this.GetString("yb_remark")
  243. custom.YbStatus = ybStatus
  244. custom.YbPerson = ybPerson
  245. custom.YbTime = ybTime
  246. custom.YbRemark = ybRemark
  247. custom.ID = id
  248. custom.Mtime = time.Now().Unix()
  249. err := service.UpdateCustomTwo(custom)
  250. if err != nil {
  251. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  252. return
  253. }
  254. this.ServeSuccessJSON(map[string]interface{}{
  255. "msg": "修改成功",
  256. })
  257. break
  258. case 5: //编辑质控对接
  259. qcStatus, _ := this.GetInt64("qc_status")
  260. qcPerson := this.GetString("qc_person")
  261. qcTime := this.GetString("qc_time")
  262. qcRemark := this.GetString("qc_remark")
  263. custom.QcStatus = qcStatus
  264. custom.QcPerson = qcPerson
  265. custom.QcTime = qcTime
  266. custom.QcRemark = qcRemark
  267. custom.ID = id
  268. custom.Mtime = time.Now().Unix()
  269. err := service.UpdateCustomTwo(custom)
  270. if err != nil {
  271. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  272. return
  273. }
  274. this.ServeSuccessJSON(map[string]interface{}{
  275. "msg": "修改成功",
  276. })
  277. break
  278. case 6: //编辑备注
  279. remark := this.GetString("remark")
  280. custom.Remark = remark
  281. custom.ID = id
  282. custom.Mtime = time.Now().Unix()
  283. err := service.UpdateCustomTwo(custom)
  284. if err != nil {
  285. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  286. return
  287. }
  288. this.ServeSuccessJSON(map[string]interface{}{
  289. "msg": "修改成功",
  290. })
  291. break
  292. case 7: //编辑硬件信息
  293. weightScaleStatus, _ := this.GetInt64("weight_scale_status")
  294. weightScaleBrand := this.GetString("weight_scale_brand")
  295. weightScaleRemark := this.GetString("weight_scale_remark")
  296. sphygmomanometerStatus, _ := this.GetInt64("sphygmomanometer_status")
  297. sphygmomanometerBrand := this.GetString("sphygmomanometer_brand")
  298. sphygmomanometerRemark := this.GetString("sphygmomanometer_remark")
  299. scannerStatus, _ := this.GetInt64("scanner_status")
  300. scannerBrand := this.GetString("scanner_brand")
  301. scannerRemark := this.GetString("scanner_remark")
  302. facialRecognitionDeviceStatus, _ := this.GetInt64("facial_recognition_device_status")
  303. facialRecognitionDeviceBrand := this.GetString("facial_recognition_device_brand")
  304. facialRecognitionDeviceRemark := this.GetString("facial_recognition_device_remark")
  305. printerStatus, _ := this.GetInt64("printer_status")
  306. printerBrand := this.GetString("printer_brand")
  307. printerRemark := this.GetString("printer_remark")
  308. hardwareRemark := this.GetString("hardware_remark")
  309. custom.WeightScaleStatus = weightScaleStatus
  310. custom.WeightScaleBrand = weightScaleBrand
  311. custom.WeightScaleRemark = weightScaleRemark
  312. custom.SphygmomanometerStatus = sphygmomanometerStatus
  313. custom.SphygmomanometerBrand = sphygmomanometerBrand
  314. custom.SphygmomanometerRemark = sphygmomanometerRemark
  315. custom.ScannerStatus = scannerStatus
  316. custom.ScannerBrand = scannerBrand
  317. custom.ScannerRemark = scannerRemark
  318. custom.FacialRecognitionDeviceStatus = facialRecognitionDeviceStatus
  319. custom.FacialRecognitionDeviceBrand = facialRecognitionDeviceBrand
  320. custom.FacialRecognitionDeviceRemark = facialRecognitionDeviceRemark
  321. custom.PrinterStatus = printerStatus
  322. custom.PrinterBrand = printerBrand
  323. custom.PrinterRemark = printerRemark
  324. custom.HardwareRemark = hardwareRemark
  325. custom.ID = id
  326. custom.Mtime = time.Now().Unix()
  327. err := service.UpdateCustomTwo(custom)
  328. if err != nil {
  329. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  330. return
  331. }
  332. this.ServeSuccessJSON(map[string]interface{}{
  333. "msg": "修改成功",
  334. })
  335. break
  336. }
  337. }
  338. func (this *CustomAPIController) GetCustom() {
  339. id, _ := this.GetInt64("id")
  340. custom, _ := service.FindCustomInfoByID(id)
  341. if custom.ID == 0 {
  342. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  343. return
  344. }
  345. this.ServeSuccessJSON(map[string]interface{}{
  346. "custom": custom,
  347. })
  348. }
  349. func (this *CustomAPIController) CreatePaymentCollection() {
  350. customID, _ := this.GetInt64("custom_id")
  351. customName := this.GetString("custom_name")
  352. paymentCollectionType, _ := this.GetInt64("payment_collection_type")
  353. paymentCollectionSumAmt := this.GetString("payment_collection_sumamt")
  354. softwareSumAmt := this.GetString("software_sumamt")
  355. hardwareSumAmt := this.GetString("hardware_sumamt")
  356. paymentCollectionDate := this.GetString("payment_collection_date")
  357. paymentCollectionRole := this.GetString("payment_collection_role")
  358. url := this.GetString("url")
  359. remark := this.GetString("remark")
  360. ctime := time.Now().Unix()
  361. mtime := time.Now().Unix()
  362. // 创建 KyyChargePaymentCollection 对象,并设置每个字段的值
  363. paymentCollection := models.KyyChargePaymentCollection{
  364. CustomId: customID,
  365. CustomName: customName,
  366. PaymentCollectionType: paymentCollectionType,
  367. PaymentCollectionSumamt: paymentCollectionSumAmt,
  368. SoftwareSumamt: softwareSumAmt,
  369. HardwareSumamt: hardwareSumAmt,
  370. PaymentCollectionDate: paymentCollectionDate,
  371. PaymentCollectionRole: paymentCollectionRole,
  372. Url: url,
  373. Remark: remark,
  374. Ctime: ctime,
  375. Mtime: mtime,
  376. Creator: 0,
  377. Modifier: 0,
  378. Status: 1,
  379. }
  380. err := service.CreateChargePaymentCollection(&paymentCollection)
  381. if err != nil {
  382. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  383. return
  384. }
  385. this.ServeSuccessJSON(map[string]interface{}{
  386. "paymentCollection": paymentCollection,
  387. })
  388. }
  389. func (this *CustomAPIController) GetPaymentCollectionList() {
  390. list, _ := service.GetAllPaymentCollections()
  391. this.ServeSuccessJSON(map[string]interface{}{
  392. "list": list,
  393. })
  394. }
  395. func (this *CustomAPIController) GetPaymentCollection() {
  396. id, _ := this.GetInt64("id")
  397. pc, _ := service.FindPaymentCollectionInfo(id)
  398. if pc.ID == 0 {
  399. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  400. return
  401. }
  402. this.ServeSuccessJSON(map[string]interface{}{
  403. "pc": pc,
  404. })
  405. }
  406. func (this *CustomAPIController) EditPaymentCollection() {
  407. id, _ := this.GetInt64("id")
  408. paymentCollectionType, _ := this.GetInt64("payment_collection_type")
  409. paymentCollectionSumAmt := this.GetString("payment_collection_sumamt")
  410. softwareSumAmt := this.GetString("software_sumamt")
  411. hardwareSumAmt := this.GetString("hardware_sumamt")
  412. paymentCollectionDate := this.GetString("payment_collection_date")
  413. paymentCollectionRole := this.GetString("payment_collection_role")
  414. url := this.GetString("url")
  415. remark := this.GetString("remark")
  416. mtime := time.Now().Unix()
  417. cpc, _ := service.FindPaymentCollectionInfo(id)
  418. if cpc.ID == 0 {
  419. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  420. return
  421. }
  422. cpc.PaymentCollectionType = paymentCollectionType
  423. cpc.PaymentCollectionSumamt = paymentCollectionSumAmt
  424. cpc.SoftwareSumamt = softwareSumAmt
  425. cpc.HardwareSumamt = hardwareSumAmt
  426. cpc.PaymentCollectionDate = paymentCollectionDate
  427. cpc.PaymentCollectionRole = paymentCollectionRole
  428. cpc.Url = url
  429. cpc.Remark = remark
  430. cpc.Mtime = mtime
  431. err := service.CreateChargePaymentCollection(&cpc)
  432. if err != nil {
  433. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  434. return
  435. }
  436. this.ServeSuccessJSON(map[string]interface{}{
  437. "cpc": cpc,
  438. })
  439. }
  440. func (this *CustomAPIController) DeleteCustom() {
  441. id, _ := this.GetInt64("id")
  442. ct, _ := service.FindCustomInfoByIDTwo(id)
  443. if ct.ID == 0 {
  444. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  445. return
  446. }
  447. ct.Status = 0
  448. err := service.SaveCustomTwo(ct)
  449. if err != nil {
  450. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  451. return
  452. }
  453. this.ServeSuccessJSON(map[string]interface{}{
  454. "msg": "删除成功",
  455. })
  456. }
  457. func (this *CustomAPIController) DeletePaymentCollection() {
  458. id, _ := this.GetInt64("id")
  459. cpc, _ := service.FindPaymentCollectionInfo(id)
  460. if cpc.ID == 0 {
  461. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  462. return
  463. }
  464. cpc.Status = 0
  465. err := service.SaveChargePaymentCollection(&cpc)
  466. if err != nil {
  467. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  468. return
  469. }
  470. this.ServeSuccessJSON(map[string]interface{}{
  471. "msg": "删除成功",
  472. })
  473. }
  474. func (this *CustomAPIController) CheckPaymentCollection() {
  475. id, _ := this.GetInt64("id")
  476. cpc, _ := service.FindPaymentCollectionInfo(id)
  477. if cpc.ID == 0 {
  478. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  479. return
  480. }
  481. cpc.IsCheck = 1
  482. cpc.CheckPerson = this.GetAdminInfo().Name
  483. err := service.SaveChargePaymentCollection(&cpc)
  484. if err != nil {
  485. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  486. return
  487. }
  488. this.ServeSuccessJSON(map[string]interface{}{
  489. "msg": "审核成功",
  490. })
  491. }
  492. func (this *CustomAPIController) CreateContactInfo() {
  493. customID, _ := this.GetInt64("custom_id")
  494. contactName := this.GetString("contact_name")
  495. contactPhone := this.GetString("contact_phone")
  496. contactDuties := this.GetString("contact_duties")
  497. isDecision := this.GetString("is_decision")
  498. remark := this.GetString("remark")
  499. contact_way := this.GetString("contact_way")
  500. ctime := time.Now().Unix()
  501. mtime := time.Now().Unix()
  502. // 创建 KyyChargeContact 对象,并设置每个字段的值
  503. contact := models.KyyChargeContact{
  504. ID: 0,
  505. CustomId: customID,
  506. ContactName: contactName,
  507. ContactPhone: contactPhone,
  508. ContactDuties: contactDuties,
  509. IsDecision: isDecision,
  510. Remark: remark,
  511. Ctime: ctime,
  512. Mtime: mtime,
  513. Status: 1,
  514. Creator: 0,
  515. Modifier: 0,
  516. IsCheck: 0,
  517. ContactWay: contact_way,
  518. }
  519. err := service.SaveChargeContact(&contact)
  520. if err != nil {
  521. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  522. return
  523. }
  524. this.ServeSuccessJSON(map[string]interface{}{
  525. "contact": contact,
  526. })
  527. }
  528. func (this *CustomAPIController) GetContactInfoList() {
  529. list, _ := service.GetAllChargeContacts()
  530. this.ServeSuccessJSON(map[string]interface{}{
  531. "list": list,
  532. })
  533. }
  534. func (this *CustomAPIController) GetContactInfo() {
  535. id, _ := this.GetInt64("id")
  536. cc, _ := service.FindChargeContactInfo(id)
  537. if cc.ID == 0 {
  538. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  539. return
  540. }
  541. this.ServeSuccessJSON(map[string]interface{}{
  542. "contact_info": cc,
  543. })
  544. }
  545. func (this *CustomAPIController) EditContactInfo() {
  546. id, _ := this.GetInt64("id")
  547. contactName := this.GetString("contact_name")
  548. contactPhone := this.GetString("contact_phone")
  549. contactDuties := this.GetString("contact_duties")
  550. isDecision := this.GetString("is_decision")
  551. remark := this.GetString("remark")
  552. mtime := time.Now().Unix()
  553. chargeContact, _ := service.FindChargeContactInfo(id)
  554. if chargeContact.ID == 0 {
  555. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  556. return
  557. }
  558. chargeContact.ContactName = contactName
  559. chargeContact.ContactPhone = contactPhone
  560. chargeContact.ContactDuties = contactDuties
  561. chargeContact.IsDecision = isDecision
  562. chargeContact.Remark = remark
  563. chargeContact.Remark = remark
  564. chargeContact.Mtime = mtime
  565. err := service.SaveChargeContact(&chargeContact)
  566. if err != nil {
  567. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  568. return
  569. }
  570. this.ServeSuccessJSON(map[string]interface{}{
  571. "contact": chargeContact,
  572. })
  573. }
  574. func (this *CustomAPIController) DeleteContactInfo() {
  575. id, _ := this.GetInt64("id")
  576. cc, _ := service.FindChargeContactInfo(id)
  577. if cc.ID == 0 {
  578. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  579. return
  580. }
  581. cc.Status = 0
  582. err := service.SaveChargeContact(&cc)
  583. if err != nil {
  584. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  585. return
  586. }
  587. this.ServeSuccessJSON(map[string]interface{}{
  588. "msg": "删除成功",
  589. })
  590. }
  591. func (this *CustomAPIController) CheckContactInfo() {
  592. id, _ := this.GetInt64("id")
  593. chargeContact, _ := service.FindChargeContactInfo(id)
  594. if chargeContact.ID == 0 {
  595. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  596. return
  597. }
  598. chargeContact.IsCheck = 1
  599. chargeContact.CheckPerson = this.GetAdminInfo().Name
  600. err := service.SaveChargeContact(&chargeContact)
  601. if err != nil {
  602. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  603. return
  604. }
  605. this.ServeSuccessJSON(map[string]interface{}{
  606. "msg": "审核成功",
  607. })
  608. }
  609. func (this *CustomAPIController) CreateContractInfo() {
  610. customID, _ := this.GetInt64("custom_id")
  611. code := this.GetString("code")
  612. name := this.GetString("name")
  613. sumamt := this.GetString("sumamt")
  614. custom_name := this.GetString("custom_name")
  615. start_time := this.GetString("start_time")
  616. end_time := this.GetString("end_time")
  617. signing_person := this.GetString("signing_person")
  618. wordFileURL := this.GetString("word_file_url")
  619. pdfFileURL := this.GetString("pdf_file_url")
  620. remark := this.GetString("remark")
  621. ctime := time.Now().Unix()
  622. mtime := time.Now().Unix()
  623. // 创建 KyyChargeContract 对象,并设置每个字段的值
  624. contract := models.KyyChargeContract{
  625. CustomId: customID,
  626. Code: code,
  627. Name: name,
  628. Sumamt: sumamt,
  629. StartTime: start_time,
  630. EndTime: end_time,
  631. SigningPerson: signing_person,
  632. WordFileUrl: wordFileURL,
  633. PdfFileUrl: pdfFileURL,
  634. CustomName: custom_name,
  635. Remark: remark,
  636. Ctime: ctime,
  637. Mtime: mtime,
  638. Status: 1,
  639. }
  640. err := service.SaveChargeContract(&contract)
  641. if err != nil {
  642. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  643. return
  644. }
  645. this.ServeSuccessJSON(map[string]interface{}{
  646. "msg": "创建成功",
  647. })
  648. }
  649. func (this *CustomAPIController) GetContractInfoList() {
  650. list, _ := service.GetAllChargeContracts()
  651. this.ServeSuccessJSON(map[string]interface{}{
  652. "list": list,
  653. })
  654. }
  655. func (this *CustomAPIController) GetContractInfo() {
  656. id, _ := this.GetInt64("id")
  657. cc, _ := service.FindChargeContractInfo(id)
  658. if cc.ID == 0 {
  659. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  660. return
  661. }
  662. this.ServeSuccessJSON(map[string]interface{}{
  663. "charge_contract": cc,
  664. })
  665. }
  666. func (this *CustomAPIController) EditContractInfo() {
  667. id, _ := this.GetInt64("id")
  668. code := this.GetString("code")
  669. name := this.GetString("name")
  670. customName := this.GetString("custom_name")
  671. sumamt := this.GetString("sumamt")
  672. startTime := this.GetString("start_time")
  673. endTime := this.GetString("end_time")
  674. signingPerson := this.GetString("signing_person")
  675. wordFileURL := this.GetString("word_file_url")
  676. pdfFileURL := this.GetString("pdf_file_url")
  677. remark := this.GetString("remark")
  678. mtime := time.Now().Unix()
  679. chargeContract, _ := service.FindChargeContractInfo(id)
  680. if chargeContract.ID == 0 {
  681. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  682. return
  683. }
  684. chargeContract.Code = code
  685. chargeContract.Name = name
  686. chargeContract.CustomName = customName
  687. chargeContract.Sumamt = sumamt
  688. chargeContract.StartTime = startTime
  689. chargeContract.EndTime = endTime
  690. chargeContract.SigningPerson = signingPerson
  691. chargeContract.WordFileUrl = wordFileURL
  692. chargeContract.PdfFileUrl = pdfFileURL
  693. chargeContract.Remark = remark
  694. chargeContract.Mtime = mtime
  695. err := service.SaveChargeContract(&chargeContract)
  696. if err != nil {
  697. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  698. return
  699. }
  700. this.ServeSuccessJSON(map[string]interface{}{
  701. "msg": "修改成功",
  702. })
  703. }
  704. func (this *CustomAPIController) DeleteContractInfo() {
  705. id, _ := this.GetInt64("id")
  706. cc, _ := service.FindChargeContractInfo(id)
  707. if cc.ID == 0 {
  708. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  709. return
  710. }
  711. cc.Status = 0
  712. err := service.SaveChargeContract(&cc)
  713. if err != nil {
  714. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  715. return
  716. }
  717. this.ServeSuccessJSON(map[string]interface{}{
  718. "msg": "删除成功",
  719. })
  720. }
  721. func (this *CustomAPIController) CheckContractInfo() {
  722. id, _ := this.GetInt64("id")
  723. chargeContract, _ := service.FindChargeContractInfo(id)
  724. if chargeContract.ID == 0 {
  725. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  726. return
  727. }
  728. chargeContract.CheckPerson = this.GetAdminInfo().Name
  729. chargeContract.IsCheck = 1
  730. err := service.SaveChargeContract(&chargeContract)
  731. if err != nil {
  732. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  733. return
  734. }
  735. this.ServeSuccessJSON(map[string]interface{}{
  736. "msg": "审核成功",
  737. })
  738. }
  739. func (this *CustomAPIController) CreateFollowInfo() {
  740. ctime := time.Now().Unix()
  741. mtime := time.Now().Unix()
  742. customID, _ := this.GetInt64("custom_id")
  743. desc := this.GetString("desc")
  744. // 创建 KyyChargeFollow 对象,并设置每个字段的值
  745. follow := models.KyyChargeFollow{
  746. Ctime: ctime,
  747. Mtime: mtime,
  748. Creator: this.GetAdminInfo().ID,
  749. CustomId: customID,
  750. Desc: desc,
  751. Status: 1,
  752. }
  753. err := service.SaveChargeFollow(&follow)
  754. if err != nil {
  755. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  756. return
  757. }
  758. this.ServeSuccessJSON(map[string]interface{}{
  759. "follow": follow,
  760. })
  761. }
  762. func (this *CustomAPIController) GetFollowInfoList() {
  763. list, _ := service.GetAllChargeFollow()
  764. this.ServeSuccessJSON(map[string]interface{}{
  765. "list": list,
  766. })
  767. }
  768. func (this *CustomAPIController) GetFollowInfo() {
  769. id, _ := this.GetInt64("id")
  770. follow, _ := service.FindChargeFollowInfo(id)
  771. if follow.ID == 0 {
  772. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  773. return
  774. }
  775. this.ServeSuccessJSON(map[string]interface{}{
  776. "follow": follow,
  777. })
  778. }
  779. func (this *CustomAPIController) EditFollowInfo() {
  780. id, _ := this.GetInt64("id")
  781. desc := this.GetString("desc")
  782. chargeFollow, _ := service.FindChargeFollowInfo(id)
  783. chargeFollow.Desc = desc
  784. chargeFollow.Mtime = time.Now().Unix()
  785. err := service.SaveChargeFollow(&chargeFollow)
  786. if err != nil {
  787. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  788. return
  789. }
  790. this.ServeSuccessJSON(map[string]interface{}{
  791. "follow": chargeFollow,
  792. })
  793. }
  794. func (this *CustomAPIController) DeleteFollowInfo() {
  795. id, _ := this.GetInt64("id")
  796. follow, _ := service.FindChargeFollowInfo(id)
  797. if follow.ID == 0 {
  798. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  799. return
  800. }
  801. follow.Status = 0
  802. err := service.SaveChargeFollow(&follow)
  803. if err != nil {
  804. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  805. return
  806. }
  807. this.ServeSuccessJSON(map[string]interface{}{
  808. "msg": "删除成功",
  809. })
  810. }
  811. func (this *CustomAPIController) CheckFollowInfo() {
  812. id, _ := this.GetInt64("id")
  813. follow, _ := service.FindChargeFollowInfoTwo(id)
  814. if len(follow) == 0 {
  815. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  816. return
  817. }
  818. var ids []int64
  819. for _, item := range follow {
  820. ids = append(ids, item.ID)
  821. }
  822. err := service.CheckChargeFollowTwo(ids)
  823. if err != nil {
  824. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  825. return
  826. }
  827. this.ServeSuccessJSON(map[string]interface{}{
  828. "msg": "审核成功",
  829. })
  830. }
  831. func (this *CustomAPIController) CreateDemandInfo() {
  832. demandType, _ := this.GetInt64("demand_type")
  833. demandDesc := this.GetString("demand_desc")
  834. demandStatus, _ := this.GetInt64("demand_status")
  835. demandCreator := this.GetString("demand_creator")
  836. demandCreateDate := this.GetString("demand_create_date")
  837. demandDirector := this.GetString("demand_director")
  838. ctime := time.Now().Unix()
  839. mtime := time.Now().Unix()
  840. customID, _ := this.GetInt64("custom_id")
  841. demandFinishDate := this.GetString("demand_finish_date")
  842. demandDetail := this.GetString("demand_detail")
  843. // 创建 KyyChargeDemand 对象,并设置每个字段的值
  844. demand := models.KyyChargeDemand{
  845. DemandType: demandType,
  846. DemandDesc: demandDesc,
  847. DemandStatus: demandStatus,
  848. DemandCreator: demandCreator,
  849. DemandCreateDate: demandCreateDate,
  850. DemandDirector: demandDirector,
  851. Ctime: ctime,
  852. Mtime: mtime,
  853. Status: 1,
  854. CustomId: customID,
  855. DemandFinishDate: demandFinishDate,
  856. DemandDetail: demandDetail,
  857. }
  858. err := service.SaveChargeDemand(&demand)
  859. if err != nil {
  860. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  861. return
  862. }
  863. this.ServeSuccessJSON(map[string]interface{}{
  864. "demand": demand,
  865. })
  866. }
  867. func (this *CustomAPIController) GetDemandInfoList() {
  868. list, _ := service.GetAllChargeDemand()
  869. this.ServeSuccessJSON(map[string]interface{}{
  870. "list": list,
  871. })
  872. }
  873. func (this *CustomAPIController) GetDemandInfo() {
  874. id, _ := this.GetInt64("id")
  875. cd, _ := service.FindChargeDemandInfo(id)
  876. if cd.ID == 0 {
  877. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  878. return
  879. }
  880. this.ServeSuccessJSON(map[string]interface{}{
  881. "charge_demand": cd,
  882. })
  883. }
  884. func (this *CustomAPIController) EditDemandInfo() {
  885. id, _ := this.GetInt64("id")
  886. demandType, _ := this.GetInt64("demand_type")
  887. demandDesc := this.GetString("demand_desc")
  888. demandStatus, _ := this.GetInt64("demand_status")
  889. demandCreator := this.GetString("demand_creator")
  890. demandCreateDate := this.GetString("demand_create_date")
  891. demandFinishDate := this.GetString("demand_finish_date")
  892. demandDetail := this.GetString("demand_detail")
  893. demandDirector := this.GetString("demand_director")
  894. cd, _ := service.FindChargeDemandInfo(id)
  895. cd.DemandType = demandType
  896. cd.DemandDesc = demandDesc
  897. cd.DemandStatus = demandStatus
  898. cd.DemandCreator = demandCreator
  899. cd.DemandCreateDate = demandCreateDate
  900. cd.DemandFinishDate = demandFinishDate
  901. cd.DemandDirector = demandDirector
  902. cd.DemandDetail = demandDetail
  903. cd.Mtime = time.Now().Unix()
  904. err := service.SaveChargeDemand(&cd)
  905. if err != nil {
  906. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  907. return
  908. }
  909. this.ServeSuccessJSON(map[string]interface{}{
  910. "demand": cd,
  911. })
  912. }
  913. func (this *CustomAPIController) DeleteDemandInfo() {
  914. id, _ := this.GetInt64("id")
  915. cd, _ := service.FindChargeDemandInfo(id)
  916. if cd.ID == 0 {
  917. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  918. return
  919. }
  920. cd.Status = 0
  921. err := service.SaveChargeDemand(&cd)
  922. if err != nil {
  923. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  924. return
  925. }
  926. this.ServeSuccessJSON(map[string]interface{}{
  927. "msg": "删除成功",
  928. })
  929. }
  930. func (this *CustomAPIController) CheckDemandInfo() {
  931. id, _ := this.GetInt64("id")
  932. cd, _ := service.FindChargeDemandInfo(id)
  933. if cd.ID == 0 {
  934. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  935. return
  936. }
  937. cd.IsCheck = 1
  938. //chargeContract
  939. cd.CheckPerson = this.GetAdminInfo().Name
  940. err := service.SaveChargeDemand(&cd)
  941. if err != nil {
  942. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  943. return
  944. }
  945. this.ServeSuccessJSON(map[string]interface{}{
  946. "msg": "审核成功",
  947. })
  948. }
  949. func (this *CustomAPIController) CreateRenewalInfo() {
  950. types, _ := this.GetInt64("type")
  951. startTime := this.GetString("start_time")
  952. endTime := this.GetString("end_time")
  953. signingPersonal := this.GetString("signing_personal")
  954. customID, _ := this.GetInt64("custom_id")
  955. signTime := this.GetString("sign_time")
  956. checkPersonal := this.GetString("check_personal")
  957. ctime := time.Now().Format("2006-01-02 15:04:05") // 使用当前时间
  958. mtime := time.Now().Format("2006-01-02 15:04:05") // 使用当前时间
  959. remark := this.GetString("remark")
  960. // 创建 KyyChargeRenewal 对象,并设置每个字段的值
  961. renewal := models.KyyChargeRenewal{
  962. Type: types,
  963. StartTime: startTime,
  964. EndTime: endTime,
  965. SigningPersonal: signingPersonal,
  966. CustomId: customID,
  967. SignTime: signTime,
  968. CheckPersonal: checkPersonal,
  969. Ctime: ctime,
  970. Mtime: mtime,
  971. Status: 1,
  972. Remark: remark,
  973. }
  974. err := service.SaveChargeRenewal(&renewal)
  975. if err != nil {
  976. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  977. return
  978. }
  979. this.ServeSuccessJSON(map[string]interface{}{
  980. "renewal": renewal,
  981. })
  982. }
  983. func (this *CustomAPIController) GetRenewalInfoList() {
  984. list, _ := service.GetAllChargeRenewal()
  985. this.ServeSuccessJSON(map[string]interface{}{
  986. "list": list,
  987. })
  988. }
  989. func (this *CustomAPIController) GetRenewalInfo() {
  990. id, _ := this.GetInt64("id")
  991. cr, _ := service.FindChargeRenewalInfo(id)
  992. if cr.ID == 0 {
  993. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  994. return
  995. }
  996. this.ServeSuccessJSON(map[string]interface{}{
  997. "charge_renewal": cr,
  998. })
  999. }
  1000. func (this *CustomAPIController) EditRenewalInfo() {
  1001. types, _ := this.GetInt64("type")
  1002. id, _ := this.GetInt64("id")
  1003. startTime := this.GetString("start_time")
  1004. endTime := this.GetString("end_time")
  1005. signingPersonal := this.GetString("signing_personal")
  1006. customID, _ := this.GetInt64("custom_id")
  1007. signTime := this.GetString("sign_time")
  1008. remark := this.GetString("remark")
  1009. checkPersonal := this.GetString("check_personal")
  1010. mtime := time.Now().Format("2006-01-02 15:04:05") // 使用当前时间
  1011. cr, _ := service.FindChargeRenewalInfo(id)
  1012. if cr.ID == 0 {
  1013. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  1014. return
  1015. }
  1016. cr.Type = types
  1017. cr.CustomId = customID
  1018. cr.StartTime = startTime
  1019. cr.EndTime = endTime
  1020. cr.SigningPersonal = signingPersonal
  1021. cr.SignTime = signTime
  1022. cr.Mtime = mtime
  1023. cr.Remark = remark
  1024. cr.CheckPersonal = checkPersonal
  1025. err := service.SaveChargeRenewal(&cr)
  1026. if err != nil {
  1027. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  1028. return
  1029. }
  1030. this.ServeSuccessJSON(map[string]interface{}{
  1031. "cr": cr,
  1032. })
  1033. }
  1034. func (this *CustomAPIController) DeleteRenewalInfo() {
  1035. id, _ := this.GetInt64("id")
  1036. cr, _ := service.FindChargeRenewalInfo(id)
  1037. if cr.ID == 0 {
  1038. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  1039. return
  1040. }
  1041. cr.Status = 0
  1042. err := service.SaveChargeRenewal(&cr)
  1043. if err != nil {
  1044. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  1045. return
  1046. }
  1047. this.ServeSuccessJSON(map[string]interface{}{
  1048. "msg": "删除成功",
  1049. })
  1050. }
  1051. func (this *CustomAPIController) CheckRenewalInfo() {
  1052. id, _ := this.GetInt64("id")
  1053. cr, _ := service.FindChargeRenewalInfo(id)
  1054. if cr.ID == 0 {
  1055. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  1056. return
  1057. }
  1058. cr.IsCheck = 1
  1059. cr.CheckPerson = this.GetAdminInfo().Name
  1060. err := service.SaveChargeRenewal(&cr)
  1061. if err != nil {
  1062. this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
  1063. return
  1064. }
  1065. this.ServeSuccessJSON(map[string]interface{}{
  1066. "msg": "审核成功",
  1067. })
  1068. }
  1069. func (c *CustomAPIController) GetQNUpToken() {
  1070. redisClient := service.RedisClient()
  1071. defer redisClient.Close()
  1072. token, err := redisClient.Get("qn_token").Result()
  1073. fmt.Println(token)
  1074. if err != nil {
  1075. defer fmt.Println(err)
  1076. c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeGetQiniuUpToken)
  1077. return
  1078. }
  1079. c.ServeSuccessJSON(map[string]interface{}{
  1080. "uptoken": token,
  1081. })
  1082. return
  1083. }