Commit f2e0595d by 1244575290@qq.com Committed by unknown

fixbug

parent a6609a3c
...@@ -27,6 +27,8 @@ public interface SelfPlanBiz { ...@@ -27,6 +27,8 @@ public interface SelfPlanBiz {
List<TimeControlSelfPlanItem> getSelfPlanItems(Integer planId); List<TimeControlSelfPlanItem> getSelfPlanItems(Integer planId);
List<TimeControlSelfPlanItem> getSelfPlanItems4Wechat(Integer planId);
void commitFeedback(List<TimeControlSelfPlanFeedback> selfPlanFeedbackList); void commitFeedback(List<TimeControlSelfPlanFeedback> selfPlanFeedbackList);
List<TimeControlSelfPlanFeedback> getFeedbackByPlan(Integer planId); List<TimeControlSelfPlanFeedback> getFeedbackByPlan(Integer planId);
......
...@@ -210,7 +210,9 @@ public class SelfPlanBizImpl implements SelfPlanBiz { ...@@ -210,7 +210,9 @@ public class SelfPlanBizImpl implements SelfPlanBiz {
selfPlanItemMapper.deleteByPlanId(planId); selfPlanItemMapper.deleteByPlanId(planId);
selfPlanItemMapper.batchInsert(selfPlanItemList); selfPlanItemMapper.batchInsert(selfPlanItemList);
TimeControlSelfPlan plan = timeControlSelfPlanMapper.getById(planId); TimeControlSelfPlan plan = timeControlSelfPlanMapper.getById(planId);
if(plan != null && !StringUtil.isEmpty(plan.getChangeReply())) { plan.setUpdateTime(new Date());
timeControlSelfPlanMapper.update(plan);
if(plan != null && plan.getHasClickPlan() == 1) {
String robotWxId = plan.getRobotWxId(); String robotWxId = plan.getRobotWxId();
String userWxId = plan.getWxId(); String userWxId = plan.getWxId();
GroupRobotDTO groupRobotDTO = wechatGroupConsr.getGroupRobotByWxId(robotWxId); GroupRobotDTO groupRobotDTO = wechatGroupConsr.getGroupRobotByWxId(robotWxId);
...@@ -232,6 +234,13 @@ public class SelfPlanBizImpl implements SelfPlanBiz { ...@@ -232,6 +234,13 @@ public class SelfPlanBizImpl implements SelfPlanBiz {
} }
@Override @Override
public List<TimeControlSelfPlanItem> getSelfPlanItems4Wechat(Integer planId) {
List<TimeControlSelfPlanItem> list = selfPlanItemMapper.getByPlanId(planId);
timeControlSelfPlanMapper.updateHasClickPlan(planId);
return list;
}
@Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void commitFeedback(List<TimeControlSelfPlanFeedback> selfPlanFeedbackList) { public void commitFeedback(List<TimeControlSelfPlanFeedback> selfPlanFeedbackList) {
if(CollectionUtils.isEmpty(selfPlanFeedbackList)) { if(CollectionUtils.isEmpty(selfPlanFeedbackList)) {
......
...@@ -41,4 +41,6 @@ public class TimeControlSelfPlan { ...@@ -41,4 +41,6 @@ public class TimeControlSelfPlan {
private String planOrder; private String planOrder;
private Integer hasClickPlan;
} }
\ No newline at end of file
...@@ -89,7 +89,7 @@ public class SelfPlanFacadeImpl { ...@@ -89,7 +89,7 @@ public class SelfPlanFacadeImpl {
@ApiOperation(value = "获取方案内容(客户端)", httpMethod = "GET") @ApiOperation(value = "获取方案内容(客户端)", httpMethod = "GET")
@GetMapping("getSelfPlanItems4Wechat") @GetMapping("getSelfPlanItems4Wechat")
ResponseDto<?> getSelfPlanItems4Wechat(@RequestParam Integer planId) { ResponseDto<?> getSelfPlanItems4Wechat(@RequestParam Integer planId) {
return new ResponseDto<>( selfPlanBiz.getSelfPlanItems(planId)); return new ResponseDto<>(selfPlanBiz.getSelfPlanItems4Wechat(planId));
} }
@ApiOperation(value = "新增反馈", httpMethod = "POST") @ApiOperation(value = "新增反馈", httpMethod = "POST")
......
...@@ -42,4 +42,6 @@ public interface TimeControlSelfPlanMapper { ...@@ -42,4 +42,6 @@ public interface TimeControlSelfPlanMapper {
void updateSelfPlan(UpdateSelfPlanVO updateSelfPlanVO); void updateSelfPlan(UpdateSelfPlanVO updateSelfPlanVO);
TimeControlSelfPlan getLatestPlan(String wxId); TimeControlSelfPlan getLatestPlan(String wxId);
void updateHasClickPlan(@Param("id") Integer id);
} }
\ No newline at end of file
...@@ -16,11 +16,12 @@ ...@@ -16,11 +16,12 @@
<result column="evaluate_guide" property="evaluateGuide" jdbcType="VARCHAR" /> <result column="evaluate_guide" property="evaluateGuide" jdbcType="VARCHAR" />
<result column="change_reply" property="changeReply" jdbcType="VARCHAR" /> <result column="change_reply" property="changeReply" jdbcType="VARCHAR" />
<result column="plan_order" property="planOrder" jdbcType="VARCHAR" /> <result column="plan_order" property="planOrder" jdbcType="VARCHAR" />
<result column="has_click_plan" property="hasClickPlan" jdbcType="INTEGER" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, robot_wx_id, wx_id, task_id, total_price, buy_reply, subscribe_reply, evaluate_open, id, robot_wx_id, wx_id, task_id, total_price, buy_reply, subscribe_reply, evaluate_open,
service_state, create_time, update_time,evaluate_guide,change_reply, plan_order service_state, create_time, update_time,evaluate_guide,change_reply, plan_order, has_click_plan
</sql> </sql>
<insert id="insert" parameterType="TimeControlSelfPlan" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="TimeControlSelfPlan" useGeneratedKeys="true" keyProperty="id">
...@@ -148,13 +149,18 @@ ...@@ -148,13 +149,18 @@
where id = #{id} where id = #{id}
</update> </update>
<update id="updateHasClickPlan">
update time_control_self_plan set has_click_plan = 1, update_time = now()
where id = #{id}
</update>
<update id="advancedSetting" parameterType="com.pcloud.book.timecontrol.entity.TimeControlSelfPlan"> <update id="advancedSetting" parameterType="com.pcloud.book.timecontrol.entity.TimeControlSelfPlan">
update update
time_control_self_plan time_control_self_plan
set set
total_price = #{totalPrice} , total_price = #{totalPrice} ,
buy_reply = #{buyReply} , buy_reply = #{buyReply} ,
change_reply = #{changeReply} change_reply = #{changeReply}, update_time = now()
<if test="evaluateOpen != null"> <if test="evaluateOpen != null">
,evaluate_open = #{evaluateOpen} ,evaluate_open = #{evaluateOpen}
</if> </if>
...@@ -169,7 +175,7 @@ ...@@ -169,7 +175,7 @@
time_control_self_plan time_control_self_plan
set set
robot_wx_id = #{robotWxId}, robot_wx_id = #{robotWxId},
wx_id = #{wxId} wx_id = #{wxId}, update_time = now()
where where
id = #{planId} id = #{planId}
</update> </update>
......
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