@@ -813,6 +813,36 @@ func SelfSupportForSchoolArrearsOrdList(c *gin.Context) { | |||||
return | return | ||||
} | } | ||||
func SelfSupportForSchoolBlackList(c *gin.Context) { | |||||
var req md.SelfSupportForSchoolBlackListReq | |||||
err := c.ShouldBindJSON(&req) | |||||
if err != nil { | |||||
err = validate.HandleValidateErr(err) | |||||
err1 := err.(e.E) | |||||
e.OutErr(c, err1.Code, err1.Error()) | |||||
return | |||||
} | |||||
selfSupportForSchoolInfoDb := db.SelfSupportForSchoolInfoDb{} | |||||
selfSupportForSchoolInfoDb.Set(req.EnterpriseId) | |||||
info, err := selfSupportForSchoolInfoDb.GetSelfSupportForSchoolInfo() | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
err, resp := svc.CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList(md2.CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList{ | |||||
SchoolCode: info.SchoolCode, | |||||
PageNo: req.Page, | |||||
PageSize: req.Limit, | |||||
}) | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR, err.Error()) | |||||
return | |||||
} | |||||
e.OutSuc(c, resp, nil) | |||||
return | |||||
} | |||||
func SelfSupportForSchoolArrearsOrdDebtRepay(c *gin.Context) { | func SelfSupportForSchoolArrearsOrdDebtRepay(c *gin.Context) { | ||||
var req md.SelfSupportForSchoolArrearsOrdDebtRepayReq | var req md.SelfSupportForSchoolArrearsOrdDebtRepayReq | ||||
err := c.ShouldBindJSON(&req) | err := c.ShouldBindJSON(&req) | ||||
@@ -461,6 +461,12 @@ type SelfSupportForSchoolArrearsOrdListReq struct { | |||||
IsTeacher int `json:"is_teacher" label:"是否教师"` | IsTeacher int `json:"is_teacher" label:"是否教师"` | ||||
} | } | ||||
type SelfSupportForSchoolBlackListReq struct { | |||||
EnterpriseId int `json:"enterprise_id" label:"企业id"` | |||||
Limit int `json:"limit" binding:"required"` | |||||
Page int `json:"page" binding:"required"` | |||||
} | |||||
type SelfSupportForSchoolArrearsOrdDebtRepayReq struct { | type SelfSupportForSchoolArrearsOrdDebtRepayReq struct { | ||||
UserIdentityId int `json:"user_identity_id" label:"用户身份id"` | UserIdentityId int `json:"user_identity_id" label:"用户身份id"` | ||||
OutOrderNo string `json:"out_order_no"` | OutOrderNo string `json:"out_order_no"` | ||||
@@ -131,6 +131,12 @@ type CurlAlipayPlanetEcocampusApiDebtPageQueryDebtInfo struct { | |||||
PageSize int `json:"page_size"` | PageSize int `json:"page_size"` | ||||
} | } | ||||
type CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList struct { | |||||
SchoolCode string `json:"school_code" label:"学校内标"` | |||||
PageNo int `json:"page_no"` | |||||
PageSize int `json:"page_size"` | |||||
} | |||||
type CurlSelfSupportForSchoolOrderDebtRepay struct { | type CurlSelfSupportForSchoolOrderDebtRepay struct { | ||||
OutOrderNo string `json:"out_order_no" label:"外部订单号"` | OutOrderNo string `json:"out_order_no" label:"外部订单号"` | ||||
MerchantCode string `json:"merchant_code" label:"商户编号"` | MerchantCode string `json:"merchant_code" label:"商户编号"` | ||||
@@ -628,6 +628,36 @@ func CurlAlipayPlanetEcocampusApiDebtPageQueryDebtInfo(args md.CurlAlipayPlanetE | |||||
return nil, result.Data | return nil, result.Data | ||||
} | } | ||||
func CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList(args md.CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList) (err error, resp interface{}) { | |||||
url := cfg.SmartCanteenPay + "/alipay/bPass/alipayPlanetEcocampusApiRosterPageQueryBlackList" | |||||
utils.FilePutContents("CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList", 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("CurlAlipayPlanetEcocampusApiRosterPageQueryBlackList", 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 | |||||
} | |||||
func CurlAlipayPlanetEcocampusApiDebtCancel(args md.CurlAlipayPlanetEcocampusApiDebtCancel) (err error, resp interface{}) { | func CurlAlipayPlanetEcocampusApiDebtCancel(args md.CurlAlipayPlanetEcocampusApiDebtCancel) (err error, resp interface{}) { | ||||
url := cfg.SmartCanteenPay + "/alipay/bPass/alipayPlanetEcocampusApiDebtCancel" | url := cfg.SmartCanteenPay + "/alipay/bPass/alipayPlanetEcocampusApiDebtCancel" | ||||
utils.FilePutContents("CurlAlipayPlanetEcocampusApiDebtCancel", utils.SerializeStr(map[string]interface{}{ | utils.FilePutContents("CurlAlipayPlanetEcocampusApiDebtCancel", utils.SerializeStr(map[string]interface{}{ | ||||
@@ -208,6 +208,7 @@ func rEnterpriseManage(r *gin.RouterGroup) { | |||||
r.GET("/selfSupportForSchool/downloadTemplateExcel", hdl.SelfSupportForSchoolDownloadTemplateExcel) //"自营-学校"下载表格模板 | r.GET("/selfSupportForSchool/downloadTemplateExcel", hdl.SelfSupportForSchoolDownloadTemplateExcel) //"自营-学校"下载表格模板 | ||||
r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //"自营-学校"订单列表 | r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //"自营-学校"订单列表 | ||||
r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //"自营-学校"订单欠费列表 | r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //"自营-学校"订单欠费列表 | ||||
r.POST("/selfSupportForSchool/blackList", hdl.SelfSupportForSchoolBlackList) //"自营-学校"黑名单列表 | |||||
r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴 | r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴 | ||||
r.POST("/selfSupportForSchool/arrearsOrdDebtCancel", hdl.SelfSupportForSchoolArrearsOrdDebtCancel) //"自营-学校"撤销欠款 | r.POST("/selfSupportForSchool/arrearsOrdDebtCancel", hdl.SelfSupportForSchoolArrearsOrdDebtCancel) //"自营-学校"撤销欠款 | ||||
r.GET("/selfSupportForSchool/educateSceneKidsClose", hdl.SelfSupportForSchoolEducateSceneKidsClose) //"自营-学校"人脸识别关闭 | r.GET("/selfSupportForSchool/educateSceneKidsClose", hdl.SelfSupportForSchoolEducateSceneKidsClose) //"自营-学校"人脸识别关闭 | ||||