作者 yangfu

合并

正在显示 29 个修改的文件 包含 316 行增加82 行删除
... ... @@ -29,7 +29,7 @@ type CreateCompanyCommand struct {
}
func (createCompanyCommand *CreateCompanyCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (createCompanyCommand *CreateCompanyCommand) ValidateCommand() error {
... ...
... ... @@ -19,7 +19,7 @@ type AuditCooperationApplicationCommand struct {
}
func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) ValidateCommand() error {
... ...
... ... @@ -16,7 +16,7 @@ type GetCooperationApplicationQuery struct {
}
func (getCooperationApplicationQuery *GetCooperationApplicationQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (getCooperationApplicationQuery *GetCooperationApplicationQuery) ValidateQuery() error {
... ...
... ... @@ -85,7 +85,7 @@ type CreateCooperationContractCommand struct {
}
func (createCooperationContractCommand *CreateCooperationContractCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (createCooperationContractCommand *CreateCooperationContractCommand) ValidateCommand() error {
... ...
... ... @@ -86,7 +86,7 @@ type UpdateCooperationContractCommand struct {
}
func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (updateCooperationContractCommand *UpdateCooperationContractCommand) ValidateCommand() error {
... ...
... ... @@ -8,7 +8,7 @@ import (
type GetCooperationContractQuery struct {
// 共创合约ID
CooperationContractId int64 `json:"cooperationContractId" valid:"Required"`
CooperationContractId int `json:"cooperationContractId" valid:"Required"`
}
func (getCooperationContractQuery *GetCooperationContractQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -27,7 +27,7 @@ func (cooperationModeService *CooperationModeService) CreateCooperationMode(crea
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
data := struct {
CooperationModeId int `json:"cooperationModeId,string," valid:"Required"`
CooperationModeId int `json:"cooperationModeId,string,"`
command.CreateCooperationModeCommand
}{
CooperationModeId: result.CooperationModeId,
... ...
... ... @@ -2,6 +2,7 @@ package command
import (
"fmt"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"github.com/beego/beego/v2/core/validation"
... ... @@ -17,7 +18,7 @@ type MenuFavoriteCommand struct {
}
func (menuFavoriteCommand *MenuFavoriteCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (menuFavoriteCommand *MenuFavoriteCommand) ValidateCommand() error {
... ...
... ... @@ -22,7 +22,7 @@ type MenuUpdateCommand struct {
}
func (menuUpdateQuery *MenuUpdateCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (menuUpdateQuery *MenuUpdateCommand) ValidateQuery() error {
... ...
... ... @@ -15,7 +15,7 @@ type RemoveDividendsOrderCommand struct {
}
func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error {
... ...
... ... @@ -15,7 +15,7 @@ type GetDividendsOrderQuery struct {
}
func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error {
... ...
... ... @@ -14,7 +14,7 @@ type ListDividendsOrdersQuery struct {
}
func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (listDividendsOrdersQuery *ListDividendsOrdersQuery) ValidateQuery() error {
... ...
... ... @@ -21,7 +21,7 @@ type SearchDividendsOrderQuery struct {
}
func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (searchDividendsOrderQuery *SearchDividendsOrderQuery) ValidateQuery() error {
... ...
... ... @@ -67,7 +67,6 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return updateDividendsReturnedOrderCommand, nil
}
func NewDividendsReturnedOrderService(options map[string]interface{}) *DividendsReturnedOrderService {
... ...
... ... @@ -15,7 +15,7 @@ type OrgGetQuery struct {
}
func (orgGetQuery *OrgGetQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (orgGetQuery *OrgGetQuery) ValidateQuery() error {
... ...
... ... @@ -2,6 +2,7 @@ package query
import (
"fmt"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"github.com/beego/beego/v2/core/validation"
... ... @@ -15,7 +16,7 @@ type RoleMenuBeforeEditQuery struct {
}
func (roleMenuBeforeEditQuery *RoleMenuBeforeEditQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (roleMenuBeforeEditQuery *RoleMenuBeforeEditQuery) ValidateQuery() error {
... ...
... ... @@ -2,6 +2,7 @@ package query
import (
"fmt"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"github.com/beego/beego/v2/core/validation"
... ... @@ -15,7 +16,7 @@ type RoleUserBeforeEditQuery struct {
}
func (roleUserBeforeEditQuery *RoleUserBeforeEditQuery) Valid(validation *validation.Validation) {
//validation.SetError("CustomValid", "未实现的自定义认证")
}
func (roleUserBeforeEditQuery *RoleUserBeforeEditQuery) ValidateQuery() error {
... ...
... ... @@ -15,7 +15,7 @@ type RoleUserInfoQuery struct {
}
func (roleUserInfoQuery *RoleUserInfoQuery) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (roleUserInfoQuery *RoleUserInfoQuery) ValidateQuery() error {
... ...
... ... @@ -33,7 +33,7 @@ type CompanyUserAddCommand struct {
}
func (companyUserAddCommand *CompanyUserAddCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (companyUserAddCommand *CompanyUserAddCommand) ValidateCommand() error {
... ...
... ... @@ -17,7 +17,7 @@ type CompanyUserEnableCommand struct {
}
func (companyUserEnableCommand *CompanyUserEnableCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (companyUserEnableCommand *CompanyUserEnableCommand) ValidateCommand() error {
... ...
... ... @@ -14,7 +14,7 @@ type CompanyUserResetPasswordCommand struct {
}
func (companyUserResetPasswordCommand *CompanyUserResetPasswordCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (companyUserResetPasswordCommand *CompanyUserResetPasswordCommand) ValidateCommand() error {
... ...
... ... @@ -42,7 +42,7 @@ type Role struct {
}
func (companyUserUpdateCommand *CompanyUserUpdateCommand) Valid(validation *validation.Validation) {
validation.SetError("CustomValid", "未实现的自定义认证")
}
func (companyUserUpdateCommand *CompanyUserUpdateCommand) ValidateCommand() error {
... ...
... ... @@ -196,3 +196,35 @@ func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderGet(param
err = gateway.GetResponseData(result, &data)
return &data, err
}
// DividendsReturnedOrderBatchRemove 批量移除分红退货单
func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderBatchRemove(param ReqDividendsReturnedOrderRemove) (
*DataDividendsReturnedOrderRemove, error) {
url := gateway.baseUrL + "/dividends-returned-orders/batch-remove"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:批量移除分红退货单。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求批量移除分红退货单失败:%w", err)
}
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取批量移除分红退货单失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:批量移除分红退货单。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析移除分红退货单:%w", err)
}
var data DataDividendsReturnedOrderRemove
err = gateway.GetResponseData(result, &data)
return &data, err
}
... ...
package web_client
import (
"github.com/linmadan/egglib-go/web/beego"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/service"
)
type CooperationContractController struct {
beego.BaseController
}
func (controller *CooperationContractController) CreateCooperationContract() {
cooperationContractService := service.NewCooperationContractService(nil)
createCooperationContractCommand := &command.CreateCooperationContractCommand{}
controller.Unmarshal(createCooperationContractCommand)
data, err := cooperationContractService.CreateCooperationContract(createCooperationContractCommand)
controller.Response(data, err)
}
func (controller *CooperationContractController) UpdateCooperationContract() {
cooperationContractService := service.NewCooperationContractService(nil)
updateCooperationContractCommand := &command.UpdateCooperationContractCommand{}
controller.Unmarshal(updateCooperationContractCommand)
contractId, _ := controller.GetInt(":contractId")
updateCooperationContractCommand.CooperationContract.CooperationContractId = contractId
data, err := cooperationContractService.UpdateCooperationContract(updateCooperationContractCommand)
controller.Response(data, err)
}
func (controller *CooperationContractController) GetCooperationContract() {
cooperationContractService := service.NewCooperationContractService(nil)
getCooperationContractQuery := &query.GetCooperationContractQuery{}
contractId, _ := controller.GetInt(":contractId")
getCooperationContractQuery.CooperationContractId = contractId
data, err := cooperationContractService.GetCooperationContract(getCooperationContractQuery)
controller.Response(data, err)
}
func (controller *CooperationContractController) ListCooperationContract() {
cooperationContractService := service.NewCooperationContractService(nil)
listCooperationContractQuery := &query.ListCooperationContractQuery{}
data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery)
controller.Response(data, err)
}
func (controller *CooperationContractController) EnableCooperationContract() {
cooperationContractService := service.NewCooperationContractService(nil)
enableCooperationContractCommand := &command.EnableCooperationContractCommand{}
controller.Unmarshal(enableCooperationContractCommand)
data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand)
controller.Response(data, err)
}
... ...
... ... @@ -4,7 +4,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationMode/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationMode/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationMode/service"
"strconv"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
type CooperationModeController struct {
... ... @@ -12,85 +12,59 @@ type CooperationModeController struct {
}
func (controller *CooperationModeController) CreateCooperationMode() {
svr := service.CooperationModeService{}
cmd := &command.CreateCooperationModeCommand{}
err := controller.Unmarshal(cmd)
cooperationModeService := service.NewCooperationModeService(nil)
createCooperationModeCommand := &command.CreateCooperationModeCommand{}
err := controller.Unmarshal(createCooperationModeCommand)
if err != nil {
controller.Response(nil, err)
return
log.Logger.Debug("json err:" + err.Error())
}
cmd.Operator = controller.GetOperator()
data, err := svr.CreateCooperationMode(cmd)
createCooperationModeCommand.Operator = controller.GetOperator()
data, err := cooperationModeService.CreateCooperationMode(createCooperationModeCommand)
controller.Response(data, err)
}
func (controller *CooperationModeController) UpdateCooperationMode() {
svr := service.CooperationModeService{}
cmd := &command.UpdateCooperationModeCommand{}
err := controller.Unmarshal(cmd)
cooperationModeService := service.NewCooperationModeService(nil)
updateCooperationModeCommand := &command.UpdateCooperationModeCommand{}
err := controller.Unmarshal(updateCooperationModeCommand)
if err != nil {
controller.Response(nil, err)
return
log.Logger.Debug("json err:" + err.Error())
}
cooperationModeId := controller.GetString(":cooperationModeId")
cmd.CooperationModeId, _ = strconv.Atoi(cooperationModeId)
cmd.Operator = controller.GetOperator()
data, err := svr.UpdateCooperationMode(cmd)
modeId, _ := controller.GetInt(":modeId")
updateCooperationModeCommand.Operator = controller.GetOperator()
updateCooperationModeCommand.CooperationModeId = modeId
data, err := cooperationModeService.UpdateCooperationMode(updateCooperationModeCommand)
controller.Response(data, err)
}
func (controller *CooperationModeController) GetCooperationMode() {
svr := service.CooperationModeService{}
cmd := &query.GetCooperationModeQuery{}
err := controller.Unmarshal(cmd)
if err != nil {
controller.Response(nil, err)
return
}
cooperationModeId := controller.GetString(":cooperationModeId")
cmd.CooperationModeId, _ = strconv.Atoi(cooperationModeId)
cmd.Operator = controller.GetOperator()
data, err := svr.GetCooperationMode(cmd)
cooperationModeService := service.NewCooperationModeService(nil)
getCooperationModeQuery := &query.GetCooperationModeQuery{}
modeId, _ := controller.GetInt(":modeId")
getCooperationModeQuery.CooperationModeId = modeId
getCooperationModeQuery.Operator = controller.GetOperator()
data, err := cooperationModeService.GetCooperationMode(getCooperationModeQuery)
controller.Response(data, err)
}
func (controller *CooperationModeController) RemoveCooperationMode() {
svr := service.CooperationModeService{}
cmd := &command.RemoveCooperationModeCommand{}
err := controller.Unmarshal(cmd)
if err != nil {
controller.Response(nil, err)
return
}
cooperationModeId := controller.GetString(":cooperationModeId")
cmd.CooperationModeId, _ = strconv.Atoi(cooperationModeId)
cmd.Operator = controller.GetOperator()
data, err := svr.RemoveCooperationMode(cmd)
cooperationModeService := service.NewCooperationModeService(nil)
removeCooperationModeCommand := &command.RemoveCooperationModeCommand{}
modeId, _ := controller.GetInt(":modeId")
removeCooperationModeCommand.Operator = controller.GetOperator()
removeCooperationModeCommand.CooperationModeId = modeId
data, err := cooperationModeService.RemoveCooperationMode(removeCooperationModeCommand)
controller.Response(data, err)
}
func (controller *CooperationModeController) SearchCooperationMode() {
svr := service.CooperationModeService{}
cmd := &query.ListCooperationModeQuery{}
err := controller.Unmarshal(cmd)
if err != nil {
controller.Response(nil, err)
return
}
cmd.Operator = controller.GetOperator()
cnt, data, err := svr.ListCooperationMode(cmd)
controller.returnPageListData(cnt, data, err, cmd.PageNumber)
}
func (controller *CooperationModeController) ListCooperationMode() {
svr := service.CooperationModeService{}
cmd := &query.ListCooperationModeQuery{}
err := controller.Unmarshal(cmd)
cooperationModeService := service.NewCooperationModeService(nil)
listCooperationModeQuery := &query.ListCooperationModeQuery{}
err := controller.Unmarshal(listCooperationModeQuery)
if err != nil {
controller.Response(nil, err)
return
log.Logger.Debug("json err:" + err.Error())
}
cmd.Operator = controller.GetOperator()
_, data, err := svr.ListCooperationMode(cmd)
controller.Response(data, err)
listCooperationModeQuery.Operator = controller.GetOperator()
cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery)
controller.returnPageListData(cnt, data, err, listCooperationModeQuery.PageNumber)
}
... ...
package web_client
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsOrder/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsOrder/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsOrder/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
type DividendsOrderController struct {
baseController
}
func (controller *DividendsOrderController) CreateDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
createDividendsOrderCommand := &command.CreateDividendsOrderCommand{}
err := controller.Unmarshal(createDividendsOrderCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
data, err := dividendsOrderService.CreateDividendsOrder(createDividendsOrderCommand)
controller.Response(data, err)
}
func (controller *DividendsOrderController) UpdateDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
updateDividendsOrderCommand := &command.UpdateDividendsOrderCommand{}
err := controller.Unmarshal(updateDividendsOrderCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
orderId, _ := controller.GetInt(":orderId")
updateDividendsOrderCommand.DividendsOrderID = orderId
data, err := dividendsOrderService.UpdateDividendsOrder(updateDividendsOrderCommand)
controller.Response(data, err)
}
func (controller *DividendsOrderController) RemoveDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
removeDividendsOrderCommand := &command.RemoveDividendsOrderCommand{}
err := controller.Unmarshal(removeDividendsOrderCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
removeDividendsOrderCommand.Operator = controller.GetOperator()
data, err := dividendsOrderService.RemoveDividendsOrder(removeDividendsOrderCommand)
controller.Response(data, err)
}
func (controller *DividendsOrderController) GetDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
getDividendsOrderQuery := &query.GetDividendsOrderQuery{}
orderId, _ := controller.GetInt(":orderId")
getDividendsOrderQuery.DividendsOrderId = orderId
getDividendsOrderQuery.Operator = controller.GetOperator()
data, err := dividendsOrderService.GetDividendsOrder(getDividendsOrderQuery)
controller.Response(data, err)
}
func (controller *DividendsOrderController) SearchDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
searchDividendsOrderQuery := &query.SearchDividendsOrderQuery{}
err := controller.Unmarshal(searchDividendsOrderQuery)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
searchDividendsOrderQuery.Operator = controller.GetOperator()
cnt, data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery)
controller.returnPageListData(int64(cnt), data, err, searchDividendsOrderQuery.PageNumber)
}
... ...
package web_client
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
type DividendsReturnedOrderController struct {
baseController
}
func (controller *DividendsReturnedOrderController) CreateDividendsReturnedOrder() {
dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil)
createDividendsReturnedOrderCommand := &command.CreateDividendsReturnedOrderCommand{}
err := controller.Unmarshal(createDividendsReturnedOrderCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
createDividendsReturnedOrderCommand.Operator = controller.GetOperator()
data, err := dividendsReturnedOrderService.CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand)
controller.Response(data, err)
}
func (controller *DividendsReturnedOrderController) UpdateDividendsReturnedOrder() {
dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil)
updateDividendsReturnedOrderCommand := &command.UpdateDividendsReturnedOrderCommand{}
err := controller.Unmarshal(updateDividendsReturnedOrderCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
projectId, _ := controller.GetInt(":projectId")
updateDividendsReturnedOrderCommand.DividendsReturnedOrderID = projectId
updateDividendsReturnedOrderCommand.Operator = controller.GetOperator()
data, err := dividendsReturnedOrderService.UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand)
controller.Response(data, err)
}
func (controller *DividendsReturnedOrderController) RemoveDividendsReturnedOrder() {
dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil)
removeDividendsReturnedOrderCommand := &command.RemoveDividendsReturnedOrderCommand{}
err := controller.Unmarshal(removeDividendsReturnedOrderCommand)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
projectId, _ := controller.GetInt(":projectId")
removeDividendsReturnedOrderCommand.DividendsReturnedOrderID = projectId
removeDividendsReturnedOrderCommand.Operator = controller.GetOperator()
data, err := dividendsReturnedOrderService.RemoveDividendsReturnedOrder(removeDividendsReturnedOrderCommand)
controller.Response(data, err)
}
func (controller *DividendsReturnedOrderController) GetDividendsReturnedOrder() {
dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil)
getDividendsReturnedOrderQuery := &query.GetDividendsReturnedOrderQuery{}
projectId, _ := controller.GetInt(":projectId")
getDividendsReturnedOrderQuery.DividendsReturnedOrderID = projectId
getDividendsReturnedOrderQuery.Operator = controller.GetOperator()
data, err := dividendsReturnedOrderService.GetDividendsReturnedOrder(getDividendsReturnedOrderQuery)
controller.Response(data, err)
}
func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder() {
dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil)
searchDividendsReturnedOrderQuery := &query.SearchDividendsReturnedOrderQuery{}
err := controller.Unmarshal(searchDividendsReturnedOrderQuery)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
searchDividendsReturnedOrderQuery.Operator = controller.GetOperator()
cnt, data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery)
controller.returnPageListData(int64(cnt), data, err, searchDividendsReturnedOrderQuery.PageNumber)
}
... ...
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/cooperation-modes/", &web_client.CooperationModeController{}, "Post:CreateCooperationMode")
web.Router("/v1/web/cooperation-modes/:modeId", &web_client.CooperationModeController{}, "Put:UpdateCooperationMode")
web.Router("/v1/web/cooperation-modes/:modeId", &web_client.CooperationModeController{}, "Get:GetCooperationMode")
web.Router("/v1/web/cooperation-modes/:modeId", &web_client.CooperationModeController{}, "Delete:RemoveCooperationMode")
web.Router("/v1/web/cooperation-modes/search", &web_client.CooperationModeController{}, "Post:ListCooperationMode")
}
... ...
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-returned-order/", &web_client.DividendsReturnedOrderController{}, "Post:CreateDividendsReturnedOrder")
web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Put:UpdateDividendsReturnedOrder")
web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Delete:RemoveDividendsReturnedOrder")
web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Get:GetDividendsReturnedOrder")
web.Router("/v1/web/dividends-returned-order/search", &web_client.DividendsReturnedOrderController{}, "Post:SearchDividendsReturnedOrder")
}
... ...