新增微信支付对接,后台客服取消订单

This commit is contained in:
2023-08-03 14:42:33 +08:00
parent faabe27f32
commit 96308ff608
18 changed files with 684 additions and 1 deletions
+6
View File
@@ -6,6 +6,7 @@ type Api struct {
userDoctorManage // 医生管理
Admin // 公共方法
basic // 基础数据
order // 订单管理
}
// SysSetting 系统设置
@@ -31,3 +32,8 @@ type basic struct {
Bank // 银行管理
Area // 省市区管理
}
// 订单管理
type order struct {
OrderInquiry // 问诊订单
}
+51
View File
@@ -0,0 +1,51 @@
package controller
import (
"github.com/gin-gonic/gin"
"hospital-admin-api/api/responses"
"hospital-admin-api/api/service"
"strconv"
)
type OrderInquiry struct{}
// GetOrderInquiryPage 获取问诊订单列表-分页
func (r *OrderInquiry) GetOrderInquiryPage(c *gin.Context) {
responses.Ok(c)
}
// GetOrderInquiry 问诊订单详情
func (r *OrderInquiry) GetOrderInquiry(c *gin.Context) {
responses.Ok(c)
}
// DeleteOrderInquiry 删除问诊订单
func (r *OrderInquiry) DeleteOrderInquiry(c *gin.Context) {
responses.Ok(c)
}
// CancelOrderInquiry 取消问诊订单
func (r *OrderInquiry) CancelOrderInquiry(c *gin.Context) {
id := c.Param("order_inquiry_id")
if id == "" {
responses.FailWithMessage("缺少参数", c)
return
}
// 将 id 转换为 int64 类型
orderInquiryId, err := strconv.ParseInt(id, 10, 64)
if err != nil {
responses.Fail(c)
return
}
// 业务处理
orderInquiryService := service.OrderInquiryService{}
_, err = orderInquiryService.CancelOrderInquiry(orderInquiryId)
if err != nil {
responses.FailWithMessage(err.Error(), c)
return
}
responses.Ok(c)
}