Browse Source

Merge remote-tracking branch 'origin/master_179_20250814' into master_179_20250814

xgb 4 days ago
parent
commit
9705ee79ff

+ 15 - 0
fs-user-app/src/main/java/com/fs/app/controller/FoodRecordController.java

@@ -44,6 +44,7 @@ public class FoodRecordController extends AppBaseController {
     @ApiOperation("获取饮食记录详情")
     @GetMapping("/getRecordInfo/{id}")
     public R getRecordInfo(@PathVariable Long id, HttpServletRequest request) {
+        log.info("获取饮食记录详情 参数: {}",id);
         try {
             FsFoodRecord record = foodRecordService.selectFsFoodRecordById(id);
             if (record == null || !record.getUserId().equals(Long.parseLong(getUserId()))) {
@@ -65,6 +66,8 @@ public class FoodRecordController extends AppBaseController {
     @GetMapping("/getDayRecords")
     public R getDayRecords(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate recordDate,
                           HttpServletRequest request) {
+        log.info("获取某日饮食记录列表 参数: {}",recordDate);
+
         try {
             Long userId = Long.parseLong(getUserId());
             List<FsFoodRecord> list = foodRecordService.selectFoodRecordsByUserAndDate(userId, recordDate);
@@ -84,6 +87,8 @@ public class FoodRecordController extends AppBaseController {
     @ApiOperation("获取用户饮食记录列表")
     @PostMapping("/getMyRecordList")
     public R getMyRecordList(@RequestBody FoodRecordQueryParam param, HttpServletRequest request) {
+        log.info("获取用户饮食记录列表 参数: {}",param);
+
         try {
             PageHelper.startPage(param.getPageNum(), param.getPageSize());
             param.setUserId(param.getUserId());
@@ -102,6 +107,8 @@ public class FoodRecordController extends AppBaseController {
     @ApiOperation("新增饮食记录")
     @PostMapping("/addRecord")
     public R addRecord(@RequestBody @Valid FoodRecordAddParam param, HttpServletRequest request) {
+        log.info("新增饮食记录 参数: {}",param);
+
         try {
             log.info("【新增饮食记录】:{}", param);
 
@@ -130,6 +137,8 @@ public class FoodRecordController extends AppBaseController {
     @ApiOperation("修改饮食记录")
     @PostMapping("/editRecord")
     public R editRecord(@RequestBody @Valid FoodRecordEditParam param, HttpServletRequest request) {
+        log.info("修改饮食记录 参数: {}",param);
+
         try {
             log.info("【修改饮食记录】:{}", param);
 
@@ -160,6 +169,8 @@ public class FoodRecordController extends AppBaseController {
     @ApiOperation("删除饮食记录")
     @PostMapping("/deleteRecord/{id}")
     public R deleteRecord(@PathVariable("id") Long id, HttpServletRequest request) {
+        log.info("删除饮食记录 参数: {}",id);
+
         try {
             // 验证记录是否存在且属于当前用户
             FsFoodRecord existRecord = foodRecordService.selectFsFoodRecordById(id);
@@ -186,6 +197,8 @@ public class FoodRecordController extends AppBaseController {
     public R getRecordStats(@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startDate,
                            @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate,
                            HttpServletRequest request) {
+        log.info("获取饮食记录统计 参数: {} {}",startDate,endDate);
+
         try {
             Long userId = Long.parseLong(getUserId());
             Map<String, Object> stats = foodRecordService.getFoodRecordStats(userId, startDate, endDate);
@@ -202,6 +215,8 @@ public class FoodRecordController extends AppBaseController {
     @ApiOperation("管理端查询饮食记录")
     @GetMapping("/admin/list")
     public TableDataInfo adminList(FoodRecordQueryParam param) {
+        log.info("管理端查询饮食记录 参数: {}",param);
+
         startPage();
         List<FsFoodRecord> list = foodRecordService.selectFoodRecordList(param);
         return getDataTable(list);

+ 13 - 3
fs-user-app/src/main/java/com/fs/app/controller/FsComplaintController.java

@@ -11,6 +11,7 @@ import com.fs.complaint.service.FsComplaintService;
 import com.fs.complaint.vo.ComplaintVO;
 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.*;
 
@@ -19,6 +20,7 @@ import java.util.List;
 @Api("投诉接口")
 @RestController
 @RequestMapping(value="/app/complaint")
+@Slf4j
 public class FsComplaintController {
 
     @Autowired
@@ -32,6 +34,7 @@ public class FsComplaintController {
      */
     @GetMapping("/category")
     public R getComplaintCategory(){
+        log.info("获取所有投诉类型");
         List<FsComplaintCategory> fsComplaintCategories = fsComplaintCategoryMapper.selectAll();
         return R.ok().put("data", fsComplaintCategories);
     }
@@ -42,10 +45,12 @@ public class FsComplaintController {
      */
     @PostMapping("/submitComplaint")
     public R submitComplaint(@RequestBody SubmitComplaintDTO dto){
+        log.info("提交投诉 参数: {}",dto);
+
         fsComplaintService.submitComplaint(dto);
         return R.ok();
     }
-    
+
     /**
      * 分页查询投诉列表
      * @param queryDTO 查询条件
@@ -54,10 +59,12 @@ public class FsComplaintController {
     @ApiOperation("分页查询投诉列表")
     @PostMapping("/list")
     public R getComplaintList(@RequestBody ComplaintQueryDTO queryDTO) {
+        log.info("分页查询投诉列表 参数: {}",queryDTO);
+
         List<FsComplaint> list = fsComplaintService.getComplaintPage(queryDTO);
         return R.ok().put("data", list);
     }
-    
+
     /**
      * 获取投诉详情
      * @param id 投诉ID
@@ -66,10 +73,11 @@ public class FsComplaintController {
     @ApiOperation("获取投诉详情")
     @GetMapping("/{id}")
     public R getComplaintDetail(@PathVariable Long id) {
+        log.info("获取投诉详情 参数: {}",id);
         ComplaintVO complaint = fsComplaintService.getComplaintById(id);
         return R.ok().put("data", complaint);
     }
-    
+
     /**
      * 修改投诉信息
      * @param id 投诉ID
@@ -79,6 +87,8 @@ public class FsComplaintController {
     @ApiOperation("修改投诉信息")
     @PutMapping("/{id}")
     public R updateComplaint(@PathVariable Long id, @RequestBody UpdateComplaintDTO dto) {
+        log.info("修改投诉信息 参数: {},{}",id,dto);
+
         fsComplaintService.updateComplaint(id, dto);
         return R.ok();
     }

+ 9 - 0
fs-user-app/src/main/java/com/fs/app/controller/FsServiceGoodsController.java

@@ -7,6 +7,7 @@ import com.fs.saler.service.FsProductInfoService;
 import com.github.pagehelper.PageHelper;
 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.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,6 +18,7 @@ import java.util.List;
 @Api("商品信息")
 @RestController
 @RequestMapping(value="/app/serviceGoods")
+@Slf4j
 public class FsServiceGoodsController {
     @Autowired
     private FsProductInfoService fsProductInfoService;
@@ -27,6 +29,7 @@ public class FsServiceGoodsController {
     @ApiOperation("查看商品列表")
     @PostMapping("/listPage")
     public R listPage(@RequestBody ProductInfoListPageParam param) {
+        log.info("查看商品列表 参数: {}",param);
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
         List<FsProductInfo> list = fsProductInfoService.getAll(param);
         PageInfo<FsProductInfo> pageInfo = new PageInfo<>(list);
@@ -38,6 +41,7 @@ public class FsServiceGoodsController {
     @ApiOperation("查看商品详情")
     @PostMapping("/findById")
     public R findById(@RequestBody ProductInfoListPageParam param) {
+        log.info("查看商品详情 参数: {}",param);
         FsProductInfo productInfo = fsProductInfoService.getById(param.getId());
         return R.ok().put("data", productInfo);
     }
@@ -47,6 +51,7 @@ public class FsServiceGoodsController {
     @ApiOperation("新增商品")
     @PostMapping("/save")
     public R save(@RequestBody FsProductInfo productInfo) {
+        log.info("新增商品 参数: {}",productInfo);
         boolean result = fsProductInfoService.save(productInfo);
         return result ? R.ok() : R.error("新增商品失败");
     }
@@ -56,6 +61,8 @@ public class FsServiceGoodsController {
     @ApiOperation("更新商品信息")
     @PostMapping("/updateById")
     public R updateById(@RequestBody FsProductInfo productInfo) {
+        log.info("更新商品信息 参数: {}",productInfo);
+
         boolean result = fsProductInfoService.update(productInfo);
         return result ? R.ok() : R.error("更新商品信息失败");
     }
@@ -65,6 +72,8 @@ public class FsServiceGoodsController {
     @ApiOperation("删除商品")
     @PostMapping("/deleteById")
     public R deleteById(@RequestBody ProductInfoListPageParam param) {
+        log.info("删除商品 参数: {}",param);
+
         boolean result = fsProductInfoService.removeById(param.getId());
         return result ? R.ok() : R.error("删除商品失败");
     }

+ 1 - 0
fs-user-app/src/main/java/com/fs/app/controller/FsTodoItemsController.java

@@ -31,6 +31,7 @@ public class FsTodoItemsController extends BaseController {
     @ApiOperation("获取类型统计(各个类型的百分比)")
     @GetMapping("/queryCateStatis")
     public R queryCateStatis(){
+        log.info("获取类型统计(各个类型的百分比)");
         Map<Long, TodoCategoryStatisticsDTO> cateStatis = fsTodoItemsService.queryCateStatis();
 
         return R.ok().put("data",cateStatis);

+ 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) {

+ 63 - 39
fs-user-app/src/main/java/com/fs/app/controller/store/UserScrmController.java

@@ -115,95 +115,119 @@ public class UserScrmController extends AppBaseController {
     @ApiOperation("获取推荐海报")
     @GetMapping("/getTuiImg")
     public R getTuiImg(HttpServletRequest request){
+        log.info("开始获取推荐海报");
         try {
-            FsUserScrm user=userService.selectFsUserById(Long.parseLong(getUserId()));
+            String userId = getUserId();
+            log.info("获取用户ID: {}", userId);
+            FsUserScrm user = userService.selectFsUserById(Long.parseLong(userId));
+            log.info("查询到用户信息: 用户ID={}, 昵称={}", userId, user.getNickname());
+
             if(StringUtils.isEmpty(user.getUserCode())){
-                FsUserScrm userMap=new FsUserScrm();
+                log.info("用户邀请码为空,开始生成新的邀请码");
+                FsUserScrm userMap = new FsUserScrm();
                 userMap.setUserId(user.getUserId());
                 userMap.setUserCode(OrderUtils.genUserCode());
                 userService.updateFsUser(userMap);
                 user.setUserCode(userMap.getUserCode());
+                log.info("成功生成并更新用户邀请码: {}", userMap.getUserCode());
             }
+
             File newFile = new File("fx.jpg");
             File newFileT = new File("simsunb.ttf");
             try {
-                InputStream stream =  getClass().getClassLoader().getResourceAsStream("fx.jpg");
+                log.info("开始加载海报模板图片");
+                InputStream stream = getClass().getClassLoader().getResourceAsStream("fx.jpg");
                 FileUtils.copyInputStreamToFile(stream, newFile);
-                // if(!newFile.exists()){
-                //     InputStream stream =  getClass().getClassLoader().getResourceAsStream("fx.jpg");
-                //     FileUtils.copyInputStreamToFile(stream, newFile);
-                // }
+                log.info("海报模板图片加载成功: {}", newFile.getAbsolutePath());
+
                 if(!newFileT.exists()){
-                    InputStream streamT =  getClass().getClassLoader()
-                            .getResourceAsStream("simsunb.ttf");
+                    log.info("开始加载字体文件");
+                    InputStream streamT = getClass().getClassLoader().getResourceAsStream("simsunb.ttf");
                     FileUtils.copyInputStreamToFile(streamT, newFileT);
+                    log.info("字体文件加载成功: {}", newFileT.getAbsolutePath());
                 }
             } catch (IOException e) {
-
+                log.error("加载资源文件失败: {}", e.getMessage(), e);
                 throw new CustomException(e.getMessage());
             }
-
             try {
-                String url=fsConfig.getTuiImgPath()+"/tui-"+getUserId()+".jpg";
+                String url = fsConfig.getTuiImgPath()+"/tui-"+getUserId()+".jpg";
+                log.info("开始生成用户海报,输出路径: {}", url);
+
                 File outputFile = new File(url);
-                if(!outputFile.exists())
-                {
+                if(!outputFile.exists()) {
                     try {
                         outputFile.createNewFile();
-
+                        log.info("创建海报输出文件成功");
                     } catch (IOException e) {
+                        log.error("创建海报输出文件失败: {}", e.getMessage(), e);
                         e.printStackTrace();
                     }
                 }
-                Font font =  Font.createFont(Font.TRUETYPE_FONT, newFileT);
-                Font f= font.deriveFont(Font.PLAIN,50);
-                ImgUtil.pressText(//
+
+                Font font = Font.createFont(Font.TRUETYPE_FONT, newFileT);
+                Font f = font.deriveFont(Font.PLAIN,50);
+                log.info("开始向海报添加用户昵称文本");
+                ImgUtil.pressText(
                         newFile,
                         outputFile,
                         user.getNickname()+"邀您加入",
                         Color.BLACK,
-                        f, //字体
-                        -60, //x坐标修正值。 默认在中间,偏移量相对于中间偏移
-                        900, //y坐标修正值。 默认在中间,偏移量相对于中间偏移
-                        0.8f//透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字
+                        f,
+                        -60,
+                        900,
+                        0.8f
                 );
-                ImgUtil.pressText(//
+
+                log.info("开始向海报添加邀请码文本: {}", user.getUserCode());
+                ImgUtil.pressText(
                         outputFile,
                         outputFile,
-                         "邀请码:"+user.getUserCode(),
+                        "邀请码:"+user.getUserCode(),
                         Color.BLACK,
-                        f, //字体
-                        -40, //x坐标修正值。 默认在中间,偏移量相对于中间偏移
-                        1000, //y坐标修正值。 默认在中间,偏移量相对于中间偏移
-                        0.8f//透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字
+                        f,
+                        -40,
+                        1000,
+                        0.8f
                 );
-                File qr = new File(fsConfig.getTuiImgPath()+"/qr-"+getUserId()+".png");
-                if(!qr.exists())
-                {
+
+                String qrPath = fsConfig.getTuiImgPath()+"/qr-"+getUserId()+".png";
+                File qr = new File(qrPath);
+                log.info("开始生成二维码图片: {}", qrPath);
+                if(!qr.exists()) {
                     try {
                         qr.createNewFile();
-
+                        log.info("创建二维码输出文件成功");
                     } catch (IOException e) {
+                        log.error("创建二维码输出文件失败: {}", e.getMessage(), e);
                         e.printStackTrace();
                     }
                 }
-                QrCodeUtil.generate(fsConfig.getUrl()+"/distribution?userCode="+user.getUserCode(), 300, 300,
-                        FileUtil.file(fsConfig.getTuiImgPath()+"/qr-"+getUserId()+".png"));
+
+                String qrContent = fsConfig.getUrl()+"/distribution?userCode="+user.getUserCode();
+                log.info("生成二维码内容: {}", qrContent);
+                QrCodeUtil.generate(qrContent, 300, 300, FileUtil.file(qrPath));
+
+                log.info("开始将二维码图片合并到海报");
                 ImgUtil.pressImage(
                         outputFile,
                         outputFile,
-                        ImgUtil.read(qr), //QR图片
-                        -400, //x坐标修正值。 默认在中间,偏移量相对于中间偏移
-                        900, //y坐标修正值。 默认在中间,偏移量相对于中间偏移
+                        ImgUtil.read(qr),
+                        -400,
+                        900,
                         1f
                 );
-                return R.ok().put("url","profile/tui/tui-"+getUserId()+".jpg");
+
+                String resultUrl = "profile/tui/tui-"+getUserId()+".jpg";
+                log.info("海报生成完成,返回URL: {}", resultUrl);
+                return R.ok().put("url", resultUrl);
             } catch (Exception e) {
+                log.error("生成海报过程出现异常: {}", e.getMessage(), e);
                 e.printStackTrace();
                 return R.error("操作异常");
             }
         } catch (Exception e){
-
+            log.error("获取推荐海报失败: {}", e.getMessage(), e);
             return R.error("操作异常");
         }
     }