diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java index 48bb3ab96..54a448c51 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java @@ -276,5 +276,15 @@ public class SysWapController extends BaseController { return AjaxResult.success(reply); } + @DeleteMapping("/video/delete/comment/{id}") + public AjaxResult deleteVideoComment(@PathVariable String id) { + return toAjax(iSysNutritionalVideoService.deleteVideoCommentById(id)); + } + + @DeleteMapping("/video/delete/reply/{id}") + public AjaxResult deleteVideoReply(@PathVariable String id) { + return toAjax(iSysNutritionalVideoService.deleteVideoCommentReplyById(id)); + } + } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipesPlanListInfo.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipesPlanListInfo.java index e333258da..bfcffbe02 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipesPlanListInfo.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipesPlanListInfo.java @@ -31,4 +31,6 @@ public class SysRecipesPlanListInfo { private Integer status; + private String remark; + } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysVideoCommentMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysVideoCommentMapper.java index 34a66a7b0..241e26cf7 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysVideoCommentMapper.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysVideoCommentMapper.java @@ -11,4 +11,7 @@ public interface SysVideoCommentMapper { int insertVideoCommentReply(SysVideoComment videoComment); + int deleteVideoCommentById(String id); + + int deleteVideoCommentReplyById(String id); } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysNutritionalVideoService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysNutritionalVideoService.java index 1e57c4009..1131879ba 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysNutritionalVideoService.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysNutritionalVideoService.java @@ -1,21 +1,18 @@ package com.stdiet.custom.service; +import com.stdiet.custom.domain.SysNutritionalVideo; +import com.stdiet.custom.domain.SysVideoComment; + import java.util.List; import java.util.Map; -import com.stdiet.custom.domain.SysNutritionalVideo; -import com.stdiet.custom.domain.SysVideoClassify; -import com.stdiet.custom.domain.SysVideoComment; -import org.apache.ibatis.annotations.Param; - /** * 营养视频Service接口 * * @author xzj * @date 2021-04-29 */ -public interface ISysNutritionalVideoService -{ +public interface ISysNutritionalVideoService { /** * 查询营养视频 * @@ -66,6 +63,7 @@ public interface ISysNutritionalVideoService /** * 获取视频 + * * @param videoId * @return */ @@ -73,12 +71,14 @@ public interface ISysNutritionalVideoService /** * 阿里云视频查询检索 + * * @return */ - public Map searchVideo(String key, Integer status, Integer pageNo, Integer pageSize, String scrollToken); + public Map searchVideo(String key, Integer status, Integer pageNo, Integer pageSize, String scrollToken); /** * 更新微信展示状态 + * * @param wxShow * @param ids * @return @@ -87,12 +87,14 @@ public interface ISysNutritionalVideoService /** * 更新视频播放量 + * * @return */ public int updateVideoPlayNum(String videoId); /** * 获取评论 + * * @param videoComment * @return */ @@ -100,6 +102,7 @@ public interface ISysNutritionalVideoService /** * 添加评论 + * * @param videoComment * @return */ @@ -107,8 +110,15 @@ public interface ISysNutritionalVideoService /** * 添加回复 + * * @param videoComment * @return */ public SysVideoComment insertVideoCommentReply(SysVideoComment videoComment); + + public int deleteVideoCommentById(String id); + + public int deleteVideoCommentReplyById(String id); + + } \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysNutritionalVideoServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysNutritionalVideoServiceImpl.java index cb4544263..a1b571a04 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysNutritionalVideoServiceImpl.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysNutritionalVideoServiceImpl.java @@ -345,6 +345,16 @@ public class SysNutritionalVideoServiceImpl implements ISysNutritionalVideoServi return null; } + @Override + public int deleteVideoCommentById(String id) { + return sysVideoCommentMapper.deleteVideoCommentById(id); + } + + @Override + public int deleteVideoCommentReplyById(String id) { + return sysVideoCommentMapper.deleteVideoCommentReplyById(id); + } + /** * 判断是否为阿里点播的截图 * diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml index 1bde54407..68dedc763 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml @@ -36,11 +36,13 @@ + - select id, order_id, cus_id, out_id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, send_time, pause_date, create_time, create_by, update_time, update_by, del_flag, review_status, sub_send, sms_send, subscribed from sys_recipes_plan + select id, order_id, cus_id, out_id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, send_time, pause_date, create_time, create_by, update_time, update_by, del_flag, review_status, sub_send, sms_send, subscribed, remark + from sys_recipes_plan - select id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, subscribed from sys_recipes_plan where out_id=#{outId} and del_flag = 0 + select id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, subscribed, remark from sys_recipes_plan where out_id=#{outId} and del_flag = 0 diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysVideoCommentMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysVideoCommentMapper.xml index b07635c84..c837bf606 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysVideoCommentMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysVideoCommentMapper.xml @@ -12,11 +12,11 @@ - + - - - + + + @@ -31,11 +31,11 @@ - + - - - + + + @@ -137,4 +137,12 @@ + + update sys_nutritional_video_comment set del_flag = 1 where id = #{id} + + + + update sys_nutritional_video_reply set del_flag = 1 where id = #{id} + + \ No newline at end of file diff --git a/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue b/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue index 119b84075..b8a78cabb 100644 --- a/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue +++ b/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue @@ -4,7 +4,7 @@ placement="right" trigger="click" width="400" - title="备注" + :title="title" @hide="handleOnHide" > - 备注: + {{ title }}:
@@ -35,6 +35,10 @@ export default { type: String, default: "", }, + title: { + type: String, + default: "备注", + }, }, components: {}, data() { diff --git a/stdiet-ui/src/components/HealthyView/index.vue b/stdiet-ui/src/components/HealthyView/index.vue index c61af37f0..08195e6d8 100644 --- a/stdiet-ui/src/components/HealthyView/index.vue +++ b/stdiet-ui/src/components/HealthyView/index.vue @@ -21,6 +21,12 @@ :value.sync="data.avoidFood" @onConfirm="handleOnConfirm" /> +
{ + if (res.code === 200) { + this.$message.success("修改成功"); + } + }); + }, }, }; diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js index 23e4e2a08..f01aaecf2 100644 --- a/stdiet-ui/src/store/modules/recipes.js +++ b/stdiet-ui/src/store/modules/recipes.js @@ -49,7 +49,8 @@ const oriState = { igdTypeOptions: [], physicalSignsOptions: [], // - curShortCutObj: {} + curShortCutObj: {}, + recipesPlanRemark: "" }; const mutations = { @@ -147,7 +148,8 @@ const actions = { endNumDay, recipesId, cusId, - reviewStatus + reviewStatus, + remark } = planResponse.data; commit("updateStateData", { cusId, @@ -157,7 +159,8 @@ const actions = { name: payload.name, planId: payload.planId, startNum: startNumDay, - endNum: endNumDay + endNum: endNumDay, + recipesPlanRemark: remark }); getDicts("cus_cus_unit").then(response => { commit("updateStateData", { cusUnitOptions: response.data }); @@ -237,7 +240,8 @@ const actions = { commit("updateStateData", payload); } }, - async getHealthyData({ commit }, payload) { + async getHealthyData({ commit, state }, payload) { + const { recipesPlanRemark } = state; commit("updateStateData", { healthDataLoading: true }); const healthyDataResult = await getCustomerPhysicalSignsByCusId( payload.cusId @@ -256,7 +260,10 @@ const actions = { commit("updateStateData", { healthDataLoading: false, healthyDataType, - healthyData, + healthyData: { + ...healthyData, + recipesPlanRemark + }, avoidFoodIds: (healthyData.avoidFood || []).map(obj => obj.id) }); }, @@ -555,7 +562,7 @@ const actions = { id: new Date().getTime(), name: tarDishes.name, type: response.data.type.split(",").sort(), - className: response.data.className, //大类小类名称 + className: response.data.className, //大类小类名称 data: tarDishes }).then(() => { window.postMessage(