功能更新
parent
51993a6e59
commit
cf7532a1f5
|
@ -29,11 +29,11 @@ public class ResponseComment {
|
||||||
*/
|
*/
|
||||||
private Date commentTime;
|
private Date commentTime;
|
||||||
/**
|
/**
|
||||||
* 发布评论患者Id
|
* 患者Id
|
||||||
*/
|
*/
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
/**
|
/**
|
||||||
* 送礼用户名
|
* 用户名
|
||||||
*/
|
*/
|
||||||
private String userName;
|
private String userName;
|
||||||
/**
|
/**
|
||||||
|
@ -52,4 +52,8 @@ public class ResponseComment {
|
||||||
* 礼物名称
|
* 礼物名称
|
||||||
*/
|
*/
|
||||||
private String giftName;
|
private String giftName;
|
||||||
|
/**
|
||||||
|
* 礼物图片
|
||||||
|
*/
|
||||||
|
private String giftPicture;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,10 +62,10 @@ public class CommentController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/giftList")
|
@GetMapping("/giftList")
|
||||||
public Result<List<Gift>> giftList(){
|
public Result<List<Gift>> giftList(){
|
||||||
log.info("功能名称:查询礼物记录,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
log.info("功能名称:查询礼物详情,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||||
request.getMethod());
|
request.getMethod());
|
||||||
Result<List<Gift>> result = commentServlce.giftList();
|
Result<List<Gift>> result = commentServlce.giftList();
|
||||||
log.info("功能名称:查询礼物记录,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
log.info("功能名称:查询礼物详情,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||||
request.getMethod());
|
request.getMethod());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -144,5 +144,42 @@ public class CommentController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:根据id查询评论详情
|
||||||
|
No such property: code for class: Script1
|
||||||
|
* @return: com.grail.common.core.domain.Result
|
||||||
|
* @Author: YHY
|
||||||
|
* @Updator: YHY
|
||||||
|
* @Date 2023/11/1 9:20
|
||||||
|
*/
|
||||||
|
@GetMapping("/findCommentById/{commentId}")
|
||||||
|
public Result findCommentById(@PathVariable Integer commentId){
|
||||||
|
log.info("功能名称:根据id查询评论详情,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod());
|
||||||
|
ResponseComment comment = commentServlce.findCommentById(commentId);
|
||||||
|
Result result = Result.success(comment);
|
||||||
|
log.info("功能名称:根据id查询评论详情,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod(),JSONObject.toJSONString(result));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:医生查看礼物信息
|
||||||
|
No such property: code for class: Script1
|
||||||
|
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.response.ResponseComment>>
|
||||||
|
* @Author: YHY
|
||||||
|
* @Updator: YHY
|
||||||
|
* @Date 2023/11/1 13:56
|
||||||
|
*/
|
||||||
|
@GetMapping("/findDoctorGift")
|
||||||
|
public Result<List<ResponseComment>> findDoctorGift(){
|
||||||
|
log.info("功能名称:医生查看礼物信息,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod());
|
||||||
|
Result<List<ResponseComment>> result = commentServlce.findDoctorGift();
|
||||||
|
log.info("功能名称:医生查看礼物信息,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
|
request.getMethod(),JSONObject.toJSONString(result));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,4 +30,7 @@ public interface CommentMapper {
|
||||||
|
|
||||||
int deleteGiftById(@Param("giftId") Integer giftId);
|
int deleteGiftById(@Param("giftId") Integer giftId);
|
||||||
|
|
||||||
|
ResponseComment findCommentById(@Param("commentId") Integer commentId);
|
||||||
|
|
||||||
|
List<ResponseComment> findDoctorGift();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,8 @@ public interface CommentServlce {
|
||||||
Result addGift(Gift gift);
|
Result addGift(Gift gift);
|
||||||
|
|
||||||
Result deleteGiftById(Integer giftId);
|
Result deleteGiftById(Integer giftId);
|
||||||
|
|
||||||
|
ResponseComment findCommentById(Integer commentId);
|
||||||
|
|
||||||
|
Result<List<ResponseComment>> findDoctorGift();
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,5 +100,16 @@ public class CommentServlceimpl implements CommentServlce {
|
||||||
return i>0?Result.success(200,"礼物已下架"):Result.success(500,"礼物下架失败");
|
return i>0?Result.success(200,"礼物已下架"):Result.success(500,"礼物下架失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseComment findCommentById(Integer commentId) {
|
||||||
|
return commentMapper.findCommentById(commentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<ResponseComment>> findDoctorGift() {
|
||||||
|
List<ResponseComment> list = commentMapper.findDoctorGift();
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,12 +40,21 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="commentList" resultType="com.grail.publice.domain.response.ResponseComment">
|
<select id="commentList" resultType="com.grail.publice.domain.response.ResponseComment">
|
||||||
select t_comment.*,gift_name,user_name from t_comment left join
|
select t_comment.*,user_name,gift_name,gift_picture from t_comment left join
|
||||||
t_gift on t_comment.gift_id=t_gift.gift_id left join t_user
|
t_gift on t_comment.gift_id=t_gift.gift_id left join t_user
|
||||||
on t_comment.user_id=t_user.user_id
|
on t_comment.user_id=t_user.user_id
|
||||||
</select>
|
</select>
|
||||||
<select id="giftList" resultType="com.grail.publice.domain.Gift">
|
<select id="giftList" resultType="com.grail.publice.domain.Gift">
|
||||||
select * from t_gift
|
select * from t_gift
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findCommentById" resultType="com.grail.publice.domain.response.ResponseComment">
|
||||||
|
select t_comment.*,user_name,gift_picture from t_comment left join
|
||||||
|
t_gift on t_comment.gift_id=t_gift.gift_id left join t_user
|
||||||
|
on t_comment.user_id=t_user.user_id where comment_id=#{commentId}
|
||||||
|
</select>
|
||||||
|
<select id="findDoctorGift" resultType="com.grail.publice.domain.response.ResponseComment">
|
||||||
|
select comment_time,user_name,gift_name,gift_picture from t_comment left join t_gift on
|
||||||
|
t_comment.gift_id=t_gift.gift_id left join t_user on t_comment.user_id=t_user.user_id
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue