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
c3faa0d9
Commit
c3faa0d9
authored
Apr 16, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1002714 定制服务允许二级分类
parent
84976539
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
14 deletions
+45
-14
CustomPlanBizImpl.java
...va/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
+27
-9
CustomPlanModule.java
.../java/com/pcloud/book/custom/entity/CustomPlanModule.java
+4
-0
CustomPlanModuleVO.java
...in/java/com/pcloud/book/custom/vo/CustomPlanModuleVO.java
+4
-0
CustomPlanModuleMapper.xml
...c/main/resources/mapper/custom/CustomPlanModuleMapper.xml
+10
-5
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
View file @
c3faa0d9
...
@@ -257,16 +257,26 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -257,16 +257,26 @@ 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
planModule4Second
=
new
CustomPlanModule
();
BeanUtils
.
copyProperties
(
planModuleVO
,
planModule
);
BeanUtils
.
copyProperties
(
planModuleVO
,
planModule4Second
);
planModule
.
setParentId
(
parentPlanModule
.
getId
());
planModule4Second
.
setParentId
(
parentPlanModule
.
getId
());
planModule
.
setPlanId
(
planId
);
planModule4Second
.
setPlanId
(
planId
);
itemList
.
add
(
planModule
);
customPlanModuleMapper
.
insert
(
planModule4Second
);
}
if
(
PlanModuleTypeEnum
.
GROUP
.
value
.
equals
(
planModuleVO
.
getModuleType
())
if
(!
ListUtils
.
isEmpty
(
itemList
))
{
&&
!
CollectionUtils
.
isEmpty
(
planModuleVO
.
getCustomPlanModuleVOList
()))
{
customPlanModuleMapper
.
batchInsert
(
itemList
);
List
<
CustomPlanModule
>
itemList4Second
=
new
ArrayList
<>();
for
(
CustomPlanModuleVO
planModuleVO4Second
:
planModuleVO
.
getCustomPlanModuleVOList
())
{
CustomPlanModule
planModule
=
new
CustomPlanModule
();
BeanUtils
.
copyProperties
(
planModuleVO4Second
,
planModule
);
planModule
.
setParentId
(
planModule4Second
.
getId
());
planModule
.
setPlanId
(
planId
);
itemList4Second
.
add
(
planModule
);
}
if
(!
ListUtils
.
isEmpty
(
itemList4Second
))
{
customPlanModuleMapper
.
batchInsert
(
itemList4Second
);
}
}
}
}
}
}
}
}
...
@@ -280,6 +290,14 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -280,6 +290,14 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
if
(
PlanModuleTypeEnum
.
GROUP
.
value
.
equals
(
planModuleVO
.
getModuleType
()))
{
if
(
PlanModuleTypeEnum
.
GROUP
.
value
.
equals
(
planModuleVO
.
getModuleType
()))
{
List
<
CustomPlanModuleVO
>
planModuleVOList
=
customPlanModuleMapper
.
getCustomPlanModuleByPlanId
(
planId
,
planModuleVO
.
getId
());
List
<
CustomPlanModuleVO
>
planModuleVOList
=
customPlanModuleMapper
.
getCustomPlanModuleByPlanId
(
planId
,
planModuleVO
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
planModuleVOList
))
{
if
(!
CollectionUtils
.
isEmpty
(
planModuleVOList
))
{
for
(
CustomPlanModuleVO
customPlanModuleVO
:
planModuleVOList
){
if
(
PlanModuleTypeEnum
.
GROUP
.
value
.
equals
(
customPlanModuleVO
.
getModuleType
()))
{
List
<
CustomPlanModuleVO
>
planModuleVOList4Second
=
customPlanModuleMapper
.
getCustomPlanModuleByPlanId
(
planId
,
customPlanModuleVO
.
getId
());
if
(!
ListUtils
.
isEmpty
(
planModuleVOList4Second
)){
customPlanModuleVO
.
setCustomPlanModuleVOList
(
planModuleVOList4Second
);
}
}
}
planModuleVO
.
setCustomPlanModuleVOList
(
planModuleVOList
);
planModuleVO
.
setCustomPlanModuleVOList
(
planModuleVOList
);
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/entity/CustomPlanModule.java
View file @
c3faa0d9
...
@@ -50,4 +50,7 @@ public class CustomPlanModule {
...
@@ -50,4 +50,7 @@ public class CustomPlanModule {
private
String
bookName
;
private
String
bookName
;
private
Integer
readType
;
private
Integer
readType
;
// 家长是否参与
private
Integer
parentAttend
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/custom/vo/CustomPlanModuleVO.java
View file @
c3faa0d9
...
@@ -48,4 +48,7 @@ public class CustomPlanModuleVO {
...
@@ -48,4 +48,7 @@ public class CustomPlanModuleVO {
private
String
bookName
;
private
String
bookName
;
private
Integer
readType
;
private
Integer
readType
;
// 家长是否参与
private
Integer
parentAttend
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/custom/CustomPlanModuleMapper.xml
View file @
c3faa0d9
...
@@ -21,11 +21,13 @@
...
@@ -21,11 +21,13 @@
<result
column=
"open_feedback"
jdbcType=
"INTEGER"
property=
"openFeedback"
/>
<result
column=
"open_feedback"
jdbcType=
"INTEGER"
property=
"openFeedback"
/>
<result
column=
"book_name"
jdbcType=
"VARCHAR"
property=
"bookName"
/>
<result
column=
"book_name"
jdbcType=
"VARCHAR"
property=
"bookName"
/>
<result
column=
"read_type"
jdbcType=
"INTEGER"
property=
"readType"
/>
<result
column=
"read_type"
jdbcType=
"INTEGER"
property=
"readType"
/>
<result
column=
"parent_attend"
jdbcType=
"INTEGER"
property=
"parentAttend"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, plan_id, parent_id, module_type, pic_url, type_name, title, content, skill_id, skill_cover,
id, 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
app_id, agent_name, product_id, merchant_name, product_unique_number, link_url, create_time, update_time, open_feedback, book_name,
read_type,parent_attend
</sql>
</sql>
<insert
id=
"insert"
parameterType=
"CustomPlanModule"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insert"
parameterType=
"CustomPlanModule"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
@@ -33,12 +35,12 @@
...
@@ -33,12 +35,12 @@
type_name, title, content,
type_name, title, content,
skill_id, skill_cover, app_id, agent_name,
skill_id, skill_cover, app_id, agent_name,
product_id, merchant_name, product_unique_number, link_url, create_time,
product_id, merchant_name, product_unique_number, link_url, create_time,
update_time, open_feedback, book_name, read_type)
update_time, open_feedback, book_name, read_type
,parent_attend
)
values (#{planId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, #{moduleType,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR},
values (#{planId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, #{moduleType,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR},
#{typeName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
#{typeName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
#{skillId,jdbcType=INTEGER}, #{skillCover,jdbcType=VARCHAR}, #{appId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR},
#{skillId,jdbcType=INTEGER}, #{skillCover,jdbcType=VARCHAR}, #{appId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR},
#{productId,jdbcType=BIGINT}, #{merchantName,jdbcType=VARCHAR}, #{productUniqueNumber,jdbcType=VARCHAR}, #{linkUrl,jdbcType=VARCHAR},
#{productId,jdbcType=BIGINT}, #{merchantName,jdbcType=VARCHAR}, #{productUniqueNumber,jdbcType=VARCHAR}, #{linkUrl,jdbcType=VARCHAR},
NOW(), NOW(), #{openFeedback}, #{bookName}, #{readType})
NOW(), NOW(), #{openFeedback}, #{bookName}, #{readType}
,#{parentAttend}
)
</insert>
</insert>
<insert
id=
"batchInsert"
parameterType=
"list"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"batchInsert"
parameterType=
"list"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
@@ -46,14 +48,14 @@
...
@@ -46,14 +48,14 @@
type_name, title, content,
type_name, title, content,
skill_id, skill_cover, app_id, agent_name,
skill_id, skill_cover, app_id, agent_name,
product_id, merchant_name, product_unique_number, link_url, create_time,
product_id, merchant_name, product_unique_number, link_url, create_time,
update_time, open_feedback, book_name, read_type)
update_time, open_feedback, book_name, read_type
,parent_attend
)
values
values
<foreach
collection=
"list"
separator=
","
item=
"item"
>
<foreach
collection=
"list"
separator=
","
item=
"item"
>
(#{item.planId,jdbcType=INTEGER}, #{item.parentId,jdbcType=INTEGER}, #{item.moduleType,jdbcType=INTEGER}, #{item.picUrl,jdbcType=VARCHAR},
(#{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.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.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},
#{item.productId,jdbcType=BIGINT}, #{item.merchantName,jdbcType=VARCHAR}, #{item.productUniqueNumber,jdbcType=VARCHAR}, #{item.linkUrl,jdbcType=VARCHAR},
NOW(), NOW(), #{item.openFeedback}, #{item.bookName}, #{item.readType})
NOW(), NOW(), #{item.openFeedback}, #{item.bookName}, #{item.readType}
,#{item.parentAttend}
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -99,6 +101,9 @@
...
@@ -99,6 +101,9 @@
<if
test=
"readType != null"
>
<if
test=
"readType != null"
>
read_type = #{readType,jdbcType=INTEGER},
read_type = #{readType,jdbcType=INTEGER},
</if>
</if>
<if
test=
"parentAttend != null"
>
parent_attend = #{parentAttend,jdbcType=INTEGER},
</if>
update_time = NOW(),
update_time = NOW(),
</set>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
...
...
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