| | |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ShareMore; |
| | | import com.ruoyi.domain.ZfDoctor; |
| | | import com.ruoyi.domain.ZfDoctorDownload; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | | import com.ruoyi.service.ZfDoctorDownloadService; |
| | | import com.ruoyi.service.ZfDoctorService; |
| | | import com.ruoyi.service.ZfDoctorShareService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/ZfDoctorShare") |
| | |
| | | @Resource |
| | | ZfDoctorShareService zfDoctorShareService; |
| | | |
| | | @Resource |
| | | ZfDoctorService zfDoctorService; |
| | | |
| | | @Resource |
| | | ZInfoUserService zInfoUserService; |
| | | |
| | | @Resource |
| | | ZfDoctorDownloadService zfDoctorDownloadService; |
| | | /** |
| | | * 分享数据 |
| | | */ |
| | |
| | | return zfDoctorShareService.deleteZa(zfDoctor); |
| | | } |
| | | |
| | | /** |
| | | * 下载分享的数据 |
| | | */ |
| | | @PostMapping("/downloadDate") |
| | | public AjaxResult ifDownLoad(@RequestBody ZfDoctorDownload zfDoctorDownload){ |
| | | return zfDoctorDownloadService.addData(zfDoctorDownload); |
| | | } |
| | | |
| | | /** |
| | | * 展示下载分享的数据 |
| | | */ |
| | | @GetMapping("/all") |
| | | public List<ZfDoctor> data(ZfDoctorDownload zfDoctorDownload){ |
| | | List<ZfDoctorDownload> as = zfDoctorDownloadService.selectDoctorList(zfDoctorDownload); |
| | | List<ZfDoctor> bs = new ArrayList<>(); |
| | | for (ZfDoctorDownload a: as) { |
| | | if (zfDoctorService.getById(a.getDownloadContent()) != null) { |
| | | ZfDoctor ds = zfDoctorService.getById(a.getDownloadContent()); |
| | | ds.setShareId(a.getShareId()); |
| | | bs.add(ds); |
| | | } |
| | | } |
| | | return bs; |
| | | } |
| | | |
| | | } |