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
c5dd98cf
Commit
c5dd98cf
authored
Aug 11, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 小程序藏品接口
parent
cabdb8f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/FavoritesItemsRelationMapper.xml
...es/com/wwdz/ch/db/mapper/FavoritesItemsRelationMapper.xml
+23
-12
No files found.
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/FavoritesItemsRelationMapper.xml
View file @
c5dd98cf
...
...
@@ -3,6 +3,7 @@
<mapper
namespace=
"com.wwdz.ch.db.mapper.FavoritesItemsRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
<result
column=
"favorites_id"
jdbcType=
"BIGINT"
property=
"favoritesId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"add_time"
jdbcType=
"TIMESTAMP"
property=
"addTime"
/>
</resultMap>
...
...
@@ -65,7 +66,7 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
favorites_id, item_id, add_time
favorites_id,
user_id,
item_id, add_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelationExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -94,13 +95,13 @@
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
favorites_id, item_id, add_time
favorites_id,
user_id,
item_id, add_time
</otherwise>
</choose>
from favorites_items_relation
...
...
@@ -118,16 +119,16 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
insert into favorites_items_relation (favorites_id,
item_id, add_time
)
values (#{favoritesId,jdbcType=BIGINT}, #{
itemId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP}
)
insert into favorites_items_relation (favorites_id,
user_id, item_id,
add_time
)
values (#{favoritesId,jdbcType=BIGINT}, #{
userId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT},
#{addTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"batchInsert"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
insert into favorites_
coins_relation (favorites_id, item_id, add_time)
values
insert into favorites_
items_relation (favorites_id, user_id, item_id,
add_time)
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.favoritesId,jdbcType=BIGINT}, #{item.itemId,jdbcType=BIGINT}, #{item.addTime,jdbcType=TIMESTAMP})
(#{item.favoritesId,jdbcType=BIGINT}, #{item.
userId,jdbcType=BIGINT}, #{item.
itemId,jdbcType=BIGINT}, #{item.addTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.FavoritesItemsRelation"
>
...
...
@@ -136,6 +137,9 @@
<if
test=
"favoritesId != null"
>
favorites_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"itemId != null"
>
item_id,
</if>
...
...
@@ -147,6 +151,9 @@
<if
test=
"favoritesId != null"
>
#{favoritesId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"itemId != null"
>
#{itemId,jdbcType=BIGINT},
</if>
...
...
@@ -167,6 +174,9 @@
<if
test=
"record.favoritesId != null"
>
favorites_id = #{record.favoritesId,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.itemId != null"
>
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
...
...
@@ -181,6 +191,7 @@
<update
id=
"updateByExample"
parameterType=
"map"
>
update favorites_items_relation
set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
...
...
@@ -214,13 +225,13 @@
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
favorites_id, item_id, add_time
favorites_id,
user_id,
item_id, add_time
</otherwise>
</choose>
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