From 57aa1f5d37b38a120e631cc1c17ac9d14253fedf Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 2 Nov 2023 15:47:11 +0800 Subject: [PATCH] update --- .../hdl_self_support_for_school.go | 36 +++++++++++++++++++ app/customer/md/md_curl_smart_pay.go | 15 ++++++-- app/router/admin_router.go | 1 + 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go b/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go index 2901873..2a7d15d 100644 --- a/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go @@ -650,6 +650,7 @@ func SelfSupportForSchoolAddWorker(c *gin.Context) { Uid: 0, Name: req.Name, IdNo: req.IdNo, + CertType: enum.UserIdentityCertTypeForIdCard, Kind: enum.UserIdentityKindForWorker, Identity: enum.UserIdentityForSelfSupportForWorker, EnterpriseId: req.EnterpriseId, @@ -701,6 +702,7 @@ func SelfSupportForSchoolAddTeacher(c *gin.Context) { Uid: 0, Name: req.Name, IdNo: req.IdNo, + CertType: enum.UserIdentityCertTypeForIdCard, Kind: enum.UserIdentityKindForCommon, Identity: enum.UserIdentityForSelfSupportForTeacher, EnterpriseId: req.EnterpriseId, @@ -930,6 +932,7 @@ func SelfSupportForSchoolImportTeacher(c *gin.Context) { Uid: 0, Name: name, IdNo: idNo, + CertType: enum.UserIdentityCertTypeForIdCard, Kind: enum.UserIdentityKindForCommon, Identity: enum.UserIdentityForSelfSupportForTeacher, EnterpriseId: enterpriseId, @@ -1070,6 +1073,39 @@ func SelfSupportForSchoolOrdList(c *gin.Context) { return } +func SelfSupportForSchoolConsumeLimit(c *gin.Context) { + var req md.SelfSupportForSchoolOrdListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + resp, total, err := svc2.SelfSupportForSchoolOrdList(req) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + e.OutSuc(c, map[string]interface{}{ + "list": resp, + "total": total, + "enterprise_kind_list": md.EnterpriseKindForSchool, + "order_status_list": []map[string]interface{}{ + { + "name": enum.SelfSupportForSchoolOrdOrderStatus.String(enum.SelfSupportForSchoolOrdOrderStatusForWait), + "value": enum.SelfSupportForSchoolOrdOrderStatusForWait, + }, + { + "name": enum.SelfSupportForSchoolOrdOrderStatus.String(enum.SelfSupportForSchoolOrdOrderStatusForSuccess), + "value": enum.SelfSupportForSchoolOrdOrderStatusForSuccess, + }, + }, + }, nil) + return +} + func SelfSupportForSchoolOrdListExport(c *gin.Context) { var req md.SelfSupportForSchoolOrdListReq err := c.ShouldBindJSON(&req) diff --git a/app/customer/md/md_curl_smart_pay.go b/app/customer/md/md_curl_smart_pay.go index 45bf2aa..8a097e5 100644 --- a/app/customer/md/md_curl_smart_pay.go +++ b/app/customer/md/md_curl_smart_pay.go @@ -153,7 +153,16 @@ type CurlAlipayPlanetEcocampusApiDebtCancel struct { type CurlAlipayPlanetEcocampusApiRosterConsumeLimit struct { ConsumeLimitSyncInfo struct { - } `json:"school_code" label:"外部订单号"` - SchoolCode string `json:"school_code" label:"外部订单号"` - SchoolName string `json:"school_name" label:"商户编号"` + FaceUid string `json:"face_uid" label:"学生刷脸编号"` + OutRosterCode string `json:"out_roster_code" label:"外部花名册编号"` + RosterName string `json:"roster_name" label:"花名册名称"` + DailyConsumeLimit string `json:"daily_consume_limit" label:"单日金额上限"` + DailyConsumeLimitSwitch string `json:"daily_consume_limit_switch" label:"单日金额上限 功能开关"` + SingleConsumeLimit string `json:"single_consume_limit" label:"单笔金额上限"` + SingleConsumeLimitSwitch string `json:"single_consume_limit_switch" label:"单笔金额上限 功能开关"` + DailyConsumeNumber string `json:"daily_consume_number" label:"单日笔数上限"` + DailyConsumeNumberSwitch string `json:"daily_consume_number_switch" label:"单日笔数上限 功能开关"` + } `json:"consume_limit_sync_info" label:"外部订单号"` + SchoolCode string `json:"school_code" label:"学校内标"` + SchoolName string `json:"school_name" label:"学校名称"` } diff --git a/app/router/admin_router.go b/app/router/admin_router.go index 38fc90a..84b3aa8 100644 --- a/app/router/admin_router.go +++ b/app/router/admin_router.go @@ -221,6 +221,7 @@ func rEnterpriseManage(r *gin.RouterGroup) { r.GET("/selfSupportForSchool/downloadTemplateExcel", hdl.SelfSupportForSchoolDownloadTemplateExcel) //"自营-学校"下载表格模板 r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //"自营-学校"订单列表 r.Any("/selfSupportForSchool/ordListExport", hdl.SelfSupportForSchoolOrdListExport) //"自营-学校"订单列表-导出 + r.Any("/selfSupportForSchool/consumeLimit", hdl.SelfSupportForSchoolConsumeLimit) //"自营-学校"消费限制 r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //"自营-学校"订单欠费列表 r.POST("/selfSupportForSchool/blackList", hdl.SelfSupportForSchoolBlackList) //"自营-学校"黑名单列表 r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴