Commit c003777f by unknown

fix bug 1021667

parent c1654609
...@@ -332,7 +332,8 @@ public class CustomPlanBizImpl implements CustomPlanBiz { ...@@ -332,7 +332,8 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
} }
CustomPlanModuleSuggestion suggestion = CustomPlanModuleSuggestion.builder().wxId(wxId).planId(planId) CustomPlanModuleSuggestion suggestion = CustomPlanModuleSuggestion.builder().wxId(wxId).planId(planId)
.suggestionLevel(addSuggestionListVO.getSuggestionLevel()).suggestion(addSuggestionListVO.getSuggestion()) .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); list.add(suggestion);
}); });
customPlanModuleSuggestionMapper.batchInsert(list); customPlanModuleSuggestionMapper.batchInsert(list);
......
...@@ -25,4 +25,8 @@ public class CustomPlanModuleSuggestion { ...@@ -25,4 +25,8 @@ public class CustomPlanModuleSuggestion {
private Date createTime; private Date createTime;
private Integer openFeedback;
private Integer moduleType;
} }
\ No newline at end of file
...@@ -10,4 +10,8 @@ public class AddSuggestionListVO { ...@@ -10,4 +10,8 @@ public class AddSuggestionListVO {
private Integer suggestionLevel; private Integer suggestionLevel;
private String suggestion; private String suggestion;
private Integer openFeedback;
private Integer moduleType;
} }
...@@ -61,26 +61,15 @@ ...@@ -61,26 +61,15 @@
<select id="getSuggestionInfo" resultType="com.pcloud.book.custom.vo.ModuleSuggestionVO"> <select id="getSuggestionInfo" resultType="com.pcloud.book.custom.vo.ModuleSuggestionVO">
SELECT SELECT
e.id moduleId, module_type moduleType,
e.module_type moduleType, module_id moduleId,
e.open_feedback openFeedback, open_feedback openFeedback,
s.suggestion_level suggestionLevel, suggestion_level suggestionLevel,
s.suggestion suggestion
FROM FROM
custom_plan_module e custom_plan_module_suggestion
LEFT JOIN (
SELECT
a.id,
suggestion_level,
suggestion
FROM
custom_plan_module a
LEFT JOIN custom_plan_module_suggestion b ON a.id = b.module_id
WHERE
batch_id = #{batchId}
) s ON e.id = s.id
WHERE WHERE
e.plan_id = #{planId} batch_id = #{batchId}
</select> </select>
<select id="getMaxBatchId" resultType="Integer"> <select id="getMaxBatchId" resultType="Integer">
...@@ -88,10 +77,12 @@ ...@@ -88,10 +77,12 @@
</select> </select>
<insert id="batchInsert" parameterType="com.pcloud.book.custom.entity.CustomPlanModuleSuggestion"> <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 values
<foreach collection="list" separator="," item="item"> <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> </foreach>
</insert> </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