Commit f2e0595d by 1244575290@qq.com Committed by unknown

fixbug

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