Commit 1e01fce66db199ace9123bdd6b68ebc170e1bd78
1 parent
334e792164
Exists in
master
患者点阅读修改状态
Showing 1 changed file with 22 additions and 4 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java
View file @
1e01fce
| 1 | 1 | package com.lyms.talkonlineweb.controller; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | |
| 3 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 5 | 6 | import com.lyms.talkonlineweb.domain.*; |
| ... | ... | @@ -12,10 +13,7 @@ |
| 12 | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | 14 | import org.springframework.beans.factory.annotation.Value; |
| 14 | 15 | import org.springframework.http.codec.multipart.Part; |
| 15 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 16 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 17 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 18 | -import org.springframework.web.bind.annotation.RestController; | |
| 16 | +import org.springframework.web.bind.annotation.*; | |
| 19 | 17 | import org.springframework.web.multipart.MultipartFile; |
| 20 | 18 | |
| 21 | 19 | import java.io.File; |
| ... | ... | @@ -196,6 +194,26 @@ |
| 196 | 194 | baseResponse.setErrormsg("失败"); |
| 197 | 195 | e.printStackTrace(); |
| 198 | 196 | } |
| 197 | + return baseResponse; | |
| 198 | + } | |
| 199 | + /** | |
| 200 | + * 根据患者id,问诊id,状态类型1为已读更新推送文章记录 | |
| 201 | + */ | |
| 202 | + @PostMapping("updatePushedartlogs") | |
| 203 | + public BaseResponse updatePushedartlogs(@RequestBody LymsPushedart pushedart) { | |
| 204 | + BaseResponse baseResponse=new BaseResponse(); | |
| 205 | + try { | |
| 206 | + UpdateWrapper<LymsPushedart> updateWrapper = new UpdateWrapper<>(); | |
| 207 | + updateWrapper.eq("pid",pushedart.getPid()).eq("aid", pushedart.getAid()); | |
| 208 | + boolean f=lymsPushedartService.update(pushedart,updateWrapper); | |
| 209 | + baseResponse.setErrorcode(f==true?0:1); | |
| 210 | + baseResponse.setErrormsg(f==true?"成功":"失败"); | |
| 211 | + } catch (Exception e) { | |
| 212 | + baseResponse.setErrorcode(1); | |
| 213 | + baseResponse.setErrormsg("失败"); | |
| 214 | + e.printStackTrace(); | |
| 215 | + } | |
| 216 | + | |
| 199 | 217 | return baseResponse; |
| 200 | 218 | } |
| 201 | 219 |