作者 yangfu

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creat…

…ion-cooperation into dev
正在显示 57 个修改的文件 包含 234 行增加221 行删除
不能预览此文件类型
... ... @@ -80,33 +80,51 @@ func (contractUndertakerFeedbackService *ContractUndertakerFeedbackService) Crea
organization = data
}
newContractUndertakerFeedback := &domain.ContractUndertakerFeedback{
FeedbackAttachment: createContractUndertakerFeedbackCommand.FeedbackAttachment,
FeedbackContent: createContractUndertakerFeedbackCommand.FeedbackContent,
CooperationContractNumber: createContractUndertakerFeedbackCommand.CooperationContractNumber,
ContractUndertaker: undertaker,
Company: company,
Org: organization,
UpdatedAt: time.Time{},
DeletedAt: time.Time{},
CreatedAt: time.Now(),
}
var contractUndertakerFeedbackRepository domain.ContractUndertakerFeedbackRepository
if value, err := factory.CreateContractUndertakerFeedbackRepository(map[string]interface{}{
// 获取项目合约信息
var cooperationContractRepository domain.CooperationContractRepository
if value, err := factory.CreateCooperationContractRepository(map[string]interface{}{
"transactionContext": transactionContext,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
contractUndertakerFeedbackRepository = value
cooperationContractRepository = value
}
if contractUndertakerFeedback, err := contractUndertakerFeedbackRepository.Save(newContractUndertakerFeedback); err != nil {
cooperationContract, err := cooperationContractRepository.FindOne(map[string]interface{}{"cooperationContractNumber": createContractUndertakerFeedbackCommand.CooperationContractNumber})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if cooperationContract == nil {
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", createContractUndertakerFeedbackCommand.CooperationContractNumber))
} else {
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
newContractUndertakerFeedback := &domain.ContractUndertakerFeedback{
FeedbackAttachment: createContractUndertakerFeedbackCommand.FeedbackAttachment,
FeedbackContent: createContractUndertakerFeedbackCommand.FeedbackContent,
CooperationContractNumber: createContractUndertakerFeedbackCommand.CooperationContractNumber,
CooperationContractName: cooperationContract.CooperationContractName,
ContractUndertaker: undertaker,
Company: company,
Org: organization,
UpdatedAt: time.Time{},
DeletedAt: time.Time{},
CreatedAt: time.Now(),
}
var contractUndertakerFeedbackRepository domain.ContractUndertakerFeedbackRepository
if value, err := factory.CreateContractUndertakerFeedbackRepository(map[string]interface{}{
"transactionContext": transactionContext,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
contractUndertakerFeedbackRepository = value
}
if contractUndertakerFeedback, err := contractUndertakerFeedbackRepository.Save(newContractUndertakerFeedback); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return contractUndertakerFeedback, nil
}
return contractUndertakerFeedback, nil
}
}
... ...
... ... @@ -12,11 +12,11 @@ type RemoveCooperationContractCommand struct {
// 共创合约ID
CooperationContractId int64 `cname:"共创合约ID" json:"cooperationContractId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
}
... ...
... ... @@ -12,15 +12,15 @@ type GetCooperationContractQuery struct {
// 共创合约ID
CooperationContractId int64 `cname:"共创合约ID" json:"cooperationContractId,string" valid:"Required"`
// 发起人uid
SponsorUid string `cname:"发起人uid" json:"sponsorUid,omitempty"`
SponsorUid string `cname:"发起人UID" json:"sponsorUid,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (getCooperationContractQuery *GetCooperationContractQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListCooperationContractQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listCooperationContractQuery *ListCooperationContractQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,7 +10,7 @@ import (
type SearchCooperationContractByUndertakerQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 共创合约名称
... ... @@ -18,13 +18,13 @@ type SearchCooperationContractByUndertakerQuery struct {
// 项目发起人姓名
SponsorName string `cname:"项目发起人姓名" json:"sponsorName,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (searchCooperationContractByUndertakerQuery *SearchCooperationContractByUndertakerQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -14,19 +14,19 @@ type CreateCooperationContractChangeLogCommand struct {
// 激励规则明细
IncentivesRuleDetail string `cname:"激励规则明细" json:"incentivesRuleDetail" valid:"Required"`
// 合约变更操作类型,1编辑、2暂停、3恢复
OperationType int32 `cname:"合约变更操作类型,1编辑、2暂停、3恢复" json:"operationType" valid:"Required"`
OperationType int32 `cname:"合约变更操作类型" json:"operationType" valid:"Required"`
// 承接人
Undertakers string `cname:"承接人" json:"undertakers" valid:"Required"`
// 共创合约编号
CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (createCooperationContractChangeLogCommand *CreateCooperationContractChangeLogCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type RemoveCooperationContractChangeLogCommand struct {
// 合约变更记录ID
CooperationContractChangeLogId int64 `cname:"合约变更记录ID" json:"cooperationContractChangeLogId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (removeCooperationContractChangeLogCommand *RemoveCooperationContractChangeLogCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,25 +10,25 @@ import (
type UpdateCooperationContractChangeLogCommand struct {
// 共创合约修改记录id
CooperationContractChangeLogId string `cname:"共创合约修改记录id" json:"cooperationContractChangeLogId" valid:"Required"`
CooperationContractChangeLogId string `cname:"共创合约修改记录ID" json:"cooperationContractChangeLogId" valid:"Required"`
// 激励规则
IncentivesRule string `cname:"激励规则" json:"incentivesRule" valid:"Required"`
// 激励规则明细
IncentivesRuleDetail string `cname:"激励规则明细" json:"incentivesRuleDetail" valid:"Required"`
// 合约变更操作类型,1编辑、2暂停、3恢复
OperationType int32 `cname:"合约变更操作类型,1编辑、2暂停、3恢复" json:"operationType" valid:"Required"`
OperationType int32 `cname:"合约变更操作类型" json:"operationType" valid:"Required"`
// 承接人
Undertakers string `cname:"承接人" json:"undertakers" valid:"Required"`
// 共创合约编号
CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (updateCooperationContractChangeLogCommand *UpdateCooperationContractChangeLogCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type GetCooperationContractChangeLogQuery struct {
// 合约变更记录ID
CooperationContractChangeLogId int64 `cname:"合约变更记录ID" json:"cooperationContractChangeLogId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (getCooperationContractChangeLogQuery *GetCooperationContractChangeLogQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListCooperationContractChangeLogQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listCooperationContractChangeLogQuery *ListCooperationContractChangeLogQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,21 +10,21 @@ import (
type SearchCooperationContractChangeLogQuery struct {
// 合约变更操作类型,1编辑、2暂停、3恢复
OperationType int32 `cname:"合约变更操作类型,1编辑、2暂停、3恢复" json:"operationType,omitempty"`
OperationType int32 `cname:"合约变更操作类型" json:"operationType,omitempty"`
// 共创合约编号
CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (searchCooperationContractChangeLogQuery *SearchCooperationContractChangeLogQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,7 +12,7 @@ type CreateCooperationModeCommand struct {
// 共创模式名称
CooperationModeName string `cname:"共创模式名称" json:"cooperationModeName" valid:"Required"`
// 共创模式编码,手动输入,唯一确定
CooperationModeNumber string `cname:"共创模式编码,手动输入,唯一确定" json:"cooperationModeNumber" valid:"Required"`
CooperationModeNumber string `cname:"共创模式编码" json:"cooperationModeNumber" valid:"Required"`
// 备注
Remarks string `cname:"备注" json:"remarks,omitempty"`
// 公司ID,通过集成REST上下文获取
... ... @@ -22,7 +22,7 @@ type CreateCooperationModeCommand struct {
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string"`
}
func (createCooperationModeCommand *CreateCooperationModeCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,7 +10,7 @@ import (
type OperateCooperationModeCommand struct {
// 共创模式ID
CooperationModeId string `cname:"共创模式id" json:"cooperationModeId" valid:"Required"`
CooperationModeId string `cname:"共创模式ID" json:"cooperationModeId" valid:"Required"`
// 共创模式状态,1启用,2禁用
Status int32 `cname:"状态" json:"status" valid:"Required"`
// 公司ID,通过集成REST上下文获取
... ...
... ... @@ -12,11 +12,11 @@ type RemoveCooperationModeCommand struct {
// 共创模式ID
CooperationModeId int64 `cname:"共创模式ID" json:"cooperationModeId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string"`
}
... ...
... ... @@ -10,7 +10,7 @@ import (
type ListCooperationModeQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
... ...
... ... @@ -10,7 +10,7 @@ import (
type SearchCooperationModeQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 共创模式名称
... ...
... ... @@ -12,13 +12,13 @@ type BatchEndCooperationProjectCommand struct {
// 共创项目ID
CooperationProjectIds []string `cname:"共创项目ID数组" json:"cooperationProjectIds" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (batchEndCooperationProjectCommand *BatchEndCooperationProjectCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type EndCooperationProjectCommand struct {
// 共创项目ID
CooperationProjectId string `cname:"共创项目ID" json:"cooperationProjectId" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (endCooperationProjectCommand *EndCooperationProjectCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -14,19 +14,19 @@ type ReleaseCooperationProjectCommand struct {
// 共创模式ID
CooperationModeId int64 `cname:"共创模式ID" json:"cooperationModeId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基本id
UserBaseId int64 `cname:"用户基本id" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基本数据ID" json:"userBaseId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 共创项目发起人id
CooperationProjectSponsorId string `cname:"共创项目发起人id" json:"cooperationProjectSponsorId" valid:"Required"`
CooperationProjectSponsorId string `cname:"共创项目发起人UID" json:"cooperationProjectSponsorId" valid:"Required"`
// 部门ID,通过REST集成上下文获取
DepartmentId int64 `cname:"部门ID" json:"departmentId,string" valid:"Required"`
// 共创项目承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `cname:"共创项目承接对象,1员工,2共创用户,3公开,可以多选" json:"cooperationProjectUndertakerType" valid:"Required"`
CooperationProjectUndertakerType []int32 `cname:"共创项目承接对象" json:"cooperationProjectUndertakerType" valid:"Required"`
// 共创项目描述
CooperationProjectDescription string `cname:"共创项目描述" json:"cooperationProjectDescription" valid:"Required"`
}
... ...
... ... @@ -12,13 +12,13 @@ type RemoveCooperationProjectCommand struct {
// 共创项目ID
CooperationProjectId int64 `cname:"共创项目ID" json:"cooperationProjectId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (removeCooperationProjectCommand *RemoveCooperationProjectCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -16,21 +16,21 @@ type UpdateCooperationProjectCommand struct {
// 共创模式编码
CooperationModeNumber string `cname:"共创模式编码" json:"cooperationModeNumber" valid:"Required"`
// 承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `cname:"承接对象,1员工,2共创用户,3公开,可以多选" json:"cooperationProjectUndertakerType" valid:"Required"`
CooperationProjectUndertakerType []int32 `cname:"承接对象" json:"cooperationProjectUndertakerType" valid:"Required"`
// 共创项目发起人uid
SponsorUid string `cname:"共创项目发起人uid" json:"sponsorUid" valid:"Required"`
SponsorUid string `cname:"共创项目发起人UID" json:"sponsorUid" valid:"Required"`
// 共创项目发布人uid
PublisherUid string `cname:"共创项目发布人uid" json:"publisherUid" valid:"Required"`
PublisherUid string `cname:"共创项目发布人UID" json:"publisherUid" valid:"Required"`
// 共创项目描述
CooperationProjectDescription string `cname:"共创项目描述" json:"cooperationProjectDescription,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type CheckUndertakerQuery struct {
// 共创项目承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `cname:"共创项目承接对象,1员工,2共创用户,3公开,可以多选" json:"cooperationProjectUndertakerType" valid:"Required"`
CooperationProjectUndertakerType []int32 `cname:"共创项目承接对象" json:"cooperationProjectUndertakerType" valid:"Required"`
// 共创项目ID
CooperationProjectId int64 `cname:"共创项目ID" json:"cooperationProjectId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (checkUndertakerQuery *CheckUndertakerQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type GetCooperationProjectQuery struct {
// 共创项目ID
CooperationProjectId int64 `cname:"共创项目ID" json:"cooperationProjectId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (getCooperationProjectQuery *GetCooperationProjectQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListCooperationProjectQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listCooperationProjectQuery *ListCooperationProjectQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,7 +10,7 @@ import (
type SearchCooperationProjectQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 共创项目名称
... ... @@ -18,15 +18,15 @@ type SearchCooperationProjectQuery struct {
// 部门名称
DepartmentName string `cname:"部门名称" json:"departmentName,omitempty"`
// 共创项目状态,根据共创项目状态筛选项目数据
Status int32 `cname:"共创项目状态,根据共创项目状态筛选项目数据" json:"status,omitempty"`
Status int32 `cname:"共创项目状态" json:"status,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (searchCooperationProjectQuery *SearchCooperationProjectQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,13 +10,13 @@ import (
type CreateCreditAccountCommand struct {
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (createCreditAccountCommand *CreateCreditAccountCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -14,13 +14,13 @@ type PayCreditAccountCommand struct {
// 备注
Remarks string `cname:"备注" json:"remarks" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (payCreditAccountCommand *PayCreditAccountCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type RemoveCreditAccountCommand struct {
// 账期结算单ID
CreditAccountId int64 `cname:"账期结算单ID" json:"creditAccountId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (removeCreditAccountCommand *RemoveCreditAccountCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type UpdateCreditAccountCommand struct {
// 账期结算单ID
CreditAccountId int64 `cname:"账期结算单ID" json:"creditAccountId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (updateCreditAccountCommand *UpdateCreditAccountCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,13 +10,13 @@ import (
type CreditAccountRankingQuery struct {
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 统计周期
Period string `cname:"统计周期" json:"period,omitempty"`
}
... ...
... ... @@ -12,13 +12,13 @@ type GetCreditAccountQuery struct {
// 账期结算单ID
CreditAccountId int64 `cname:"账期结算单ID" json:"creditAccountId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (getCreditAccountQuery *GetCreditAccountQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListCreditAccountQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listCreditAccountQuery *ListCreditAccountQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -11,7 +11,7 @@ import (
type SearchCreditAccountQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 账期结算单号
... ... @@ -19,17 +19,17 @@ type SearchCreditAccountQuery struct {
// 参与人姓名
ParticipatorName string `cname:"参与人姓名" json:"participatorName,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单
PaymentStatus int32 `cname:"账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单" json:"paymentStatus" valid:"Required"`
PaymentStatus int32 `cname:"账期结算支付状态" json:"paymentStatus" valid:"Required"`
// 结算周期,按年“2021”或者按月结算”2021-07“
Period time.Time `cname:"结算周期,按年“2021”或者按月结算”2021-07“" json:"period,omitempty"`
Period time.Time `cname:"结算周期" json:"period,omitempty"`
}
func (searchCreditAccountQuery *SearchCreditAccountQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type CancelDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateId string `cname:"承接人分红预算记录ID" json:"dividendsEstimateId" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (cancelDividendsEstimateCommand *CancelDividendsEstimateCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,13 +10,13 @@ import (
type CreateDividendsEstimateCommand struct {
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (createDividendsEstimateCommand *CreateDividendsEstimateCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -14,13 +14,13 @@ type EstimateDividendsIncentivesCommand struct {
// 合约编号
CooperationContractNumber string `cname:"合约编号" json:"cooperationContractNumber" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (estimateDividendsIncentivesCommand *EstimateDividendsIncentivesCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -16,13 +16,13 @@ type EstimateMoneyIncentivesCommand struct {
// 承接人UID
UndertakerUid string `cname:"承接人UID" json:"undertakerUid" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (estimateMoneyIncentivesCommand *EstimateMoneyIncentivesCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type RemoveDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateId int64 `cname:"承接人分红预算记录ID" json:"dividendsEstimateId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (removeDividendsEstimateCommand *RemoveDividendsEstimateCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type UpdateDividendsEstimateCommand struct {
// 承接人分红预算记录ID
DividendsEstimateId int64 `cname:"承接人分红预算记录ID" json:"dividendsEstimateId,string" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (updateDividendsEstimateCommand *UpdateDividendsEstimateCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,13 +12,13 @@ type GetDividendsEstimateQuery struct {
// 承接人分红预算记录ID
DividendsEstimateId string `cname:"承接人分红预算记录ID" json:"dividendsEstimateId" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (getDividendsEstimateQuery *GetDividendsEstimateQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListDividendsEstimateQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listDividendsEstimateQuery *ListDividendsEstimateQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListDividendsIncentivesQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listDividendsIncentivesQuery *ListDividendsIncentivesQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,17 +10,17 @@ import (
type ListMoneyIncentivesQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (listMoneyIncentivesQuery *ListMoneyIncentivesQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,17 +12,17 @@ type SearchDividendsEstimateQuery struct {
// 承接人分红预算单号
DividendsEstimateOrderNumber string `cname:"承接人分红预算单号" json:"dividendsEstimateOrderNumber" valid:"Required"`
// 分红类型,1订单分红,2退货冲销,3金额激励
DividendsType int32 `cname:"分红类型,1订单分红,2退货冲销,3金额激励" json:"dividendsType" valid:"Required"`
DividendsType int32 `cname:"分红类型" json:"dividendsType" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
}
... ...
... ... @@ -14,15 +14,15 @@ type SearchDividendsIncentivesQuery struct {
// 分红订单号/退货单号
OrderOrReturnedOrderNum string `cname:"分红订单号/退货单号" json:"orderOrReturnedOrderNum,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
}
... ...
... ... @@ -14,15 +14,15 @@ type SearchMoneyIncentivesQuery struct {
// 发起部门名称
DepartmentName string `cname:"发起部门名称" json:"departmentName,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
}
... ...
... ... @@ -25,9 +25,9 @@ type ImportDividendsOrderCommand struct {
// 订单区域名称
RegionName string `cname:"订单区域名称" json:"regionName,omitempty"`
// 订单业务员uid
SalesmanUid string `cname:"订单业务员uid" json:"salesmanUid,omitempty"`
SalesmanUid string `cname:"订单业务员UID" json:"salesmanUid,omitempty"`
// 订单操作人uid
OperatorUid string `cname:"订单操作人uid" json:"operatorUid,omitempty"`
OperatorUid string `cname:"订单操作人UID" json:"operatorUid,omitempty"`
// 订单产品列表
OrderGoods []*OrderGoods `cname:"订单产品列表" json:"orderGoods,omitempty"`
// 公司ID,通过集成REST上下文获取
... ...
... ... @@ -4,9 +4,9 @@ import "os"
var POSTGRESQL_DB_NAME = "allied-creation-cooperation"
var POSTGRESQL_USER = "postgres"
var POSTGRESQL_PASSWORD = ""
var POSTGRESQL_PASSWORD = "1993618jack"
var POSTGRESQL_HOST = "127.0.0.1"
var POSTGRESQL_PORT = "32432"
var POSTGRESQL_PORT = "5432"
var DISABLE_CREATE_TABLE = false
var DISABLE_SQL_GENERATE_PRINT = false
... ...
... ... @@ -12,6 +12,8 @@ type ContractUndertakerFeedback struct {
FeedbackContent string `json:"feedbackContent"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 项目合约名称
CooperationContractName string `json:"cooperationContractName"`
// 共创合约承接人
ContractUndertaker *Undertaker `json:"contractUndertaker"`
// 数据所属组织机构
... ...
... ... @@ -3,7 +3,7 @@ package domain
// Relevant 共创合约相关人值对象
type Relevant struct {
// 相关人id
RelevantId int64 `json:"relevantId"`
RelevantId int64 `json:"relevantId,string"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
... ...
... ... @@ -3,7 +3,7 @@ package domain
// Role 用户角色值对象
type Role struct {
// 角色ID
RoleId int64 `json:"roleId,string"`
RoleId int64 `json:"roleId"`
// 角色名称
RoleName string `json:"roleName"`
}
... ...
... ... @@ -3,13 +3,13 @@ package domain
// Undertaker 共创合约承接方值对象
type Undertaker struct {
// 承接人id
UndertakerId int64 `json:"relevantId"`
UndertakerId int64 `json:"relevantId,string"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `json:"userId,string"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 用户基本id
UserBaseId int64 `json:"userBaseId,string"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 用户所属组织机构
Org *Org `json:"org"`
// 用户关联的组织机构
... ...
... ... @@ -27,9 +27,6 @@ func (service *UserService) UserFrom(companyId int64, orgId int64, userId int64)
if err1 != nil {
return nil, err
}
log.Logger.Debug("普通用户", map[string]interface{}{
"user json": userJson,
})
err2 := json.Unmarshal(userJson, &returnData)
if err2 != nil {
return nil, err2
... ... @@ -57,9 +54,6 @@ func (service *UserService) ReferrerFrom(companyId int64, orgId int64, userId in
if err1 != nil {
return nil, err
}
log.Logger.Debug("推荐人", map[string]interface{}{
"referrer json": referrerJson,
})
err2 := json.Unmarshal(referrerJson, &returnData)
if err2 != nil {
return nil, err2
... ... @@ -87,9 +81,6 @@ func (service *UserService) UndertakerFrom(companyId int64, orgId int64, userId
if err1 != nil {
return nil, err
}
log.Logger.Debug("承接人", map[string]interface{}{
"undertaker json": undertakerJson,
})
err2 := json.Unmarshal(undertakerJson, &returnData)
if err2 != nil {
return nil, err2
... ... @@ -117,9 +108,6 @@ func (service *UserService) RelevantFrom(companyId int64, orgId int64, userId in
if err1 != nil {
return nil, err
}
log.Logger.Debug("相关人", map[string]interface{}{
"relevant json": relevantJson,
})
err2 := json.Unmarshal(relevantJson, &returnData)
if err2 != nil {
return nil, err2
... ... @@ -147,9 +135,6 @@ func (service *UserService) SalesmanFrom(companyId int64, orgId int64, userId in
if err1 != nil {
return nil, err
}
log.Logger.Debug("业务员", map[string]interface{}{
"salesman json": salesmanJson,
})
err2 := json.Unmarshal(salesmanJson, &returnData)
if err2 != nil {
return nil, err2
... ... @@ -177,9 +162,6 @@ func (service *UserService) OperatorFrom(companyId int64, orgId int64, userId in
if err1 != nil {
return nil, err
}
log.Logger.Debug("操作人", map[string]interface{}{
"operator json": operatorJson,
})
err2 := json.Unmarshal(operatorJson, &returnData)
if err2 != nil {
return nil, err2
... ...
... ... @@ -15,6 +15,8 @@ type ContractUndertakerFeedback struct {
FeedbackContent string `comment:"合约承接方反馈内容"`
// 共创合约编号
CooperationContractNumber string `comment:"共创合约编号"`
// 项目合约名称
CooperationContractName string `comment:"项目合约名称"`
// 共创合约承接人
ContractUndertaker *domain.Undertaker `comment:"共创合约承接人"`
// 数据所属组织机构
... ...
... ... @@ -3,7 +3,7 @@ package repository
import (
"fmt"
"github.com/go-pg/pg/v10"
"github.com/go-pg/pg/v10/orm"
"github.com/linmadan/egglib-go/persistent/pg/sqlbuilder"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"github.com/linmadan/egglib-go/utils/snowflake"
... ... @@ -31,6 +31,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF
"feedback_attachment",
"feedback_content",
"cooperation_contract_number",
"cooperation_contract_name",
"contract_undertaker",
"org",
"company",
... ... @@ -57,6 +58,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF
&contractUndertakerFeedback.FeedbackAttachment,
&contractUndertakerFeedback.FeedbackContent,
&contractUndertakerFeedback.CooperationContractNumber,
&contractUndertakerFeedback.CooperationContractName,
&contractUndertakerFeedback.ContractUndertaker,
&contractUndertakerFeedback.Org,
&contractUndertakerFeedback.Company,
... ... @@ -69,6 +71,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF
contractUndertakerFeedback.FeedbackAttachment,
contractUndertakerFeedback.FeedbackContent,
contractUndertakerFeedback.CooperationContractNumber,
contractUndertakerFeedback.CooperationContractName,
contractUndertakerFeedback.ContractUndertaker,
contractUndertakerFeedback.Org,
contractUndertakerFeedback.Company,
... ... @@ -85,6 +88,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF
&contractUndertakerFeedback.FeedbackAttachment,
&contractUndertakerFeedback.FeedbackContent,
&contractUndertakerFeedback.CooperationContractNumber,
&contractUndertakerFeedback.CooperationContractName,
&contractUndertakerFeedback.ContractUndertaker,
&contractUndertakerFeedback.Org,
&contractUndertakerFeedback.Company,
... ... @@ -97,6 +101,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF
contractUndertakerFeedback.FeedbackAttachment,
contractUndertakerFeedback.FeedbackContent,
contractUndertakerFeedback.CooperationContractNumber,
contractUndertakerFeedback.CooperationContractName,
contractUndertakerFeedback.ContractUndertaker,
contractUndertakerFeedback.Org,
contractUndertakerFeedback.Company,
... ... @@ -136,12 +141,6 @@ func (repository *ContractUndertakerFeedbackRepository) FindOne(queryOptions map
if contractUndertakerFeedbackModel.FeedbackId == 0 {
return nil, nil
} else {
//// 获取共创模式
//cooperationModeModel := new(models.CooperationMode)
//cooperationModeQuery := tx.Model(cooperationModeModel)
//if err := cooperationModeQuery.Where("cooperation_mode_number = ?", contractUndertakerFeedbackModel.CooperationModeNumber).First(); err != nil {
// return nil, err
//}
return transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel)
}
}
... ... @@ -151,24 +150,33 @@ func (repository *ContractUndertakerFeedbackRepository) Find(queryOptions map[st
var contractUndertakerFeedbackModels []*models.ContractUndertakerFeedback
contractUndertakerFeedbacks := make([]*domain.ContractUndertakerFeedback, 0)
query := sqlbuilder.BuildQuery(tx.Model(&contractUndertakerFeedbackModels), queryOptions)
if cooperationContractName, ok := queryOptions["cooperationContractName"]; ok && cooperationContractName != "" {
query.Where("cooperation_contract_number like ?", fmt.Sprintf("%%%s%%", cooperationContractName))
}
if undertakerName, ok := queryOptions["undertakerName"]; ok && undertakerName != "" {
query.Where("contract_undertaker->>'userName' like ?", fmt.Sprintf("%%%s%%", undertakerName))
}
// 搜索内容包括项目合约名称、承接人姓名、承接内容关键字
if matchWord, ok := queryOptions["matchWord"]; ok && matchWord != "" {
query.WhereGroup(func(q *orm.Query) (*orm.Query, error) {
q.WhereOr("cooperation_contract_name like ?",fmt.Sprintf("%%%s%%", matchWord))
q.WhereOr("contract_undertaker->>'userName' like ?", fmt.Sprintf("%%%s%%", matchWord))
q.WhereOr("feedback_content like ?", fmt.Sprintf("%%%s%%", matchWord))
return q, nil
})
}
query.SetOffsetAndLimit(20)
query.SetOrderDirect("feedback_id", "DESC")
if count, err := query.SelectAndCount(); err != nil {
return 0, contractUndertakerFeedbacks, err
} else {
//for _, contractUndertakerFeedbackModel := range contractUndertakerFeedbackModels {
// // 获取共创模式
// cooperationModeModel := new(models.CooperationMode)
// cooperationModeQuery := tx.Model(cooperationModeModel)
// if err := cooperationModeQuery.Where("cooperation_mode_number = ?", contractUndertakerFeedbackModel.CooperationModeNumber).First(); err != nil {
// return 0, nil, err
// }
// if contractUndertakerFeedback, err := transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel, cooperationModeModel); err != nil {
// return 0, contractUndertakerFeedbacks, err
// } else {
// contractUndertakerFeedbacks = append(contractUndertakerFeedbacks, contractUndertakerFeedback)
// }
//}
for _, contractUndertakerFeedbackModel := range contractUndertakerFeedbackModels {
if contractUndertakerFeedback, err := transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel); err != nil {
return 0, contractUndertakerFeedbacks, err
} else {
contractUndertakerFeedbacks = append(contractUndertakerFeedbacks, contractUndertakerFeedback)
}
}
return int64(count), contractUndertakerFeedbacks, nil
}
}
... ...
... ... @@ -625,6 +625,7 @@ func (repository *CooperationContractRepository) FindOne(queryOptions map[string
cooperationContractModel := new(models.CooperationContract)
query := sqlbuilder.BuildQuery(tx.Model(cooperationContractModel), queryOptions)
query.SetWhereByQueryOption("cooperation_contract.cooperation_contract_id = ?", "cooperationContractId")
query.SetWhereByQueryOption("cooperation_contract.cooperation_contract_number = ?", "cooperationContractNumber")
if err := query.First(); err != nil {
if err.Error() == "pg: no rows in result set" {
return nil, fmt.Errorf("没有此资源")
... ...