Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Biz.Finances.V2.0
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Biz.Finances.V2.0
Commits
055b9906
Commit
055b9906
authored
Nov 11, 2021
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
61be61c0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
1 deletion
+39
-1
RestfulPayment.Offset.cs
Src/Transforms/RestfulPayment.Offset.cs
+0
-0
RestfulPayment.Split.cs
Src/Transforms/RestfulPayment.Split.cs
+1
-1
RestfulPayment.cs
Src/Transforms/RestfulPayment.cs
+38
-0
No files found.
Src/Transforms/RestfulPayment.Offset.cs
View file @
055b9906
This diff is collapsed.
Click to expand it.
Src/Transforms/RestfulPayment.Split.cs
View file @
055b9906
...
...
@@ -151,7 +151,7 @@ namespace Kivii.Finances.Transforms
public
class
PaymentMultiSplit
:
RestfulExecution
<
Payment
>
{
[
ApiMember
(
Description
=
"认领类型,默认为Department,Organization,Member"
)]
public
OwnerType
OwnerType
{
get
;
set
;
}
public
OwnerType
OwnerType
{
get
;
set
;
}
=
OwnerType
.
Department
;
public
List
<
Guid
>
Kvids
{
get
;
set
;
}
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
...
...
Src/Transforms/RestfulPayment.cs
View file @
055b9906
...
...
@@ -173,4 +173,42 @@ namespace Kivii.Finances.Transforms
return
rtns
;
}
}
[
Api
(
Description
=
"作废查询"
)]
[
RequiresAnyRole
(
SystemRoles
.
Everyone
)]
public
class
PaymentOffsetQuery
:
RestfulExecution
<
Payment
>
{
#
region
QueryArgs
public
virtual
int
?
Skip
{
get
;
set
;
}
public
virtual
int
?
Take
{
get
;
set
;
}
public
virtual
string
OrderBy
{
get
;
set
;
}
public
string
OrderByDesc
{
get
;
set
;
}
public
virtual
string
Include
{
get
;
set
;
}
public
virtual
string
Fields
{
get
;
set
;
}
public
string
QueryKeys
{
get
;
set
;
}
public
string
QueryValues
{
get
;
set
;
}
#
endregion
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
{
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Payment
>();
var
dynamicParams
=
Request
.
GetRequestParams
();
var
autoQuery
=
Request
.
TryResolve
<
IAutoQueryDb
>();
autoQuery
.
IncludeTotal
=
true
;
var
request
=
new
RestfulQuery
<
Payment
>();
request
=
request
.
PopulateWith
(
this
);
var
sqlExpress
=
autoQuery
.
CreateQuery
(
Request
,
conn
,
request
,
dynamicParams
);
sqlExpress
.
Where
(
o
=>
o
.
OffsetKvid
!=
Guid
.
Empty
&&
o
.
Amount
>=
0
&&
Sql
.
In
(
o
.
Type
,
PaymentType
.
AliPay
,
PaymentType
.
WeChat
,
PaymentType
.
Bank
,
PaymentType
.
Cash
,
PaymentType
.
Pos
));
var
rtns
=
autoQuery
.
Execute
(
Request
,
conn
,
request
,
sqlExpress
);
return
rtns
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment