Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
c8e1496e
Commit
c8e1496e
authored
Dec 15, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品同步es
parent
6684964a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
2360 additions
and
16 deletions
+2360
-16
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynCoinJob.java
...n-api/src/main/java/com/wwdz/ch/admin/job/SynCoinJob.java
+2
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynItemToEsJob.java
...i/src/main/java/com/wwdz/ch/admin/job/SynItemToEsJob.java
+55
-11
ch-dao/src/main/java/com/wwdz/ch/db/dao/SynDataRecordDao.java
...ao/src/main/java/com/wwdz/ch/db/dao/SynDataRecordDao.java
+14
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/SynDataRecord.java
...ao/src/main/java/com/wwdz/ch/db/domain/SynDataRecord.java
+296
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/SynDataRecordExample.java
...main/java/com/wwdz/ch/db/domain/SynDataRecordExample.java
+1491
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
.../main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
+5
-0
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
+3
-3
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
+2
-1
ch-dao/src/main/java/com/wwdz/ch/db/impl/SynDataRecordDaoImpl.java
...c/main/java/com/wwdz/ch/db/impl/SynDataRecordDaoImpl.java
+47
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/SynDataRecordMapper.java
.../main/java/com/wwdz/ch/db/mapper/SynDataRecordMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/SynDataRecordMapper.xml
...n/resources/com/wwdz/ch/db/mapper/SynDataRecordMapper.xml
+375
-0
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynCoinJob.java
View file @
c8e1496e
...
@@ -120,6 +120,7 @@ public class SynCoinJob {
...
@@ -120,6 +120,7 @@ public class SynCoinJob {
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
setPage
(
1
);
coinRequestDto
.
setPage
(
1
);
coinRequestDto
.
setLimit
(
100
);
coinRequestDto
.
setLimit
(
100
);
coinRequestDto
.
setKind
(
3
);
PageInfo
<
Item
>
pageInfo
=
itemDao
.
findPageExcludeFilter
(
coinRequestDto
);
PageInfo
<
Item
>
pageInfo
=
itemDao
.
findPageExcludeFilter
(
coinRequestDto
);
int
totalPageNum
=
pageInfo
.
getPages
();
int
totalPageNum
=
pageInfo
.
getPages
();
logger
.
info
(
"total page : {}, total : {}"
,
totalPageNum
,
pageInfo
.
getTotal
());
logger
.
info
(
"total page : {}, total : {}"
,
totalPageNum
,
pageInfo
.
getTotal
());
...
@@ -128,6 +129,7 @@ public class SynCoinJob {
...
@@ -128,6 +129,7 @@ public class SynCoinJob {
CoinRequestDto
dto
=
new
CoinRequestDto
();
CoinRequestDto
dto
=
new
CoinRequestDto
();
dto
.
setPage
(
i
);
dto
.
setPage
(
i
);
dto
.
setLimit
(
100
);
dto
.
setLimit
(
100
);
dto
.
setKind
(
3
);
List
<
Item
>
itemList
=
itemDao
.
findListByPage
(
dto
);
List
<
Item
>
itemList
=
itemDao
.
findListByPage
(
dto
);
itemList
.
parallelStream
().
forEach
(
item
->
{
itemList
.
parallelStream
().
forEach
(
item
->
{
String
imageUrl
=
item
.
getImages
();
String
imageUrl
=
item
.
getImages
();
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynItemToEsJob.java
View file @
c8e1496e
...
@@ -8,8 +8,10 @@ import com.wwdz.ch.core.storage.QiniuStorage;
...
@@ -8,8 +8,10 @@ import com.wwdz.ch.core.storage.QiniuStorage;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.db.dao.CoinsDao
;
import
com.wwdz.ch.db.dao.CoinsDao
;
import
com.wwdz.ch.db.dao.ItemDao
;
import
com.wwdz.ch.db.dao.ItemDao
;
import
com.wwdz.ch.db.dao.SynDataRecordDao
;
import
com.wwdz.ch.db.domain.Coins
;
import
com.wwdz.ch.db.domain.Coins
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.SynDataRecord
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.es.ItemEsDao
;
import
com.wwdz.ch.db.es.ItemEsDao
;
import
com.xxdxxs.utils.CommonUtils
;
import
com.xxdxxs.utils.CommonUtils
;
...
@@ -44,7 +46,9 @@ public class SynItemToEsJob {
...
@@ -44,7 +46,9 @@ public class SynItemToEsJob {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SynItemToEsJob
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SynItemToEsJob
.
class
);
private
String
QUANKU_SYN_TO_ES_TASK_KEY
=
"QUANKU_SYN_TO_ES_TASK_KEY"
;
private
final
static
String
QUANKU_SYN_TO_ES_TASK_KEY
=
"QUANKU_SYN_TO_ES_TASK_KEY"
;
private
final
int
SYN_ITEM_TO_ES_TYPE
=
1
;
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
10
);
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
10
);
...
@@ -57,10 +61,13 @@ public class SynItemToEsJob {
...
@@ -57,10 +61,13 @@ public class SynItemToEsJob {
@Autowired
@Autowired
RedissonClient
redissonClient
;
RedissonClient
redissonClient
;
@Autowired
SynDataRecordDao
synDataRecordDao
;
/**
/**
* 隔2分钟运行一次
* 隔2分钟运行一次
*/
*/
@Scheduled
(
fixedDelay
=
1000
*
60
*
2
)
@Scheduled
(
fixedDelay
=
1000
*
60
*
1
)
public
void
execute
()
{
public
void
execute
()
{
RLock
lock
=
redissonClient
.
getLock
(
QUANKU_SYN_TO_ES_TASK_KEY
);
RLock
lock
=
redissonClient
.
getLock
(
QUANKU_SYN_TO_ES_TASK_KEY
);
if
(!
lock
.
tryLock
())
{
if
(!
lock
.
tryLock
())
{
...
@@ -69,17 +76,34 @@ public class SynItemToEsJob {
...
@@ -69,17 +76,34 @@ public class SynItemToEsJob {
}
}
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> 同步item增量数据到ES, 开始执行 <<<<<<<<<<<<<<<<<<<<<"
);
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> 同步item增量数据到ES, 开始执行 <<<<<<<<<<<<<<<<<<<<<"
);
try
{
try
{
//查询es已有数据的最新修改时间
//查询同步数据记录表中数据,判断上次的同步操作是否完成,没有则继续上次的查询条件继续执行,完成则查询es中最新时间作为本次查询开始时间
Date
time
=
itemEsDao
.
getMaxTime
();
Date
startTime
;
if
(
time
==
null
)
{
Date
endTime
;
logger
.
warn
(
">>>>>>>>>>>> es中没有数据,先同步全量数据 <<<<<<<<<<<<"
);
int
page
=
1
;
return
;
int
limit
=
100
;
SynDataRecord
synDataRecord
=
synDataRecordDao
.
find
(
SYN_ITEM_TO_ES_TYPE
);
if
(
synDataRecord
.
getIsEnd
().
intValue
()
!=
1
)
{
startTime
=
synDataRecord
.
getQueryStartTime
();
endTime
=
synDataRecord
.
getQueryEndTime
();
page
=
synDataRecord
.
getPageIndex
()
+
1
;
limit
=
synDataRecord
.
getPageSize
();
logger
.
info
(
"同步item增量数据到ES, 承接上次同步的时间范围执行, 时间范围 {} to {}"
,
DateUtils
.
toString
(
startTime
),
DateUtils
.
toString
(
endTime
));
}
else
{
//查询es已有数据的最新修改时间
startTime
=
itemEsDao
.
getMaxTime
();
if
(
startTime
==
null
)
{
logger
.
warn
(
">>>>>>>>>>>> es中没有数据,先同步全量数据 <<<<<<<<<<<<"
);
return
;
}
endTime
=
new
Date
();
logger
.
info
(
"上次同步任务执行完毕,开始新一轮时间范围的数据同步, 时间范围 {} to {}"
,
DateUtils
.
toString
(
startTime
),
DateUtils
.
toString
(
endTime
));
}
}
logger
.
info
(
"es中最新数据时间为 {}"
,
DateUtils
.
toString
(
t
ime
));
logger
.
info
(
"es中最新数据时间为 {}"
,
DateUtils
.
toString
(
startT
ime
));
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
setPage
(
1
);
coinRequestDto
.
setPage
(
page
);
coinRequestDto
.
setLimit
(
100
);
coinRequestDto
.
setLimit
(
limit
);
coinRequestDto
.
setStartUpdateTime
(
time
);
coinRequestDto
.
setStartUpdateTime
(
startTime
);
coinRequestDto
.
setEndUpdateTime
(
endTime
);
coinRequestDto
.
setSortColumn
(
"update_time"
);
coinRequestDto
.
setSortColumn
(
"update_time"
);
List
<
Item
>
itemList
=
itemDao
.
findListByPage
(
coinRequestDto
);
List
<
Item
>
itemList
=
itemDao
.
findListByPage
(
coinRequestDto
);
PageInfo
<
Item
>
pageInfo
=
new
PageInfo
<>(
itemList
);
PageInfo
<
Item
>
pageInfo
=
new
PageInfo
<>(
itemList
);
...
@@ -89,6 +113,26 @@ public class SynItemToEsJob {
...
@@ -89,6 +113,26 @@ public class SynItemToEsJob {
itemEsDao
.
upsert
(
item
);
itemEsDao
.
upsert
(
item
);
});
});
}
}
//如果有下一页则记录下来,下一次任务执行接着同步该更新时间范围的
if
(
pageInfo
.
isHasNextPage
())
{
SynDataRecord
updateRecord
=
new
SynDataRecord
();
updateRecord
.
setPageIndex
(
page
);
updateRecord
.
setPageSize
(
limit
);
updateRecord
.
setQueryStartTime
(
startTime
);
updateRecord
.
setQueryEndTime
(
endTime
);
updateRecord
.
setIsEnd
(
0
);
updateRecord
.
setType
(
SYN_ITEM_TO_ES_TYPE
);
synDataRecordDao
.
update
(
updateRecord
);
}
else
{
SynDataRecord
updateRecord
=
new
SynDataRecord
();
updateRecord
.
setPageIndex
(
page
);
updateRecord
.
setPageSize
(
limit
);
updateRecord
.
setQueryStartTime
(
startTime
);
updateRecord
.
setQueryEndTime
(
endTime
);
updateRecord
.
setIsEnd
(
1
);
updateRecord
.
setType
(
SYN_ITEM_TO_ES_TYPE
);
synDataRecordDao
.
update
(
updateRecord
);
}
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> 增量数据同步ES成功, 执行完毕 <<<<<<<<<<<<<<<<<<<<<"
);
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> 增量数据同步ES成功, 执行完毕 <<<<<<<<<<<<<<<<<<<<<"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"同步item增量数据到ES error {}"
,
e
);
logger
.
error
(
"同步item增量数据到ES error {}"
,
e
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/SynDataRecordDao.java
0 → 100644
View file @
c8e1496e
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.SynDataRecord
;
public
interface
SynDataRecordDao
{
boolean
create
(
SynDataRecord
record
);
boolean
update
(
SynDataRecord
record
);
SynDataRecord
find
(
int
type
);
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/SynDataRecord.java
0 → 100644
View file @
c8e1496e
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2023/12/15
*/
@Data
public
class
SynDataRecord
implements
Entity
{
private
Integer
id
;
private
Date
queryStartTime
;
private
Date
queryEndTime
;
/**
* 同步的页码
*/
private
Integer
pageIndex
;
/**
* 一页的数据量
*/
private
Integer
pageSize
;
/**
* 1:item同步到es
*/
private
Integer
type
;
/**
* 是否完成
*/
private
Integer
isEnd
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", queryStartTime="
).
append
(
queryStartTime
);
sb
.
append
(
", queryEndTime="
).
append
(
queryEndTime
);
sb
.
append
(
", pageIndex="
).
append
(
pageIndex
);
sb
.
append
(
", pageSize="
).
append
(
pageSize
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", isEnd="
).
append
(
isEnd
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
SynDataRecord
other
=
(
SynDataRecord
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getQueryStartTime
()
==
null
?
other
.
getQueryStartTime
()
==
null
:
this
.
getQueryStartTime
().
equals
(
other
.
getQueryStartTime
()))
&&
(
this
.
getQueryEndTime
()
==
null
?
other
.
getQueryEndTime
()
==
null
:
this
.
getQueryEndTime
().
equals
(
other
.
getQueryEndTime
()))
&&
(
this
.
getPageIndex
()
==
null
?
other
.
getPageIndex
()
==
null
:
this
.
getPageIndex
().
equals
(
other
.
getPageIndex
()))
&&
(
this
.
getPageSize
()
==
null
?
other
.
getPageSize
()
==
null
:
this
.
getPageSize
().
equals
(
other
.
getPageSize
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getIsEnd
()
==
null
?
other
.
getIsEnd
()
==
null
:
this
.
getIsEnd
().
equals
(
other
.
getIsEnd
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getQueryStartTime
()
==
null
)
?
0
:
getQueryStartTime
().
hashCode
());
result
=
prime
*
result
+
((
getQueryEndTime
()
==
null
)
?
0
:
getQueryEndTime
().
hashCode
());
result
=
prime
*
result
+
((
getPageIndex
()
==
null
)
?
0
:
getPageIndex
().
hashCode
());
result
=
prime
*
result
+
((
getPageSize
()
==
null
)
?
0
:
getPageSize
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getIsEnd
()
==
null
)
?
0
:
getIsEnd
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
queryStartTime
(
"query_start_time"
,
"queryStartTime"
,
"TIMESTAMP"
,
false
),
queryEndTime
(
"query_end_time"
,
"queryEndTime"
,
"TIMESTAMP"
,
false
),
pageIndex
(
"page_index"
,
"pageIndex"
,
"INTEGER"
,
false
),
pageSize
(
"page_size"
,
"pageSize"
,
"INTEGER"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
isEnd
(
"is_end"
,
"isEnd"
,
"INTEGER"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/SynDataRecordExample.java
0 → 100644
View file @
c8e1496e
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
SynDataRecordExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
SynDataRecordExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SynDataRecordExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SynDataRecordExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
SynDataRecordExample
example
=
new
SynDataRecordExample
();
return
example
.
createCriteria
();
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeIsNull
()
{
addCriterion
(
"query_start_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeIsNotNull
()
{
addCriterion
(
"query_start_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeEqualTo
(
Date
value
)
{
addCriterion
(
"query_start_time ="
,
value
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryStartTimeEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_start_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"query_start_time <>"
,
value
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryStartTimeNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_start_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"query_start_time >"
,
value
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryStartTimeGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_start_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"query_start_time >="
,
value
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryStartTimeGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_start_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeLessThan
(
Date
value
)
{
addCriterion
(
"query_start_time <"
,
value
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryStartTimeLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_start_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"query_start_time <="
,
value
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryStartTimeLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_start_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"query_start_time in"
,
values
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"query_start_time not in"
,
values
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"query_start_time between"
,
value1
,
value2
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryStartTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"query_start_time not between"
,
value1
,
value2
,
"queryStartTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeIsNull
()
{
addCriterion
(
"query_end_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeIsNotNull
()
{
addCriterion
(
"query_end_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeEqualTo
(
Date
value
)
{
addCriterion
(
"query_end_time ="
,
value
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryEndTimeEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_end_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"query_end_time <>"
,
value
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryEndTimeNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_end_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"query_end_time >"
,
value
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryEndTimeGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_end_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"query_end_time >="
,
value
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryEndTimeGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_end_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeLessThan
(
Date
value
)
{
addCriterion
(
"query_end_time <"
,
value
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryEndTimeLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_end_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"query_end_time <="
,
value
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andQueryEndTimeLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"query_end_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"query_end_time in"
,
values
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"query_end_time not in"
,
values
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"query_end_time between"
,
value1
,
value2
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andQueryEndTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"query_end_time not between"
,
value1
,
value2
,
"queryEndTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexIsNull
()
{
addCriterion
(
"page_index is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexIsNotNull
()
{
addCriterion
(
"page_index is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexEqualTo
(
Integer
value
)
{
addCriterion
(
"page_index ="
,
value
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageIndexEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_index = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexNotEqualTo
(
Integer
value
)
{
addCriterion
(
"page_index <>"
,
value
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageIndexNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_index <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexGreaterThan
(
Integer
value
)
{
addCriterion
(
"page_index >"
,
value
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageIndexGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_index > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"page_index >="
,
value
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageIndexGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_index >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexLessThan
(
Integer
value
)
{
addCriterion
(
"page_index <"
,
value
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageIndexLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_index < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"page_index <="
,
value
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageIndexLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_index <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"page_index in"
,
values
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"page_index not in"
,
values
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"page_index between"
,
value1
,
value2
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageIndexNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"page_index not between"
,
value1
,
value2
,
"pageIndex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeIsNull
()
{
addCriterion
(
"page_size is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeIsNotNull
()
{
addCriterion
(
"page_size is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeEqualTo
(
Integer
value
)
{
addCriterion
(
"page_size ="
,
value
,
"pageSize"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageSizeEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_size = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"page_size <>"
,
value
,
"pageSize"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageSizeNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_size <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeGreaterThan
(
Integer
value
)
{
addCriterion
(
"page_size >"
,
value
,
"pageSize"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageSizeGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_size > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"page_size >="
,
value
,
"pageSize"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageSizeGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_size >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeLessThan
(
Integer
value
)
{
addCriterion
(
"page_size <"
,
value
,
"pageSize"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageSizeLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_size < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"page_size <="
,
value
,
"pageSize"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andPageSizeLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"page_size <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"page_size in"
,
values
,
"pageSize"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"page_size not in"
,
values
,
"pageSize"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"page_size between"
,
value1
,
value2
,
"pageSize"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPageSizeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"page_size not between"
,
value1
,
value2
,
"pageSize"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNull
()
{
addCriterion
(
"`type` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNotNull
()
{
addCriterion
(
"`type` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` ="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` <>"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"`type` >"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` >="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThan
(
Integer
value
)
{
addCriterion
(
"`type` <"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` <="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`type` in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`type` not in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`type` between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndIsNull
()
{
addCriterion
(
"is_end is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndIsNotNull
()
{
addCriterion
(
"is_end is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndEqualTo
(
Integer
value
)
{
addCriterion
(
"is_end ="
,
value
,
"isEnd"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsEndEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_end = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndNotEqualTo
(
Integer
value
)
{
addCriterion
(
"is_end <>"
,
value
,
"isEnd"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsEndNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_end <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndGreaterThan
(
Integer
value
)
{
addCriterion
(
"is_end >"
,
value
,
"isEnd"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsEndGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_end > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"is_end >="
,
value
,
"isEnd"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsEndGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_end >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndLessThan
(
Integer
value
)
{
addCriterion
(
"is_end <"
,
value
,
"isEnd"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsEndLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_end < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"is_end <="
,
value
,
"isEnd"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsEndLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_end <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"is_end in"
,
values
,
"isEnd"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"is_end not in"
,
values
,
"isEnd"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"is_end between"
,
value1
,
value2
,
"isEnd"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEndNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"is_end not between"
,
value1
,
value2
,
"isEnd"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
SynDataRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
SynDataRecordExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
SynDataRecordExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SynDataRecordExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
View file @
c8e1496e
...
@@ -99,6 +99,11 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
...
@@ -99,6 +99,11 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
*/
*/
private
Date
startUpdateTime
;
private
Date
startUpdateTime
;
/**
* 用于同步数据到es
*/
private
Date
endUpdateTime
;
private
String
detail
;
private
String
detail
;
private
Double
price
;
private
Double
price
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
View file @
c8e1496e
...
@@ -315,12 +315,12 @@ public class ItemEsDao {
...
@@ -315,12 +315,12 @@ public class ItemEsDao {
IndexResponse
indexResponse
=
elasticsearchClient
.
index
(
indexRequest
);
IndexResponse
indexResponse
=
elasticsearchClient
.
index
(
indexRequest
);
logger
.
info
(
"indexResponse ={}"
,
indexResponse
);
logger
.
info
(
"indexResponse ={}"
,
indexResponse
);
if
(
indexResponse
.
shards
().
successful
().
intValue
()
==
1
)
{
if
(
indexResponse
.
shards
().
successful
().
intValue
()
==
1
)
{
logger
.
info
(
"ES upsert 数据成功 : {} "
,
item
);
logger
.
info
(
"ES upsert 数据成功 : {} "
,
item
.
getId
()
);
}
else
{
}
else
{
logger
.
error
(
"ES upsert 数据失败 : {} "
,
item
);
logger
.
error
(
"ES upsert 数据失败 : {} "
,
item
.
getId
()
);
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
logger
.
info
(
"ES upsert 数据 content :{} error"
,
item
,
e
);
logger
.
info
(
"ES upsert 数据 content :{} error"
,
item
.
getId
()
,
e
);
}
}
}
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
View file @
c8e1496e
...
@@ -94,10 +94,11 @@ public class ItemDaoImpl implements ItemDao {
...
@@ -94,10 +94,11 @@ public class ItemDaoImpl implements ItemDao {
ItemExample
example
=
new
ItemExample
();
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
example
.
setOrderByClause
(
"create_time asc"
);
example
.
setOrderByClause
(
"create_time asc"
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getStartUpdateTime
(),
criteria:
:
andUpdateTimeGreaterThan
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getEndUpdateTime
(),
criteria:
:
andUpdateTimeLessThanOrEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getKind
(),
criteria
::
andKindEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getKind
(),
criteria
::
andKindEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getIsDeleted
(),
criteria:
:
andIsDeletedEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getIsDeleted
(),
criteria:
:
andIsDeletedEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getCid
(),
criteria:
:
andCidEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getCid
(),
criteria:
:
andCidEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getStartUpdateTime
(),
criteria:
:
andUpdateTimeGreaterThan
);
PageHelper
.
startPage
(
coinRequestDto
.
getPage
(),
coinRequestDto
.
getLimit
());
PageHelper
.
startPage
(
coinRequestDto
.
getPage
(),
coinRequestDto
.
getLimit
());
return
itemMapper
.
selectByExampleWithBLOBs
(
example
);
return
itemMapper
.
selectByExampleWithBLOBs
(
example
);
}
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/SynDataRecordDaoImpl.java
0 → 100644
View file @
c8e1496e
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.SynDataRecordDao
;
import
com.wwdz.ch.db.domain.SynDataRecord
;
import
com.wwdz.ch.db.domain.SynDataRecordExample
;
import
com.wwdz.ch.db.mapper.SynDataRecordMapper
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
/**
* 同步数据记录
*/
@Repository
public
class
SynDataRecordDaoImpl
implements
SynDataRecordDao
{
@Autowired
SynDataRecordMapper
synDataRecordMapper
;
@Override
public
boolean
create
(
SynDataRecord
record
)
{
Date
now
=
new
Date
();
record
.
setCreateTime
(
now
);
record
.
setUpdateTime
(
now
);
return
synDataRecordMapper
.
insert
(
record
)
>
0
;
}
@Override
public
boolean
update
(
SynDataRecord
record
)
{
SynDataRecordExample
synDataRecordExample
=
new
SynDataRecordExample
();
SynDataRecordExample
.
Criteria
criteria
=
synDataRecordExample
.
createCriteria
();
criteria
.
andTypeEqualTo
(
record
.
getType
());
Date
now
=
new
Date
();
record
.
setUpdateTime
(
now
);
return
synDataRecordMapper
.
updateByExampleSelective
(
record
,
synDataRecordExample
)
>
0
;
}
@Override
public
SynDataRecord
find
(
int
type
)
{
SynDataRecordExample
synDataRecordExample
=
new
SynDataRecordExample
();
SynDataRecordExample
.
Criteria
criteria
=
synDataRecordExample
.
createCriteria
();
criteria
.
andTypeEqualTo
(
type
);
return
synDataRecordMapper
.
selectOneByExample
(
synDataRecordExample
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/SynDataRecordMapper.java
0 → 100644
View file @
c8e1496e
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.SynDataRecord
;
import
com.wwdz.ch.db.domain.SynDataRecordExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
SynDataRecordMapper
{
long
countByExample
(
SynDataRecordExample
example
);
int
deleteByExample
(
SynDataRecordExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
SynDataRecord
record
);
int
insertSelective
(
SynDataRecord
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SynDataRecord
selectOneByExample
(
SynDataRecordExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SynDataRecord
selectOneByExampleSelective
(
@Param
(
"example"
)
SynDataRecordExample
example
,
@Param
(
"selective"
)
SynDataRecord
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
SynDataRecord
>
selectByExampleSelective
(
@Param
(
"example"
)
SynDataRecordExample
example
,
@Param
(
"selective"
)
SynDataRecord
.
Column
...
selective
);
List
<
SynDataRecord
>
selectByExample
(
SynDataRecordExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table syn_data_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SynDataRecord
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
SynDataRecord
.
Column
...
selective
);
SynDataRecord
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SynDataRecord
record
,
@Param
(
"example"
)
SynDataRecordExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SynDataRecord
record
,
@Param
(
"example"
)
SynDataRecordExample
example
);
int
updateByPrimaryKeySelective
(
SynDataRecord
record
);
int
updateByPrimaryKey
(
SynDataRecord
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/SynDataRecordMapper.xml
0 → 100644
View file @
c8e1496e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.wwdz.ch.db.mapper.SynDataRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.SynDataRecord"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"query_start_time"
jdbcType=
"TIMESTAMP"
property=
"queryStartTime"
/>
<result
column=
"query_end_time"
jdbcType=
"TIMESTAMP"
property=
"queryEndTime"
/>
<result
column=
"page_index"
jdbcType=
"INTEGER"
property=
"pageIndex"
/>
<result
column=
"page_size"
jdbcType=
"INTEGER"
property=
"pageSize"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"is_end"
jdbcType=
"INTEGER"
property=
"isEnd"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, query_start_time, query_end_time, page_index, page_size, `type`, is_end, create_time,
update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecordExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from syn_data_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, query_start_time, query_end_time, page_index, page_size, `type`, is_end, create_time,
update_time
</otherwise>
</choose>
from syn_data_record
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from syn_data_record
where id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, query_start_time, query_end_time, page_index, page_size, `type`, is_end, create_time,
update_time
</otherwise>
</choose>
from syn_data_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from syn_data_record
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecordExample"
>
delete from syn_data_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecord"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into syn_data_record (query_start_time, query_end_time,
page_index, page_size, `type`,
is_end, create_time, update_time
)
values (#{queryStartTime,jdbcType=TIMESTAMP}, #{queryEndTime,jdbcType=TIMESTAMP},
#{pageIndex,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{isEnd,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecord"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into syn_data_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"queryStartTime != null"
>
query_start_time,
</if>
<if
test=
"queryEndTime != null"
>
query_end_time,
</if>
<if
test=
"pageIndex != null"
>
page_index,
</if>
<if
test=
"pageSize != null"
>
page_size,
</if>
<if
test=
"type != null"
>
`type`,
</if>
<if
test=
"isEnd != null"
>
is_end,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"queryStartTime != null"
>
#{queryStartTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"queryEndTime != null"
>
#{queryEndTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"pageIndex != null"
>
#{pageIndex,jdbcType=INTEGER},
</if>
<if
test=
"pageSize != null"
>
#{pageSize,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
<if
test=
"isEnd != null"
>
#{isEnd,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecordExample"
resultType=
"java.lang.Long"
>
select count(*) from syn_data_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update syn_data_record
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.queryStartTime != null"
>
query_start_time = #{record.queryStartTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.queryEndTime != null"
>
query_end_time = #{record.queryEndTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.pageIndex != null"
>
page_index = #{record.pageIndex,jdbcType=INTEGER},
</if>
<if
test=
"record.pageSize != null"
>
page_size = #{record.pageSize,jdbcType=INTEGER},
</if>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if
test=
"record.isEnd != null"
>
is_end = #{record.isEnd,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update syn_data_record
set id = #{record.id,jdbcType=INTEGER},
query_start_time = #{record.queryStartTime,jdbcType=TIMESTAMP},
query_end_time = #{record.queryEndTime,jdbcType=TIMESTAMP},
page_index = #{record.pageIndex,jdbcType=INTEGER},
page_size = #{record.pageSize,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
is_end = #{record.isEnd,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecord"
>
update syn_data_record
<set>
<if
test=
"queryStartTime != null"
>
query_start_time = #{queryStartTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"queryEndTime != null"
>
query_end_time = #{queryEndTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"pageIndex != null"
>
page_index = #{pageIndex,jdbcType=INTEGER},
</if>
<if
test=
"pageSize != null"
>
page_size = #{pageSize,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=INTEGER},
</if>
<if
test=
"isEnd != null"
>
is_end = #{isEnd,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecord"
>
update syn_data_record
set query_start_time = #{queryStartTime,jdbcType=TIMESTAMP},
query_end_time = #{queryEndTime,jdbcType=TIMESTAMP},
page_index = #{pageIndex,jdbcType=INTEGER},
page_size = #{pageSize,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
is_end = #{isEnd,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.SynDataRecordExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from syn_data_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, query_start_time, query_end_time, page_index, page_size, `type`, is_end, create_time,
update_time
</otherwise>
</choose>
from syn_data_record
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
c8e1496e
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
item
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
syn_data_record
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
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