切换导航条
此项目
正在载入...
登录
allied-creation
/
allied-creation-cooperation
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
yangfu
3 years ago
提交
ae86ffe27244819a9b1f863a01ba8b72eb6e26b8
1 个父辈
58c7b496
统计修改
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
14 行增加
和
8 行删除
pkg/infrastructure/dao/pg_credit_account_dao.go
pkg/infrastructure/domain_service/pg_cooperation_company_statistics_service.go
pkg/infrastructure/domain_service/pg_cooperation_person_statistics_service.go
pkg/infrastructure/dao/pg_credit_account_dao.go
查看文件 @
ae86ffe
...
...
@@ -111,10 +111,10 @@ func (dao *CreditAccountDao) CooperationUsersDividendsStatistics(queryOptions ma
query
.
ColumnExpr
(
`sum((case when payment_status = 1 then settlement_amount else 0 end)) un_paid_amount`
)
query
.
ColumnExpr
(
`max(participator->>'userId') user_id`
)
query
.
ColumnExpr
(
`max(participator#>>'{userInfo,userName}') user_name`
)
if
_
,
ok
:=
queryOptions
[
"beginTime"
];
ok
&&
!
queryOptions
[
"beginTime"
]
.
(
time
.
Time
)
.
IsZero
()
{
query
.
Where
(
`created_at>? `
,
queryOptions
[
"beginTime"
])
query
.
Where
(
`created_at<? `
,
queryOptions
[
"endTime"
])
}
//if _, ok := queryOptions["beginTime"]; ok && !queryOptions["beginTime"].(time.Time).IsZero() {
// query.Where(`created_at>? `, queryOptions["beginTime"])
// query.Where(`created_at<? `, queryOptions["endTime"])
//}
if
v
,
ok
:=
queryOptions
[
"userBaseId"
];
ok
&&
v
.
(
int64
)
>
0
{
query
.
Where
(
fmt
.
Sprintf
(
`participator->>'userBaseId'='%v' `
,
v
))
}
...
...
@@ -130,6 +130,12 @@ func (dao *CreditAccountDao) CooperationUsersDividendsStatistics(queryOptions ma
if
v
,
ok
:=
queryOptions
[
"endTime"
];
ok
&&
!
v
.
(
time
.
Time
)
.
IsZero
()
{
query
.
Where
(
"created_at < ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"paymentBeginTime"
];
ok
&&
!
(
v
.
(
time
.
Time
)
.
IsZero
())
{
query
.
Where
(
`payment_time>=? `
,
queryOptions
[
"paymentBeginTime"
])
}
if
v
,
ok
:=
queryOptions
[
"paymentEndTime"
];
ok
&&
!
(
v
.
(
time
.
Time
)
.
IsZero
())
{
query
.
Where
(
`payment_time<? `
,
queryOptions
[
"paymentEndTime"
])
}
if
v
,
ok
:=
queryOptions
[
"cooperationContractNumbers"
];
ok
&&
len
(
v
.
([]
string
))
>
0
{
//query.Where("cooperation_contract_number in (?)", pg.In(v))
query
.
Where
(
domain
.
ConditionInContractNumbers
(
v
.
([]
string
)))
...
...
pkg/infrastructure/domain_service/pg_cooperation_company_statistics_service.go
查看文件 @
ae86ffe
...
...
@@ -590,8 +590,8 @@ func (ptr *CooperationStatisticsService) CompanyPaymentHistoryStatistics(queryOp
OrgId
int64
`json:"orgId" valid:"Required"`
UserId
int64
`json:"userId" valid:"Required"`
SortByActuallyPaidAmount
int
`json:"sortByActuallyPaidAmount" valid:"Required"`
BeginTime
time
.
Time
`json:"beginTime"`
EndTime
time
.
Time
`json:"endTime"`
PaymentBeginTime
time
.
Time
`json:"paymentBeginTime"`
PaymentEndTime
time
.
Time
`json:"paymentEndTime"`
}{}
if
err
:=
LoadQueryObject
(
queryOptions
,
&
request
);
err
!=
nil
{
return
nil
,
err
...
...
pkg/infrastructure/domain_service/pg_cooperation_person_statistics_service.go
查看文件 @
ae86ffe
...
...
@@ -150,8 +150,8 @@ func (ptr *CooperationStatisticsService) PersonCompanyPaymentHistoryStatistics(q
UserBaseId
int64
`json:"userBaseId" valid:"Required"`
OrgId
int64
`json:"orgId" valid:"Required"`
SortByActuallyPaidAmount
int
`json:"sortByActuallyPaidAmount" valid:"Required"`
BeginTime
time
.
Time
`json:"paymentBeginTime"`
EndTime
time
.
Time
`json:"paymentEndTime"`
PaymentBeginTime
time
.
Time
`json:"paymentBeginTime"`
PaymentEndTime
time
.
Time
`json:"paymentEndTime"`
}{}
if
err
:=
LoadQueryObject
(
queryOptions
,
&
request
);
err
!=
nil
{
return
nil
,
err
...
...
请
注册
或
登录
后发表评论