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
17886961
Commit
17886961
authored
Sep 04, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 收藏册和藏品关联表结构
parent
e0fe1f97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
23 deletions
+161
-23
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesItemsRelation.java
...in/java/com/wwdz/ch/db/domain/FavoritesItemsRelation.java
+12
-3
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesItemsRelationExample.java
.../com/wwdz/ch/db/domain/FavoritesItemsRelationExample.java
+132
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/FavoritesItemsRelationMapper.xml
...es/com/wwdz/ch/db/mapper/FavoritesItemsRelationMapper.xml
+17
-20
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesItemsRelation.java
View file @
17886961
...
@@ -9,7 +9,7 @@ import java.util.Date;
...
@@ -9,7 +9,7 @@ import java.util.Date;
/**
/**
* @author shiyu
* @author shiyu
* @date 2023/0
7/25
* @date 2023/0
9/04
*/
*/
@Data
@Data
public
class
FavoritesItemsRelation
implements
Serializable
{
public
class
FavoritesItemsRelation
implements
Serializable
{
...
@@ -33,6 +33,11 @@ public class FavoritesItemsRelation implements Serializable {
...
@@ -33,6 +33,11 @@ public class FavoritesItemsRelation implements Serializable {
*/
*/
private
Date
addTime
;
private
Date
addTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
@Override
...
@@ -45,6 +50,7 @@ public class FavoritesItemsRelation implements Serializable {
...
@@ -45,6 +50,7 @@ public class FavoritesItemsRelation implements Serializable {
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
sb
.
append
(
", addTime="
).
append
(
addTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
...
@@ -65,7 +71,8 @@ public class FavoritesItemsRelation implements Serializable {
...
@@ -65,7 +71,8 @@ public class FavoritesItemsRelation implements Serializable {
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
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()));
&&
(
this
.
getAddTime
()
==
null
?
other
.
getAddTime
()
==
null
:
this
.
getAddTime
().
equals
(
other
.
getAddTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
}
}
@Override
@Override
...
@@ -76,6 +83,7 @@ public class FavoritesItemsRelation implements Serializable {
...
@@ -76,6 +83,7 @@ public class FavoritesItemsRelation implements Serializable {
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
result
=
prime
*
result
+
((
getAddTime
()
==
null
)
?
0
:
getAddTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
return
result
;
return
result
;
}
}
...
@@ -90,7 +98,8 @@ public class FavoritesItemsRelation implements Serializable {
...
@@ -90,7 +98,8 @@ public class FavoritesItemsRelation implements Serializable {
favoritesId
(
"favorites_id"
,
"favoritesId"
,
"BIGINT"
,
false
),
favoritesId
(
"favorites_id"
,
"favoritesId"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
);
addTime
(
"add_time"
,
"addTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
);
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/FavoritesItemsRelationExample.java
View file @
17886961
...
@@ -675,6 +675,138 @@ public class FavoritesItemsRelationExample {
...
@@ -675,6 +675,138 @@ public class FavoritesItemsRelationExample {
addCriterion
(
"add_time not between"
,
value1
,
value2
,
"addTime"
);
addCriterion
(
"add_time not between"
,
value1
,
value2
,
"addTime"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
FavoritesItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
FavoritesItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
FavoritesItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
FavoritesItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
FavoritesItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table favorites_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
FavoritesItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/FavoritesItemsRelationMapper.xml
View file @
17886961
...
@@ -6,12 +6,7 @@
...
@@ -6,12 +6,7 @@
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
</resultMap>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<resultMap
id=
"ItemResultMap"
type=
"com.wwdz.ch.db.dto.FavoritesItemsDto"
>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
<result
column=
"images"
jdbcType=
"VARCHAR"
property=
"images"
/>
<result
column=
"top_image"
jdbcType=
"VARCHAR"
property=
"topImage"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -72,7 +67,7 @@
...
@@ -72,7 +67,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
favorites_id, user_id, item_id, add_time
favorites_id, user_id, item_id, add_time
, update_time
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelationExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelationExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -107,7 +102,7 @@
...
@@ -107,7 +102,7 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
favorites_id, user_id, item_id, add_time
favorites_id, user_id, item_id, add_time
, update_time
</otherwise>
</otherwise>
</choose>
</choose>
from favorites_items_relation
from favorites_items_relation
...
@@ -126,17 +121,9 @@
...
@@ -126,17 +121,9 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
insert into favorites_items_relation (favorites_id, user_id, item_id,
insert into favorites_items_relation (favorites_id, user_id, item_id,
add_time)
add_time
, update_time
)
values (#{favoritesId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT},
values (#{favoritesId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT},
#{addTime,jdbcType=TIMESTAMP})
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"batchInsert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
insert into favorites_items_relation (favorites_id, user_id, item_id,
add_time)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.favoritesId,jdbcType=BIGINT}, #{item.userId,jdbcType=BIGINT}, #{item.itemId,jdbcType=BIGINT}, #{item.addTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
insert into favorites_items_relation
insert into favorites_items_relation
...
@@ -153,6 +140,9 @@
...
@@ -153,6 +140,9 @@
<if
test=
"addTime != null"
>
<if
test=
"addTime != null"
>
add_time,
add_time,
</if>
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"favoritesId != null"
>
<if
test=
"favoritesId != null"
>
...
@@ -167,6 +157,9 @@
...
@@ -167,6 +157,9 @@
<if
test=
"addTime != null"
>
<if
test=
"addTime != null"
>
#{addTime,jdbcType=TIMESTAMP},
#{addTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelationExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelationExample"
resultType=
"java.lang.Long"
>
...
@@ -190,6 +183,9 @@
...
@@ -190,6 +183,9 @@
<if
test=
"record.addTime != null"
>
<if
test=
"record.addTime != null"
>
add_time = #{record.addTime,jdbcType=TIMESTAMP},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -200,7 +196,8 @@
...
@@ -200,7 +196,8 @@
set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,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>
...
@@ -238,7 +235,7 @@
...
@@ -238,7 +235,7 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
favorites_id, user_id, item_id, add_time
favorites_id, user_id, item_id, add_time
, update_time
</otherwise>
</otherwise>
</choose>
</choose>
from favorites_items_relation
from favorites_items_relation
...
...
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