@@ -103,6 +103,17 @@ func FinanceCenterAgentPaySave(c *gin.Context) { | |||||
} | } | ||||
svc.FinanceCenterAgentPaySave(c, req) | 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 | // FinanceCenterAgentOtherIncomeSave | ||||
// @Summary 代理详情-其他收益调整 | // @Summary 代理详情-其他收益调整 | ||||
@@ -128,6 +128,17 @@ func FinanceCenterMediumPaySave(c *gin.Context) { | |||||
} | } | ||||
svc.FinanceCenterMediumPaySave(c, req) | 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 | // FinanceCenterMediumOtherIncomeSave | ||||
// @Summary 媒体详情-其他收益调整 | // @Summary 媒体详情-其他收益调整 | ||||
@@ -280,6 +280,7 @@ func rFinanceCenter(r *gin.RouterGroup) { | |||||
r.POST("/medium/invoice/save", hdl.FinanceCenterMediumInvoiceSave) // 财务中心-媒体详情-发票审核 | r.POST("/medium/invoice/save", hdl.FinanceCenterMediumInvoiceSave) // 财务中心-媒体详情-发票审核 | ||||
r.POST("/medium/other/income/save", hdl.FinanceCenterMediumOtherIncomeSave) // 财务中心-媒体详情-其他收益调整 | r.POST("/medium/other/income/save", hdl.FinanceCenterMediumOtherIncomeSave) // 财务中心-媒体详情-其他收益调整 | ||||
r.POST("/medium/pay/save", hdl.FinanceCenterMediumPaySave) // 财务中心-媒体详情-确认支付 | r.POST("/medium/pay/save", hdl.FinanceCenterMediumPaySave) // 财务中心-媒体详情-确认支付 | ||||
r.POST("/medium/check/save", hdl.FinanceCenterMediumCheckSave) // 财务中心-媒体详情-确认支付 | |||||
r.POST("/platform/list", hdl.FinanceCenterPlatformList) // 财务中心-平台报表 | 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/invoice/save", hdl.FinanceCenterAgentInvoiceSave) // 财务中心-代理详情-发票审核 | ||||
r.POST("/agent/other/income/save", hdl.FinanceCenterAgentOtherIncomeSave) // 财务中心-代理详情-其他收益调整 | r.POST("/agent/other/income/save", hdl.FinanceCenterAgentOtherIncomeSave) // 财务中心-代理详情-其他收益调整 | ||||
r.POST("/agent/pay/save", hdl.FinanceCenterAgentPaySave) // 财务中心-代理详情-确认支付 | r.POST("/agent/pay/save", hdl.FinanceCenterAgentPaySave) // 财务中心-代理详情-确认支付 | ||||
r.POST("/agent/check/save", hdl.FinanceCenterAgentCheckSave) // 财务中心-媒体详情-确认支付 | |||||
} | } | ||||
@@ -74,6 +74,19 @@ func FinanceCenterAgentPaySave(c *gin.Context, req md.CommDetailReq) { | |||||
e.OutSuc(c, "success", nil) | e.OutSuc(c, "success", nil) | ||||
return | 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) { | func FinanceCenterAgentOtherIncomeSave(c *gin.Context, req md.OtherIncomeReq) { | ||||
engine := db.Db | engine := db.Db | ||||
NewAgentSettlementDb := implement.NewAgentSettlementDb(engine) | NewAgentSettlementDb := implement.NewAgentSettlementDb(engine) | ||||
@@ -74,6 +74,19 @@ func FinanceCenterMediumPaySave(c *gin.Context, req md.CommDetailReq) { | |||||
e.OutSuc(c, "success", nil) | e.OutSuc(c, "success", nil) | ||||
return | 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) { | func FinanceCenterMediumOtherIncomeSave(c *gin.Context, req md.OtherIncomeReq) { | ||||
engine := db.Db | engine := db.Db | ||||
NewMediumSettlementDb := implement.NewMediumSettlementDb(engine) | NewMediumSettlementDb := implement.NewMediumSettlementDb(engine) | ||||