作者 tangxuhui

添加结算

{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628818869330120900}
\ No newline at end of file
{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628844413608624400}
\ No newline at end of file
... ...
package query
type ListCreditAccountQuery struct {
}
... ...
package service
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/creditAccount/query"
)
type CreditAccountService struct{}
//ListCreditAccount返回账期结算列表
func (srv *CreditAccountService) ListCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
return 0, nil, nil
}
//GetCreditAccount 返回账期结算详情
func (srv *CreditAccountService) GetCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
return 0, nil, nil
}
//PayCreditAccount 支付账期结算
func (srv *CreditAccountService) PayCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
return 0, nil, nil
}
//RemoveCreditAccount 删除账期结算
func (srv *CreditAccountService) RemoveCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
return 0, nil, nil
}
... ...
package web_client
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
type DividendsEstimateController struct {
baseController
}
//CancelDividendsEstimate 取消分红预算
func (controller *DividendsEstimateController) CancelDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
cancelDividendsEstimateCommand := &command.CancelDividendsEstimateCommand{}
err := controller.Unmarshal(cancelDividendsEstimateCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
cancelDividendsEstimateCommand.Operator = controller.GetOperator()
data, err := dividendsEstimateService.CancelDividendsEstimate(cancelDividendsEstimateCommand)
controller.Response(data, err)
}
//SearchDividendsEstimate 查询分红预算单列表
func (controller *DividendsEstimateController) SearchDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchDividendsEstimateQuery := &query.SearchDividendsEstimateQuery{}
err := controller.Unmarshal(searchDividendsEstimateQuery)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
searchDividendsEstimateQuery.Operator = controller.GetOperator()
data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery)
controller.Response(data, err)
}
//SearchDividendsIncentives 查询业绩分红
func (controller *DividendsEstimateController) SearchDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchDividendsIncentivesQuery := &query.SearchDividendsIncentivesQuery{}
err := controller.Unmarshal(searchDividendsIncentivesQuery)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
searchDividendsIncentivesQuery.Operator = controller.GetOperator()
data, err := dividendsEstimateService.SearchDividendsIncentives(searchDividendsIncentivesQuery)
controller.Response(data, err)
}
//SearchMoneyIncentives 查询金额激励分红
func (controller *DividendsEstimateController) SearchMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchMoneyIncentivesQuery := &query.SearchMoneyIncentivesQuery{}
err := controller.Unmarshal(searchMoneyIncentivesQuery)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
searchMoneyIncentivesQuery.Operator = controller.GetOperator()
data, err := dividendsEstimateService.SearchMoneyIncentives(searchMoneyIncentivesQuery)
controller.Response(data, err)
}
//EstimateMoneyIncentives 确定预算金额激励分红
func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateMoneyIncentivesCommand := &command.EstimateMoneyIncentivesCommand{}
err := controller.Unmarshal(estimateMoneyIncentivesCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
estimateMoneyIncentivesCommand.Operator = controller.GetOperator()
data, err := dividendsEstimateService.EstimateMoneyIncentives(estimateMoneyIncentivesCommand)
controller.Response(data, err)
}
//EstimateDividendsIncentives 确定业绩分红激励
func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateDividendsIncentivesCommand := &command.EstimateDividendsIncentivesCommand{}
err := controller.Unmarshal(estimateDividendsIncentivesCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
estimateDividendsIncentivesCommand.Operator = controller.GetOperator()
data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand)
controller.Response(data, err)
}
... ...
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/web_client"
)
func init() {
web.Router("/v1/web/dividends-estimate/cancel", &web_client.DividendsEstimateController{}, "Post:CancelDividendsEstimate")
web.Router("/v1/web/dividends-estimate/search", &web_client.DividendsEstimateController{}, "Post:SearchDividendsEstimate")
web.Router("/v1/web/dividends-estimate/dividends-incentives/search", &web_client.DividendsEstimateController{}, "Post:SearchDividendsIncentives")
web.Router("/v1/web/dividends-estimate/money-incentives/search", &web_client.DividendsEstimateController{}, "Post:SearchMoneyIncentives")
web.Router("/v1/web/dividends-estimate/money-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateMoneyIncentives")
web.Router("/v1/web/dividends-estimate/dividends-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateDividendsIncentives")
}
... ...