作者 陈志颖

feat:调整基础设施层

... ... @@ -13,6 +13,10 @@ type ListContractUndertakerFeedbackQuery struct {
Offset int `cname:"查询偏离量" json:"offset,omitempty"`
// 查询限制
Limit int `cname:"查询限制" json:"limit,omitempty"`
// 查询偏离量
PageSize int32 `cname:"查询限制" json:"pageSize,omitempty"`
// 查询限制
PageNumber int32 `cname:"查询限制" json:"pageNumber,omitempty"`
// 承接人uid
UnderTakerUid string `cname:"承接人uid" json:"underTakerUid" valid:"Required"`
// 公司ID,通过集成REST上下文获取
... ...
... ... @@ -10,9 +10,9 @@ import (
type SearchContractUndertakerFeedbackQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber" valid:"Required"`
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize" valid:"Required"`
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 共创合约名称
CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName" valid:"Required"`
// 承接人姓名
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type ListCooperationApplicationQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 查询偏离量
Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
// 查询限制
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type ListCooperationContractQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 查询偏离量
Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
// 查询限制
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type SearchCooperationContractByUndertakerQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 共创合约名称
CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName,omitempty"`
// 项目发起人姓名
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type ListCooperationContractChangeLogQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 查询偏离量
Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
// 查询限制
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type ListCooperationModeQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 查询偏离量
Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
// 查询限制
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type ListCooperationProjectQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 查询偏离量
Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
// 查询限制
... ...
... ... @@ -9,6 +9,10 @@ import (
)
type ListCreditAccountQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 查询偏离量
Offset int `cname:"查询偏离量" json:"offset" valid:"Required"`
// 查询限制
... ...
... ... @@ -10,6 +10,10 @@ import (
)
type SearchCreditAccountQuery struct {
// 页面大小
PageNumber int32 `cname:"页面大小" json:"pageNumber,omitempty"`
// 页面大小
PageSize int32 `cname:"页面大小" json:"pageSize,omitempty"`
// 账期结算单号
CreditAccountOrderNum string `cname:"账期结算单号" json:"creditAccountOrderNum" valid:"Required"`
// 参与人姓名
... ...
... ... @@ -10,22 +10,23 @@ type HttplibUserServiceGateway struct {
httplibBaseServiceGateway
}
// GetUser 获取用户
func (serviceGateway *HttplibUserServiceGateway) GetUser(uid int64) (map[string]interface{}, error) {
url := strings.Join([]string{serviceGateway.baseURL, ""}, "/")
request := serviceGateway.createRequest(url, "post")
url := strings.Join([]string{serviceGateway.baseURL, "users/get-user"}, "/")
request := serviceGateway.createRequest(url, "get")
options := make(map[string]interface{})
options["uid"] = uid
request.JSONBody(options)
response := make(map[string]interface{})
request.ToJSON(&response)
data, err := serviceGateway.responseHandle(response)
return data, err
}
// GetCompany 获取公司
func (serviceGateway *HttplibUserServiceGateway) GetCompany(companyId int64) (map[string]interface{}, error) {
url := strings.Join([]string{serviceGateway.baseURL, ""}, "/")
request := serviceGateway.createRequest(url, "post")
url := strings.Join([]string{serviceGateway.baseURL, "companies/ge-company"}, "/")
request := serviceGateway.createRequest(url, "get")
options := make(map[string]interface{})
options["companyId"] = companyId
request.JSONBody(options)
... ... @@ -35,9 +36,10 @@ func (serviceGateway *HttplibUserServiceGateway) GetCompany(companyId int64) (ma
return data, err
}
// GetOrganization 获取组织信息
func (serviceGateway *HttplibUserServiceGateway) GetOrganization(organizationId int64) (map[string]interface{}, error) {
url := strings.Join([]string{serviceGateway.baseURL, ""}, "/")
request := serviceGateway.createRequest(url, "post")
url := strings.Join([]string{serviceGateway.baseURL, "orgs/get-org"}, "/")
request := serviceGateway.createRequest(url, "get")
options := make(map[string]interface{})
options["orgId"] = organizationId
request.JSONBody(options)
... ... @@ -47,6 +49,19 @@ func (serviceGateway *HttplibUserServiceGateway) GetOrganization(organizationId
return data, err
}
// UserInMenu 获取用户菜单模块权限
func (serviceGateway *HttplibUserServiceGateway) UserInMenu(menuCode string) (map[string]interface{}, error) {
url := strings.Join([]string{serviceGateway.baseURL, "users/menu"}, "/")
request := serviceGateway.createRequest(url, "get")
options := make(map[string]interface{})
options["code"] = menuCode
request.JSONBody(options)
response := make(map[string]interface{})
request.ToJSON(&response)
data, err := serviceGateway.responseHandle(response)
return data, err
}
func NewHttplibUserServiceGateway() *HttplibUserServiceGateway {
return &HttplibUserServiceGateway{
httplibBaseServiceGateway: httplibBaseServiceGateway{
... ...
package services
type UserAdaptor struct {
}
... ...
package services
type UserInMenuAdaptor struct {
}
... ...
package services
type UserInOrganizationAdaptor struct {
}
... ...