!299 添加营养师评论功能

Merge pull request !299 from 德仔/develop
This commit is contained in:
德仔
2021-06-29 10:42:42 +00:00
committed by Gitee
10 changed files with 108 additions and 30 deletions

View File

@ -31,4 +31,6 @@ public class SysRecipesPlanListInfo {
private Integer status;
private String remark;
}

View File

@ -11,4 +11,7 @@ public interface SysVideoCommentMapper {
int insertVideoCommentReply(SysVideoComment videoComment);
int deleteVideoCommentById(String id);
int deleteVideoCommentReplyById(String id);
}

View File

@ -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<String,Object> searchVideo(String key, Integer status, Integer pageNo, Integer pageSize, String scrollToken);
public Map<String, Object> 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);
}

View File

@ -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);
}
/**
* 判断是否为阿里点播的截图
*

View File

@ -36,11 +36,13 @@
<result property="nutritionist" column="nutritionist"/>
<result property="nutritionistAssisId" column="nutritionist_assis_id"/>
<result property="nutritionistAssis" column="nutritionist_assis"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectSysRecipesPlanVo">
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
</sql>
<select id="selectSysRecipesPlanList" parameterType="SysRecipesPlan" resultMap="SysRecipesPlanResult">
@ -141,6 +143,7 @@
<if test="subscribed != null">subscribed = #{subscribed},</if>
<if test="subSend != null">sub_send = #{subSend},</if>
<if test="smsSend != null">sms_send = #{smsSend},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id} and del_flag = 0
</update>
@ -185,10 +188,11 @@
srp.subscribed
FROM sys_recipes_plan srp
LEFT JOIN sys_customer sc ON sc.id = srp.cus_id
LEFT JOIN sys_user su_nutritionist ON su_nutritionist.user_id = sc.main_dietitian AND su_nutritionist.del_flag = 0
LEFT JOIN sys_user su_nutritionist ON su_nutritionist.user_id = sc.main_dietitian AND su_nutritionist.del_flag =
0
LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sc.assistant_dietitian AND
su_nutritionist_assis.del_flag = 0
WHERE srp.del_flag = 0 AND sc.del_flag = 0 AND srp.type = 0
WHERE srp.del_flag = 0 AND sc.del_flag = 0 AND srp.type = 0
<if test="orderId != null">AND srp.order_id = #{orderId}</if>
<if test="sendFlag != null">AND srp.send_flag = #{sendFlag}</if>
<if test="customer != null and customer != ''">AND (sc.name like concat('%',#{customer},'%') OR sc.phone like
@ -249,6 +253,7 @@
<result property="recipesId" column="recipes_id"/>
<result property="sendFlag" column="send_flag"/>
<result property="subscribed" column="subscribed"/>
<result property="remark" column="remark"/>
<association property="menus" column="recipes_id" select="selectMenuIds"/>
</resultMap>
@ -256,12 +261,12 @@
and review_status = 2 and send_flag = 1
-->
<select id="selectRecipesPlanListInfo" resultMap="SysRecipesPlanListInfoResult">
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
</select>
<!-- and review_status = 2 and send_flag = 1-->
<select id="selectRecipesPlanListInfoByCusId" resultMap="SysRecipesPlanListInfoResult">
select id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, subscribed from sys_recipes_plan where cus_id=#{cusId} 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 cus_id=#{cusId} and del_flag = 0
</select>
<resultMap type="SysRecipesDaily" id="SysRecipesResult">

View File

@ -12,11 +12,11 @@
<result column="from_role" property="fromRole"/>
<result column="to_uid" property="toUid"/>
<result column="to_role" property="toRole"/>
<!-- <result column="img" property="img" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>-->
<!-- <result column="img" property="img" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>-->
<result column="create_time" property="createTime"/>
<!-- <association property="fromName" column="{uid=from_uid,role=from_role}" select="selectUserInfo"/>-->
<!-- <association property="fromAvatar" column="{uid=from_uid,role=from_role}" select="selectUserAvatar"/>-->
<!-- <association property="toName" column="{uid=to_uid,role=to_role}" select="selectUserInfo"/>-->
<!-- <association property="fromName" column="{uid=from_uid,role=from_role}" select="selectUserInfo"/>-->
<!-- <association property="fromAvatar" column="{uid=from_uid,role=from_role}" select="selectUserAvatar"/>-->
<!-- <association property="toName" column="{uid=to_uid,role=to_role}" select="selectUserInfo"/>-->
<association property="replys" column="id"
select="selectVideoCommentReplyByCommentId"/>
</resultMap>
@ -31,11 +31,11 @@
<result column="to_uid" property="toUid"/>
<result column="to_role" property="toRole"/>
<result column="reply_id" property="replyId"/>
<!-- <result column="img" property="img" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>-->
<!-- <result column="img" property="img" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>-->
<result column="create_time" property="createTime"/>
<!-- <association property="fromName" column="{uid=from_uid,role=from_role}" select="selectUserInfo"/>-->
<!-- <association property="fromAvatar" column="{uid=from_uid,role=from_role}" select="selectUserAvatar"/>-->
<!-- <association property="toName" column="{uid=to_uid,role=to_role}" select="selectUserInfo"/>-->
<!-- <association property="fromName" column="{uid=from_uid,role=from_role}" select="selectUserInfo"/>-->
<!-- <association property="fromAvatar" column="{uid=from_uid,role=from_role}" select="selectUserAvatar"/>-->
<!-- <association property="toName" column="{uid=to_uid,role=to_role}" select="selectUserInfo"/>-->
<!-- <association property="toAvatar" column="{uid=to_uid,role=to_role}" select="selectUserAvatar"/>-->
</resultMap>
@ -137,4 +137,12 @@
</trim>
</insert>
<update id="deleteVideoCommentById" parameterType="String">
update sys_nutritional_video_comment set del_flag = 1 where id = #{id}
</update>
<update id="deleteVideoCommentReplyById" parameterType="String">
update sys_nutritional_video_reply set del_flag = 1 where id = #{id}
</update>
</mapper>