作者 Your Name

Merge branch 'dev' into test

... ... @@ -5,8 +5,8 @@ import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domai
type ListContractChangeLogQuery struct {
//操作人
Operator domain.Operator `json:"-"`
PageNumber int `json:"pageNumber,omitempty"` // 页码
PageSize int `json:"pageSize,omitempty"` // 页面大小
PageNumber int `json:"pageNumber"` // 页码
PageSize int `json:"pageSize"` // 页面大小
OperationType int `json:"operationType,"` // 合约变更操作类型,1编辑、2暂停、3恢复
CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
}
... ...
... ... @@ -213,7 +213,7 @@ func (cooperationContractService *CooperationContractService) SearchCooperationC
CooperationContractName: queryParam.CooperationContractName,
SponsorName: queryParam.ContractSponsor,
PageNumber: queryParam.PageNumber,
PageIndex: queryParam.PageSize,
PageSize: queryParam.PageSize,
CompanyId: queryParam.Operator.CompanyId,
OrgIds: queryParam.Operator.OrgIds,
})
... ...
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
... ... @@ -11,24 +8,7 @@ type GetCooperationProjectQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创项目ID
CooperationProjectId int `json:"cooperationProjectId"`
CooperationProjectNumber string `json:"cooperationProjectNumber"`
}
func (getCooperationProjectQuery *GetCooperationProjectQuery) Valid(validation *validation.Validation) {
}
func (getCooperationProjectQuery *GetCooperationProjectQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(getCooperationProjectQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
CooperationProjectId int `json:"-"`
CooperationProjectNumber string `json:"-"`
OrgId int `json:"-"`
}
... ...
... ... @@ -63,6 +63,8 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
resultProject, err := creationCooperationGateway.CooperationProjectGet(allied_creation_cooperation.ReqCooperationProjectGet{
CooperationProjectId: getCooperationProjectQuery.CooperationProjectId,
CooperationProjectNumber: getCooperationProjectQuery.CooperationProjectNumber,
OrgId: getCooperationProjectQuery.OrgId,
CompanyId: int(getCooperationProjectQuery.Operator.CompanyId),
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ... @@ -72,6 +74,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
PageNumber: 0,
PageSize: 0,
CompanyId: resultProject.Company.CompanyId,
OrgId: int64(resultProject.Org.OrgId),
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -8,24 +8,7 @@ type GetDividendsOrderQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 分红订单ID
DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"`
DividendsOrderNumber string `json:"dividendsOrderNumber"`
DividendsOrderId int `json:"-" `
DividendsOrderNumber string `json:"-"`
OrgId int `json:"-"`
}
// func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) {
// }
// func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error {
// valid := validation.Validation{}
// b, err := valid.Valid(getDividendsOrderQuery)
// if err != nil {
// return err
// }
// if !b {
// for _, validErr := range valid.Errors {
// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
// }
// }
// return nil
// }
... ...
... ... @@ -57,6 +57,8 @@ func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividen
result, err := creationCooperationGateway.DividendsOrderGet(allied_creation_cooperation.ReqDividendsOrderGet{
DividendsOrderId: getDividendsOrderQuery.DividendsOrderId,
DividendsOrderNumber: getDividendsOrderQuery.DividendsOrderNumber,
OrgId: getDividendsOrderQuery.OrgId,
CompanyId: int(getDividendsOrderQuery.Operator.CompanyId),
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
package service
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"strconv"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/dto"
... ... @@ -164,7 +165,7 @@ func (orgsService OrgsService) DepartmentsUsers(departmentsUsersQuery *query.Dep
CompanyId: departmentsUsersQuery.Operator.CompanyId,
OrganizationId: departmentsUsersQuery.Operator.OrgId,
Limit: 1000,
InEnableStatus: []int{domain.UserStatusEnable, domain.UserStatusDisable},
InEnableStatus: []int{domain.UserStatusEnable},
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -78,7 +78,10 @@ func (gateway HttplibAlliedCreationCooperation) CooperationProjectGet(param ReqC
req := gateway.CreateRequest(url, method)
if len(param.CooperationProjectNumber) > 0 {
req.Param("cooperationProjectNumber", param.CooperationProjectNumber)
req.Param("orgId", strconv.Itoa(param.OrgId))
req.Param("companyId", strconv.Itoa(param.CompanyId))
}
log.Logger.Debug("向业务模块请求数据:返回共创项目详情。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
... ...
... ... @@ -205,6 +205,8 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid
req := gateway.CreateRequest(url, method)
if len(param.DividendsOrderNumber) > 0 {
req.Param("dividendsOrderNumber", param.DividendsOrderNumber)
req.Param("orgId", strconv.Itoa(param.OrgId))
req.Param("companyId", strconv.Itoa(param.CompanyId))
}
fmt.Printf("=========>param %+v", param)
log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{
... ...
... ... @@ -254,7 +254,7 @@ type (
CooperationContractName string `json:"cooperationContractName"` //合约名称
SponsorName string `json:"sponsorName"` //项目发起人姓名
PageNumber int `json:"pageNumber"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
CompanyId int64 ` json:"companyId"`
OrgId int64 ` json:"orgId"`
UserBaseId int64 `json:"userBaseId"`
... ...
... ... @@ -118,6 +118,8 @@ type (
ReqCooperationProjectGet struct {
CooperationProjectId int
CooperationProjectNumber string
OrgId int
CompanyId int
}
DataCooperationProjectGet struct {
... ...
... ... @@ -173,8 +173,10 @@ type (
//返回分红订单详情
type (
ReqDividendsOrderGet struct {
DividendsOrderId int `json:"dividendsOrderId"`
DividendsOrderNumber string `json:"dividendsOrderNumber"`
DividendsOrderId int
DividendsOrderNumber string
OrgId int
CompanyId int
}
DataDividendsOrderGet struct {
... ...
... ... @@ -46,8 +46,10 @@ func (controller *CooperationProjectController) GetCooperationProject() {
getCooperationProjectQuery := &query.GetCooperationProjectQuery{}
projectId, _ := controller.GetInt(":projectId")
projectNumber := controller.GetString("cooperationProjectNumber")
orgId, _ := controller.GetInt("orgId")
getCooperationProjectQuery.CooperationProjectId = projectId
getCooperationProjectQuery.CooperationProjectNumber = projectNumber
getCooperationProjectQuery.OrgId = orgId
getCooperationProjectQuery.Operator = controller.GetOperator()
data, err := cooperationProjectService.GetCooperationProject(getCooperationProjectQuery)
controller.Response(data, err)
... ...
... ... @@ -61,7 +61,9 @@ func (controller *DividendsOrderController) GetDividendsOrder() {
getDividendsOrderQuery := &query.GetDividendsOrderQuery{}
orderId, _ := controller.GetInt(":orderId")
dividendsOrderNumber := controller.GetString("dividendsOrderNumber")
orgId, _ := controller.GetInt("orgId")
getDividendsOrderQuery.DividendsOrderId = orderId
getDividendsOrderQuery.OrgId = orgId
getDividendsOrderQuery.DividendsOrderNumber = dividendsOrderNumber
getDividendsOrderQuery.Operator = controller.GetOperator()
data, err := dividendsOrderService.GetDividendsOrder(getDividendsOrderQuery)
... ...