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
512a3cb7
Commit
512a3cb7
authored
Jul 19, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
303d8f91
fe971e58
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
3690 additions
and
1 deletion
+3690
-1
ch-dao/pom.xml
ch-dao/pom.xml
+0
-1
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesCoinsRelationMapper.java
...java/com/wwdz/ch/db/dao/FavoritesCoinsRelationMapper.java
+54
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesMapper.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesMapper.java
+111
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites.java
+320
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesCoinsRelation.java
...in/java/com/wwdz/ch/db/domain/FavoritesCoinsRelation.java
+239
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesCoinsRelationExample.java
.../com/wwdz/ch/db/domain/FavoritesCoinsRelationExample.java
+566
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesExample.java
...src/main/java/com/wwdz/ch/db/domain/FavoritesExample.java
+1258
-0
ch-dao/src/main/java/com/wwdz/ch/db/service/FavoritesCoinsRelationDao.java
...ava/com/wwdz/ch/db/service/FavoritesCoinsRelationDao.java
+14
-0
ch-dao/src/main/java/com/wwdz/ch/db/service/FavoritesDao.java
...ao/src/main/java/com/wwdz/ch/db/service/FavoritesDao.java
+19
-0
ch-dao/src/main/java/com/wwdz/ch/db/service/impl/FavoritesCoinsRelationDaoImpl.java
...wdz/ch/db/service/impl/FavoritesCoinsRelationDaoImpl.java
+59
-0
ch-dao/src/main/java/com/wwdz/ch/db/service/impl/FavoritesDaoImpl.java
...in/java/com/wwdz/ch/db/service/impl/FavoritesDaoImpl.java
+84
-0
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FavoritesCoinsRelationMapper.xml
...urces/com/wwdz/ch/db/dao/FavoritesCoinsRelationMapper.xml
+222
-0
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FavoritesMapper.xml
...src/main/resources/com/wwdz/ch/db/dao/FavoritesMapper.xml
+462
-0
ch-wx-api/pom.xml
ch-wx-api/pom.xml
+6
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/FavoritesRequestDto.java
...va/com/wwdz/ch/wx/entity/request/FavoritesRequestDto.java
+42
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/FavoritesService.java
...rc/main/java/com/wwdz/ch/wx/service/FavoritesService.java
+17
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
...ava/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
+151
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFavoritesController.java
...c/main/java/com/wwdz/ch/wx/web/WxFavoritesController.java
+66
-0
No files found.
ch-dao/pom.xml
View file @
512a3cb7
...
@@ -73,7 +73,6 @@
...
@@ -73,7 +73,6 @@
<version>
1.3.7
</version>
<version>
1.3.7
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesCoinsRelationMapper.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelationExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
FavoritesCoinsRelationMapper
{
long
countByExample
(
FavoritesCoinsRelationExample
example
);
int
deleteByExample
(
FavoritesCoinsRelationExample
example
);
int
insert
(
FavoritesCoinsRelation
record
);
int
batchInsert
(
List
<
FavoritesCoinsRelation
>
list
);
int
insertSelective
(
FavoritesCoinsRelation
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
FavoritesCoinsRelation
selectOneByExample
(
FavoritesCoinsRelationExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
FavoritesCoinsRelation
selectOneByExampleSelective
(
@Param
(
"example"
)
FavoritesCoinsRelationExample
example
,
@Param
(
"selective"
)
FavoritesCoinsRelation
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
FavoritesCoinsRelation
>
selectByExampleSelective
(
@Param
(
"example"
)
FavoritesCoinsRelationExample
example
,
@Param
(
"selective"
)
FavoritesCoinsRelation
.
Column
...
selective
);
List
<
FavoritesCoinsRelation
>
selectByExample
(
FavoritesCoinsRelationExample
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FavoritesCoinsRelation
record
,
@Param
(
"example"
)
FavoritesCoinsRelationExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FavoritesCoinsRelation
record
,
@Param
(
"example"
)
FavoritesCoinsRelationExample
example
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesMapper.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
FavoritesMapper
{
long
countByExample
(
FavoritesExample
example
);
int
deleteByExample
(
FavoritesExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
Favorites
record
);
int
insertSelective
(
Favorites
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Favorites
selectOneByExample
(
FavoritesExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Favorites
selectOneByExampleSelective
(
@Param
(
"example"
)
FavoritesExample
example
,
@Param
(
"selective"
)
Favorites
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Favorites
selectOneByExampleWithBLOBs
(
FavoritesExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
Favorites
>
selectByExampleSelective
(
@Param
(
"example"
)
FavoritesExample
example
,
@Param
(
"selective"
)
Favorites
.
Column
...
selective
);
List
<
Favorites
>
selectByExampleWithBLOBs
(
FavoritesExample
example
);
List
<
Favorites
>
selectByExample
(
FavoritesExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Favorites
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
Favorites
.
Column
...
selective
);
Favorites
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Favorites
selectByPrimaryKeyWithLogicalDelete
(
@Param
(
"id"
)
Long
id
,
@Param
(
"andLogicalDeleted"
)
boolean
andLogicalDeleted
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Favorites
record
,
@Param
(
"example"
)
FavoritesExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
Favorites
record
,
@Param
(
"example"
)
FavoritesExample
example
);
int
updateByExample
(
@Param
(
"record"
)
Favorites
record
,
@Param
(
"example"
)
FavoritesExample
example
);
int
updateByPrimaryKeySelective
(
Favorites
record
);
int
updateByPrimaryKeyWithBLOBs
(
Favorites
record
);
int
updateByPrimaryKey
(
Favorites
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByExample
(
@Param
(
"example"
)
FavoritesExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2023/07/18
*/
@Data
public
class
Favorites
implements
Serializable
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
final
Boolean
NOT_DELETED
=
false
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
final
Boolean
IS_DELETED
=
true
;
private
Long
id
;
/**
* 用户id
*/
private
Long
uid
;
/**
* 标题
*/
private
String
title
;
/**
* 描述
*/
private
String
description
;
/**
* 创建时间
*/
private
Date
addTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 逻辑删除
*/
private
Boolean
deleted
;
/**
* 收藏册图片,用;分隔
*/
private
String
images
;
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
(
", uid="
).
append
(
uid
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", deleted="
).
append
(
deleted
);
sb
.
append
(
", images="
).
append
(
images
);
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
;
}
Favorites
other
=
(
Favorites
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getUid
()
==
null
?
other
.
getUid
()
==
null
:
this
.
getUid
().
equals
(
other
.
getUid
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()))
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getDeleted
()
==
null
?
other
.
getDeleted
()
==
null
:
this
.
getDeleted
().
equals
(
other
.
getDeleted
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getUid
()
==
null
)
?
0
:
getUid
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getDeleted
()
==
null
)
?
0
:
getDeleted
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
return
result
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
void
andLogicalDeleted
(
boolean
deleted
)
{
setDeleted
(
deleted
?
IS_DELETED
:
NOT_DELETED
);
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
uid
(
"uid"
,
"uid"
,
"BIGINT"
,
true
),
title
(
"title"
,
"title"
,
"VARCHAR"
,
false
),
description
(
"description"
,
"description"
,
"VARCHAR"
,
false
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
deleted
(
"deleted"
,
"deleted"
,
"BIT"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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 favorites
*
* @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/FavoritesCoinsRelation.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2023/07/18
*/
@Data
public
class
FavoritesCoinsRelation
implements
Serializable
{
/**
* 收藏册id
*/
private
Long
favoritesId
;
/**
* 钱币id
*/
private
Long
coinsId
;
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
(
", favoritesId="
).
append
(
favoritesId
);
sb
.
append
(
", coinsId="
).
append
(
coinsId
);
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
;
}
FavoritesCoinsRelation
other
=
(
FavoritesCoinsRelation
)
that
;
return
(
this
.
getFavoritesId
()
==
null
?
other
.
getFavoritesId
()
==
null
:
this
.
getFavoritesId
().
equals
(
other
.
getFavoritesId
()))
&&
(
this
.
getCoinsId
()
==
null
?
other
.
getCoinsId
()
==
null
:
this
.
getCoinsId
().
equals
(
other
.
getCoinsId
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getFavoritesId
()
==
null
)
?
0
:
getFavoritesId
().
hashCode
());
result
=
prime
*
result
+
((
getCoinsId
()
==
null
)
?
0
:
getCoinsId
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
favoritesId
(
"favorites_id"
,
"favoritesId"
,
"BIGINT"
,
false
),
coinsId
(
"coins_id"
,
"coinsId"
,
"BIGINT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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/FavoritesCoinsRelationExample.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
FavoritesCoinsRelationExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FavoritesCoinsRelationExample
()
{
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 favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
FavoritesCoinsRelationExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
FavoritesCoinsRelationExample
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 favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
FavoritesCoinsRelationExample
example
=
new
FavoritesCoinsRelationExample
();
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
andFavoritesIdIsNull
()
{
addCriterion
(
"favorites_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdIsNotNull
()
{
addCriterion
(
"favorites_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdEqualTo
(
Long
value
)
{
addCriterion
(
"favorites_id ="
,
value
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andFavoritesIdEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"favorites_id <>"
,
value
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andFavoritesIdNotEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdGreaterThan
(
Long
value
)
{
addCriterion
(
"favorites_id >"
,
value
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andFavoritesIdGreaterThanColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"favorites_id >="
,
value
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andFavoritesIdGreaterThanOrEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdLessThan
(
Long
value
)
{
addCriterion
(
"favorites_id <"
,
value
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andFavoritesIdLessThanColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"favorites_id <="
,
value
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andFavoritesIdLessThanOrEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"favorites_id in"
,
values
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"favorites_id not in"
,
values
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"favorites_id between"
,
value1
,
value2
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFavoritesIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"favorites_id not between"
,
value1
,
value2
,
"favoritesId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdIsNull
()
{
addCriterion
(
"coins_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdIsNotNull
()
{
addCriterion
(
"coins_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdEqualTo
(
Long
value
)
{
addCriterion
(
"coins_id ="
,
value
,
"coinsId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCoinsIdEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"coins_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"coins_id <>"
,
value
,
"coinsId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCoinsIdNotEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"coins_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdGreaterThan
(
Long
value
)
{
addCriterion
(
"coins_id >"
,
value
,
"coinsId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCoinsIdGreaterThanColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"coins_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"coins_id >="
,
value
,
"coinsId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCoinsIdGreaterThanOrEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"coins_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdLessThan
(
Long
value
)
{
addCriterion
(
"coins_id <"
,
value
,
"coinsId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCoinsIdLessThanColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"coins_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"coins_id <="
,
value
,
"coinsId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCoinsIdLessThanOrEqualToColumn
(
FavoritesCoinsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"coins_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"coins_id in"
,
values
,
"coinsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"coins_id not in"
,
values
,
"coinsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"coins_id between"
,
value1
,
value2
,
"coinsId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCoinsIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"coins_id not between"
,
value1
,
value2
,
"coinsId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
FavoritesCoinsRelationExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
FavoritesCoinsRelationExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
FavoritesCoinsRelationExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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 favorites_coins_relation
*
* @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/domain/FavoritesExample.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
FavoritesExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FavoritesExample
()
{
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
FavoritesExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
FavoritesExample
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
FavoritesExample
example
=
new
FavoritesExample
();
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
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUidIsNull
()
{
addCriterion
(
"`uid` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUidIsNotNull
()
{
addCriterion
(
"`uid` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUidEqualTo
(
Long
value
)
{
addCriterion
(
"`uid` ="
,
value
,
"uid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUidEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`uid` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUidNotEqualTo
(
Long
value
)
{
addCriterion
(
"`uid` <>"
,
value
,
"uid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUidNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`uid` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUidGreaterThan
(
Long
value
)
{
addCriterion
(
"`uid` >"
,
value
,
"uid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUidGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`uid` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUidGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`uid` >="
,
value
,
"uid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUidGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`uid` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUidLessThan
(
Long
value
)
{
addCriterion
(
"`uid` <"
,
value
,
"uid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUidLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`uid` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUidLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`uid` <="
,
value
,
"uid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUidLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`uid` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUidIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`uid` in"
,
values
,
"uid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUidNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`uid` not in"
,
values
,
"uid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUidBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`uid` between"
,
value1
,
value2
,
"uid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUidNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`uid` not between"
,
value1
,
value2
,
"uid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIsNull
()
{
addCriterion
(
"title is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIsNotNull
()
{
addCriterion
(
"title is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleEqualTo
(
String
value
)
{
addCriterion
(
"title ="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotEqualTo
(
String
value
)
{
addCriterion
(
"title <>"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleGreaterThan
(
String
value
)
{
addCriterion
(
"title >"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"title >="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLessThan
(
String
value
)
{
addCriterion
(
"title <"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"title <="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLike
(
String
value
)
{
addCriterion
(
"title like"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotLike
(
String
value
)
{
addCriterion
(
"title not like"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIn
(
List
<
String
>
values
)
{
addCriterion
(
"title in"
,
values
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"title not in"
,
values
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"title between"
,
value1
,
value2
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"title not between"
,
value1
,
value2
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNull
()
{
addCriterion
(
"description is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNotNull
()
{
addCriterion
(
"description is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionEqualTo
(
String
value
)
{
addCriterion
(
"description ="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDescriptionEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"description = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotEqualTo
(
String
value
)
{
addCriterion
(
"description <>"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDescriptionNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"description <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionGreaterThan
(
String
value
)
{
addCriterion
(
"description >"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDescriptionGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"description > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"description >="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDescriptionGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"description >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLessThan
(
String
value
)
{
addCriterion
(
"description <"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDescriptionLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"description < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"description <="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDescriptionLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"description <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLike
(
String
value
)
{
addCriterion
(
"description like"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotLike
(
String
value
)
{
addCriterion
(
"description not like"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIn
(
List
<
String
>
values
)
{
addCriterion
(
"description in"
,
values
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"description not in"
,
values
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description between"
,
value1
,
value2
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description not between"
,
value1
,
value2
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeIsNull
()
{
addCriterion
(
"add_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeIsNotNull
()
{
addCriterion
(
"add_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeEqualTo
(
Date
value
)
{
addCriterion
(
"add_time ="
,
value
,
"addTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"add_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"add_time <>"
,
value
,
"addTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"add_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"add_time >"
,
value
,
"addTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"add_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"add_time >="
,
value
,
"addTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"add_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeLessThan
(
Date
value
)
{
addCriterion
(
"add_time <"
,
value
,
"addTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"add_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"add_time <="
,
value
,
"addTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"add_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"add_time in"
,
values
,
"addTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"add_time not in"
,
values
,
"addTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"add_time between"
,
value1
,
value2
,
"addTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAddTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"add_time not between"
,
value1
,
value2
,
"addTime"
);
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
Favorites
.
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
Favorites
.
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
Favorites
.
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
Favorites
.
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
Favorites
.
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 favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
Favorites
.
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
Criteria
andDeletedIsNull
()
{
addCriterion
(
"deleted is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedIsNotNull
()
{
addCriterion
(
"deleted is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedEqualTo
(
Boolean
value
)
{
addCriterion
(
"deleted ="
,
value
,
"deleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDeletedEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deleted = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedNotEqualTo
(
Boolean
value
)
{
addCriterion
(
"deleted <>"
,
value
,
"deleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDeletedNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deleted <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedGreaterThan
(
Boolean
value
)
{
addCriterion
(
"deleted >"
,
value
,
"deleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDeletedGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deleted > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedGreaterThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"deleted >="
,
value
,
"deleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDeletedGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deleted >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedLessThan
(
Boolean
value
)
{
addCriterion
(
"deleted <"
,
value
,
"deleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDeletedLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deleted < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedLessThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"deleted <="
,
value
,
"deleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDeletedLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deleted <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"deleted in"
,
values
,
"deleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedNotIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"deleted not in"
,
values
,
"deleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"deleted between"
,
value1
,
value2
,
"deleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeletedNotBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"deleted not between"
,
value1
,
value2
,
"deleted"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
FavoritesExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
FavoritesExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
FavoritesExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @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 method was generated by MyBatis Generator.
* This method corresponds to the database table favorites
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andLogicalDeleted
(
boolean
deleted
)
{
return
deleted
?
andDeletedEqualTo
(
Favorites
.
IS_DELETED
)
:
andDeletedNotEqualTo
(
Favorites
.
IS_DELETED
);
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table favorites
*
* @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 favorites
*
* @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/service/FavoritesCoinsRelationDao.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.service
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
java.util.List
;
public
interface
FavoritesCoinsRelationDao
{
int
add
(
FavoritesCoinsRelation
record
);
int
batchAdd
(
List
<
FavoritesCoinsRelation
>
list
);
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
List
<
FavoritesCoinsRelation
>
listByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
PageInfo
<
FavoritesCoinsRelation
>
pageByFavoritesId
(
Long
favoritesId
,
int
page
,
int
size
);
}
ch-dao/src/main/java/com/wwdz/ch/db/service/FavoritesDao.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.service
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.Favorites
;
import
java.util.List
;
public
interface
FavoritesDao
{
int
add
(
Favorites
record
);
int
delete
(
Long
id
);
int
update
(
Favorites
record
);
Favorites
info
(
Long
id
);
PageInfo
<
Favorites
>
pageByUid
(
Long
uid
,
int
page
,
int
size
);
boolean
isExisted
(
Long
id
,
Long
uid
,
String
title
);
int
delete
(
Long
id
,
List
<
Long
>
ids
);
}
ch-dao/src/main/java/com/wwdz/ch/db/service/impl/FavoritesCoinsRelationDaoImpl.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.service.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.dao.FavoritesCoinsRelationMapper
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelationExample
;
import
com.wwdz.ch.db.service.FavoritesCoinsRelationDao
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
@Repository
public
class
FavoritesCoinsRelationDaoImpl
implements
FavoritesCoinsRelationDao
{
@Autowired
private
FavoritesCoinsRelationMapper
favoritesCoinsRelationMapper
;
@Override
public
int
add
(
FavoritesCoinsRelation
record
)
{
return
favoritesCoinsRelationMapper
.
insert
(
record
);
}
@Override
public
int
batchAdd
(
List
<
FavoritesCoinsRelation
>
list
)
{
return
favoritesCoinsRelationMapper
.
batchInsert
(
list
);
}
@Override
public
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
)
{
FavoritesCoinsRelationExample
example
=
new
FavoritesCoinsRelationExample
();
FavoritesCoinsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
CollectionUtils
.
isEmpty
(
favoritesIds
))
{
criteria
.
andFavoritesIdIn
(
favoritesIds
);
}
else
{
criteria
.
andFavoritesIdEqualTo
(
favoritesId
);
}
return
favoritesCoinsRelationMapper
.
deleteByExample
(
example
);
}
@Override
public
List
<
FavoritesCoinsRelation
>
listByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
)
{
FavoritesCoinsRelationExample
example
=
new
FavoritesCoinsRelationExample
();
FavoritesCoinsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
CollectionUtils
.
isEmpty
(
favoritesIds
))
{
criteria
.
andFavoritesIdIn
(
favoritesIds
);
}
else
{
criteria
.
andFavoritesIdEqualTo
(
favoritesId
);
}
return
favoritesCoinsRelationMapper
.
selectByExample
(
example
);
}
@Override
public
PageInfo
<
FavoritesCoinsRelation
>
pageByFavoritesId
(
Long
favoritesId
,
int
page
,
int
size
)
{
FavoritesCoinsRelationExample
example
=
new
FavoritesCoinsRelationExample
();
FavoritesCoinsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andFavoritesIdEqualTo
(
favoritesId
);
PageHelper
.
startPage
(
page
,
size
);
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelationMapper
.
selectByExample
(
example
);
return
new
PageInfo
<>(
list
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/service/impl/FavoritesDaoImpl.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.db.service.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.dao.FavoritesMapper
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
com.wwdz.ch.db.service.FavoritesDao
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
@Repository
public
class
FavoritesDaoImpl
implements
FavoritesDao
{
@Autowired
private
FavoritesMapper
favoritesMapper
;
@Override
public
int
add
(
Favorites
record
)
{
return
favoritesMapper
.
insert
(
record
);
}
@Override
public
int
delete
(
Long
id
)
{
return
favoritesMapper
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
update
(
Favorites
record
)
{
return
favoritesMapper
.
updateByPrimaryKey
(
record
);
}
@Override
public
Favorites
info
(
Long
id
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdEqualTo
(
id
);
criteria
.
andDeletedEqualTo
(
false
);
return
favoritesMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
PageInfo
<
Favorites
>
pageByUid
(
Long
uid
,
int
page
,
int
size
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUidEqualTo
(
uid
);
criteria
.
andDeletedEqualTo
(
false
);
PageHelper
.
startPage
(
page
,
size
);
List
<
Favorites
>
list
=
favoritesMapper
.
selectByExample
(
example
);
return
new
PageInfo
<>(
list
);
}
@Override
public
boolean
isExisted
(
Long
id
,
Long
uid
,
String
title
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUidEqualTo
(
uid
);
criteria
.
andTitleEqualTo
(
title
);
criteria
.
andDeletedEqualTo
(
false
);
if
(
Objects
.
nonNull
(
id
))
{
criteria
.
andIdNotEqualTo
(
id
);
}
return
favoritesMapper
.
countByExample
(
example
)
>
0
;
}
@Override
public
int
delete
(
Long
id
,
List
<
Long
>
ids
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
CollectionUtils
.
isEmpty
(
ids
))
{
criteria
.
andIdIn
(
ids
);
}
else
{
criteria
.
andIdEqualTo
(
id
);
}
Favorites
favorites
=
new
Favorites
();
favorites
.
setDeleted
(
true
);
favorites
.
setUpdateTime
(
new
Date
());
return
favoritesMapper
.
updateByExampleSelective
(
favorites
,
example
);
}
}
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FavoritesCoinsRelationMapper.xml
0 → 100644
View file @
512a3cb7
<?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.dao.FavoritesCoinsRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.FavoritesCoinsRelation"
>
<result
column=
"favorites_id"
jdbcType=
"BIGINT"
property=
"favoritesId"
/>
<result
column=
"coins_id"
jdbcType=
"BIGINT"
property=
"coinsId"
/>
</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"
>
favorites_id, coins_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from favorites_coins_relation
<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>
favorites_id, coins_id
</otherwise>
</choose>
from favorites_coins_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelationExample"
>
delete from favorites_coins_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelation"
>
insert into favorites_coins_relation (favorites_id, coins_id)
values (#{favoritesId,jdbcType=BIGINT}, #{coinsId,jdbcType=BIGINT})
</insert>
<insert
id=
"batchInsert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelation"
>
insert into favorites_coins_relation (favorites_id, coins_id)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.favoritesId,jdbcType=BIGINT}, #{item.coinsId,jdbcType=BIGINT})
</foreach>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelation"
>
insert into favorites_coins_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"favoritesId != null"
>
favorites_id,
</if>
<if
test=
"coinsId != null"
>
coins_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"favoritesId != null"
>
#{favoritesId,jdbcType=BIGINT},
</if>
<if
test=
"coinsId != null"
>
#{coinsId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelationExample"
resultType=
"java.lang.Long"
>
select count(*) from favorites_coins_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update favorites_coins_relation
<set>
<if
test=
"record.favoritesId != null"
>
favorites_id = #{record.favoritesId,jdbcType=BIGINT},
</if>
<if
test=
"record.coinsId != null"
>
coins_id = #{record.coinsId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update favorites_coins_relation
set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
coins_id = #{record.coinsId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelationExample"
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 favorites_coins_relation
<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>
favorites_id, coins_id
</otherwise>
</choose>
from favorites_coins_relation
<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/com/wwdz/ch/db/dao/FavoritesMapper.xml
0 → 100644
View file @
512a3cb7
<?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.dao.FavoritesMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.Favorites"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"uid"
jdbcType=
"BIGINT"
property=
"uid"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"deleted"
jdbcType=
"BIT"
property=
"deleted"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Favorites"
>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
</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, `uid`, title, description, add_time, update_time, deleted
</sql>
<sql
id=
"Blob_Column_List"
>
images
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.FavoritesExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from favorites
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from favorites
<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=
"ResultMapWithBLOBs"
>
<!--
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, `uid`, title, description, add_time, update_time, deleted, images
</otherwise>
</choose>
from favorites
<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.Long"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from favorites
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"selectByPrimaryKeyWithLogicalDelete"
parameterType=
"map"
resultMap=
"ResultMapWithBLOBs"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from favorites
where id = #{id,jdbcType=BIGINT}
and deleted =
<choose>
<when
test=
"andLogicalDeleted"
>
1
</when>
<otherwise>
0
</otherwise>
</choose>
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"ResultMapWithBLOBs"
>
<!--
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, `uid`, title, description, add_time, update_time, deleted, images
</otherwise>
</choose>
from favorites
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from favorites
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesExample"
>
delete from favorites
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into favorites (`uid`, title, description,
add_time, update_time, deleted,
images)
values (#{uid,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{images,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into favorites
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"uid != null"
>
`uid`,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"addTime != null"
>
add_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"deleted != null"
>
deleted,
</if>
<if
test=
"images != null"
>
images,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"uid != null"
>
#{uid,jdbcType=BIGINT},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"addTime != null"
>
#{addTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleted != null"
>
#{deleted,jdbcType=BIT},
</if>
<if
test=
"images != null"
>
#{images,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesExample"
resultType=
"java.lang.Long"
>
select count(*) from favorites
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update favorites
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.uid != null"
>
`uid` = #{record.uid,jdbcType=BIGINT},
</if>
<if
test=
"record.title != null"
>
title = #{record.title,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
</if>
<if
test=
"record.addTime != null"
>
add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.deleted != null"
>
deleted = #{record.deleted,jdbcType=BIT},
</if>
<if
test=
"record.images != null"
>
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update favorites
set id = #{record.id,jdbcType=BIGINT},
`uid` = #{record.uid,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT},
images = #{record.images,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update favorites
set id = #{record.id,jdbcType=BIGINT},
`uid` = #{record.uid,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
update favorites
<set>
<if
test=
"uid != null"
>
`uid` = #{uid,jdbcType=BIGINT},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"addTime != null"
>
add_time = #{addTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleted != null"
>
deleted = #{deleted,jdbcType=BIT},
</if>
<if
test=
"images != null"
>
images = #{images,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
update favorites
set `uid` = #{uid,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT},
images = #{images,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
update favorites
set `uid` = #{uid,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesExample"
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 favorites
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.FavoritesExample"
resultMap=
"ResultMapWithBLOBs"
>
<!--
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"
/>
,
<include
refid=
"Blob_Column_List"
/>
from favorites
<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=
"ResultMapWithBLOBs"
>
<!--
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, `uid`, title, description, add_time, update_time, deleted, images
</otherwise>
</choose>
from favorites
<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>
<update
id=
"logicalDeleteByExample"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update favorites set deleted = 1
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update favorites set deleted = 1
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
ch-wx-api/pom.xml
View file @
512a3cb7
...
@@ -70,6 +70,12 @@
...
@@ -70,6 +70,12 @@
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.24
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/FavoritesRequestDto.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.wx.entity.request
;
import
com.github.pagehelper.Page
;
import
com.xxdxxs.support.Delete
;
import
com.xxdxxs.support.Insert
;
import
com.xxdxxs.support.Select
;
import
com.xxdxxs.support.Update
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
FavoritesRequestDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
groups
=
{
Update
.
class
,
Select
.
class
},
message
=
"id不能为空"
)
private
Long
id
;
@NotBlank
(
groups
=
{
Insert
.
class
,
Update
.
class
},
message
=
"标题不能为空"
)
@Length
(
groups
=
{
Insert
.
class
,
Update
.
class
},
max
=
20
,
message
=
"标题字数不能超过20个字符"
)
private
String
title
;
@Length
(
groups
=
{
Insert
.
class
,
Update
.
class
},
max
=
200
,
message
=
"描述字数不能超过200个字符"
)
private
String
description
;
private
String
images
;
@NotNull
(
groups
=
{
Insert
.
class
,
Update
.
class
,
Page
.
class
,
Delete
.
class
},
message
=
"用户id不能为空"
)
private
Long
uid
;
@NotNull
(
groups
=
Page
.
class
,
message
=
"当前页不能为空"
)
private
Integer
page
;
@NotNull
(
groups
=
Page
.
class
,
message
=
"页面大小不能为空"
)
private
Integer
size
;
private
List
<
Long
>
ids
;
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/FavoritesService.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.wx.service
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
public
interface
FavoritesService
{
Object
page
(
FavoritesRequestDto
dto
);
Object
add
(
FavoritesRequestDto
dto
);
Object
update
(
FavoritesRequestDto
dto
);
Object
info
(
FavoritesRequestDto
dto
);
Object
delete
(
FavoritesRequestDto
dto
);
Object
batchDelete
(
FavoritesRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.wx.service.impl
;
import
com.wwdz.ch.core.util.ResponseUtil
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.service.FavoritesCoinsRelationDao
;
import
com.wwdz.ch.db.service.FavoritesDao
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
@Service
public
class
FavoritesServiceImpl
implements
FavoritesService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FavoritesServiceImpl
.
class
);
@Autowired
private
FavoritesDao
favoritesDao
;
@Autowired
private
FavoritesCoinsRelationDao
favoritesCoinsRelationDao
;
@Override
public
Object
page
(
FavoritesRequestDto
dto
)
{
try
{
return
ResponseUtil
.
ok
(
favoritesDao
.
pageByUid
(
dto
.
getUid
(),
dto
.
getPage
(),
dto
.
getSize
()));
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询收藏册列表失败,原因:"
+
e
.
getMessage
(),
e
);
return
ResponseUtil
.
fail
(-
1
,
"查询收藏册列表失败"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Object
add
(
FavoritesRequestDto
dto
)
{
try
{
// 判断收藏册标题是否已存在
if
(
favoritesDao
.
isExisted
(
null
,
dto
.
getUid
(),
dto
.
getTitle
()))
{
return
ResponseUtil
.
fail
(-
1
,
"收藏册的标题不能重复"
);
}
Favorites
favorites
=
new
Favorites
();
favorites
.
setUid
(
dto
.
getUid
());
favorites
.
setTitle
(
dto
.
getTitle
());
favorites
.
setDescription
(
dto
.
getDescription
());
favorites
.
setImages
(
dto
.
getImages
());
Date
date
=
new
Date
();
favorites
.
setAddTime
(
date
);
favorites
.
setUpdateTime
(
date
);
favorites
.
setDeleted
(
false
);
favoritesDao
.
add
(
favorites
);
return
ResponseUtil
.
ok
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"新增收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResponseUtil
.
fail
(-
1
,
"新增收藏册失败"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Object
update
(
FavoritesRequestDto
dto
)
{
try
{
Favorites
favorites
=
favoritesDao
.
info
(
dto
.
getId
());
if
(
Objects
.
isNull
(
favorites
))
{
return
ResponseUtil
.
fail
(-
1
,
"数据异常,记录不存在"
);
}
// 判断收藏册标题是否已存在
if
(
favoritesDao
.
isExisted
(
dto
.
getId
(),
dto
.
getUid
(),
dto
.
getTitle
()))
{
return
ResponseUtil
.
fail
(-
1
,
"收藏册的标题不能重复"
);
}
favorites
.
setTitle
(
dto
.
getTitle
());
favorites
.
setDescription
(
dto
.
getDescription
());
favorites
.
setImages
(
dto
.
getImages
());
favorites
.
setUpdateTime
(
new
Date
());
favoritesDao
.
update
(
favorites
);
return
ResponseUtil
.
ok
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"新增收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResponseUtil
.
fail
(-
1
,
"新增收藏册失败"
);
}
}
@Override
public
Object
info
(
FavoritesRequestDto
dto
)
{
try
{
Favorites
favorites
=
favoritesDao
.
info
(
dto
.
getId
());
if
(
Objects
.
isNull
(
favorites
))
{
return
ResponseUtil
.
fail
(-
1
,
"数据异常,记录不存在"
);
}
return
ResponseUtil
.
ok
(
favorites
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查看收藏册详情失败,原因:"
+
e
.
getMessage
(),
e
);
return
ResponseUtil
.
fail
(-
1
,
"查看收藏册详情失败"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Object
delete
(
FavoritesRequestDto
dto
)
{
try
{
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelationDao
.
listByFavoritesId
(
dto
.
getId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
return
ResponseUtil
.
fail
(-
1
,
"收藏册内有藏品,清先移除藏品"
);
}
//TODO 删除该收藏册下用户创建的钱币
// 删除收藏册和钱币的关联
favoritesCoinsRelationDao
.
deleteByFavoritesId
(
dto
.
getId
(),
null
);
// 删除收藏册
favoritesDao
.
delete
(
dto
.
getId
(),
null
);
return
ResponseUtil
.
ok
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"批量删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResponseUtil
.
fail
(-
1
,
"批量删除收藏册失败"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Object
batchDelete
(
FavoritesRequestDto
dto
)
{
try
{
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelationDao
.
listByFavoritesId
(
null
,
dto
.
getIds
());
//TODO 删除该收藏册下用户创建的钱币
// 删除收藏册和钱币的关联
favoritesCoinsRelationDao
.
deleteByFavoritesId
(
null
,
dto
.
getIds
());
// 删除收藏册
favoritesDao
.
delete
(
null
,
dto
.
getIds
());
return
ResponseUtil
.
ok
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"批量删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResponseUtil
.
fail
(-
1
,
"批量删除收藏册失败"
);
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFavoritesController.java
0 → 100644
View file @
512a3cb7
package
com.wwdz.ch.wx.web
;
import
com.github.pagehelper.Page
;
import
com.wwdz.ch.core.util.ResponseUtil
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
com.xxdxxs.support.Delete
;
import
com.xxdxxs.support.Insert
;
import
com.xxdxxs.support.Select
;
import
com.xxdxxs.support.Update
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Objects
;
@RestController
@RequestMapping
(
"/wx/favorites"
)
public
class
WxFavoritesController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WxFavoritesController
.
class
);
@Autowired
private
FavoritesService
favoritesService
;
@PostMapping
(
"/page"
)
public
Object
page
(
@RequestBody
@Validated
(
Page
.
class
)
FavoritesRequestDto
dto
)
{
return
favoritesService
.
page
(
dto
);
}
@PostMapping
(
"/add"
)
public
Object
add
(
@RequestBody
@Validated
(
Insert
.
class
)
FavoritesRequestDto
dto
)
{
return
favoritesService
.
add
(
dto
);
}
@PostMapping
(
"/update"
)
public
Object
update
(
@RequestBody
@Validated
(
Update
.
class
)
FavoritesRequestDto
dto
)
{
return
favoritesService
.
update
(
dto
);
}
@PostMapping
(
"/info"
)
public
Object
info
(
@RequestBody
@Validated
(
Select
.
class
)
FavoritesRequestDto
dto
)
{
return
favoritesService
.
info
(
dto
);
}
@PostMapping
(
"/delete"
)
public
Object
delete
(
@RequestBody
@Validated
(
Delete
.
class
)
FavoritesRequestDto
dto
)
{
if
(
Objects
.
isNull
(
dto
.
getId
()))
{
return
ResponseUtil
.
fail
(-
1
,
"id不能为空"
);
}
return
favoritesService
.
delete
(
dto
);
}
@PostMapping
(
"/batchDelete"
)
public
Object
batchDelete
(
@RequestBody
@Validated
(
Delete
.
class
)
FavoritesRequestDto
dto
)
{
if
(
CollectionUtils
.
isEmpty
(
dto
.
getIds
()))
{
return
ResponseUtil
.
fail
(-
1
,
"请选择收藏册"
);
}
return
favoritesService
.
batchDelete
(
dto
);
}
}
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