From c5fcb0e0b95775004e7f14e1dd13aee70d9d4d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= Date: Wed, 18 Oct 2023 15:06:02 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nursingorder/NursingOrderController.java | 14 ++++- .../nursingorder/NursingOrderMapper.java | 20 ++++++ .../nursingorder/INursingOrderService.java | 9 +++ .../impl/NursingOrderServiceImpl.java | 43 +++++++++++++ .../vo/nursingorder/NursingOrderInfoVO.java | 1 - .../applet/vo/nursingorder/PatientOrder.java | 63 +++++++++++++++++++ .../nursingorder/NusringOrderMapper.xml | 41 ++++++++++++ 7 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java index 35a1960..308db93 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java @@ -31,7 +31,7 @@ public class NursingOrderController extends BaseController { private INursingOrderService nursingOrderService; /** - * 根据登录id查询订单列表 + * 根据登录id查询订单列表(暂时不用) */ @GetMapping("/userPage") public TableDataInfo page(Long parentId) { @@ -93,4 +93,16 @@ public class NursingOrderController extends BaseController { } return nursingOrderService.getAppointmentDetailsInfo(orderNo); } + + /** + * 根据openid编号查询对应得订单 + */ + @MobileRequestAuthorization + @GetMapping("/getAppletOrderList") + public AjaxResult getAppletOrderList(Long parentId, String orderStatus) { + if (Objects.isNull(parentId)) { + return AjaxResult.error("请选择要查询的用户信息!"); + } + return nursingOrderService.getAppletOrderList(parentId, orderStatus); + } } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java index bd37450..387d663 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java @@ -3,9 +3,11 @@ package com.xinelu.applet.mapper.nursingorder; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO; +import com.xinelu.applet.vo.nursingorder.PatientOrder; import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO; import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.manage.domain.goodsOrder.GoodsOrder; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -63,4 +65,22 @@ public interface NursingOrderMapper { * @return 护理站信息 */ AppointmentOrderDetailsInfoVO getNurseStationByItemId(Long nurseStationItemId); + + /** + * 根据openid编号查询对应得订单 + * + * @param patientId openid编号 + * @param orderStatus 订单状态 + * @return AjaxResult + */ + List getAppointmentOrderListByParentId(@Param("patientId") Long patientId, @Param("orderStatus") String orderStatus); + + /** + * 根据openid编号查询对应得订单 + * + * @param patientId openid编号 + * @param orderStatus 订单状态 + * @return AjaxResult + */ + List getGoodsOrderAndConsultationOrder(@Param("patientId") Long patientId, @Param("orderStatus") String orderStatus); } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java index 1ea42de..6756d4f 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java @@ -55,4 +55,13 @@ public interface INursingOrderService { * @return 详情信息 */ AjaxResult getAppointmentDetailsInfo(String orderNo); + + /** + * 根据openid编号查询对应得订单 + * + * @param parentId openid编号 + * @param orderStatus 订单状态 + * @return AjaxResult + */ + AjaxResult getAppletOrderList(Long parentId, String orderStatus); } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java index 6756490..250d176 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java @@ -5,17 +5,21 @@ import com.xinelu.applet.mapper.nursingorder.NursingOrderMapper; import com.xinelu.applet.service.nursingorder.INursingOrderService; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO; +import com.xinelu.applet.vo.nursingorder.PatientOrder; import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.enums.ConfirmRefundStatusEnum; import com.xinelu.common.enums.GooodsOrderStatusEnum; +import com.xinelu.common.enums.OrderStatusEnum; import com.xinelu.manage.domain.goodsOrder.GoodsOrder; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -31,6 +35,16 @@ public class NursingOrderServiceImpl implements INursingOrderService { @Resource private NursingOrderMapper nursingOrderMapper; + /** + * 未评价标识 + */ + private final String NOT_EVALUATED = "NOT_EVALUATED"; + + /** + * 未评价标识 + */ + private final String EVALUATED = "EVALUATED"; + /** * 查询个人订单列表并分页 * @@ -107,4 +121,33 @@ public class NursingOrderServiceImpl implements INursingOrderService { } return AjaxResult.success(detailsInfoVO); } + + /** + * 根据openid编号查询对应得订单 + * + * @param parentId openid编号 + * @param orderStatus 订单状态 + * @return AjaxResult + */ + @Override + public AjaxResult getAppletOrderList(Long parentId, String orderStatus) { + List patientOrders = new ArrayList<>(); + List appletOrderList = new ArrayList<>(); + List goodsOrderAndConsultationOrder = new ArrayList<>(); + if (NOT_EVALUATED.equals(orderStatus)) { + appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(parentId, OrderStatusEnum.COMPLETE.getInfo()); + goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(parentId, GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo()); + } + if (EVALUATED.equals(orderStatus)) { + appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(parentId, OrderStatusEnum.EVALUATED.getInfo()); + goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(parentId, GooodsOrderStatusEnum.EVALUATED.getInfo()); + } + if (CollectionUtils.isNotEmpty(appletOrderList)) { + patientOrders.addAll(appletOrderList); + } + if (CollectionUtils.isNotEmpty(goodsOrderAndConsultationOrder)) { + patientOrders.addAll(goodsOrderAndConsultationOrder); + } + return AjaxResult.success(patientOrders); + } } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/NursingOrderInfoVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/NursingOrderInfoVO.java index 065ed8a..edf8519 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/NursingOrderInfoVO.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/NursingOrderInfoVO.java @@ -75,7 +75,6 @@ public class NursingOrderInfoVO extends BaseDomain implements Serializable { */ private BigDecimal nurseItemPrice; - /** * 是否删除标识,0:否,1:是 */ diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java new file mode 100644 index 0000000..ef32417 --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java @@ -0,0 +1,63 @@ +package com.xinelu.applet.vo.nursingorder; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @Description 服务评价 + * @Author zhangheng + * @Date 2022-10-18 + */ + +@Data +public class PatientOrder implements Serializable { + + /** + * 被护理人信息表id + */ + @ApiModelProperty(value = "被护理人信息表id") + private Long patientId; + + /** + * 预约订单编号 + */ + @ApiModelProperty(value = "订单编号") + private String orderNo; + + /** + * 预约订单状态 + */ + @ApiModelProperty(value = "订单状态") + private String orderStatus; + + /** + * 下单时间 + */ + private LocalDateTime createTime; + + /** + * 订单名称 + */ + @ApiModelProperty(value = "订单名称") + private String orderName; + + /** + * 护理站护理项目表id + */ + @ApiModelProperty(value = "护理站护理项目表id") + private Long nurseStationItemId; + + /** + * 护理项目图片地址 + */ + @ApiModelProperty(value = "护理项目图片地址") + private String pictureUrl; + + /** + * 订单类型 + */ + private String orderType; +} diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml index d100995..e907928 100644 --- a/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml +++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml @@ -338,4 +338,45 @@ + + + + \ No newline at end of file From 7b9d49cf1b070e567fc48abab870bf4e5ef86d66 Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Thu, 19 Oct 2023 13:39:47 +0800 Subject: [PATCH 2/6] =?UTF-8?q?update=3D=3D=3D>:=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=AD=9B=E6=9F=A5=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppletScreeningRecordController.java | 11 ++++--- .../impl/ScreeningRecordServiceImpl.java | 29 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java index 01dcb6d..d1d6f24 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java @@ -106,10 +106,13 @@ public class AppletScreeningRecordController extends BaseController { public R detail(@PathVariable String screeningId) { ScreeningRecordVo screeningRecordVo = screeningRecordService.detail(screeningId); if (screeningRecordVo != null) { - File file = new File(screeningRecordVo.getAttachment()); - if (file.exists() && file.isFile()) { - String fileName = file.getName(); - screeningRecordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1)); + if (StringUtils.isNotBlank(screeningRecordVo.getAttachment())){ + String fileDir = XinELuConfig.getProfile() + screeningRecordVo.getAttachment().replaceAll("/profile", ""); + File file = new File(fileDir); + if (file.exists() && file.isFile()) { + String fileName = file.getName(); + screeningRecordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1)); + } } if (!StringUtils.contains(screeningRecordVo.getProjectName(), ScreeningProjectConstants.ALZHEIMER)) { diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java index 0a214af..3f49e70 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java @@ -286,10 +286,13 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { if(recordVo == null) { return null; } - File file = new File(recordVo.getAttachment()); - if (file.exists() && file.isFile()) { - String fileName = file.getName(); - recordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1)); + if(StringUtils.isNotBlank(recordVo.getAttachment())) { + String fileDir = XinELuConfig.getProfile() + recordVo.getAttachment().replaceAll("/profile", ""); + File file = new File(fileDir); + if (file.exists() && file.isFile()) { + String fileName = file.getName(); + recordVo.setFileType(fileName.substring(fileName.lastIndexOf(".") + 1)); + } } if (!StringUtils.contains(recordVo.getProjectName(), ScreeningProjectConstants.ALZHEIMER)) { getRecordDetail(recordVo); @@ -432,16 +435,18 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { /** 获取图片附件转base64 */ private void setAttachment(ScreeningRecordVo record) { - if(!StringUtils.isBlank(record.getAttachment())) { - File file = new File(record.getAttachment()); - if(file.exists()) { - record.setAttachment(FileUtils.PicToBase64(record.getAttachment())); + if(StringUtils.isNotBlank(record.getAttachment())) { + String fileDir = XinELuConfig.getProfile() + record.getAttachment().replaceAll("/profile", ""); + File file = new File(fileDir); + if(file.exists() && file.isFile()) { + record.setAttachment(FileUtils.PicToBase64(fileDir)); } } - if(!StringUtils.isBlank(record.getAttachmentTwo())) { - File file = new File(record.getAttachmentTwo()); - if (file.exists()) { - record.setAttachmentTwo(FileUtils.PicToBase64(record.getAttachmentTwo())); + if(StringUtils.isNotBlank(record.getAttachmentTwo())) { + String fileDir = XinELuConfig.getProfile() + record.getAttachmentTwo().replaceAll("/profile", ""); + File file = new File(fileDir); + if (file.exists() && file.isFile()) { + record.setAttachmentTwo(FileUtils.PicToBase64(fileDir)); } } } From 82ec747dc4fcc810927946cc6a199011a1afe667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AA=E5=AF=92?= <2533659732@qq.com> Date: Thu, 19 Oct 2023 16:52:34 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8C=BB=E7=94=9FApp=E7=AB=AF=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E6=8B=92=E6=8E=A5=E4=B8=93=E5=AE=B6=E5=92=A8=E8=AF=A2?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WeChatPaymentController.java | 29 ++------ .../WeChatPayNotifyService.java | 20 ------ .../WeChatRefundService.java | 9 +++ .../impl/WeChatPayNotifyServiceImpl.java | 30 -------- .../impl/WeChatRefundServiceImpl.java | 71 ++++++++++++++++--- .../wechatpaymentinfo/dto/CloseOrderDTO.java | 27 +++++++ .../controller/RefundInfoTaskController.java | 15 +++- .../quartz/service/RefundInfoTaskService.java | 5 ++ .../impl/RefundInfoTaskServiceImpl.java | 44 ++++++++++++ .../RefundHealthConsultationOrderTask.java | 30 ++++++++ 10 files changed, 197 insertions(+), 83 deletions(-) create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/wechatpaymentinfo/dto/CloseOrderDTO.java create mode 100644 xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/wechatpaymentinfo/WeChatPaymentController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/wechatpaymentinfo/WeChatPaymentController.java index bdc87e3..2d9b8a0 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/wechatpaymentinfo/WeChatPaymentController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/wechatpaymentinfo/WeChatPaymentController.java @@ -3,6 +3,7 @@ package com.xinelu.applet.controller.wechatpaymentinfo; import com.xinelu.applet.service.wechatpaymentinfo.WeChatPayNotifyService; import com.xinelu.applet.service.wechatpaymentinfo.WeChatPaymentService; import com.xinelu.applet.service.wechatpaymentinfo.WeChatRefundService; +import com.xinelu.applet.vo.wechatpaymentinfo.dto.CloseOrderDTO; import com.xinelu.applet.vo.wechatpaymentinfo.dto.PaymentDTO; import com.xinelu.applet.vo.wechatpaymentinfo.dto.RefundDTO; import com.xinelu.common.annotation.MobileRequestAuthorization; @@ -105,19 +106,6 @@ public class WeChatPaymentController extends BaseController { return weChatPayNotifyService.xylWeChatPayNotify(request, response); } - /** - * 医路优品微信支付回调通知接口 - * - * @param request 请求头信息 - * @param response 响应信息 - * @return 应答信息,避免微信平台重复发送回调通知 - * @throws Exception 异常信息 - */ - @PostMapping("/ylypWeChatPayNotify") - public String ylypWeChatPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception { - return weChatPayNotifyService.ylypWeChatPayNotify(request, response); - } - /** * 微信确认退款接口 * @@ -143,16 +131,13 @@ public class WeChatPaymentController extends BaseController { } /** - * 医路优品微信退款回调通知接口 + * 专家咨询订单-医生端App拒单接口 * - * @param request 请求头信息 - * @param response 响应信息 - * @return 应答信息,避免微信平台重复发送回调通知 - * @throws Exception 异常信息 + * @param closeOrderDTO 订单关闭参数 + * @return 退款申请结果 */ - @PostMapping("/ylypWeChatRefundNotify") - public String ylypWeChatRefundNotify(HttpServletRequest request, HttpServletResponse response) throws Exception { - return weChatPayNotifyService.ylypWeChatRefundNotify(request, response); + @PostMapping("/closeHealthConsultationOrder") + public AjaxResult closeHealthConsultationOrder(@Validated(Insert.class) @RequestBody CloseOrderDTO closeOrderDTO) { + return weChatRefundService.closeHealthConsultationOrder(closeOrderDTO); } - } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatPayNotifyService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatPayNotifyService.java index 1ede360..114a37c 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatPayNotifyService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatPayNotifyService.java @@ -21,16 +21,6 @@ public interface WeChatPayNotifyService { */ String xylWeChatPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception; - /** - * 医路优品支付回调接口 - * - * @param request 请求信息 - * @param response 响应信息 - * @return 应答信息,避免微信平台重复发送回调通知 - * @throws Exception 异常信息 - */ - String ylypWeChatPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception; - /** * 新医路退款回调接口 * @@ -40,14 +30,4 @@ public interface WeChatPayNotifyService { * @throws Exception 异常信息 */ String xylWeChatRefundNotify(HttpServletRequest request, HttpServletResponse response) throws Exception; - - /** - * 医路优品退款回调接口 - * - * @param request 请求信息 - * @param response 响应信息 - * @return 应答信息,避免微信平台重复发送回调通知 - * @throws Exception 异常信息 - */ - String ylypWeChatRefundNotify(HttpServletRequest request, HttpServletResponse response) throws Exception; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatRefundService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatRefundService.java index dbab3cb..6057ef6 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatRefundService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/WeChatRefundService.java @@ -1,5 +1,6 @@ package com.xinelu.applet.service.wechatpaymentinfo; +import com.xinelu.applet.vo.wechatpaymentinfo.dto.CloseOrderDTO; import com.xinelu.applet.vo.wechatpaymentinfo.dto.RefundDTO; import com.xinelu.applet.vo.wechatpaymentinfo.vo.WeChatRefundInfoVO; import com.xinelu.common.core.domain.AjaxResult; @@ -36,4 +37,12 @@ public interface WeChatRefundService { * @return 退款信息 */ WeChatRefundInfoVO queryGoodsOrderRefundStatus(String refundNo, String buySource); + + /** + * 专家咨询订单-医生端App拒单接口 + * + * @param closeOrderDTO 订单关闭参数 + * @return 返回信息 + */ + AjaxResult closeHealthConsultationOrder(CloseOrderDTO closeOrderDTO); } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatPayNotifyServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatPayNotifyServiceImpl.java index fb470d6..c50932a 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatPayNotifyServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatPayNotifyServiceImpl.java @@ -105,20 +105,6 @@ public class WeChatPayNotifyServiceImpl implements WeChatPayNotifyService { return weChatPayNotifyInfo(request, response, PaymentMerchantTypeEnum.XINYILU.getInfo(), PAY); } - /** - * 医路优品支付回调接口 - * - * @param request 请求信息 - * @param response 响应信息 - * @return 应答信息,避免微信平台重复发送回调通知 - * @throws Exception 异常信息 - */ - @Override - public String ylypWeChatPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception { - log.info("医路优品微信支付回调开始执行"); - return weChatPayNotifyInfo(request, response, PaymentMerchantTypeEnum.YILUYOUPIN.getInfo(), PAY); - } - /** * 新医路退款回调接口 * @@ -133,20 +119,6 @@ public class WeChatPayNotifyServiceImpl implements WeChatPayNotifyService { return weChatPayNotifyInfo(request, response, PaymentMerchantTypeEnum.XINYILU.getInfo(), REFUND); } - /** - * 医路优品退款回调接口 - * - * @param request 请求信息 - * @param response 响应信息 - * @return 应答信息,避免微信平台重复发送回调通知 - * @throws Exception 异常信息 - */ - @Override - public String ylypWeChatRefundNotify(HttpServletRequest request, HttpServletResponse response) throws Exception { - log.info("医路优品微信退款回调开始执行"); - return weChatPayNotifyInfo(request, response, PaymentMerchantTypeEnum.YILUYOUPIN.getInfo(), REFUND); - } - /** * 微信支付回调通知公共方法 * @@ -194,11 +166,9 @@ public class WeChatPayNotifyServiceImpl implements WeChatPayNotifyService { resultMap.put("message", "解密失败!"); return JSON.toJSONString(resultMap); } - //记录支付日志和修改订单状态 if (Constants.PAY_NOTIFY.equals(refundAndPaymentFlag)) { this.processPaymentInfo(plainText); } - //修改订单状态以及增加库存以及退还用户所使用的优惠券信息 if (Constants.REFUND_NOTIFY.equals(refundAndPaymentFlag)) { this.processRefundInfo(plainText); } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatRefundServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatRefundServiceImpl.java index 2413684..51029e5 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatRefundServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/wechatpaymentinfo/impl/WeChatRefundServiceImpl.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.xinelu.applet.service.goodstock.GoodsStockService; import com.xinelu.applet.service.wechatpaymentinfo.WeChatRefundService; +import com.xinelu.applet.vo.wechatpaymentinfo.dto.CloseOrderDTO; import com.xinelu.applet.vo.wechatpaymentinfo.dto.RefundDTO; import com.xinelu.applet.vo.wechatpaymentinfo.vo.WeChatRefundInfoVO; import com.xinelu.common.config.WeChatPaymentUrlConfig; @@ -115,7 +116,8 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { Long patientId = Objects.isNull(appointmentOrderInfo.getPatientId()) ? 0 : appointmentOrderInfo.getPatientId(); String outRefundNo = com.xinelu.common.utils.StringUtils.fillZeroByPatientId(patientId, 5) + System.nanoTime(); String refundParam = buildRefundParam(null, appointmentOrderInfo, refundDTO, outRefundNo); - this.applyWeRefund(refundParam, appointmentOrderInfo, null, patientId, refundDTO); + String refundReason = StringUtils.isBlank(refundDTO.getRefundReason()) ? "" : refundDTO.getRefundReason(); + this.applyWeRefund(refundParam, appointmentOrderInfo, null, patientId, refundReason); return AjaxResult.success(); } GoodsOrder goodsOrderInfo = goodsOrderMapper.getGoodsOrderByOrderNo(refundDTO.getOrderNo()); @@ -136,7 +138,8 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { Long patientId = Objects.isNull(goodsOrderInfo.getPatientId()) ? 0 : goodsOrderInfo.getPatientId(); String outRefundNo = com.xinelu.common.utils.StringUtils.fillZeroByPatientId(patientId, 5) + System.nanoTime(); String refundParam = buildRefundParam(goodsOrderInfo, null, refundDTO, outRefundNo); - this.applyWeRefund(refundParam, null, goodsOrderInfo, patientId, refundDTO); + String refundReason = StringUtils.isBlank(refundDTO.getRefundReason()) ? "" : refundDTO.getRefundReason(); + this.applyWeRefund(refundParam, null, goodsOrderInfo, patientId, refundReason); return AjaxResult.success(); } return AjaxResult.success(); @@ -204,6 +207,38 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { } } + /** + * 专家咨询订单-医生端App拒单接口 + * + * @param closeOrderDTO 订单关闭参数 + * @return 返回信息 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public AjaxResult closeHealthConsultationOrder(CloseOrderDTO closeOrderDTO) { + GoodsOrder goodsOrderInfo = goodsOrderMapper.getGoodsOrderByOrderNo(closeOrderDTO.getOrderNo()); + if (Objects.isNull(goodsOrderInfo) || StringUtils.isBlank(goodsOrderInfo.getOrderNo())) { + return AjaxResult.error("当前订单信息不存在,无法拒单!"); + } + if (StringUtils.isBlank(goodsOrderInfo.getOrderType()) + || !StringUtils.equals(OrderTypeEnum.HEALTH_CONSULTATION.getInfo(), goodsOrderInfo.getOrderType())) { + return AjaxResult.error("当前订单非专家咨询订单,无法拒单!"); + } + if (StringUtils.isBlank(goodsOrderInfo.getOrderStatus()) + || !StringUtils.equals(GooodsOrderStatusEnum.WAIT_RECEIVED_GOODS.getInfo(), goodsOrderInfo.getOrderStatus())) { + return AjaxResult.error("当前订单状态异常,无法拒单!"); + } + if (Objects.isNull(goodsOrderInfo.getTotalPrice()) || goodsOrderInfo.getTotalPrice().compareTo(BigDecimal.ZERO) <= 0) { + return AjaxResult.error("当前订单金额异常,无法拒单!"); + } + Long patientId = Objects.isNull(goodsOrderInfo.getPatientId()) ? 0 : goodsOrderInfo.getPatientId(); + String outRefundNo = com.xinelu.common.utils.StringUtils.fillZeroByPatientId(patientId, 5) + System.nanoTime(); + String refundParam = this.buildHealthConsultationRefundParam(goodsOrderInfo, outRefundNo); + String refundReason = StringUtils.isBlank(closeOrderDTO.getRemark()) ? "" : closeOrderDTO.getRemark(); + this.applyWeRefund(refundParam, null, goodsOrderInfo, patientId, refundReason); + return AjaxResult.success(); + } + /** * 退款参数检验 * @@ -257,10 +292,10 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { * @param appointmentOrderInfo 预约服务订单信息 * @param goodsOrderInfo 商品订单信息 * @param patientId 会员id - * @param refundDTO 申请信息 + * @param refundReason 退款原因 */ public void applyWeRefund(String refundParam, AppointmentOrder appointmentOrderInfo, - GoodsOrder goodsOrderInfo, Long patientId, RefundDTO refundDTO) { + GoodsOrder goodsOrderInfo, Long patientId, String refundReason) { String requestUrl = weChatPaymentUrlConfig.getRefundApplyUrl(); HttpPost httpPost = new HttpPost(requestUrl); StringEntity entity = new StringEntity(refundParam, "utf-8"); @@ -286,7 +321,7 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { WeChatRefundInfoVO weChatRefundInfoVO = JSONObject.parseObject(body, WeChatRefundInfoVO.class); int refundInfoCount = refundInfoMapper.getRefundInfoByOrderNo(weChatRefundInfoVO.getOutTradeNo()); if (refundInfoCount <= 0) { - RefundInfo refundInfo = buildRefundInfo(patientId, weChatRefundInfoVO, refundDTO, body, refundMerchantType); + RefundInfo refundInfo = buildRefundInfo(patientId, weChatRefundInfoVO, refundReason, body, refundMerchantType); int insertCunt = refundInfoMapper.insertRefundInfo(refundInfo); if (insertCunt <= 0) { throw new ServiceException("记录退款信息失败,请联系管理员!"); @@ -302,19 +337,19 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { * * @param patientId 会员id * @param refundInfoVO 退款信息参数 - * @param refundDTO 退款申请参数 + * @param refundReason 退款原因 * @param refundBody 返回体 * @param refundMerchantType 退款账户类型,新医路或者医路优品 */ private RefundInfo buildRefundInfo(Long patientId, WeChatRefundInfoVO refundInfoVO, - RefundDTO refundDTO, String refundBody, String refundMerchantType) { + String refundReason, String refundBody, String refundMerchantType) { RefundInfo refundInfo = new RefundInfo(); refundInfo.setPatientId(patientId); refundInfo.setOrderNo(refundInfoVO.getOutTradeNo()); refundInfo.setRefundNo(refundInfoVO.getRefundId()); refundInfo.setOutRefundNo(refundInfoVO.getOutRefundNo()); refundInfo.setTransactionNo(StringUtils.isBlank(refundInfoVO.getTransactionId()) ? "" : refundInfoVO.getTransactionId()); - refundInfo.setRefundReason(StringUtils.isBlank(refundDTO.getRefundReason()) ? "" : refundDTO.getRefundReason()); + refundInfo.setRefundReason(refundReason); refundInfo.setRefundType(RefundTypeEnum.WE_CHAT.getInfo()); refundInfo.setWechatRefundStatus(RefundStatusEnum.PROCESSING.getInfo()); refundInfo.setOrderTotalPrice(BigDecimal.valueOf(refundInfoVO.getAmount().getTotal()).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_DOWN)); @@ -393,4 +428,24 @@ public class WeChatRefundServiceImpl implements WeChatRefundService { } return null; } + + /** + * 构建专家咨询微信退款参数信息 + * + * @param goodsOrderInfo 专家咨询订单信息 + * @param outRefundNo 退款单号 + * @return 退款申请Json串 + */ + private String buildHealthConsultationRefundParam(GoodsOrder goodsOrderInfo, String outRefundNo) { + Map paramMap = new LinkedHashMap<>(); + paramMap.put("out_trade_no", goodsOrderInfo.getOrderNo()); + paramMap.put("out_refund_no", outRefundNo); + Map amountMap = new LinkedHashMap<>(); + paramMap.put("notify_url", xylWeChatPaymentConfig.getXylWeChatNotifyUrl() + XINYILU_WE_CHAT_REFUND_URL); + amountMap.put("refund", goodsOrderInfo.getTotalPrice().multiply(BigDecimal.valueOf(100)).intValue()); + amountMap.put("total", goodsOrderInfo.getTotalPrice().multiply(BigDecimal.valueOf(100)).intValue()); + amountMap.put("currency", "CNY"); + paramMap.put("amount", amountMap); + return JSON.toJSONString(paramMap); + } } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/wechatpaymentinfo/dto/CloseOrderDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/wechatpaymentinfo/dto/CloseOrderDTO.java new file mode 100644 index 0000000..c2385bd --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/wechatpaymentinfo/dto/CloseOrderDTO.java @@ -0,0 +1,27 @@ +package com.xinelu.applet.vo.wechatpaymentinfo.dto; + +import com.xinelu.common.custominterface.Insert; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 订单关闭DTO + * @Author 纪寒 + * @Date 2023-10-19 14:28:07 + * @Version 1.0 + */ +@Data +public class CloseOrderDTO implements Serializable { + private static final long serialVersionUID = -1681680608523099847L; + /** + * 订单编号,必传字段 + */ + @NotBlank(message = "订单编号不能为空!", groups = {Insert.class}) + private String orderNo; + /** + * 拒单原因 + */ + private String remark; +} diff --git a/xinelu-quartz/src/main/java/com/xinelu/quartz/controller/RefundInfoTaskController.java b/xinelu-quartz/src/main/java/com/xinelu/quartz/controller/RefundInfoTaskController.java index 2ef9ba8..f4f31c7 100644 --- a/xinelu-quartz/src/main/java/com/xinelu/quartz/controller/RefundInfoTaskController.java +++ b/xinelu-quartz/src/main/java/com/xinelu/quartz/controller/RefundInfoTaskController.java @@ -1,5 +1,6 @@ package com.xinelu.quartz.controller; +import com.xinelu.quartz.task.RefundHealthConsultationOrderTask; import com.xinelu.quartz.task.RefundInfoTask; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -19,14 +20,22 @@ public class RefundInfoTaskController { @Resource private RefundInfoTask refundInfoTask; + @Resource + private RefundHealthConsultationOrderTask refundHealthConsultationOrderTask; /** * 手动执行修改退款单状态定时任务 - * - * @throws Exception 异常信息 */ @GetMapping("/handleRefundStatus") - public void handleRefundStatus() throws Exception { + public void handleRefundStatus() { refundInfoTask.automaticProcessRefundInfo(); } + + /** + * 手动执行处理专家咨询订单医生手动拒单定时任务 + */ + @GetMapping("/handleHealthConsultationStatus") + public void handleHealthConsultationRefund() { + refundHealthConsultationOrderTask.automaticProcessHealthConsultationRefund(); + } } diff --git a/xinelu-quartz/src/main/java/com/xinelu/quartz/service/RefundInfoTaskService.java b/xinelu-quartz/src/main/java/com/xinelu/quartz/service/RefundInfoTaskService.java index 4a028a5..18ca7f7 100644 --- a/xinelu-quartz/src/main/java/com/xinelu/quartz/service/RefundInfoTaskService.java +++ b/xinelu-quartz/src/main/java/com/xinelu/quartz/service/RefundInfoTaskService.java @@ -13,4 +13,9 @@ public interface RefundInfoTaskService { * 防止由于网络等其它原因未接受到退款回调通知进而导致的退款单状态修改不及时 */ void automaticProcessRefundInfo(); + + /** + * 自动处理专家咨询订单医生手动拒单定时任务 + */ + void automaticProcessHealthConsultationRefund(); } diff --git a/xinelu-quartz/src/main/java/com/xinelu/quartz/service/impl/RefundInfoTaskServiceImpl.java b/xinelu-quartz/src/main/java/com/xinelu/quartz/service/impl/RefundInfoTaskServiceImpl.java index ac5d226..b822ce4 100644 --- a/xinelu-quartz/src/main/java/com/xinelu/quartz/service/impl/RefundInfoTaskServiceImpl.java +++ b/xinelu-quartz/src/main/java/com/xinelu/quartz/service/impl/RefundInfoTaskServiceImpl.java @@ -93,6 +93,26 @@ public class RefundInfoTaskServiceImpl implements RefundInfoTaskService { } } + /** + * 自动处理专家咨询订单医生手动拒单定时任务 + */ + @Override + public void automaticProcessHealthConsultationRefund() { + List refundGoodsOrderLit = goodsOrderMapper.getRefundGoodsOrderInfo(GooodsOrderStatusEnum.WAIT_RECEIVED_GOODS.getInfo(), RefundStatusEnum.PROCESSING.getInfo(), ConfirmRefundStatusEnum.CONFIRMED.getInfo()); + if (CollectionUtils.isEmpty(refundGoodsOrderLit)) { + return; + } + TransactionStatus transactionStatus = transactionManager.getTransaction(new DefaultTransactionDefinition()); + try { + processHealthConsultationRefund(refundGoodsOrderLit); + transactionManager.commit(transactionStatus); + } catch (Exception e) { + transactionManager.rollback(transactionStatus); + log.error("处理专家咨询订单医生手动拒单定时任务异常,异常信息 =====> {}", e.getMessage()); + throw e; + } + } + /** * 处理退款的预约订单信息 * @@ -158,4 +178,28 @@ public class RefundInfoTaskServiceImpl implements RefundInfoTaskService { } } + /** + * 处理退款成功的专家咨询订单信息 + * + * @param refundGoodsOrderLit 专家咨询订单信息 + */ + private void processHealthConsultationRefund(List refundGoodsOrderLit) { + List orderNoList = Lists.newArrayList(); + for (RefundOrderInfoVO refundOrderInfoVO : refundGoodsOrderLit) { + if (StringUtils.isBlank(refundOrderInfoVO.getOrderNo()) + || StringUtils.isBlank(refundOrderInfoVO.getOutRefundNo()) || StringUtils.isBlank(refundOrderInfoVO.getBuySource())) { + continue; + } + WeChatRefundInfoVO weChatRefundInfoVO = weChatRefundService.queryGoodsOrderRefundStatus(refundOrderInfoVO.getOutRefundNo(), refundOrderInfoVO.getBuySource()); + if (StringUtils.isNotBlank(weChatRefundInfoVO.getStatus()) + && RefundStatusEnum.SUCCESS.getInfo().equals(weChatRefundInfoVO.getStatus())) { + orderNoList.add(refundOrderInfoVO.getOrderNo()); + } + LocalDateTime successTime = StringUtils.isBlank(weChatRefundInfoVO.getSuccessTime()) ? LocalDateTime.now() : LocalDateTime.parse(weChatRefundInfoVO.getSuccessTime(), DateTimeFormatter.ISO_DATE_TIME); + refundInfoMapper.updateBatchRefundStatus(refundOrderInfoVO.getOrderNo(), successTime, weChatRefundInfoVO.getStatus()); + } + if (CollectionUtils.isNotEmpty(orderNoList)) { + goodsOrderMapper.updateBatchGoodsOrderStatus(orderNoList, OrderStatusEnum.REFUNDED.getInfo()); + } + } } diff --git a/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java b/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java new file mode 100644 index 0000000..bf9f6b8 --- /dev/null +++ b/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java @@ -0,0 +1,30 @@ +package com.xinelu.quartz.task; + +import com.xinelu.quartz.service.RefundInfoTaskService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * @Description + * @Author 纪寒 + * @Date 2022-10-25 14:35:59 + * @Version 1.0 + */ +@Slf4j +@Component("refundHealthConsultationOrderTask") +public class RefundHealthConsultationOrderTask { + + @Resource + private RefundInfoTaskService refundInfoTaskService; + + /** + * 自动处理专家咨询订单医生手动拒单定时任务 + */ + public void automaticProcessHealthConsultationRefund() { + log.info("开始执行专家咨询订单医生手动拒单定时任务........"); + refundInfoTaskService.automaticProcessHealthConsultationRefund(); + log.info("完成专家咨询订单医生手动拒单定时任务........"); + } +} From d7165b3fbad6373fee7639eb98b21b656307d0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AA=E5=AF=92?= <2533659732@qq.com> Date: Thu, 19 Oct 2023 16:55:17 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=8C=BB=E7=94=9FApp=E7=AB=AF=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E6=8B=92=E6=8E=A5=E4=B8=93=E5=AE=B6=E5=92=A8=E8=AF=A2?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xinelu/quartz/task/RefundHealthConsultationOrderTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java b/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java index bf9f6b8..a0cb063 100644 --- a/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java +++ b/xinelu-quartz/src/main/java/com/xinelu/quartz/task/RefundHealthConsultationOrderTask.java @@ -7,7 +7,7 @@ import org.springframework.stereotype.Component; import javax.annotation.Resource; /** - * @Description + * @Description 专家咨询订单医生手动拒单定时任务 * @Author 纪寒 * @Date 2022-10-25 14:35:59 * @Version 1.0 From 7fcf37c42f35aa4c5dc64a60c2d8659a6648bc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AA=E5=AF=92?= <2533659732@qq.com> Date: Thu, 19 Oct 2023 17:22:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=8C=BB=E7=94=9FApp=E7=AB=AF=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E6=8B=92=E6=8E=A5=E4=B8=93=E5=AE=B6=E5=92=A8=E8=AF=A2?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xinelu/common/enums/GooodsOrderStatusEnum.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/GooodsOrderStatusEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/GooodsOrderStatusEnum.java index 7315df9..79dacf1 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/enums/GooodsOrderStatusEnum.java +++ b/xinelu-common/src/main/java/com/xinelu/common/enums/GooodsOrderStatusEnum.java @@ -60,6 +60,11 @@ public enum GooodsOrderStatusEnum { * 已评价 */ EVALUATED("EVALUATED"), + + /** + * 已完成 + */ + COMPLETED("COMPLETED"), ; final private String info; From ca5b656ee6a3b6db67863b5bacf5a50a98cb1d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= Date: Thu, 19 Oct 2023 17:30:41 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nursingorder/NursingOrderController.java | 12 ++-- .../OrderEvaluateAndPictureDTO.java | 4 ++ .../applet/dto/nurseorder/NurseOrderDTO.java | 38 +++++++++++++ .../nursingorder/NursingOrderMapper.java | 12 +++- .../impl/AppOrderEvaluateServiceImpl.java | 20 ++++--- .../nursingorder/INursingOrderService.java | 7 ++- .../impl/NursingOrderServiceImpl.java | 55 +++++++++++++++---- .../applet/vo/nursingorder/PatientOrder.java | 17 ++++++ .../vo/nursingorder/PatientOrderVO.java | 31 +++++++++++ .../nursingorder/NusringOrderMapper.xml | 16 +++++- .../OrderEvaluateInfoController.java | 6 +- 11 files changed, 185 insertions(+), 33 deletions(-) create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/nurseorder/NurseOrderDTO.java create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrderVO.java diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java index 308db93..fec730d 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nursingorder/NursingOrderController.java @@ -1,5 +1,6 @@ package com.xinelu.applet.controller.nursingorder; +import com.xinelu.applet.dto.nurseorder.NurseOrderDTO; import com.xinelu.applet.service.nursingorder.INursingOrderService; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO; @@ -14,6 +15,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -97,12 +99,12 @@ public class NursingOrderController extends BaseController { /** * 根据openid编号查询对应得订单 */ - @MobileRequestAuthorization + //@MobileRequestAuthorization @GetMapping("/getAppletOrderList") - public AjaxResult getAppletOrderList(Long parentId, String orderStatus) { - if (Objects.isNull(parentId)) { - return AjaxResult.error("请选择要查询的用户信息!"); + public TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder) { + if (Objects.isNull(nurseOrder) || Objects.isNull(nurseOrder.getParentId()) || StringUtils.isBlank(nurseOrder.getCardNo()) || StringUtils.isBlank(nurseOrder.getOrderStatus())) { + return getDataTable(new ArrayList<>()); } - return nursingOrderService.getAppletOrderList(parentId, orderStatus); + return getDataTable(nursingOrderService.getAppletOrderList(nurseOrder)); } } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java index 1b8136f..9ef0a75 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java @@ -84,4 +84,8 @@ public class OrderEvaluateAndPictureDTO implements Serializable { */ private List orderEvaluatePictureInfoList; + /** + * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR + */ + private String orderSource; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/nurseorder/NurseOrderDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/nurseorder/NurseOrderDTO.java new file mode 100644 index 0000000..667debd --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/nurseorder/NurseOrderDTO.java @@ -0,0 +1,38 @@ +package com.xinelu.applet.dto.nurseorder; + + +import com.xinelu.common.core.domain.BaseDomain; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * @Description 个人中心订单查询 + * @Author zhangheng + * @Date 2022-10-18 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class NurseOrderDTO extends BaseDomain implements Serializable { + + /** + * 用户信息 + */ + private Long parentId; + + /** + * 订单状态 + */ + private String orderStatus; + + /** + * 居民身份证号 + */ + private String cardNo; + + /** + * 地区标识 + */ + private String region; +} \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java index 387d663..9a4a956 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/nursingorder/NursingOrderMapper.java @@ -69,7 +69,7 @@ public interface NursingOrderMapper { /** * 根据openid编号查询对应得订单 * - * @param patientId openid编号 + * @param patientId openid编号 * @param orderStatus 订单状态 * @return AjaxResult */ @@ -78,9 +78,17 @@ public interface NursingOrderMapper { /** * 根据openid编号查询对应得订单 * - * @param patientId openid编号 + * @param patientId openid编号 * @param orderStatus 订单状态 * @return AjaxResult */ List getGoodsOrderAndConsultationOrder(@Param("patientId") Long patientId, @Param("orderStatus") String orderStatus); + + /** + * 根据patientId编号查询评价信息 + * + * @param patientId openid编号 + * @return AjaxResult + */ + List getOrderEvaluateByPatientId(Long patientId); } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/apporderevaluate/impl/AppOrderEvaluateServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/apporderevaluate/impl/AppOrderEvaluateServiceImpl.java index 7fe61cb..2d21548 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/apporderevaluate/impl/AppOrderEvaluateServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/apporderevaluate/impl/AppOrderEvaluateServiceImpl.java @@ -6,6 +6,7 @@ import com.xinelu.applet.service.apporderevaluate.IAppOrderEvaluateService; import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.enums.GooodsOrderStatusEnum; +import com.xinelu.common.enums.OrderSourceEnum; import com.xinelu.common.enums.OrderStatusEnum; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.bean.BeanUtils; @@ -85,12 +86,14 @@ public class AppOrderEvaluateServiceImpl implements IAppOrderEvaluateService { @Transactional(rollbackFor = Exception.class) @Override public AjaxResult insertGoodsOrderEvaluate(OrderEvaluateAndPictureDTO orderEvaluateAndPictureDTO) { - GoodsOrder goodsOrder = appOrderEvaluateMapper.selectGoodsOrderByOrderNo(orderEvaluateAndPictureDTO.getOrderNo()); - if (Objects.isNull(goodsOrder) || StringUtils.isBlank(goodsOrder.getOrderStatus()) || !goodsOrder.getOrderStatus().equals(GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo())) { - return AjaxResult.error("当前订单未确认收货,请先确认收货后进行评价!"); - } - if (StringUtils.equals(GooodsOrderStatusEnum.EVALUATED.getInfo(), goodsOrder.getOrderStatus())) { - return AjaxResult.error("当前订单已评价!"); + if (OrderSourceEnum.SPRING_DOCTOR.getInfo().equals(orderEvaluateAndPictureDTO.getOrderSource())) { + GoodsOrder goodsOrder = appOrderEvaluateMapper.selectGoodsOrderByOrderNo(orderEvaluateAndPictureDTO.getOrderNo()); + if (Objects.isNull(goodsOrder) || StringUtils.isBlank(goodsOrder.getOrderStatus()) || !goodsOrder.getOrderStatus().equals(GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo())) { + return AjaxResult.error("当前订单未确认收货,请先确认收货后进行评价!"); + } + if (StringUtils.equals(GooodsOrderStatusEnum.EVALUATED.getInfo(), goodsOrder.getOrderStatus())) { + return AjaxResult.error("当前订单已评价!"); + } } //新增评价信息 OrderEvaluateInfo orderEvaluateInfo = new OrderEvaluateInfo(); @@ -100,9 +103,12 @@ public class AppOrderEvaluateServiceImpl implements IAppOrderEvaluateService { if (insertOrderEvaluateInfo <= 0) { throw new ServiceException("评价失败,请联系管理员!"); } + if (OrderSourceEnum.FAMILY_DOCTOR.getInfo().equals(orderEvaluateAndPictureDTO.getOrderSource())) { + return AjaxResult.success(); + } //新增评价图片 List afferentEvaluatePicture = orderEvaluateAndPictureDTO.getOrderEvaluatePictureInfoList(); - if (CollectionUtils.isNotEmpty(orderEvaluateAndPictureDTO.getOrderEvaluatePictureInfoList())) { + if (CollectionUtils.isNotEmpty(afferentEvaluatePicture)) { afferentEvaluatePicture.forEach(item -> { item.setOrderEvaluateId(orderEvaluateInfo.getId()); item.setCreateTime(LocalDateTime.now()); diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java index 6756d4f..7347154 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/INursingOrderService.java @@ -1,8 +1,10 @@ package com.xinelu.applet.service.nursingorder; +import com.xinelu.applet.dto.nurseorder.NurseOrderDTO; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO; +import com.xinelu.applet.vo.nursingorder.PatientOrder; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.manage.domain.goodsOrder.GoodsOrder; @@ -59,9 +61,8 @@ public interface INursingOrderService { /** * 根据openid编号查询对应得订单 * - * @param parentId openid编号 - * @param orderStatus 订单状态 + * @param nurseOrder nurseOrder * @return AjaxResult */ - AjaxResult getAppletOrderList(Long parentId, String orderStatus); + List getAppletOrderList(NurseOrderDTO nurseOrder); } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java index 250d176..afc3bf0 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nursingorder/impl/NursingOrderServiceImpl.java @@ -1,17 +1,24 @@ package com.xinelu.applet.service.nursingorder.impl; +import com.alibaba.fastjson2.JSON; +import com.xinelu.applet.dto.nurseorder.NurseOrderDTO; import com.xinelu.applet.mapper.nursingorder.NursingOrderMapper; import com.xinelu.applet.service.nursingorder.INursingOrderService; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO; import com.xinelu.applet.vo.nursingorder.PatientOrder; +import com.xinelu.applet.vo.nursingorder.PatientOrderVO; import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.enums.ConfirmRefundStatusEnum; import com.xinelu.common.enums.GooodsOrderStatusEnum; +import com.xinelu.common.enums.OrderSourceEnum; import com.xinelu.common.enums.OrderStatusEnum; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.http.HttpUtils; +import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.manage.domain.goodsOrder.GoodsOrder; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -22,6 +29,9 @@ import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; + +import static com.xinelu.common.utils.PageUtils.startPage; /** * @Description 订单分页 @@ -41,7 +51,7 @@ public class NursingOrderServiceImpl implements INursingOrderService { private final String NOT_EVALUATED = "NOT_EVALUATED"; /** - * 未评价标识 + * 已评价标识 */ private final String EVALUATED = "EVALUATED"; @@ -125,22 +135,21 @@ public class NursingOrderServiceImpl implements INursingOrderService { /** * 根据openid编号查询对应得订单 * - * @param parentId openid编号 - * @param orderStatus 订单状态 + * @param nurseOrder nurseOrder * @return AjaxResult */ @Override - public AjaxResult getAppletOrderList(Long parentId, String orderStatus) { + public List getAppletOrderList(NurseOrderDTO nurseOrder) { List patientOrders = new ArrayList<>(); List appletOrderList = new ArrayList<>(); List goodsOrderAndConsultationOrder = new ArrayList<>(); - if (NOT_EVALUATED.equals(orderStatus)) { - appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(parentId, OrderStatusEnum.COMPLETE.getInfo()); - goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(parentId, GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo()); + if (NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) { + appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.COMPLETE.getInfo()); + goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo()); } - if (EVALUATED.equals(orderStatus)) { - appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(parentId, OrderStatusEnum.EVALUATED.getInfo()); - goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(parentId, GooodsOrderStatusEnum.EVALUATED.getInfo()); + if (EVALUATED.equals(nurseOrder.getOrderStatus())) { + appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.EVALUATED.getInfo()); + goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), GooodsOrderStatusEnum.EVALUATED.getInfo()); } if (CollectionUtils.isNotEmpty(appletOrderList)) { patientOrders.addAll(appletOrderList); @@ -148,6 +157,30 @@ public class NursingOrderServiceImpl implements INursingOrderService { if (CollectionUtils.isNotEmpty(goodsOrderAndConsultationOrder)) { patientOrders.addAll(goodsOrderAndConsultationOrder); } - return AjaxResult.success(patientOrders); + String result = HttpUtils.sendGet(SpringUtils.getFdUrl(nurseOrder.getRegion()) + "/performance/recordV2/" + nurseOrder.getCardNo()); + if (StringUtils.isBlank(result)) { + throw new ServiceException("获取微信小程序用户信息失败", 201); + } + PatientOrderVO resultHttp = JSON.parseObject(result, PatientOrderVO.class); + if (Objects.nonNull(resultHttp) && CollectionUtils.isNotEmpty(resultHttp.getData())) { + List data = resultHttp.getData(); + List orderEvaluate = nursingOrderMapper.getOrderEvaluateByPatientId(nurseOrder.getParentId()); + if (CollectionUtils.isNotEmpty(orderEvaluate) && EVALUATED.equals(nurseOrder.getOrderStatus())) { + for (PatientOrder patientOrder : orderEvaluate) { + PatientOrder dataFirst = data.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getOrderNo()) && patientOrder.getOrderNo().equals(item.getOrderNo())).findFirst().orElse(new PatientOrder()); + dataFirst.setCompositeScore(patientOrder.getCompositeScore()); + dataFirst.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo()); + patientOrders.add(dataFirst); + } + } + if (CollectionUtils.isNotEmpty(orderEvaluate) && NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) { + data.removeAll(orderEvaluate); + data.forEach(item ->item.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo())); + } + patientOrders.addAll(data); + } + startPage(); + patientOrders.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime())); + return patientOrders; } } \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java index ef32417..0ef603a 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrder.java @@ -60,4 +60,21 @@ public class PatientOrder implements Serializable { * 订单类型 */ private String orderType; + + /** + * 预约服务满意度,一般:COMMONLY,满意:SATISFIED,不满意:DISSATISFIED + */ + @ApiModelProperty(value = "预约服务满意度,一般:COMMONLY,满意:SATISFIED,不满意:DISSATISFIED") + private String evaluateSatisfaction; + + /** + * 商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星 + */ + @ApiModelProperty(value = "商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星") + private Integer compositeScore; + + /** + * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR + */ + private String orderSource; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrderVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrderVO.java new file mode 100644 index 0000000..37ddd4a --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nursingorder/PatientOrderVO.java @@ -0,0 +1,31 @@ +package com.xinelu.applet.vo.nursingorder; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 服务评价 + * @Author zhangheng + * @Date 2022-10-18 + */ + +@Data +public class PatientOrderVO implements Serializable { + + /** + * 成功标识 + */ + private String code; + + /** + * 文字描述 + */ + private String msg; + + /** + * 信息集合 + */ + private List data; +} \ No newline at end of file diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml index e907928..72bae6c 100644 --- a/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml +++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/nursingorder/NusringOrderMapper.xml @@ -347,11 +347,14 @@ ao.create_time, aod.nurse_item_name orderName, nsi.item_picture_url pictureUrl, - 'APPOINTMENT_ORDER' AS orderType + 'APPOINTMENT_ORDER' AS orderType, + nei.evaluate_satisfaction, + 'SPRING_DOCTOR' AS orderSource FROM appointment_order ao LEFT JOIN appointment_order_details aod ON ao.order_no = aod.order_no LEFT JOIN nurse_station_item nsi ON nsi.id = aod.nurse_station_item_id + LEFT JOIN order_evaluate_info nei ON nei.order_no = ao.order_no where ao.order_status = #{orderStatus} and ao.patient_id = #{patientId} @@ -368,15 +371,24 @@ gor.order_type, god.goods_name orderName, gad.attribute_piture_url pictureUrl, - hpi.person_picture_url + hpi.person_picture_url, + nei.composite_score, + 'SPRING_DOCTOR' AS orderSource FROM goods_order gor LEFT JOIN goods_order_details god ON god.order_no = gor.order_no LEFT JOIN goods_attribute_details gad ON gad.id = god.goods_attribute_details_id LEFT JOIN hospital_person_info hpi ON hpi.id = gor.hospital_person_id + LEFT JOIN order_evaluate_info nei ON nei.order_no = gor.order_no where gor.order_status = #{orderStatus} and gor.patient_id = #{patientId} and gor.del_flag = 0 + + \ No newline at end of file diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java index 1aa2d70..6c33293 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java @@ -62,9 +62,9 @@ public class OrderEvaluateInfoController extends BaseController { /** * 新增预约服务订单和商品订单评价信息 */ - @PreAuthorize("@ss.hasPermi('system:orderEvaluateInfo:add')") + //@PreAuthorize("@ss.hasPermi('system:orderEvaluateInfo:add')") @Log(title = "预约服务订单和商品订单评价信息", businessType = BusinessType.INSERT) - @PostMapping("add") + @PostMapping("/add") public AjaxResult add(@RequestBody OrderEvaluateInfo orderEvaluateInfo) { return toAjax(orderEvaluateInfoService.insertOrderEvaluateInfo(orderEvaluateInfo)); } @@ -74,7 +74,7 @@ public class OrderEvaluateInfoController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:orderEvaluateInfo:edit')") @Log(title = "预约服务订单和商品订单评价信息", businessType = BusinessType.UPDATE) - @PostMapping("edit") + @PostMapping("/edit") public AjaxResult edit(@RequestBody OrderEvaluateInfo orderEvaluateInfo) { return toAjax(orderEvaluateInfoService.updateOrderEvaluateInfo(orderEvaluateInfo)); }