Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
00f5dce7a6
5 changed files with 73 additions and 0 deletions
  1. +30
    -0
      app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go
  2. +6
    -0
      app/admin/md/md_enterprise_manage.go
  3. +6
    -0
      app/customer/md/md_curl_smart_pay.go
  4. +30
    -0
      app/customer/svc/svc_curl_smart_pay.go
  5. +1
    -0
      app/router/admin_router.go

+ 30
- 0
app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go View File

@@ -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)


+ 6
- 0
app/admin/md/md_enterprise_manage.go View File

@@ -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"`


+ 6
- 0
app/customer/md/md_curl_smart_pay.go View File

@@ -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:"商户编号"`


+ 30
- 0
app/customer/svc/svc_curl_smart_pay.go View File

@@ -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{}{


+ 1
- 0
app/router/admin_router.go View File

@@ -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) //"自营-学校"人脸识别关闭


Loading…
Cancel
Save