Commit 4e21f323 by 章春雨

Merge branch 'fixbug-1002503' into 'master'

1002503需求修改bug

See merge request rays/pcloud-book!529
parents c1654609 316fe781
......@@ -332,7 +332,8 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
}
CustomPlanModuleSuggestion suggestion = CustomPlanModuleSuggestion.builder().wxId(wxId).planId(planId)
.suggestionLevel(addSuggestionListVO.getSuggestionLevel()).suggestion(addSuggestionListVO.getSuggestion())
.batchId(maxBatchId + 1).moduleId(addSuggestionListVO.getModuleId()).build();
.batchId(maxBatchId + 1).moduleId(addSuggestionListVO.getModuleId()).moduleType(addSuggestionListVO.getModuleType())
.openFeedback(addSuggestionListVO.getOpenFeedback()).build();
list.add(suggestion);
});
customPlanModuleSuggestionMapper.batchInsert(list);
......
......@@ -25,4 +25,8 @@ public class CustomPlanModuleSuggestion {
private Date createTime;
private Integer openFeedback;
private Integer moduleType;
}
\ No newline at end of file
......@@ -10,4 +10,8 @@ public class AddSuggestionListVO {
private Integer suggestionLevel;
private String suggestion;
private Integer openFeedback;
private Integer moduleType;
}
......@@ -116,7 +116,7 @@
<select id="listCustomPlanByPage" resultMap="BaseResultMap">
select
a.id, plan_number, plan_name, create_user_name, description, open_feedback,
a.id, plan_number, plan_name, create_user_name, description, a.open_feedback,
use_state, pdf_url, h5_url, preview_qrcode_url, a.create_time, COUNT(DISTINCT b.batch_id) suggestion_count
from custom_plan a left join custom_plan_module_suggestion b
on a.id = b.plan_id
......
......@@ -61,26 +61,15 @@
<select id="getSuggestionInfo" resultType="com.pcloud.book.custom.vo.ModuleSuggestionVO">
SELECT
e.id moduleId,
e.module_type moduleType,
e.open_feedback openFeedback,
s.suggestion_level suggestionLevel,
s.suggestion
FROM
custom_plan_module e
LEFT JOIN (
SELECT
a.id,
suggestion_level,
module_type moduleType,
module_id moduleId,
open_feedback openFeedback,
suggestion_level suggestionLevel,
suggestion
FROM
custom_plan_module a
LEFT JOIN custom_plan_module_suggestion b ON a.id = b.module_id
custom_plan_module_suggestion
WHERE
batch_id = #{batchId}
) s ON e.id = s.id
WHERE
e.plan_id = #{planId}
</select>
<select id="getMaxBatchId" resultType="Integer">
......@@ -88,10 +77,12 @@
</select>
<insert id="batchInsert" parameterType="com.pcloud.book.custom.entity.CustomPlanModuleSuggestion">
insert into custom_plan_module_suggestion(batch_id, wx_id, plan_id, module_Id, suggestion_Level, suggestion, create_time)
insert into custom_plan_module_suggestion(batch_id, wx_id, plan_id, module_Id, suggestion_Level, suggestion, create_time,
module_type, open_feedback)
values
<foreach collection="list" separator="," item="item">
(#{item.batchId}, #{item.wxId}, #{item.planId}, #{item.moduleId}, #{item.suggestionLevel}, #{item.suggestion}, now())
(#{item.batchId}, #{item.wxId}, #{item.planId}, #{item.moduleId}, #{item.suggestionLevel}, #{item.suggestion}, now(),
#{item.moduleType}, #{item.openFeedback})
</foreach>
</insert>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment