作者 陈志颖

fix:关联组织机构数据查询修复

正在显示 29 个修改的文件 包含 32 行增加26 行删除
... ... @@ -14,7 +14,7 @@ type SearchContractUndertakerFeedbackQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -26,7 +26,7 @@ type SearchCooperationApplicationQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -21,6 +21,8 @@ type SearchCooperationContractQuery struct {
CompanyId int64 `cname:"公司ID" json:"companyId"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -21,6 +21,8 @@ type SearchCooperationContractByUndertakerQuery struct {
CompanyId int64 `cname:"公司ID" json:"companyId"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -22,7 +22,7 @@ type SearchCooperationContractChangeLogQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -22,7 +22,7 @@ type SearchCooperationModeQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -24,7 +24,7 @@ type SearchCooperationProjectQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -27,7 +27,7 @@ type SearchCreditAccountQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -19,7 +19,7 @@ type SearchDividendsEstimateQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -19,7 +19,7 @@ type SearchDividendsIncentivesEstimateQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -19,7 +19,7 @@ type SearchMoneyIncentivesEstimateQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -22,7 +22,7 @@ type SearchDividendsOrderQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -16,7 +16,7 @@ type SearchDividendsOrderNumberQuery struct {
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 关联的组织机构ID列表
OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId"`
// 用户基础数据id
... ...
... ... @@ -19,6 +19,8 @@ type SearchDividendsReturnedOrderQuery struct {
PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID" json:"companyId"`
// 关联的组织机构ID列表
OrgIds []string `cname:"关联的组织机构ID列表" json:"orgIds"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
... ...
... ... @@ -162,7 +162,7 @@ func (repository *ContractUndertakerFeedbackRepository) Find(queryOptions map[st
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
// 搜索内容包括项目合约名称、承接人姓名、承接内容关键字
... ...
... ... @@ -243,7 +243,7 @@ func (repository *CooperationApplicationRepository) Find(queryOptions map[string
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -171,7 +171,7 @@ func (repository *CooperationContractChangeLogRepository) Find(queryOptions map[
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
if offsetLimitFlag {
... ...
... ... @@ -176,7 +176,7 @@ func (repository *CooperationContractRelevantRepository) Find(queryOptions map[s
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
if userBaseId, ok := queryOptions["userBaseId"]; ok && userBaseId.(int64) != 0 {
... ...
... ... @@ -995,7 +995,7 @@ func (repository *CooperationContractRepository) Find(queryOptions map[string]in
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
if incentivesType, ok := queryOptions["incentivesType"]; ok && incentivesType.(int32) != 0 {
... ...
... ... @@ -187,7 +187,7 @@ func (repository *CooperationContractUndertakerRepository) Find(queryOptions map
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
if userBaseId, ok := queryOptions["userBaseId"]; ok && userBaseId.(int64) != 0 {
... ...
... ... @@ -187,7 +187,7 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -249,7 +249,7 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
if v, ok := queryOptions["status"]; ok && v.(int32) > 0 {
... ...
... ... @@ -218,7 +218,7 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -301,7 +301,7 @@ func (repository *DividendsEstimateRepository) Find(queryOptions map[string]inte
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -171,7 +171,7 @@ func (repository *DividendsIncentivesRuleRepository) Find(queryOptions map[strin
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -413,7 +413,7 @@ func (repository *DividendsOrderRepository) Find(queryOptions map[string]interfa
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -415,7 +415,7 @@ func (repository *DividendsReturnedOrderRepository) Find(queryOptions map[string
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -171,7 +171,7 @@ func (repository *MoneyIncentivesRuleRepository) Find(queryOptions map[string]in
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org->>'orgId' = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org->>'orgId' in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...
... ... @@ -184,7 +184,7 @@ func (repository *OrderGoodRepository) Find(queryOptions map[string]interface{})
if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
query.Where("org_id = '?'", orgId)
}
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]int64)) > 0 {
if orgIds, ok := queryOptions["orgIds"]; ok && len(orgIds.([]string)) > 0 {
query.Where("org_id in (?)", pg.In(orgIds))
}
offsetLimitFlag := true
... ...