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
bbf82a07
Commit
bbf82a07
authored
Jul 21, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 钱柜收藏册
parent
68e3c6d7
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1715 additions
and
289 deletions
+1715
-289
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesItemsRelationMapper.java
...java/com/wwdz/ch/db/dao/FavoritesItemsRelationMapper.java
+53
-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
+2
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/UsersItemsRelationMapper.java
...ain/java/com/wwdz/ch/db/dao/UsersItemsRelationMapper.java
+52
-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
+8
-7
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesExample.java
...src/main/java/com/wwdz/ch/db/domain/FavoritesExample.java
+36
-36
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesItemsRelation.java
...in/java/com/wwdz/ch/db/domain/FavoritesItemsRelation.java
+34
-24
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesItemsRelationExample.java
.../com/wwdz/ch/db/domain/FavoritesItemsRelationExample.java
+204
-71
ch-dao/src/main/java/com/wwdz/ch/db/domain/UsersItemsRelation.java
...c/main/java/com/wwdz/ch/db/domain/UsersItemsRelation.java
+239
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/UsersItemsRelationExample.java
...java/com/wwdz/ch/db/domain/UsersItemsRelationExample.java
+566
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
.../main/java/com/wwdz/ch/db/dto/request/CoinRequestDto.java
+5
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesItemsRelationManager.java
...com/wwdz/ch/db/manager/FavoritesItemsRelationManager.java
+15
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesManager.java
...rc/main/java/com/wwdz/ch/db/manager/FavoritesManager.java
+2
-2
ch-dao/src/main/java/com/wwdz/ch/db/manager/ItemManager.java
ch-dao/src/main/java/com/wwdz/ch/db/manager/ItemManager.java
+2
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/UsersItemsRelationManager.java
...ava/com/wwdz/ch/db/manager/UsersItemsRelationManager.java
+9
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesCoinsRelationManagerImpl.java
...ch/db/manager/impl/FavoritesCoinsRelationManagerImpl.java
+0
-59
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesItemsRelationManagerImpl.java
...ch/db/manager/impl/FavoritesItemsRelationManagerImpl.java
+61
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesManagerImpl.java
...ava/com/wwdz/ch/db/manager/impl/FavoritesManagerImpl.java
+7
-10
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/ItemManagerImpl.java
...ain/java/com/wwdz/ch/db/manager/impl/ItemManagerImpl.java
+13
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/UsersItemsRelationManagerImpl.java
...wdz/ch/db/manager/impl/UsersItemsRelationManagerImpl.java
+26
-0
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FavoritesItemsRelationMapper.xml
...urces/com/wwdz/ch/db/dao/FavoritesItemsRelationMapper.xml
+46
-33
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FavoritesMapper.xml
...src/main/resources/com/wwdz/ch/db/dao/FavoritesMapper.xml
+22
-22
ch-dao/src/main/resources/com/wwdz/ch/db/dao/UsersItemsRelationMapper.xml
...resources/com/wwdz/ch/db/dao/UsersItemsRelationMapper.xml
+215
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/FavoritesItemRequestDto.java
...om/wwdz/ch/wx/entity/request/FavoritesItemRequestDto.java
+15
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/FavoritesRequestDto.java
...va/com/wwdz/ch/wx/entity/request/FavoritesRequestDto.java
+3
-5
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/FavoritesService.java
...rc/main/java/com/wwdz/ch/wx/service/FavoritesService.java
+3
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
...ava/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
+65
-20
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFavoritesController.java
...c/main/java/com/wwdz/ch/wx/web/WxFavoritesController.java
+12
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/Favorites
Coin
sRelationMapper.java
→
ch-dao/src/main/java/com/wwdz/ch/db/dao/Favorites
Item
sRelationMapper.java
View file @
bbf82a07
package
com.wwdz.ch.db.dao
;
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesItemsRelation
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelationExample
;
import
com.wwdz.ch.db.domain.FavoritesItemsRelationExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
import
java.util.List
;
public
interface
FavoritesCoinsRelationMapper
{
long
countByExample
(
FavoritesCoinsRelationExample
example
);
int
deleteByExample
(
FavoritesCoinsRelationExample
example
);
@Mapper
public
interface
FavoritesItemsRelationMapper
{
long
countByExample
(
FavoritesItemsRelationExample
example
);
int
insert
(
FavoritesCoinsRelation
record
);
int
deleteByExample
(
FavoritesItemsRelationExample
example
);
int
batchInsert
(
List
<
FavoritesCoinsRelation
>
list
);
int
insert
(
FavoritesItemsRelation
record
);
int
insertSelective
(
FavoritesCoinsRelation
record
);
int
batchInsert
(
List
<
FavoritesItemsRelation
>
list
);
int
insertSelective
(
FavoritesItemsRelation
record
);
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
Favorites
CoinsRelation
selectOneByExample
(
FavoritesCoin
sRelationExample
example
);
Favorites
ItemsRelation
selectOneByExample
(
FavoritesItem
sRelationExample
example
);
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
Favorites
CoinsRelation
selectOneByExampleSelective
(
@Param
(
"example"
)
FavoritesCoinsRelationExample
example
,
@Param
(
"selective"
)
FavoritesCoin
sRelation
.
Column
...
selective
);
Favorites
ItemsRelation
selectOneByExampleSelective
(
@Param
(
"example"
)
FavoritesItemsRelationExample
example
,
@Param
(
"selective"
)
FavoritesItem
sRelation
.
Column
...
selective
);
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
List
<
Favorites
CoinsRelation
>
selectByExampleSelective
(
@Param
(
"example"
)
FavoritesCoinsRelationExample
example
,
@Param
(
"selective"
)
FavoritesCoin
sRelation
.
Column
...
selective
);
List
<
Favorites
ItemsRelation
>
selectByExampleSelective
(
@Param
(
"example"
)
FavoritesItemsRelationExample
example
,
@Param
(
"selective"
)
FavoritesItem
sRelation
.
Column
...
selective
);
List
<
Favorites
CoinsRelation
>
selectByExample
(
FavoritesCoin
sRelationExample
example
);
List
<
Favorites
ItemsRelation
>
selectByExample
(
FavoritesItem
sRelationExample
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Favorites
CoinsRelation
record
,
@Param
(
"example"
)
FavoritesCoin
sRelationExample
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Favorites
ItemsRelation
record
,
@Param
(
"example"
)
FavoritesItem
sRelationExample
example
);
int
updateByExample
(
@Param
(
"record"
)
Favorites
CoinsRelation
record
,
@Param
(
"example"
)
FavoritesCoin
sRelationExample
example
);
int
updateByExample
(
@Param
(
"record"
)
Favorites
ItemsRelation
record
,
@Param
(
"example"
)
FavoritesItem
sRelationExample
example
);
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/FavoritesMapper.java
View file @
bbf82a07
...
@@ -2,6 +2,8 @@ package com.wwdz.ch.db.dao;
...
@@ -2,6 +2,8 @@ package com.wwdz.ch.db.dao;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/UsersItemsRelationMapper.java
0 → 100644
View file @
bbf82a07
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.UsersItemsRelation
;
import
com.wwdz.ch.db.domain.UsersItemsRelationExample
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
UsersItemsRelationMapper
{
long
countByExample
(
UsersItemsRelationExample
example
);
int
deleteByExample
(
UsersItemsRelationExample
example
);
int
insert
(
UsersItemsRelation
record
);
int
insertSelective
(
UsersItemsRelation
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UsersItemsRelation
selectOneByExample
(
UsersItemsRelationExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
UsersItemsRelation
selectOneByExampleSelective
(
@Param
(
"example"
)
UsersItemsRelationExample
example
,
@Param
(
"selective"
)
UsersItemsRelation
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
UsersItemsRelation
>
selectByExampleSelective
(
@Param
(
"example"
)
UsersItemsRelationExample
example
,
@Param
(
"selective"
)
UsersItemsRelation
.
Column
...
selective
);
List
<
UsersItemsRelation
>
selectByExample
(
UsersItemsRelationExample
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
UsersItemsRelation
record
,
@Param
(
"example"
)
UsersItemsRelationExample
example
);
int
updateByExample
(
@Param
(
"record"
)
UsersItemsRelation
record
,
@Param
(
"example"
)
UsersItemsRelationExample
example
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites.java
View file @
bbf82a07
package
com.wwdz.ch.db.domain
;
package
com.wwdz.ch.db.domain
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
lombok.Data
;
/**
/**
* @author shiyu
* @author shiyu
* @date 2023/07/
18
* @date 2023/07/
21
*/
*/
@Data
@Data
public
class
Favorites
implements
Serializable
{
public
class
Favorites
implements
Serializable
{
...
@@ -35,7 +36,7 @@ public class Favorites implements Serializable {
...
@@ -35,7 +36,7 @@ public class Favorites implements Serializable {
/**
/**
* 用户id
* 用户id
*/
*/
private
Long
u
i
d
;
private
Long
u
serI
d
;
/**
/**
* 标题
* 标题
...
@@ -76,7 +77,7 @@ public class Favorites implements Serializable {
...
@@ -76,7 +77,7 @@ public class Favorites implements Serializable {
sb
.
append
(
" ["
);
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", u
id="
).
append
(
ui
d
);
sb
.
append
(
", u
serId="
).
append
(
userI
d
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
...
@@ -101,7 +102,7 @@ public class Favorites implements Serializable {
...
@@ -101,7 +102,7 @@ public class Favorites implements Serializable {
}
}
Favorites
other
=
(
Favorites
)
that
;
Favorites
other
=
(
Favorites
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getU
id
()
==
null
?
other
.
getUid
()
==
null
:
this
.
getUid
().
equals
(
other
.
getUi
d
()))
&&
(
this
.
getU
serId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserI
d
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()))
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()))
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()))
...
@@ -115,7 +116,7 @@ public class Favorites implements Serializable {
...
@@ -115,7 +116,7 @@ public class Favorites implements Serializable {
final
int
prime
=
31
;
final
int
prime
=
31
;
int
result
=
1
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getU
id
()
==
null
)
?
0
:
getUi
d
().
hashCode
());
result
=
prime
*
result
+
((
getU
serId
()
==
null
)
?
0
:
getUserI
d
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
...
@@ -145,7 +146,7 @@ public class Favorites implements Serializable {
...
@@ -145,7 +146,7 @@ public class Favorites implements Serializable {
*/
*/
public
enum
Column
{
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
u
id
(
"uid"
,
"uid"
,
"BIGINT"
,
tru
e
),
u
serId
(
"user_id"
,
"userId"
,
"BIGINT"
,
fals
e
),
title
(
"title"
,
"title"
,
"VARCHAR"
,
false
),
title
(
"title"
,
"title"
,
"VARCHAR"
,
false
),
description
(
"description"
,
"description"
,
"VARCHAR"
,
false
),
description
(
"description"
,
"description"
,
"VARCHAR"
,
false
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesExample.java
View file @
bbf82a07
...
@@ -280,18 +280,18 @@ public class FavoritesExample {
...
@@ -280,18 +280,18 @@ public class FavoritesExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dIsNull
()
{
public
Criteria
andU
serI
dIsNull
()
{
addCriterion
(
"
`uid`
is null"
);
addCriterion
(
"
user_id
is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dIsNotNull
()
{
public
Criteria
andU
serI
dIsNotNull
()
{
addCriterion
(
"
`uid`
is not null"
);
addCriterion
(
"
user_id
is not null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dEqualTo
(
Long
value
)
{
public
Criteria
andU
serI
dEqualTo
(
Long
value
)
{
addCriterion
(
"
`uid` ="
,
value
,
"ui
d"
);
addCriterion
(
"
user_id ="
,
value
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -302,13 +302,13 @@ public class FavoritesExample {
...
@@ -302,13 +302,13 @@ public class FavoritesExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andU
i
dEqualToColumn
(
Favorites
.
Column
column
)
{
public
Criteria
andU
serI
dEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`uid`
= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
user_id
= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dNotEqualTo
(
Long
value
)
{
public
Criteria
andU
serI
dNotEqualTo
(
Long
value
)
{
addCriterion
(
"
`uid` <>"
,
value
,
"ui
d"
);
addCriterion
(
"
user_id <>"
,
value
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -319,13 +319,13 @@ public class FavoritesExample {
...
@@ -319,13 +319,13 @@ public class FavoritesExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andU
i
dNotEqualToColumn
(
Favorites
.
Column
column
)
{
public
Criteria
andU
serI
dNotEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`uid`
<> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
user_id
<> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dGreaterThan
(
Long
value
)
{
public
Criteria
andU
serI
dGreaterThan
(
Long
value
)
{
addCriterion
(
"
`uid` >"
,
value
,
"ui
d"
);
addCriterion
(
"
user_id >"
,
value
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -336,13 +336,13 @@ public class FavoritesExample {
...
@@ -336,13 +336,13 @@ public class FavoritesExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andU
i
dGreaterThanColumn
(
Favorites
.
Column
column
)
{
public
Criteria
andU
serI
dGreaterThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`uid`
> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
user_id
> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dGreaterThanOrEqualTo
(
Long
value
)
{
public
Criteria
andU
serI
dGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
`uid` >="
,
value
,
"ui
d"
);
addCriterion
(
"
user_id >="
,
value
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -353,13 +353,13 @@ public class FavoritesExample {
...
@@ -353,13 +353,13 @@ public class FavoritesExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andU
i
dGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
public
Criteria
andU
serI
dGreaterThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`uid`
>= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
user_id
>= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dLessThan
(
Long
value
)
{
public
Criteria
andU
serI
dLessThan
(
Long
value
)
{
addCriterion
(
"
`uid` <"
,
value
,
"ui
d"
);
addCriterion
(
"
user_id <"
,
value
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -370,13 +370,13 @@ public class FavoritesExample {
...
@@ -370,13 +370,13 @@ public class FavoritesExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andU
i
dLessThanColumn
(
Favorites
.
Column
column
)
{
public
Criteria
andU
serI
dLessThanColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`uid`
< "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
user_id
< "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dLessThanOrEqualTo
(
Long
value
)
{
public
Criteria
andU
serI
dLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
`uid` <="
,
value
,
"ui
d"
);
addCriterion
(
"
user_id <="
,
value
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -387,28 +387,28 @@ public class FavoritesExample {
...
@@ -387,28 +387,28 @@ public class FavoritesExample {
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andU
i
dLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
public
Criteria
andU
serI
dLessThanOrEqualToColumn
(
Favorites
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`uid`
<= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
user_id
<= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dIn
(
List
<
Long
>
values
)
{
public
Criteria
andU
serI
dIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
`uid` in"
,
values
,
"ui
d"
);
addCriterion
(
"
user_id in"
,
values
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dNotIn
(
List
<
Long
>
values
)
{
public
Criteria
andU
serI
dNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
`uid` not in"
,
values
,
"ui
d"
);
addCriterion
(
"
user_id not in"
,
values
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dBetween
(
Long
value1
,
Long
value2
)
{
public
Criteria
andU
serI
dBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
`uid` between"
,
value1
,
value2
,
"ui
d"
);
addCriterion
(
"
user_id between"
,
value1
,
value2
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andU
i
dNotBetween
(
Long
value1
,
Long
value2
)
{
public
Criteria
andU
serI
dNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
`uid` not between"
,
value1
,
value2
,
"ui
d"
);
addCriterion
(
"
user_id not between"
,
value1
,
value2
,
"userI
d"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites
Coin
sRelation.java
→
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites
Item
sRelation.java
View file @
bbf82a07
...
@@ -3,14 +3,15 @@ package com.wwdz.ch.db.domain;
...
@@ -3,14 +3,15 @@ package com.wwdz.ch.db.domain;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
* @author shiyu
* @author shiyu
* @date 2023/07/
18
* @date 2023/07/
21
*/
*/
@Data
@Data
public
class
Favorites
Coin
sRelation
implements
Serializable
{
public
class
Favorites
Item
sRelation
implements
Serializable
{
/**
/**
* 收藏册id
* 收藏册id
*/
*/
...
@@ -19,7 +20,12 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -19,7 +20,12 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* 钱币id
* 钱币id
*/
*/
private
Long
coinsId
;
private
Long
itemId
;
/**
* 创建时间
*/
private
Date
addTime
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -30,7 +36,8 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -30,7 +36,8 @@ public class FavoritesCoinsRelation implements Serializable {
sb
.
append
(
" ["
);
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", favoritesId="
).
append
(
favoritesId
);
sb
.
append
(
", favoritesId="
).
append
(
favoritesId
);
sb
.
append
(
", coinsId="
).
append
(
coinsId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
...
@@ -47,9 +54,10 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -47,9 +54,10 @@ public class FavoritesCoinsRelation implements Serializable {
if
(
getClass
()
!=
that
.
getClass
())
{
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
return
false
;
}
}
Favorites
CoinsRelation
other
=
(
FavoritesCoin
sRelation
)
that
;
Favorites
ItemsRelation
other
=
(
FavoritesItem
sRelation
)
that
;
return
(
this
.
getFavoritesId
()
==
null
?
other
.
getFavoritesId
()
==
null
:
this
.
getFavoritesId
().
equals
(
other
.
getFavoritesId
()))
return
(
this
.
getFavoritesId
()
==
null
?
other
.
getFavoritesId
()
==
null
:
this
.
getFavoritesId
().
equals
(
other
.
getFavoritesId
()))
&&
(
this
.
getCoinsId
()
==
null
?
other
.
getCoinsId
()
==
null
:
this
.
getCoinsId
().
equals
(
other
.
getCoinsId
()));
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()));
}
}
@Override
@Override
...
@@ -57,24 +65,26 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -57,24 +65,26 @@ public class FavoritesCoinsRelation implements Serializable {
final
int
prime
=
31
;
final
int
prime
=
31
;
int
result
=
1
;
int
result
=
1
;
result
=
prime
*
result
+
((
getFavoritesId
()
==
null
)
?
0
:
getFavoritesId
().
hashCode
());
result
=
prime
*
result
+
((
getFavoritesId
()
==
null
)
?
0
:
getFavoritesId
().
hashCode
());
result
=
prime
*
result
+
((
getCoinsId
()
==
null
)
?
0
:
getCoinsId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
return
result
;
return
result
;
}
}
/**
/**
* This enum was generated by MyBatis Generator.
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table favorites_
coin
s_relation
* This enum corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
enum
Column
{
public
enum
Column
{
favoritesId
(
"favorites_id"
,
"favoritesId"
,
"BIGINT"
,
false
),
favoritesId
(
"favorites_id"
,
"favoritesId"
,
"BIGINT"
,
false
),
coinsId
(
"coins_id"
,
"coinsId"
,
"BIGINT"
,
false
);
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
);
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -83,7 +93,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -83,7 +93,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -92,7 +102,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -92,7 +102,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -101,7 +111,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -101,7 +111,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -110,7 +120,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -110,7 +120,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -119,7 +129,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -119,7 +129,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -128,7 +138,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -128,7 +138,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -139,7 +149,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -139,7 +149,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -150,7 +160,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -150,7 +160,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -161,7 +171,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -161,7 +171,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -172,7 +182,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -172,7 +182,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -186,7 +196,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -186,7 +196,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -197,7 +207,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -197,7 +207,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -208,7 +218,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -208,7 +218,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -223,7 +233,7 @@ public class FavoritesCoinsRelation implements Serializable {
...
@@ -223,7 +233,7 @@ public class FavoritesCoinsRelation implements Serializable {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites
Coin
sRelationExample.java
→
ch-dao/src/main/java/com/wwdz/ch/db/domain/Favorites
Item
sRelationExample.java
View file @
bbf82a07
package
com.wwdz.ch.db.domain
;
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
public
class
Favorites
Coin
sRelationExample
{
public
class
Favorites
Item
sRelationExample
{
protected
String
orderByClause
;
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
protected
List
<
Criteria
>
oredCriteria
;
public
Favorites
Coin
sRelationExample
()
{
public
Favorites
Item
sRelationExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
}
...
@@ -46,24 +47,24 @@ public class FavoritesCoinsRelationExample {
...
@@ -46,24 +47,24 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Favorites
Coin
sRelationExample
orderBy
(
String
orderByClause
)
{
public
Favorites
Item
sRelationExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
this
.
setOrderByClause
(
orderByClause
);
return
this
;
return
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Favorites
Coin
sRelationExample
orderBy
(
String
...
orderByClauses
)
{
public
Favorites
Item
sRelationExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
sb
.
append
(
orderByClauses
[
i
]);
...
@@ -96,13 +97,13 @@ public class FavoritesCoinsRelationExample {
...
@@ -96,13 +97,13 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
static
Criteria
newAndCreateCriteria
()
{
public
static
Criteria
newAndCreateCriteria
()
{
Favorites
CoinsRelationExample
example
=
new
FavoritesCoin
sRelationExample
();
Favorites
ItemsRelationExample
example
=
new
FavoritesItem
sRelationExample
();
return
example
.
createCriteria
();
return
example
.
createCriteria
();
}
}
...
@@ -164,12 +165,12 @@ public class FavoritesCoinsRelationExample {
...
@@ -164,12 +165,12 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andFavoritesIdEqualToColumn
(
Favorites
Coin
sRelation
.
Column
column
)
{
public
Criteria
andFavoritesIdEqualToColumn
(
Favorites
Item
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"favorites_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -181,12 +182,12 @@ public class FavoritesCoinsRelationExample {
...
@@ -181,12 +182,12 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andFavoritesIdNotEqualToColumn
(
Favorites
Coin
sRelation
.
Column
column
)
{
public
Criteria
andFavoritesIdNotEqualToColumn
(
Favorites
Item
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"favorites_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -198,12 +199,12 @@ public class FavoritesCoinsRelationExample {
...
@@ -198,12 +199,12 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andFavoritesIdGreaterThanColumn
(
Favorites
Coin
sRelation
.
Column
column
)
{
public
Criteria
andFavoritesIdGreaterThanColumn
(
Favorites
Item
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"favorites_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -215,12 +216,12 @@ public class FavoritesCoinsRelationExample {
...
@@ -215,12 +216,12 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andFavoritesIdGreaterThanOrEqualToColumn
(
Favorites
Coin
sRelation
.
Column
column
)
{
public
Criteria
andFavoritesIdGreaterThanOrEqualToColumn
(
Favorites
Item
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"favorites_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -232,12 +233,12 @@ public class FavoritesCoinsRelationExample {
...
@@ -232,12 +233,12 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andFavoritesIdLessThanColumn
(
Favorites
Coin
sRelation
.
Column
column
)
{
public
Criteria
andFavoritesIdLessThanColumn
(
Favorites
Item
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"favorites_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -249,12 +250,12 @@ public class FavoritesCoinsRelationExample {
...
@@ -249,12 +250,12 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
andFavoritesIdLessThanOrEqualToColumn
(
Favorites
Coin
sRelation
.
Column
column
)
{
public
Criteria
andFavoritesIdLessThanOrEqualToColumn
(
Favorites
Item
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"favorites_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"favorites_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -279,135 +280,267 @@ public class FavoritesCoinsRelationExample {
...
@@ -279,135 +280,267 @@ public class FavoritesCoinsRelationExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdIsNull
()
{
public
Criteria
and
Item
IdIsNull
()
{
addCriterion
(
"
coins
_id is null"
);
addCriterion
(
"
item
_id is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdIsNotNull
()
{
public
Criteria
and
Item
IdIsNotNull
()
{
addCriterion
(
"
coins
_id is not null"
);
addCriterion
(
"
item
_id is not null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdEqualTo
(
Long
value
)
{
public
Criteria
and
Item
IdEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id ="
,
value
,
"coins
Id"
);
addCriterion
(
"
item_id ="
,
value
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
and
CoinsIdEqualToColumn
(
FavoritesCoin
sRelation
.
Column
column
)
{
public
Criteria
and
ItemIdEqualToColumn
(
FavoritesItem
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coins
_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
item
_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdNotEqualTo
(
Long
value
)
{
public
Criteria
and
Item
IdNotEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id <>"
,
value
,
"coins
Id"
);
addCriterion
(
"
item_id <>"
,
value
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
and
CoinsIdNotEqualToColumn
(
FavoritesCoin
sRelation
.
Column
column
)
{
public
Criteria
and
ItemIdNotEqualToColumn
(
FavoritesItem
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coins
_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
item
_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdGreaterThan
(
Long
value
)
{
public
Criteria
and
Item
IdGreaterThan
(
Long
value
)
{
addCriterion
(
"
coins_id >"
,
value
,
"coins
Id"
);
addCriterion
(
"
item_id >"
,
value
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
and
CoinsIdGreaterThanColumn
(
FavoritesCoin
sRelation
.
Column
column
)
{
public
Criteria
and
ItemIdGreaterThanColumn
(
FavoritesItem
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coins
_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
item
_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdGreaterThanOrEqualTo
(
Long
value
)
{
public
Criteria
and
Item
IdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id >="
,
value
,
"coins
Id"
);
addCriterion
(
"
item_id >="
,
value
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
and
CoinsIdGreaterThanOrEqualToColumn
(
FavoritesCoin
sRelation
.
Column
column
)
{
public
Criteria
and
ItemIdGreaterThanOrEqualToColumn
(
FavoritesItem
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coins
_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
item
_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdLessThan
(
Long
value
)
{
public
Criteria
and
Item
IdLessThan
(
Long
value
)
{
addCriterion
(
"
coins_id <"
,
value
,
"coins
Id"
);
addCriterion
(
"
item_id <"
,
value
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
and
CoinsIdLessThanColumn
(
FavoritesCoin
sRelation
.
Column
column
)
{
public
Criteria
and
ItemIdLessThanColumn
(
FavoritesItem
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coins
_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
item
_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdLessThanOrEqualTo
(
Long
value
)
{
public
Criteria
and
Item
IdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"
coins_id <="
,
value
,
"coins
Id"
);
addCriterion
(
"
item_id <="
,
value
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Criteria
and
CoinsIdLessThanOrEqualToColumn
(
FavoritesCoin
sRelation
.
Column
column
)
{
public
Criteria
and
ItemIdLessThanOrEqualToColumn
(
FavoritesItem
sRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
coins
_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
addCriterion
(
new
StringBuilder
(
"
item
_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdIn
(
List
<
Long
>
values
)
{
public
Criteria
and
Item
IdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
coins_id in"
,
values
,
"coins
Id"
);
addCriterion
(
"
item_id in"
,
values
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdNotIn
(
List
<
Long
>
values
)
{
public
Criteria
and
Item
IdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
coins_id not in"
,
values
,
"coins
Id"
);
addCriterion
(
"
item_id not in"
,
values
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
Coins
IdBetween
(
Long
value1
,
Long
value2
)
{
public
Criteria
and
Item
IdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
coins_id between"
,
value1
,
value2
,
"coins
Id"
);
addCriterion
(
"
item_id between"
,
value1
,
value2
,
"item
Id"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andCoinsIdNotBetween
(
Long
value1
,
Long
value2
)
{
public
Criteria
andItemIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"coins_id not between"
,
value1
,
value2
,
"coinsId"
);
addCriterion
(
"item_id not between"
,
value1
,
value2
,
"itemId"
);
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_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeEqualToColumn
(
FavoritesItemsRelation
.
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_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeNotEqualToColumn
(
FavoritesItemsRelation
.
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_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeGreaterThanColumn
(
FavoritesItemsRelation
.
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_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeGreaterThanOrEqualToColumn
(
FavoritesItemsRelation
.
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_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeLessThanColumn
(
FavoritesItemsRelation
.
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_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAddTimeLessThanOrEqualToColumn
(
FavoritesItemsRelation
.
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
;
return
(
Criteria
)
this
;
}
}
}
}
...
@@ -415,39 +548,39 @@ public class FavoritesCoinsRelationExample {
...
@@ -415,39 +548,39 @@ public class FavoritesCoinsRelationExample {
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table favorites_
coin
s_relation
* This field corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
private
Favorites
Coin
sRelationExample
example
;
private
Favorites
Item
sRelationExample
example
;
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
protected
Criteria
(
Favorites
Coin
sRelationExample
example
)
{
protected
Criteria
(
Favorites
Item
sRelationExample
example
)
{
super
();
super
();
this
.
example
=
example
;
this
.
example
=
example
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
*/
public
Favorites
Coin
sRelationExample
example
()
{
public
Favorites
Item
sRelationExample
example
()
{
return
this
.
example
;
return
this
.
example
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -461,7 +594,7 @@ public class FavoritesCoinsRelationExample {
...
@@ -461,7 +594,7 @@ public class FavoritesCoinsRelationExample {
/**
/**
* This interface was generated by MyBatis Generator.
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table favorites_
coin
s_relation
* This interface corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
@@ -469,7 +602,7 @@ public class FavoritesCoinsRelationExample {
...
@@ -469,7 +602,7 @@ public class FavoritesCoinsRelationExample {
public
interface
ICriteriaAdd
{
public
interface
ICriteriaAdd
{
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_
coin
s_relation
* This method corresponds to the database table favorites_
item
s_relation
*
*
* @mbg.generated
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
* @project https://github.com/itfsw/mybatis-generator-plugin
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/UsersItemsRelation.java
0 → 100644
View file @
bbf82a07
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/21
*/
@Data
public
class
UsersItemsRelation
implements
Serializable
{
/**
* 用户id
*/
private
Long
userId
;
/**
* 钱币id
*/
private
Long
itemId
;
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
(
", userId="
).
append
(
userId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
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
;
}
UsersItemsRelation
other
=
(
UsersItemsRelation
)
that
;
return
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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 users_items_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/UsersItemsRelationExample.java
0 → 100644
View file @
bbf82a07
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
UsersItemsRelationExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
UsersItemsRelationExample
()
{
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 users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
UsersItemsRelationExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
UsersItemsRelationExample
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 users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
UsersItemsRelationExample
example
=
new
UsersItemsRelationExample
();
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
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNull
()
{
addCriterion
(
"item_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNotNull
()
{
addCriterion
(
"item_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdEqualTo
(
Long
value
)
{
addCriterion
(
"item_id ="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <>"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdNotEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThan
(
Long
value
)
{
addCriterion
(
"item_id >"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id >="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanOrEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThan
(
Long
value
)
{
addCriterion
(
"item_id <"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanOrEqualToColumn
(
UsersItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id not in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id not between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
UsersItemsRelationExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
UsersItemsRelationExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
UsersItemsRelationExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table users_items_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 users_items_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 users_items_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/dto/request/CoinRequestDto.java
View file @
bbf82a07
...
@@ -56,4 +56,9 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
...
@@ -56,4 +56,9 @@ public class CoinRequestDto extends BaseRequestDto implements Entity {
* 查询时要排除
* 查询时要排除
*/
*/
private
List
<
Long
>
idExcludeList
;
private
List
<
Long
>
idExcludeList
;
/**
* ids
*/
private
List
<
Long
>
ids
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/Favorites
Coin
sRelationManager.java
→
ch-dao/src/main/java/com/wwdz/ch/db/manager/Favorites
Item
sRelationManager.java
View file @
bbf82a07
package
com.wwdz.ch.db.manager
;
package
com.wwdz.ch.db.manager
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.Favorites
Coin
sRelation
;
import
com.wwdz.ch.db.domain.Favorites
Item
sRelation
;
import
java.util.List
;
import
java.util.List
;
public
interface
Favorites
Coin
sRelationManager
{
public
interface
Favorites
Item
sRelationManager
{
int
add
(
Favorites
Coin
sRelation
record
);
int
add
(
Favorites
Item
sRelation
record
);
int
batchAdd
(
List
<
Favorites
Coin
sRelation
>
list
);
int
batchAdd
(
List
<
Favorites
Item
sRelation
>
list
);
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
List
<
FavoritesCoinsRelation
>
listByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
int
deleteByChosen
(
Long
favoritesId
,
List
<
Long
>
itemIds
);
PageInfo
<
FavoritesCoinsRelation
>
pageByFavoritesId
(
Long
favoritesId
,
int
page
,
int
size
);
List
<
FavoritesItemsRelation
>
listByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
PageInfo
<
FavoritesItemsRelation
>
pageByFavoritesId
(
Long
favoritesId
,
int
page
,
int
size
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesManager.java
View file @
bbf82a07
...
@@ -11,9 +11,9 @@ public interface FavoritesManager {
...
@@ -11,9 +11,9 @@ public interface FavoritesManager {
int
update
(
Favorites
record
);
int
update
(
Favorites
record
);
Favorites
info
(
Long
id
);
Favorites
info
(
Long
id
);
PageInfo
<
Favorites
>
pageByU
id
(
Long
ui
d
,
int
page
,
int
size
);
PageInfo
<
Favorites
>
pageByU
serId
(
Long
userI
d
,
int
page
,
int
size
);
boolean
isExisted
(
Long
id
,
Long
u
i
d
,
String
title
);
boolean
isExisted
(
Long
id
,
Long
u
serI
d
,
String
title
);
int
delete
(
Long
id
,
List
<
Long
>
ids
);
int
delete
(
Long
id
,
List
<
Long
>
ids
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/ItemManager.java
View file @
bbf82a07
...
@@ -15,4 +15,6 @@ public interface ItemManager {
...
@@ -15,4 +15,6 @@ public interface ItemManager {
Item
findDetails
(
Long
id
);
Item
findDetails
(
Long
id
);
boolean
setCoin
(
Item
item
);
boolean
setCoin
(
Item
item
);
int
deleteUserItems
(
CoinRequestDto
coinRequestDto
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/UsersItemsRelationManager.java
0 → 100644
View file @
bbf82a07
package
com.wwdz.ch.db.manager
;
import
com.wwdz.ch.db.domain.UsersItemsRelation
;
import
java.util.List
;
public
interface
UsersItemsRelationManager
{
List
<
UsersItemsRelation
>
listByUserIds
(
Long
userId
,
List
<
Long
>
userIds
);
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesCoinsRelationManagerImpl.java
deleted
100644 → 0
View file @
68e3c6d7
package
com.wwdz.ch.db.manager.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.manager.FavoritesCoinsRelationManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
@Repository
public
class
FavoritesCoinsRelationManagerImpl
implements
FavoritesCoinsRelationManager
{
@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/manager/impl/FavoritesItemsRelationManagerImpl.java
0 → 100644
View file @
bbf82a07
package
com.wwdz.ch.db.manager.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.dao.FavoritesItemsRelationMapper
;
import
com.wwdz.ch.db.domain.FavoritesItemsRelation
;
import
com.wwdz.ch.db.domain.FavoritesItemsRelationExample
;
import
com.wwdz.ch.db.manager.FavoritesItemsRelationManager
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
FavoritesItemsRelationManagerImpl
implements
FavoritesItemsRelationManager
{
@Autowired
private
FavoritesItemsRelationMapper
favoritesItemsRelationMapper
;
@Override
public
int
add
(
FavoritesItemsRelation
record
)
{
return
favoritesItemsRelationMapper
.
insert
(
record
);
}
@Override
public
int
batchAdd
(
List
<
FavoritesItemsRelation
>
list
)
{
return
favoritesItemsRelationMapper
.
batchInsert
(
list
);
}
@Override
public
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
)
{
FavoritesItemsRelationExample
example
=
new
FavoritesItemsRelationExample
();
FavoritesItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
favoritesId
,
criteria:
:
andFavoritesIdEqualTo
);
JdbcHelper
.
ifPresent
(
favoritesIds
,
criteria:
:
andFavoritesIdIn
);
return
favoritesItemsRelationMapper
.
deleteByExample
(
example
);
}
@Override
public
int
deleteByChosen
(
Long
favoritesId
,
List
<
Long
>
itemIds
)
{
FavoritesItemsRelationExample
example
=
new
FavoritesItemsRelationExample
();
FavoritesItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andFavoritesIdEqualTo
(
favoritesId
);
criteria
.
andItemIdIn
(
itemIds
);
return
favoritesItemsRelationMapper
.
deleteByExample
(
example
);
}
@Override
public
List
<
FavoritesItemsRelation
>
listByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
)
{
FavoritesItemsRelationExample
example
=
new
FavoritesItemsRelationExample
();
FavoritesItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
favoritesId
,
criteria:
:
andFavoritesIdEqualTo
);
JdbcHelper
.
ifPresent
(
favoritesIds
,
criteria:
:
andFavoritesIdIn
);
return
favoritesItemsRelationMapper
.
selectByExample
(
example
);
}
@Override
public
PageInfo
<
FavoritesItemsRelation
>
pageByFavoritesId
(
Long
favoritesId
,
int
page
,
int
size
)
{
FavoritesItemsRelationExample
example
=
new
FavoritesItemsRelationExample
();
FavoritesItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andFavoritesIdEqualTo
(
favoritesId
);
PageHelper
.
startPage
(
page
,
size
);
List
<
FavoritesItemsRelation
>
list
=
favoritesItemsRelationMapper
.
selectByExample
(
example
);
return
new
PageInfo
<>(
list
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesManagerImpl.java
View file @
bbf82a07
...
@@ -6,9 +6,9 @@ import com.wwdz.ch.db.dao.FavoritesMapper;
...
@@ -6,9 +6,9 @@ import com.wwdz.ch.db.dao.FavoritesMapper;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
com.wwdz.ch.db.manager.FavoritesManager
;
import
com.wwdz.ch.db.manager.FavoritesManager
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -44,10 +44,10 @@ public class FavoritesManagerImpl implements FavoritesManager {
...
@@ -44,10 +44,10 @@ public class FavoritesManagerImpl implements FavoritesManager {
}
}
@Override
@Override
public
PageInfo
<
Favorites
>
pageByU
id
(
Long
ui
d
,
int
page
,
int
size
)
{
public
PageInfo
<
Favorites
>
pageByU
serId
(
Long
userI
d
,
int
page
,
int
size
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andU
idEqualTo
(
ui
d
);
criteria
.
andU
serIdEqualTo
(
userI
d
);
criteria
.
andDeletedEqualTo
(
false
);
criteria
.
andDeletedEqualTo
(
false
);
PageHelper
.
startPage
(
page
,
size
);
PageHelper
.
startPage
(
page
,
size
);
List
<
Favorites
>
list
=
favoritesMapper
.
selectByExample
(
example
);
List
<
Favorites
>
list
=
favoritesMapper
.
selectByExample
(
example
);
...
@@ -55,10 +55,10 @@ public class FavoritesManagerImpl implements FavoritesManager {
...
@@ -55,10 +55,10 @@ public class FavoritesManagerImpl implements FavoritesManager {
}
}
@Override
@Override
public
boolean
isExisted
(
Long
id
,
Long
u
i
d
,
String
title
)
{
public
boolean
isExisted
(
Long
id
,
Long
u
serI
d
,
String
title
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andU
idEqualTo
(
ui
d
);
criteria
.
andU
serIdEqualTo
(
userI
d
);
criteria
.
andTitleEqualTo
(
title
);
criteria
.
andTitleEqualTo
(
title
);
criteria
.
andDeletedEqualTo
(
false
);
criteria
.
andDeletedEqualTo
(
false
);
if
(
Objects
.
nonNull
(
id
))
{
if
(
Objects
.
nonNull
(
id
))
{
...
@@ -71,11 +71,8 @@ public class FavoritesManagerImpl implements FavoritesManager {
...
@@ -71,11 +71,8 @@ public class FavoritesManagerImpl implements FavoritesManager {
public
int
delete
(
Long
id
,
List
<
Long
>
ids
)
{
public
int
delete
(
Long
id
,
List
<
Long
>
ids
)
{
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
example
=
new
FavoritesExample
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
FavoritesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
CollectionUtils
.
isEmpty
(
ids
))
{
JdbcHelper
.
ifPresent
(
id
,
criteria:
:
andIdEqualTo
);
criteria
.
andIdIn
(
ids
);
JdbcHelper
.
ifPresent
(
ids
,
criteria:
:
andIdIn
);
}
else
{
criteria
.
andIdEqualTo
(
id
);
}
Favorites
favorites
=
new
Favorites
();
Favorites
favorites
=
new
Favorites
();
favorites
.
setDeleted
(
true
);
favorites
.
setDeleted
(
true
);
favorites
.
setUpdateTime
(
new
Date
());
favorites
.
setUpdateTime
(
new
Date
());
...
...
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/ItemManagerImpl.java
View file @
bbf82a07
...
@@ -64,4 +64,17 @@ public class ItemManagerImpl implements ItemManager {
...
@@ -64,4 +64,17 @@ public class ItemManagerImpl implements ItemManager {
int
num
=
itemMapper
.
updateByExampleSelective
(
item
,
example
);
int
num
=
itemMapper
.
updateByExampleSelective
(
item
,
example
);
return
num
>
0
;
return
num
>
0
;
}
}
@Override
public
int
deleteUserItems
(
CoinRequestDto
coinRequestDto
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getId
(),
criteria:
:
andIdEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getIds
(),
criteria:
:
andIdIn
);
criteria
.
andSourceTypeEqualTo
(
2
);
Item
item
=
new
Item
();
item
.
setUpdateTime
(
new
Date
());
item
.
setIsDeleted
(
true
);
return
itemMapper
.
updateByExampleSelective
(
item
,
example
);
}
}
}
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/UsersItemsRelationManagerImpl.java
0 → 100644
View file @
bbf82a07
package
com.wwdz.ch.db.manager.impl
;
import
com.wwdz.ch.db.dao.UsersItemsRelationMapper
;
import
com.wwdz.ch.db.domain.UsersItemsRelation
;
import
com.wwdz.ch.db.domain.UsersItemsRelationExample
;
import
com.wwdz.ch.db.manager.UsersItemsRelationManager
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
UsersItemsRelationManagerImpl
implements
UsersItemsRelationManager
{
@Autowired
private
UsersItemsRelationMapper
usersItemsRelationMapper
;
@Override
public
List
<
UsersItemsRelation
>
listByUserIds
(
Long
userId
,
List
<
Long
>
userIds
)
{
UsersItemsRelationExample
example
=
new
UsersItemsRelationExample
();
UsersItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
userId
,
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
userIds
,
criteria:
:
andUserIdIn
);
return
usersItemsRelationMapper
.
selectByExample
(
example
);
}
}
ch-dao/src/main/resources/com/wwdz/ch/db/dao/Favorites
Coin
sRelationMapper.xml
→
ch-dao/src/main/resources/com/wwdz/ch/db/dao/Favorites
Item
sRelationMapper.xml
View file @
bbf82a07
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!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.Favorites
Coin
sRelationMapper"
>
<mapper
namespace=
"com.wwdz.ch.db.dao.Favorites
Item
sRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelation"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.Favorites
Item
sRelation"
>
<result
column=
"favorites_id"
jdbcType=
"BIGINT"
property=
"favoritesId"
/>
<result
column=
"favorites_id"
jdbcType=
"BIGINT"
property=
"favoritesId"
/>
<result
column=
"coins_id"
jdbcType=
"BIGINT"
property=
"coinsId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -64,16 +65,16 @@
...
@@ -64,16 +65,16 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
favorites_id,
coins_id
favorites_id,
item_id, add_time
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelationExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Item
sRelationExample"
resultMap=
"BaseResultMap"
>
select
select
<if
test=
"distinct"
>
<if
test=
"distinct"
>
distinct
distinct
</if>
</if>
'true' as QUERYID,
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from favorites_
coin
s_relation
from favorites_
item
s_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
...
@@ -99,10 +100,10 @@
...
@@ -99,10 +100,10 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
favorites_id,
coins_id
favorites_id,
item_id, add_time
</otherwise>
</otherwise>
</choose>
</choose>
from favorites_
coin
s_relation
from favorites_
item
s_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -110,56 +111,67 @@
...
@@ -110,56 +111,67 @@
order by ${example.orderByClause}
order by ${example.orderByClause}
</if>
</if>
</select>
</select>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelationExample"
>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Item
sRelationExample"
>
delete from favorites_
coin
s_relation
delete from favorites_
item
s_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesCoinsRelation"
>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
insert into favorites_coins_relation (favorites_id, coins_id)
insert into favorites_items_relation (favorites_id, item_id, add_time
values (#{favoritesId,jdbcType=BIGINT}, #{coinsId,jdbcType=BIGINT})
)
values (#{favoritesId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP}
)
</insert>
</insert>
<insert
id=
"batchInsert"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelation"
>
<insert
id=
"batchInsert"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Item
sRelation"
>
insert into favorites_coins_relation (favorites_id,
coins_id
)
insert into favorites_coins_relation (favorites_id,
item_id, add_time
)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.favoritesId,jdbcType=BIGINT}, #{item.
coinsId,jdbcType=BIGINT
})
(#{item.favoritesId,jdbcType=BIGINT}, #{item.
itemId,jdbcType=BIGINT}, #{item.addTime,jdbcType=TIMESTAMP
})
</foreach>
</foreach>
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelation"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Item
sRelation"
>
insert into favorites_
coin
s_relation
insert into favorites_
item
s_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"favoritesId != null"
>
<if
test=
"favoritesId != null"
>
favorites_id,
favorites_id,
</if>
</if>
<if
test=
"coinsId != null"
>
<if
test=
"itemId != null"
>
coins_id,
item_id,
</if>
<if
test=
"addTime != null"
>
add_time,
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"favoritesId != null"
>
<if
test=
"favoritesId != null"
>
#{favoritesId,jdbcType=BIGINT},
#{favoritesId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"coinsId != null"
>
<if
test=
"itemId != null"
>
#{coinsId,jdbcType=BIGINT},
#{itemId,jdbcType=BIGINT},
</if>
<if
test=
"addTime != null"
>
#{addTime,jdbcType=TIMESTAMP},
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelationExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Item
sRelationExample"
resultType=
"java.lang.Long"
>
select count(*) from favorites_
coin
s_relation
select count(*) from favorites_
item
s_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
</select>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update favorites_
coin
s_relation
update favorites_
item
s_relation
<set>
<set>
<if
test=
"record.favoritesId != null"
>
<if
test=
"record.favoritesId != null"
>
favorites_id = #{record.favoritesId,jdbcType=BIGINT},
favorites_id = #{record.favoritesId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.coinsId != null"
>
<if
test=
"record.itemId != null"
>
coins_id = #{record.coinsId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if
test=
"record.addTime != null"
>
add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if>
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
...
@@ -167,14 +179,15 @@
...
@@ -167,14 +179,15 @@
</if>
</if>
</update>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<update
id=
"updateByExample"
parameterType=
"map"
>
update favorites_
coin
s_relation
update favorites_
item
s_relation
set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
coins_id = #{record.coinsId,jdbcType=BIGINT}
item_id = #{record.itemId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
</update>
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Coin
sRelationExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.Favorites
Item
sRelationExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element is automatically generated by MyBatis Generator, do not modify.
...
@@ -183,7 +196,7 @@
...
@@ -183,7 +196,7 @@
select
select
'true' as QUERYID,
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from favorites_
coin
s_relation
from favorites_
item
s_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
...
@@ -207,10 +220,10 @@
...
@@ -207,10 +220,10 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
favorites_id,
coins_id
favorites_id,
item_id, add_time
</otherwise>
</otherwise>
</choose>
</choose>
from favorites_
coin
s_relation
from favorites_
item
s_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/dao/FavoritesMapper.xml
View file @
bbf82a07
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.wwdz.ch.db.dao.FavoritesMapper"
>
<mapper
namespace=
"com.wwdz.ch.db.dao.FavoritesMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.Favorites"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.Favorites"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"u
id"
jdbcType=
"BIGINT"
property=
"ui
d"
/>
<result
column=
"u
ser_id"
jdbcType=
"BIGINT"
property=
"userI
d"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
`uid`
, title, description, add_time, update_time, deleted
id,
user_id
, title, description, add_time, update_time, deleted
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
images
images
...
@@ -121,13 +121,13 @@
...
@@ -121,13 +121,13 @@
distinct
distinct
</if>
</if>
<choose>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
${column.escapedColumnName}
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id,
`uid`
, title, description, add_time, update_time, deleted, images
id,
user_id
, title, description, add_time, update_time, deleted, images
</otherwise>
</otherwise>
</choose>
</choose>
from favorites
from favorites
...
@@ -176,13 +176,13 @@
...
@@ -176,13 +176,13 @@
-->
-->
select
select
<choose>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
${column.escapedColumnName}
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id,
`uid`
, title, description, add_time, update_time, deleted, images
id,
user_id
, title, description, add_time, update_time, deleted, images
</otherwise>
</otherwise>
</choose>
</choose>
from favorites
from favorites
...
@@ -202,10 +202,10 @@
...
@@ -202,10 +202,10 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
SELECT LAST_INSERT_ID()
</selectKey>
</selectKey>
insert into favorites (
`uid`
, title, description,
insert into favorites (
user_id
, title, description,
add_time, update_time, deleted,
add_time, update_time, deleted,
images)
images)
values (#{u
i
d,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
values (#{u
serI
d,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{images,jdbcType=LONGVARCHAR})
#{images,jdbcType=LONGVARCHAR})
</insert>
</insert>
...
@@ -215,8 +215,8 @@
...
@@ -215,8 +215,8 @@
</selectKey>
</selectKey>
insert into favorites
insert into favorites
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"u
i
d != null"
>
<if
test=
"u
serI
d != null"
>
`uid`
,
user_id
,
</if>
</if>
<if
test=
"title != null"
>
<if
test=
"title != null"
>
title,
title,
...
@@ -238,8 +238,8 @@
...
@@ -238,8 +238,8 @@
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"u
i
d != null"
>
<if
test=
"u
serI
d != null"
>
#{u
i
d,jdbcType=BIGINT},
#{u
serI
d,jdbcType=BIGINT},
</if>
</if>
<if
test=
"title != null"
>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR},
...
@@ -273,8 +273,8 @@
...
@@ -273,8 +273,8 @@
<if
test=
"record.id != null"
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.u
i
d != null"
>
<if
test=
"record.u
serI
d != null"
>
`uid` = #{record.ui
d,jdbcType=BIGINT},
user_id = #{record.userI
d,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.title != null"
>
<if
test=
"record.title != null"
>
title = #{record.title,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
...
@@ -302,7 +302,7 @@
...
@@ -302,7 +302,7 @@
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update favorites
update favorites
set id = #{record.id,jdbcType=BIGINT},
set id = #{record.id,jdbcType=BIGINT},
`uid` = #{record.ui
d,jdbcType=BIGINT},
user_id = #{record.userI
d,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
...
@@ -316,7 +316,7 @@
...
@@ -316,7 +316,7 @@
<update
id=
"updateByExample"
parameterType=
"map"
>
<update
id=
"updateByExample"
parameterType=
"map"
>
update favorites
update favorites
set id = #{record.id,jdbcType=BIGINT},
set id = #{record.id,jdbcType=BIGINT},
`uid` = #{record.ui
d,jdbcType=BIGINT},
user_id = #{record.userI
d,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
...
@@ -329,8 +329,8 @@
...
@@ -329,8 +329,8 @@
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
update favorites
update favorites
<set>
<set>
<if
test=
"u
i
d != null"
>
<if
test=
"u
serI
d != null"
>
`uid` = #{ui
d,jdbcType=BIGINT},
user_id = #{userI
d,jdbcType=BIGINT},
</if>
</if>
<if
test=
"title != null"
>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
...
@@ -355,7 +355,7 @@
...
@@ -355,7 +355,7 @@
</update>
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
update favorites
update favorites
set
`uid` = #{ui
d,jdbcType=BIGINT},
set
user_id = #{userI
d,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
add_time = #{addTime,jdbcType=TIMESTAMP},
...
@@ -366,7 +366,7 @@
...
@@ -366,7 +366,7 @@
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.Favorites"
>
update favorites
update favorites
set
`uid` = #{ui
d,jdbcType=BIGINT},
set
user_id = #{userI
d,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
add_time = #{addTime,jdbcType=TIMESTAMP},
...
@@ -421,13 +421,13 @@
...
@@ -421,13 +421,13 @@
select
select
'true' as QUERYID,
'true' as QUERYID,
<choose>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
${column.escapedColumnName}
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id,
`uid`
, title, description, add_time, update_time, deleted, images
id,
user_id
, title, description, add_time, update_time, deleted, images
</otherwise>
</otherwise>
</choose>
</choose>
from favorites
from favorites
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/dao/UsersItemsRelationMapper.xml
0 → 100644
View file @
bbf82a07
<?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.UsersItemsRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.UsersItemsRelation"
>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
</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"
>
user_id, item_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.UsersItemsRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from users_items_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>
user_id, item_id
</otherwise>
</choose>
from users_items_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.UsersItemsRelationExample"
>
delete from users_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.UsersItemsRelation"
>
insert into users_items_relation (user_id, item_id)
values (#{userId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.UsersItemsRelation"
>
insert into users_items_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"itemId != null"
>
item_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"itemId != null"
>
#{itemId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.UsersItemsRelationExample"
resultType=
"java.lang.Long"
>
select count(*) from users_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update users_items_relation
<set>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.itemId != null"
>
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update users_items_relation
set user_id = #{record.userId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.UsersItemsRelationExample"
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 users_items_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>
user_id, item_id
</otherwise>
</choose>
from users_items_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-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/FavoritesItemRequestDto.java
0 → 100644
View file @
bbf82a07
package
com.wwdz.ch.wx.entity.request
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
FavoritesItemRequestDto
implements
Entity
{
private
Long
favoritesId
;
private
List
<
Long
>
itemIds
;
private
Long
userId
;
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/FavoritesRequestDto.java
View file @
bbf82a07
package
com.wwdz.ch.wx.entity.request
;
package
com.wwdz.ch.wx.entity.request
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.xxdxxs.entity.Entity
;
import
com.xxdxxs.support.Delete
;
import
com.xxdxxs.support.Delete
;
import
com.xxdxxs.support.Insert
;
import
com.xxdxxs.support.Insert
;
import
com.xxdxxs.support.Select
;
import
com.xxdxxs.support.Select
;
...
@@ -10,13 +11,10 @@ import org.hibernate.validator.constraints.Length;
...
@@ -10,13 +11,10 @@ import org.hibernate.validator.constraints.Length;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
FavoritesRequestDto
implements
Serializable
{
public
class
FavoritesRequestDto
implements
Entity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
groups
=
{
Update
.
class
,
Select
.
class
},
message
=
"id不能为空"
)
@NotNull
(
groups
=
{
Update
.
class
,
Select
.
class
},
message
=
"id不能为空"
)
private
Long
id
;
private
Long
id
;
...
@@ -30,7 +28,7 @@ public class FavoritesRequestDto implements Serializable {
...
@@ -30,7 +28,7 @@ public class FavoritesRequestDto implements Serializable {
private
String
images
;
private
String
images
;
@NotNull
(
groups
=
{
Insert
.
class
,
Update
.
class
,
Page
.
class
,
Delete
.
class
},
message
=
"用户id不能为空"
)
@NotNull
(
groups
=
{
Insert
.
class
,
Update
.
class
,
Page
.
class
,
Delete
.
class
},
message
=
"用户id不能为空"
)
private
Long
u
i
d
;
private
Long
u
serI
d
;
@NotNull
(
groups
=
Page
.
class
,
message
=
"当前页不能为空"
)
@NotNull
(
groups
=
Page
.
class
,
message
=
"当前页不能为空"
)
private
Integer
page
;
private
Integer
page
;
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/FavoritesService.java
View file @
bbf82a07
package
com.wwdz.ch.wx.service
;
package
com.wwdz.ch.wx.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.wx.entity.request.FavoritesItemRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
public
interface
FavoritesService
{
public
interface
FavoritesService
{
...
@@ -15,4 +16,6 @@ public interface FavoritesService {
...
@@ -15,4 +16,6 @@ public interface FavoritesService {
Result
delete
(
FavoritesRequestDto
dto
);
Result
delete
(
FavoritesRequestDto
dto
);
Result
batchDelete
(
FavoritesRequestDto
dto
);
Result
batchDelete
(
FavoritesRequestDto
dto
);
Result
removeItem
(
FavoritesItemRequestDto
dto
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
View file @
bbf82a07
...
@@ -2,9 +2,14 @@ package com.wwdz.ch.wx.service.impl;
...
@@ -2,9 +2,14 @@ package com.wwdz.ch.wx.service.impl;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesItemsRelation
;
import
com.wwdz.ch.db.manager.FavoritesCoinsRelationManager
;
import
com.wwdz.ch.db.domain.UsersItemsRelation
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.manager.FavoritesItemsRelationManager
;
import
com.wwdz.ch.db.manager.FavoritesManager
;
import
com.wwdz.ch.db.manager.FavoritesManager
;
import
com.wwdz.ch.db.manager.ItemManager
;
import
com.wwdz.ch.db.manager.UsersItemsRelationManager
;
import
com.wwdz.ch.wx.entity.request.FavoritesItemRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -18,6 +23,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
...
@@ -18,6 +23,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
@Service
@Service
public
class
FavoritesServiceImpl
implements
FavoritesService
{
public
class
FavoritesServiceImpl
implements
FavoritesService
{
...
@@ -26,12 +32,16 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -26,12 +32,16 @@ public class FavoritesServiceImpl implements FavoritesService {
@Autowired
@Autowired
private
FavoritesManager
favoritesManager
;
private
FavoritesManager
favoritesManager
;
@Autowired
@Autowired
private
FavoritesCoinsRelationManager
favoritesCoinsRelationManager
;
private
FavoritesItemsRelationManager
favoritesItemsRelationManager
;
@Autowired
private
UsersItemsRelationManager
usersItemsRelationManager
;
@Autowired
private
ItemManager
itemManager
;
@Override
@Override
public
Result
page
(
FavoritesRequestDto
dto
)
{
public
Result
page
(
FavoritesRequestDto
dto
)
{
try
{
try
{
return
Result
.
success
(
favoritesManager
.
pageByU
id
(
dto
.
getUi
d
(),
dto
.
getPage
(),
dto
.
getSize
()));
return
Result
.
success
(
favoritesManager
.
pageByU
serId
(
dto
.
getUserI
d
(),
dto
.
getPage
(),
dto
.
getSize
()));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询收藏册列表失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"查询收藏册列表失败,原因:"
+
e
.
getMessage
(),
e
);
return
Result
.
failed
(-
1
,
"查询收藏册列表失败"
);
return
Result
.
failed
(-
1
,
"查询收藏册列表失败"
);
...
@@ -43,12 +53,12 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -43,12 +53,12 @@ public class FavoritesServiceImpl implements FavoritesService {
public
Result
add
(
FavoritesRequestDto
dto
)
{
public
Result
add
(
FavoritesRequestDto
dto
)
{
try
{
try
{
// 判断收藏册标题是否已存在
// 判断收藏册标题是否已存在
if
(
favoritesManager
.
isExisted
(
null
,
dto
.
getU
i
d
(),
dto
.
getTitle
()))
{
if
(
favoritesManager
.
isExisted
(
null
,
dto
.
getU
serI
d
(),
dto
.
getTitle
()))
{
return
Result
.
failed
(-
1
,
"收藏册的标题不能重复"
);
return
Result
.
failed
(-
1
,
"收藏册的标题不能重复"
);
}
}
Favorites
favorites
=
new
Favorites
();
Favorites
favorites
=
new
Favorites
();
favorites
.
setU
id
(
dto
.
getUi
d
());
favorites
.
setU
serId
(
dto
.
getUserI
d
());
favorites
.
setTitle
(
dto
.
getTitle
());
favorites
.
setTitle
(
dto
.
getTitle
());
favorites
.
setDescription
(
dto
.
getDescription
());
favorites
.
setDescription
(
dto
.
getDescription
());
favorites
.
setImages
(
dto
.
getImages
());
favorites
.
setImages
(
dto
.
getImages
());
...
@@ -74,7 +84,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -74,7 +84,7 @@ public class FavoritesServiceImpl implements FavoritesService {
return
Result
.
failed
(
"数据异常,记录不存在"
);
return
Result
.
failed
(
"数据异常,记录不存在"
);
}
}
// 判断收藏册标题是否已存在
// 判断收藏册标题是否已存在
if
(
favoritesManager
.
isExisted
(
dto
.
getId
(),
dto
.
getU
i
d
(),
dto
.
getTitle
()))
{
if
(
favoritesManager
.
isExisted
(
dto
.
getId
(),
dto
.
getU
serI
d
(),
dto
.
getTitle
()))
{
return
Result
.
failed
(
"收藏册的标题不能重复"
);
return
Result
.
failed
(
"收藏册的标题不能重复"
);
}
}
...
@@ -109,23 +119,18 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -109,23 +119,18 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
@Override
public
Result
delete
(
FavoritesRequestDto
dto
)
{
public
Result
delete
(
FavoritesRequestDto
dto
)
{
try
{
try
{
List
<
Favorites
CoinsRelation
>
list
=
favoritesCoin
sRelationManager
.
listByFavoritesId
(
dto
.
getId
(),
null
);
List
<
Favorites
ItemsRelation
>
favoritesItemsList
=
favoritesItem
sRelationManager
.
listByFavoritesId
(
dto
.
getId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
l
ist
))
{
if
(
CollectionUtils
.
isNotEmpty
(
favoritesItemsL
ist
))
{
return
Result
.
failed
(
"收藏册内有藏品,
清
先移除藏品"
);
return
Result
.
failed
(
"收藏册内有藏品,
请
先移除藏品"
);
}
}
//TODO 删除该收藏册下用户创建的钱币
// 删除收藏册和钱币的关联
favoritesCoinsRelationManager
.
deleteByFavoritesId
(
dto
.
getId
(),
null
);
// 删除收藏册
// 删除收藏册
favoritesManager
.
delete
(
dto
.
getId
(),
null
);
favoritesManager
.
delete
(
dto
.
getId
(),
null
);
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"
批量
删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
Result
.
failed
(
"
批量
删除收藏册失败"
);
return
Result
.
failed
(
"删除收藏册失败"
);
}
}
}
}
...
@@ -133,11 +138,25 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -133,11 +138,25 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
@Override
public
Result
batchDelete
(
FavoritesRequestDto
dto
)
{
public
Result
batchDelete
(
FavoritesRequestDto
dto
)
{
try
{
try
{
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelationManager
.
listByFavoritesId
(
null
,
dto
.
getIds
());
// 批量删除收藏册下用户创建的钱币
//TODO 删除该收藏册下用户创建的钱币
List
<
FavoritesItemsRelation
>
list
=
favoritesItemsRelationManager
.
listByFavoritesId
(
null
,
dto
.
getIds
());
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
Long
>
favoritesItemsIds
=
list
.
stream
()
.
map
(
FavoritesItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
List
<
UsersItemsRelation
>
usersItemsList
=
usersItemsRelationManager
.
listByUserIds
(
dto
.
getUserId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
usersItemsList
))
{
List
<
Long
>
usersItemsIds
=
usersItemsList
.
stream
()
.
map
(
UsersItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
itemIds
=
favoritesItemsIds
.
stream
()
.
filter
(
usersItemsIds:
:
contains
).
collect
(
Collectors
.
toList
());
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
setIds
(
itemIds
);
itemManager
.
deleteUserItems
(
coinRequestDto
);
}
}
// 删除收藏册和钱币的关联
// 删除收藏册和钱币的关联
favorites
Coin
sRelationManager
.
deleteByFavoritesId
(
null
,
dto
.
getIds
());
favorites
Item
sRelationManager
.
deleteByFavoritesId
(
null
,
dto
.
getIds
());
// 删除收藏册
// 删除收藏册
favoritesManager
.
delete
(
null
,
dto
.
getIds
());
favoritesManager
.
delete
(
null
,
dto
.
getIds
());
...
@@ -148,4 +167,30 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -148,4 +167,30 @@ public class FavoritesServiceImpl implements FavoritesService {
return
Result
.
failed
(
"批量删除收藏册失败"
);
return
Result
.
failed
(
"批量删除收藏册失败"
);
}
}
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Result
removeItem
(
FavoritesItemRequestDto
dto
)
{
try
{
// 批量删除收藏册下用户创建的钱币
List
<
UsersItemsRelation
>
usersItemsList
=
usersItemsRelationManager
.
listByUserIds
(
dto
.
getUserId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
usersItemsList
))
{
List
<
Long
>
usersItemsIds
=
usersItemsList
.
stream
()
.
map
(
UsersItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
itemIds
=
dto
.
getItemIds
().
stream
()
.
filter
(
usersItemsIds:
:
contains
).
collect
(
Collectors
.
toList
());
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
setIds
(
itemIds
);
itemManager
.
deleteUserItems
(
coinRequestDto
);
}
// 删除收藏册和钱币的关联
favoritesItemsRelationManager
.
deleteByChosen
(
dto
.
getFavoritesId
(),
dto
.
getItemIds
());
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
info
(
"收藏册取消收藏失败,原因:"
+
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
Result
.
failed
(
"收藏册取消收藏失败"
);
}
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/WxFavoritesController.java
View file @
bbf82a07
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.web;
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.web;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.wx.entity.request.FavoritesItemRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
com.xxdxxs.support.Delete
;
import
com.xxdxxs.support.Delete
;
...
@@ -63,4 +64,15 @@ public class WxFavoritesController {
...
@@ -63,4 +64,15 @@ public class WxFavoritesController {
}
}
return
favoritesService
.
batchDelete
(
dto
);
return
favoritesService
.
batchDelete
(
dto
);
}
}
@PostMapping
(
"/removeItem"
)
public
Result
removeItem
(
@RequestBody
FavoritesItemRequestDto
dto
)
{
if
(
Objects
.
isNull
(
dto
.
getFavoritesId
()))
{
return
Result
.
failed
(
"收藏册不能为空"
);
}
if
(
CollectionUtils
.
isEmpty
(
dto
.
getItemIds
()))
{
return
Result
.
failed
(
"请选择藏品"
);
}
return
favoritesService
.
removeItem
(
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