From 1e01fce66db199ace9123bdd6b68ebc170e1bd78 Mon Sep 17 00:00:00 2001 From: shiyang Date: Wed, 22 Sep 2021 09:56:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=E7=82=B9=E9=98=85=E8=AF=BB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ArticleController.java | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java index 5fb7941..bfc30dc 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java @@ -1,5 +1,6 @@ package com.lyms.talkonlineweb.controller; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.lyms.talkonlineweb.domain.*; @@ -12,10 +13,7 @@ import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.codec.multipart.Part; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import java.io.File; @@ -198,5 +196,25 @@ public class ArticleController { } return baseResponse; } + /** + * 根据患者id,问诊id,状态类型1为已读更新推送文章记录 + */ + @PostMapping("updatePushedartlogs") + public BaseResponse updatePushedartlogs(@RequestBody LymsPushedart pushedart) { + BaseResponse baseResponse=new BaseResponse(); + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("pid",pushedart.getPid()).eq("aid", pushedart.getAid()); + boolean f=lymsPushedartService.update(pushedart,updateWrapper); + baseResponse.setErrorcode(f==true?0:1); + baseResponse.setErrormsg(f==true?"成功":"失败"); + } catch (Exception e) { + baseResponse.setErrorcode(1); + baseResponse.setErrormsg("失败"); + e.printStackTrace(); + } + + return baseResponse; + } } -- 1.8.3.1