Browse Source

fix: 日志添加

xdd 4 days ago
parent
commit
69aae4a65c

+ 13 - 0
fs-user-app/src/main/java/com/fs/app/controller/medical/MedicalIndicatorController.java

@@ -42,6 +42,7 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("查询所有启用的指标")
     @GetMapping("/listEnabled")
     public R listAllEnabled() {
+        log.info("查询所有启用的指标");
         try {
             List<MedicalIndicator> list = medicalIndicatorService.listAllEnabled();
             return R.ok().put("data",list);
@@ -57,6 +58,8 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("分页查询医疗指标列表")
     @GetMapping("/page")
     public R page(MedicalIndicatorQueryDto queryDto) {
+        log.info("分页查询医疗指标列表 参数: {}",queryDto);
+
         try {
             PageHelper.startPage(queryDto.getPageNum(), queryDto.getPageSize());
             List<MedicalIndicator> list = medicalIndicatorService.selectPageList(queryDto);
@@ -74,6 +77,8 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("根据分类查询指标")
     @GetMapping("/listByCategory")
     public R listByCategory(@RequestParam String category) {
+        log.info("根据分类查询指标 参数: {}",category);
+
         try {
             List<MedicalIndicator> list = medicalIndicatorService.listByCategory(category);
             return R.ok().put("data",list);
@@ -89,6 +94,8 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("根据ID查询指标详情")
     @GetMapping("/{indicatorId}")
     public R getById(@PathVariable("indicatorId") Long indicatorId) {
+        log.info("根据ID查询指标详情 参数: {}",indicatorId);
+
         try {
             MedicalIndicator indicator = medicalIndicatorService.getById(indicatorId);
             return R.ok().put("data",indicator);
@@ -106,6 +113,8 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("新增指标")
     @PostMapping("/add")
     public R add(@RequestBody MedicalIndicator indicator) {
+        log.info("新增指标 参数: {}",indicator);
+
         try {
             boolean result = medicalIndicatorService.save(indicator);
             if (result) {
@@ -127,6 +136,8 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("更新指标")
     @PutMapping("/update")
     public R update(@RequestBody MedicalIndicator indicator) {
+        log.info("更新指标 参数: {}",indicator);
+
         try {
             boolean result = medicalIndicatorService.update(indicator);
             if (result) {
@@ -147,6 +158,8 @@ public class MedicalIndicatorController extends AppBaseController {
     @ApiOperation("删除指标")
     @DeleteMapping("/{indicatorId}")
     public R delete(@PathVariable("indicatorId") Long indicatorId) {
+        log.info("删除指标 参数: {}",indicatorId);
+
         try {
             boolean result = medicalIndicatorService.deleteById(indicatorId);
             if (result) {

+ 17 - 0
fs-user-app/src/main/java/com/fs/app/controller/medical/PhysicalExamReportController.java

@@ -13,6 +13,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +32,7 @@ import java.util.List;
 @Api("体检报告")
 @RestController
 @RequestMapping("/app/medical/report")
+@Slf4j
 public class PhysicalExamReportController extends AppBaseController {
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
@@ -44,6 +46,7 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("查询用户体检报告列表")
     @GetMapping("/listByUser/{userId}")
     public R listByUserId(@PathVariable("userId") Long userId) {
+        log.info("查询用户体检报告列表 {}",userId);
         try {
             List<PhysicalExamReport> list = physicalExamReportService.listByUserId(userId);
             return R.ok().put("data",list);
@@ -60,6 +63,8 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("分页查询体检报告列表")
     @GetMapping("/page")
     public R page(PhysicalExamReportQueryDto queryDto) {
+        log.info("分页查询体检报告列表 {}",queryDto);
+
         try {
             PageHelper.startPage(queryDto.getPageNum(), queryDto.getPageSize());
             List<PhysicalExamReport> list = physicalExamReportService.selectPageList(queryDto);
@@ -80,6 +85,8 @@ public class PhysicalExamReportController extends AppBaseController {
     public R getByUserIdAndDate(
             @RequestParam Long userId,
             @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date examDate) {
+        log.info("根据用户ID和体检日期查询体检报告 {} {}",userId,examDate);
+
         try {
             PhysicalExamReport report = physicalExamReportService.getByUserIdAndDate(userId, examDate);
             return R.ok().put("data",report);
@@ -95,6 +102,8 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("对比报告")
     @PostMapping("/compareReport")
     public R compareReport(@RequestBody PhysicalExamReportCompareDto reportCompareDto){
+        log.info("对比报告 {}",reportCompareDto);
+
         try {
             Object result = physicalExamReportService.compareReport(reportCompareDto);
             return R.ok().put("data", result);
@@ -110,6 +119,8 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("查询体检报告详情")
     @GetMapping("/{reportId}")
     public R getById(@PathVariable("reportId") Long reportId) {
+        log.info("查询体检报告详情 {}",reportId);
+
         try {
             PhysicalExamReport report = physicalExamReportService.getById(reportId);
             return R.ok().put("data",report);
@@ -127,6 +138,8 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("新增体检报告")
     @PostMapping("/add")
     public R add(@RequestBody PhysicalExamReport report) {
+        log.info("新增体检报告 {}",report);
+
         try {
             boolean result = physicalExamReportService.save(report);
             if (result) {
@@ -148,6 +161,8 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("更新体检报告")
     @PutMapping("/update")
     public R update(@RequestBody PhysicalExamReport report) {
+        log.info("更新体检报告 {}",report);
+
         try {
             boolean result = physicalExamReportService.update(report);
             if (result) {
@@ -168,6 +183,8 @@ public class PhysicalExamReportController extends AppBaseController {
     @ApiOperation("删除体检报告")
     @DeleteMapping("/{reportId}")
     public R delete(@PathVariable("reportId") Long reportId) {
+        log.info("删除体检报告 {}",reportId);
+
         try {
             boolean result = physicalExamReportService.deleteById(reportId);
             if (result) {

+ 19 - 0
fs-user-app/src/main/java/com/fs/app/controller/medical/ReportIndicatorResultController.java

@@ -16,6 +16,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -32,6 +33,7 @@ import java.util.List;
 @Api("报告指标检查")
 @RestController
 @RequestMapping("/app/medical/result")
+@Slf4j
 public class ReportIndicatorResultController extends AppBaseController {
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
@@ -47,6 +49,7 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("根据报告ID查询所有指标结果")
     @GetMapping("/listByReport/{reportId}")
     public R listByReportId(@PathVariable("reportId") Long reportId) {
+        log.info("根据报告ID查询所有指标结果 {}",reportId);
         try {
             List<ReportIndicatorResult> list = reportIndicatorResultService.listByReportId(reportId);
             return R.ok().put("data",list);
@@ -63,6 +66,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("分页查询报告指标检查结果列表")
     @GetMapping("/page")
     public R page(ReportIndicatorResultQueryDto queryDto) {
+        log.info("分页查询报告指标检查结果列表 {}",queryDto);
+
         try {
             PageHelper.startPage(queryDto.getPageNum(), queryDto.getPageSize());
             List<ReportIndicatorResult> list = reportIndicatorResultService.selectPageList(queryDto);
@@ -81,6 +86,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("根据指标ID查询所有结果")
     @GetMapping("/listByIndicator/{indicatorId}")
     public R listByIndicatorId(@PathVariable("indicatorId") Long indicatorId) {
+        log.info("根据指标ID查询所有结果 {}",indicatorId);
+
         try {
             List<ReportIndicatorResult> list = reportIndicatorResultService.listByIndicatorId(indicatorId);
             return R.ok().put("data",list);
@@ -97,6 +104,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("查询检查结果详情")
     @GetMapping("/{resultId}")
     public R getById(@PathVariable("resultId") Long resultId) {
+        log.info("查询检查结果详情 {}",resultId);
+
         try {
             ReportIndicatorResult result = reportIndicatorResultService.getById(resultId);
             MedicalIndicator indicator = null;
@@ -118,6 +127,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("新增检查结果")
     @PostMapping("/add")
     public R add(@RequestBody ReportIndicatorResult result) {
+        log.info("新增检查结果 {}",result);
+
         try {
             boolean success = reportIndicatorResultService.save(result);
             if (success) {
@@ -135,6 +146,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("获取指定报告的指标分类")
     @GetMapping("/getAllCateByReportId")
     public R getAllIndicatorByReportId(@RequestParam("reportId") Long reportId) {
+        log.info("获取指定报告的指标分类 {}",reportId);
+
         List<ReportAllIndicatorCateDTO> allIndicatorByReportId = reportIndicatorResultService.getAllIndicatorByReportId(reportId);
         return R.ok().put("data",allIndicatorByReportId);
     }
@@ -146,6 +159,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("批量新增检查结果")
     @PostMapping("/batchAdd")
     public R batchAdd(@RequestBody List<ReportIndicatorResult> results) {
+        log.info("批量新增检查结果 {}",results);
+
         try {
             int successCount = 0;
             for (ReportIndicatorResult result : results) {
@@ -172,6 +187,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("更新检查结果")
     @PutMapping("/update")
     public R update(@RequestBody ReportIndicatorResult result) {
+        log.info("更新检查结果 {}",result);
+
         try {
             boolean success = reportIndicatorResultService.update(result);
             if (success) {
@@ -192,6 +209,8 @@ public class ReportIndicatorResultController extends AppBaseController {
     @ApiOperation("删除检查结果")
     @DeleteMapping("/{resultId}")
     public R delete(@PathVariable("resultId") Long resultId) {
+        log.info("删除检查结果 {}",resultId);
+
         try {
             boolean success = reportIndicatorResultService.deleteById(resultId);
             if (success) {

+ 6 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/PrescribeScrmController.java

@@ -25,6 +25,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.validation.annotation.Validated;
@@ -38,6 +39,7 @@ import java.util.List;
 @Api("处方接口")
 @RestController
 @RequestMapping(value="/store/app/prescribe")
+@Slf4j
 public class PrescribeScrmController extends AppBaseController {
     @Autowired
     private WxPayProperties wxPayProperties;
@@ -60,6 +62,7 @@ public class PrescribeScrmController extends AppBaseController {
     @ApiOperation("获取我的处方列表")
     @GetMapping("/getMyPrescribeList")
     public R getMyPrescribeList(FsPrescribeQueryParam param, HttpServletRequest request){
+        log.info("处方接口 参数: {}",param);
         PageHelper.startPage(param.getPage(), param.getPageSize());
         param.setUserId(Long.parseLong(getUserId()));
         List<FsPrescribeVO> list=prescribeService.selectFsPrescribeListQuery(param);
@@ -75,6 +78,8 @@ public class PrescribeScrmController extends AppBaseController {
     @ApiOperation("开处方")
     @PostMapping("/doPrescribe")
     public R doPrescribe(@Validated @RequestBody FsPrescribeParam param, HttpServletRequest request){
+        log.info("开处方 参数: {}",param);
+
         return prescribeService.doPrescribe(Long.parseLong(getUserId()),param);
     }
 
@@ -82,6 +87,7 @@ public class PrescribeScrmController extends AppBaseController {
     @PostMapping(value="/presribeNotify")
     public String presribeNotify(HttpServletRequest request,@RequestBody String jsonBody) throws Exception
     {
+        log.info("处方开方通知 参数: {}",jsonBody);
         // 封装JSON请求
         //{"msg":"成功","code":1000,"data":{"rp_id":"202203151003300001","order_id":null,"depart_name":"内科","doctor_name":"测试账号","pharmacist_name":null,"rp_url":"https://asset.nxk520.com/202203-go/C2203151057038646.png","diagnose":"眼睑带状疱疹","rp_msg":"已开方","audit_reason":null,"drugInfo":[{"drug_name":"维力青 恩替卡韦分散片 0.5mg*7片","sale_amount":1,"drug_specification":"0.5mg*7片"}],"create_date":"2022-03-15 10:03:30","pharmacy_code":"00001","pharmacy_name":"测试门店","doctor_id":"383"}}
         JSONObject json = JSON.parseObject(jsonBody);

+ 4 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/UserCourseComplaintScrmController.java

@@ -9,6 +9,7 @@ import com.fs.course.service.IFsUserCourseComplaintTypeService;
 import com.fs.course.vo.FsUserCourseComplaintTypeListVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -17,6 +18,7 @@ import java.util.List;
 @Api("看课投诉相关接口")
 @RestController
 @RequestMapping("/store/app/user/complaint")
+@Slf4j
 public class UserCourseComplaintScrmController extends AppBaseController {
 
     @Autowired
@@ -29,6 +31,7 @@ public class UserCourseComplaintScrmController extends AppBaseController {
     @ApiOperation("获取投诉类型")
     @GetMapping("/getTypeTree")
     public R getTypeTree() {
+        log.info("获取投诉类型");
         List<FsUserCourseComplaintTypeListVO> allComplaintTypeTree = fsUserCourseComplaintTypeService.getAllComplaintTypeTree();
         return R.ok().put("data", allComplaintTypeTree);
     }
@@ -37,6 +40,7 @@ public class UserCourseComplaintScrmController extends AppBaseController {
     @ApiOperation("提交反馈记录")
     @PostMapping("/record")
     public R submitRecord(@RequestBody UserCourseComplaintRecordParam param) {
+        log.info("提交反馈记录 {}",param);
         param.setUserId(Long.parseLong(getUserId()));
         int i = fsUserCourseComplaintRecordService.submitRecord(param);
         if (i > 0) {