Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
Overview
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
s_guodong
gjjs-bd-common
Commits
4112a8bf
Commit
4112a8bf
authored
Jun 25, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页
parent
55123585
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
31 deletions
+13
-31
Comsel.java
...siness/src/main/java/com/ceb/gjjs/mda/manager/Comsel.java
+2
-5
MyBatisDaoSession.java
...com/brilliance/mda/support/mybatis/MyBatisDaoSession.java
+11
-2
CacheOption.java
...main/java/com/brilliance/mda/runtime/mda/CacheOption.java
+0
-24
No files found.
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/manager/Comsel.java
View file @
4112a8bf
...
...
@@ -688,9 +688,6 @@ public class Comsel extends AbstractTransaction{
@Rule
(
target
=
"accsel"
,
order
=
100
)
public
boolean
ruleAccselN100
(){
IContext
ctx
=
MdaEnv
.
getContext
();
BaseVO
baseVO
=
ctx
.
getVo
();
int
pageNum
=
baseVO
.
getPageNum
();
int
pageSize
=
baseVO
.
getPageSize
();
ctx
.
getErrorCode
();
MdaUtils
.
clear
(
this
.
getActlst
());
...
...
@@ -698,11 +695,11 @@ public class Comsel extends AbstractTransaction{
String
cur
=
this
.
getCur
();
if
(
MdaUtils
.
isEmpty
(
cur
))
{
ctx
.
getDaoSession
().
dbReadset
(
this
.
getActlst
(),
new
CacheOption
(
pageNum
,
pageSiz
e
),
new
Argument
<
String
>(
"ptyinr"
,
ptyinr
));
ctx
.
getDaoSession
().
dbReadset
(
this
.
getActlst
(),
new
CacheOption
(
0
,
tru
e
),
new
Argument
<
String
>(
"ptyinr"
,
ptyinr
));
}
else
ctx
.
getDaoSession
().
dbReadset
(
this
.
getActlst
(),
new
CacheOption
(
pageNum
,
pageSiz
e
),
new
Argument
<
String
>(
"cur"
,
cur
),
new
Argument
<
String
>(
"ptyinr"
,
ptyinr
));
ctx
.
getDaoSession
().
dbReadset
(
this
.
getActlst
(),
new
CacheOption
(
0
,
tru
e
),
new
Argument
<
String
>(
"cur"
,
cur
),
new
Argument
<
String
>(
"ptyinr"
,
ptyinr
));
if
(
ctx
.
getErrorCode
()!=
NO_ERROR
)
{
ctx
.
setMessage
(
MdaUtils
.
getI18NString
(
"comsel"
,
"CT000070"
),
MdaUtils
.
getI18NString
(
"comsel"
,
"CT000071"
));
...
...
gjjs-bd-mybatis-support/src/main/java/com/brilliance/mda/support/mybatis/MyBatisDaoSession.java
View file @
4112a8bf
...
...
@@ -7,6 +7,7 @@ import com.brilliance.mda.runtime.mda.impl.AbstractDaoSession;
import
com.brilliance.mda.runtime.mda.impl.Argument
;
import
com.brilliance.mda.runtime.mda.impl.ModuleList
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.request.BaseVO
;
import
com.brilliance.mda.support.mybatis.count.CounterService
;
import
com.brilliance.mda.support.mybatis.dync.mapper.DbExecuteMapper
;
import
com.github.pagehelper.PageHelper
;
...
...
@@ -164,7 +165,11 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
@Override
public
<
T
extends
IModule
>
int
dbReadset
(
ModuleList
<
T
>
list
,
CacheOption
cacheOption
,
Argument
...
args
)
{
if
(
cacheOption
!=
null
)
{
PageHelper
.
startPage
(
cacheOption
.
getPageNum
(),
cacheOption
.
getPageSize
());
IContext
ctx
=
MdaEnv
.
getContext
();
BaseVO
baseVO
=
ctx
.
getVo
();
int
pageNum
=
baseVO
.
getPageNum
();
int
pageSize
=
baseVO
.
getPageSize
();
PageHelper
.
startPage
(
pageNum
,
pageSize
);
}
int
size
=
dbReadset
(
list
,
args
);
if
(
cacheOption
!=
null
)
{
...
...
@@ -179,7 +184,11 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
DynamicDataSourceContextHolder
.
setDataSourceType
(
moduleDB
);
if
(
cacheOption
!=
null
)
{
PageHelper
.
startPage
(
cacheOption
.
getPageNum
(),
cacheOption
.
getPageSize
());
IContext
ctx
=
MdaEnv
.
getContext
();
BaseVO
baseVO
=
ctx
.
getVo
();
int
pageNum
=
baseVO
.
getPageNum
();
int
pageSize
=
baseVO
.
getPageSize
();
PageHelper
.
startPage
(
pageNum
,
pageSize
);
}
List
<
Class
<?
extends
IModule
>>
clazzList
=
new
ArrayList
<>();
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/CacheOption.java
View file @
4112a8bf
...
...
@@ -9,10 +9,6 @@ public class CacheOption {
public
long
cacheTimeout
;
public
boolean
paging
;
private
int
pageNum
=
1
;
private
int
pageSize
=
10
;
public
CacheOption
(
long
cacheTimeout
)
{
this
(
cacheTimeout
,
false
);
}
...
...
@@ -28,24 +24,4 @@ public class CacheOption {
this
.
paging
=
paging
;
}
public
CacheOption
(
int
pageNum
,
int
pageSize
)
{
this
.
pageNum
=
pageNum
;
this
.
pageSize
=
pageSize
;
}
public
int
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
int
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
}
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