Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
c25c406f
Commit
c25c406f
authored
Apr 02, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-custom-youhua' into 'master'
优化压测环境定制服务事务插入报错 See merge request rays/pcloud-book!598
parents
33f37fa2
08dd00ae
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletions
+24
-1
CustomPlanBizImpl.java
...va/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
+5
-1
CustomPlanModuleMapper.java
...com/pcloud/book/custom/mapper/CustomPlanModuleMapper.java
+3
-0
CustomPlanModuleMapper.xml
...c/main/resources/mapper/custom/CustomPlanModuleMapper.xml
+16
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
View file @
c25c406f
...
@@ -203,12 +203,16 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -203,12 +203,16 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
customPlanModuleMapper
.
insert
(
parentPlanModule
);
customPlanModuleMapper
.
insert
(
parentPlanModule
);
if
(
PlanModuleTypeEnum
.
GROUP
.
value
.
equals
(
parentPlanModuleVO
.
getModuleType
())
if
(
PlanModuleTypeEnum
.
GROUP
.
value
.
equals
(
parentPlanModuleVO
.
getModuleType
())
&&
!
CollectionUtils
.
isEmpty
(
parentPlanModuleVO
.
getCustomPlanModuleVOList
()))
{
&&
!
CollectionUtils
.
isEmpty
(
parentPlanModuleVO
.
getCustomPlanModuleVOList
()))
{
List
<
CustomPlanModule
>
itemList
=
new
ArrayList
<>();
for
(
CustomPlanModuleVO
planModuleVO
:
parentPlanModuleVO
.
getCustomPlanModuleVOList
())
{
for
(
CustomPlanModuleVO
planModuleVO
:
parentPlanModuleVO
.
getCustomPlanModuleVOList
())
{
CustomPlanModule
planModule
=
new
CustomPlanModule
();
CustomPlanModule
planModule
=
new
CustomPlanModule
();
BeanUtils
.
copyProperties
(
planModuleVO
,
planModule
);
BeanUtils
.
copyProperties
(
planModuleVO
,
planModule
);
planModule
.
setParentId
(
parentPlanModule
.
getId
());
planModule
.
setParentId
(
parentPlanModule
.
getId
());
planModule
.
setPlanId
(
planId
);
planModule
.
setPlanId
(
planId
);
customPlanModuleMapper
.
insert
(
planModule
);
itemList
.
add
(
planModule
);
}
if
(!
ListUtils
.
isEmpty
(
itemList
))
{
customPlanModuleMapper
.
batchInsert
(
itemList
);
}
}
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/mapper/CustomPlanModuleMapper.java
View file @
c25c406f
...
@@ -15,5 +15,7 @@ public interface CustomPlanModuleMapper {
...
@@ -15,5 +15,7 @@ public interface CustomPlanModuleMapper {
void
insert
(
CustomPlanModule
planModule
);
void
insert
(
CustomPlanModule
planModule
);
void
batchInsert
(
List
<
CustomPlanModule
>
planModuleList
);
List
<
CustomPlanModuleVO
>
getCustomPlanModuleByPlanId
(
@Param
(
"planId"
)
Integer
planId
,
@Param
(
"parentId"
)
Integer
parentId
);
List
<
CustomPlanModuleVO
>
getCustomPlanModuleByPlanId
(
@Param
(
"planId"
)
Integer
planId
,
@Param
(
"parentId"
)
Integer
parentId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/custom/CustomPlanModuleMapper.xml
View file @
c25c406f
...
@@ -41,6 +41,22 @@
...
@@ -41,6 +41,22 @@
NOW(), NOW(), #{openFeedback}, #{bookName}, #{readType})
NOW(), NOW(), #{openFeedback}, #{bookName}, #{readType})
</insert>
</insert>
<insert
id=
"batchInsert"
parameterType=
"list"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into custom_plan_module (plan_id,parent_id, module_type, pic_url,
type_name, title, content,
skill_id, skill_cover, app_id, agent_name,
product_id, merchant_name, product_unique_number, link_url, create_time,
update_time, open_feedback, book_name, read_type)
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.planId,jdbcType=INTEGER}, #{item.parentId,jdbcType=INTEGER}, #{item.moduleType,jdbcType=INTEGER}, #{item.picUrl,jdbcType=VARCHAR},
#{item.typeName,jdbcType=VARCHAR}, #{item.title,jdbcType=VARCHAR}, #{item.content,jdbcType=VARCHAR},
#{item.skillId,jdbcType=INTEGER}, #{item.skillCover,jdbcType=VARCHAR}, #{item.appId,jdbcType=BIGINT}, #{item.agentName,jdbcType=VARCHAR},
#{item.productId,jdbcType=BIGINT}, #{item.merchantName,jdbcType=VARCHAR}, #{item.productUniqueNumber,jdbcType=VARCHAR}, #{item.linkUrl,jdbcType=VARCHAR},
NOW(), NOW(), #{item.openFeedback}, #{item.bookName}, #{item.readType})
</foreach>
</insert>
<update
id=
"update"
parameterType=
"CustomPlanModule"
>
<update
id=
"update"
parameterType=
"CustomPlanModule"
>
update custom_plan_module
update custom_plan_module
<set>
<set>
...
...
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