Bläddra i källkod

更新

master
huangjiajun 6 dagar sedan
förälder
incheckning
df60c033b2
5 ändrade filer med 50 tillägg och 0 borttagningar
  1. +11
    -0
      app/hdl/hdl_finance_center_agent.go
  2. +11
    -0
      app/hdl/hdl_finance_center_medium.go
  3. +2
    -0
      app/router/router.go
  4. +13
    -0
      app/svc/svc_finance_center_agent.go
  5. +13
    -0
      app/svc/svc_finance_center_medium.go

+ 11
- 0
app/hdl/hdl_finance_center_agent.go Visa fil

@@ -103,6 +103,17 @@ func FinanceCenterAgentPaySave(c *gin.Context) {
}
svc.FinanceCenterAgentPaySave(c, req)
}
func FinanceCenterAgentCheckSave(c *gin.Context) {
var req md.CommDetailReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
svc.FinanceCenterAgentCheckSave(c, req)
}

// FinanceCenterAgentOtherIncomeSave
// @Summary 代理详情-其他收益调整


+ 11
- 0
app/hdl/hdl_finance_center_medium.go Visa fil

@@ -128,6 +128,17 @@ func FinanceCenterMediumPaySave(c *gin.Context) {
}
svc.FinanceCenterMediumPaySave(c, req)
}
func FinanceCenterMediumCheckSave(c *gin.Context) {
var req md.CommDetailReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
svc.FinanceCenterMediumCheckSave(c, req)
}

// FinanceCenterMediumOtherIncomeSave
// @Summary 媒体详情-其他收益调整


+ 2
- 0
app/router/router.go Visa fil

@@ -280,6 +280,7 @@ func rFinanceCenter(r *gin.RouterGroup) {
r.POST("/medium/invoice/save", hdl.FinanceCenterMediumInvoiceSave) // 财务中心-媒体详情-发票审核
r.POST("/medium/other/income/save", hdl.FinanceCenterMediumOtherIncomeSave) // 财务中心-媒体详情-其他收益调整
r.POST("/medium/pay/save", hdl.FinanceCenterMediumPaySave) // 财务中心-媒体详情-确认支付
r.POST("/medium/check/save", hdl.FinanceCenterMediumCheckSave) // 财务中心-媒体详情-确认支付

r.POST("/platform/list", hdl.FinanceCenterPlatformList) // 财务中心-平台报表

@@ -289,6 +290,7 @@ func rFinanceCenter(r *gin.RouterGroup) {
r.POST("/agent/invoice/save", hdl.FinanceCenterAgentInvoiceSave) // 财务中心-代理详情-发票审核
r.POST("/agent/other/income/save", hdl.FinanceCenterAgentOtherIncomeSave) // 财务中心-代理详情-其他收益调整
r.POST("/agent/pay/save", hdl.FinanceCenterAgentPaySave) // 财务中心-代理详情-确认支付
r.POST("/agent/check/save", hdl.FinanceCenterAgentCheckSave) // 财务中心-媒体详情-确认支付

}



+ 13
- 0
app/svc/svc_finance_center_agent.go Visa fil

@@ -74,6 +74,19 @@ func FinanceCenterAgentPaySave(c *gin.Context, req md.CommDetailReq) {
e.OutSuc(c, "success", nil)
return
}
func FinanceCenterAgentCheckSave(c *gin.Context, req md.CommDetailReq) {
engine := db.Db
NewAgentSettlementDb := implement.NewAgentSettlementDb(engine)
data, _ := NewAgentSettlementDb.GetAgentSettlementById(utils.StrToInt(req.Id))
if data.State > 1 {
e.OutErr(c, 400, e.NewErr(400, "不能再调整"))
return
}
data.State = 1
engine.Where("id=?", data.Id).Cols("state").Update(data)
e.OutSuc(c, "success", nil)
return
}
func FinanceCenterAgentOtherIncomeSave(c *gin.Context, req md.OtherIncomeReq) {
engine := db.Db
NewAgentSettlementDb := implement.NewAgentSettlementDb(engine)


+ 13
- 0
app/svc/svc_finance_center_medium.go Visa fil

@@ -74,6 +74,19 @@ func FinanceCenterMediumPaySave(c *gin.Context, req md.CommDetailReq) {
e.OutSuc(c, "success", nil)
return
}
func FinanceCenterMediumCheckSave(c *gin.Context, req md.CommDetailReq) {
engine := db.Db
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine)
data, _ := NewMediumSettlementDb.GetMediumSettlementById(utils.StrToInt(req.Id))
if data.State > 1 {
e.OutErr(c, 400, e.NewErr(400, "不能再调整"))
return
}
data.State = 1
engine.Where("id=?", data.Id).Cols("state").Update(data)
e.OutSuc(c, "success", nil)
return
}
func FinanceCenterMediumOtherIncomeSave(c *gin.Context, req md.OtherIncomeReq) {
engine := db.Db
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine)


Laddar…
Avbryt
Spara