patient_controller.go 461B

12345678910111213141516171819202122232425
  1. package patient
  2. import (
  3. "KYA/controllers"
  4. "KYA/enums"
  5. )
  6. func PatientRouter() {
  7. }
  8. type PatientMangement struct {
  9. controllers.BaseAPIController
  10. }
  11. func (this *PatientMangement) ServeFailJsonSend(code int, msg string) {
  12. this.Data["json"] = enums.MakeFailResponseJSON(msg, code)
  13. this.ServeJSON()
  14. }
  15. func (this *PatientMangement) ServeSuccessJSON(data map[string]interface{}) {
  16. this.Data["json"] = enums.MakeSuccessResponseJSON(data)
  17. this.ServeJSONP()
  18. }