diff --git a/app/customer/hdl/hdl_user_identity.go b/app/customer/hdl/hdl_user_identity.go index ab5b650..79aa9db 100644 --- a/app/customer/hdl/hdl_user_identity.go +++ b/app/customer/hdl/hdl_user_identity.go @@ -44,6 +44,7 @@ func SaveCentralKitchenForSchoolUserIdentity(c *gin.Context) { Uid: user.Id, Name: req.Name, IdNo: req.IdNo, + CertType: enum.UserIdentityCertTypeForIdCard, Kind: enum.UserIdentityKindForCommon, Identity: identity, EnterpriseId: req.EnterpriseId, diff --git a/app/customer/md/md_curl_smart_pay.go b/app/customer/md/md_curl_smart_pay.go index 89c77b1..45bf2aa 100644 --- a/app/customer/md/md_curl_smart_pay.go +++ b/app/customer/md/md_curl_smart_pay.go @@ -150,3 +150,10 @@ type CurlAlipayPlanetEcocampusApiDebtCancel struct { OutOrderNo string `json:"out_order_no" label:"外部订单号"` MerchantCode string `json:"merchant_code" label:"商户编号"` } + +type CurlAlipayPlanetEcocampusApiRosterConsumeLimit struct { + ConsumeLimitSyncInfo struct { + } `json:"school_code" label:"外部订单号"` + SchoolCode string `json:"school_code" label:"外部订单号"` + SchoolName string `json:"school_name" label:"商户编号"` +} diff --git a/app/customer/svc/svc_curl_smart_pay.go b/app/customer/svc/svc_curl_smart_pay.go index d521796..4a3ed60 100644 --- a/app/customer/svc/svc_curl_smart_pay.go +++ b/app/customer/svc/svc_curl_smart_pay.go @@ -183,7 +183,7 @@ func CurlEducateSceneTokenQuery(args md.CurlEducateSceneTokenReq, userIdentity * "school_std_code": args.SchoolStdCode, "student_name": args.StudentName, "out_user_id": args.OutUserId, - "cert_type": "1", + "cert_type": args.CertType, "sub_code": "SCHOOL_FACE_PASS_QUERY", }), nil) if err1 != nil { @@ -422,7 +422,7 @@ func CurlEducateSceneTokenCreateForApplet(args md.CurlEducateSceneTokenReq) (err "school_std_code": args.SchoolStdCode, "student_name": args.StudentName, "out_user_id": args.OutUserId, - "cert_type": "1", + "cert_type": args.CertType, "sub_code": "SCHOOL_FACE_PASS_NAVIGATE", }), nil) if err != nil { @@ -467,7 +467,7 @@ func CurlEducateSceneTokenCreateForConcentratedCollectApplet(args md.CurlEducate "school_std_code": args.SchoolStdCode, "student_name": args.StudentName, "out_user_id": args.OutUserId, - "cert_type": "1", + "cert_type": args.CertType, "sub_code": "SCHOOL_PAYMENT_REMOTE_OPEN_ACCOUNT", "operator_user_id": args.OperatorUserId, //采集人员的支付宝会员标识。(当sub_code为SCHOOL_PAYMENT_REMOTE_OPEN_ACCOUNT时,当前参数必选) }), nil) @@ -703,3 +703,33 @@ func CurlAlipayPlanetEcocampusApiDebtCancel(args md.CurlAlipayPlanetEcocampusApi } return nil, result.Data } + +func CurlAlipayPlanetEcocampusApiRosterConsumeLimit(args md.CurlAlipayPlanetEcocampusApiRosterConsumeLimit) (err error, resp interface{}) { + url := cfg.SmartCanteenPay + "/alipay/bPass/alipayPlanetEcocampusApiRosterConsumeLimit" + utils.FilePutContents("CurlAlipayPlanetEcocampusApiRosterConsumeLimit", utils.SerializeStr(map[string]interface{}{ + "args": args, + })) + bytes, err := utils.CurlPost(url, utils.Serialize(args), nil) + if err != nil { + return + } + var result struct { + Code int `json:"code"` + Msg string `json:"msg"` + Data interface{} `json:"data"` + } + utils.FilePutContents("CurlAlipayPlanetEcocampusApiRosterConsumeLimit", utils.SerializeStr(result)) + err = json.Unmarshal(bytes, &result) + if err != nil { + return + } + if result.Code != 0 { + if result.Msg != "" { + err = errors.New(result.Msg) + return + } + err = errors.New("请求智慧餐厅支付 异常/失败") + return + } + return nil, result.Data +}