浏览代码

增加系统配置接口

kobe6258 4 月之前
父节点
当前提交
ad125bc518
共有 3 个文件被更改,包括 22 次插入17 次删除
  1. 14 13
      controllers/order.go
  2. 2 1
      models/product_order.go
  3. 6 3
      models/request/analyst.go

+ 14 - 13
controllers/order.go

@@ -220,19 +220,20 @@ func (this *OrderController) ProductOrderList() {
 		go func(orderItem *models.ProductOrder) {
 			defer wg.Done()
 			view := &models.ProductOrderView{
-				OrderID:      orderItem.OrderID,
-				RealName:     orderItem.RealName,
-				Mobile:       fmt.Sprintf("+%s %s", orderItem.AreaCode, orderItem.Mobile),
-				ProductType:  ProductTypeMap[orderItem.ProductType],
-				ProductName:  orderItem.ProductName,
-				TotalAmount:  orderItem.TotalAmount,
-				TradeNO:      orderItem.TradeNO,
-				RefundAmount: orderItem.RefundAmount,
-				PaymentWay:   PaymentWayMap[orderItem.PaymentWay],
-				Status:       ProductOrderStatus[orderItem.Status],
-				RefundStatus: RefundStatusMap[orderItem.RefundStatus],
-				Remark:       orderItem.Remark,
-				CreatedTime:  orderItem.CreatedTime.Format(time.DateTime),
+				OrderID:       orderItem.OrderID,
+				RealName:      orderItem.RealName,
+				Mobile:        fmt.Sprintf("+%s %s", orderItem.AreaCode, orderItem.Mobile),
+				ProductType:   ProductTypeMap[orderItem.ProductType],
+				ProductName:   orderItem.ProductName,
+				TotalAmount:   orderItem.TotalAmount,
+				TradeNO:       orderItem.TradeNO,
+				RefundAmount:  orderItem.RefundAmount,
+				RefundTradeId: orderItem.RefundTradeId,
+				PaymentWay:    PaymentWayMap[orderItem.PaymentWay],
+				Status:        ProductOrderStatus[orderItem.Status],
+				RefundStatus:  RefundStatusMap[orderItem.RefundStatus],
+				Remark:        orderItem.Remark,
+				CreatedTime:   orderItem.CreatedTime.Format(time.DateTime),
 			}
 			if orderItem.TradeNO != "" {
 				view.PaymentTime = orderItem.PaymentTime.Format(time.DateTime)

+ 2 - 1
models/product_order.go

@@ -37,6 +37,7 @@ type ProductOrderView struct {
 	ValidDuration    string
 	PaymentAmount    string
 	TradeNO          string
+	RefundTradeId    string
 	RefundAmount     string
 	PaymentWay       string
 	PaymentTime      string
@@ -60,7 +61,7 @@ type ProductOrder struct {
 	TotalAmount      string              `gorm:"column:total_amount;size:255;default:null;comment:'金额'" json:"total_amount"`
 	TradeID          int                 `gorm:"column:trade_id;default:null;comment:'支付订单'" json:"trade_id"`
 	TradeNO          string              `gorm:"column:trade_no;default:null;comment:'支付订单'" json:"trade_no"`
-	RefundTradeId    string              `column:"refund_trade_id"`
+	RefundTradeId    string              `column:"refund_trade_id;null;comment:'退款金额'" json:"refund_trade_id"`
 	RefundAmount     string              `gorm:"column:refund_amount;size:255;default:null;comment:'退款金额'" json:"refund_amount"`
 	PaymentWay       PaymentWay          `gorm:"column:payment_way;enum('wechat','alipay');default:null;comment:'支付渠道'"`
 	PaymentTime      time.Time           `gorm:"column:payment_time;default:null;comment:'支付时间'" json:"payment_time"`

+ 6 - 3
models/request/analyst.go

@@ -3,7 +3,10 @@ package request
 // AnalystEditReq
 // @Description: 研究员信息编辑
 type AnalystEditReq struct {
-	Id           int    `description:"用户id"`
-	HeadImgUrl   string `description:"头像地址"`
-	Introduction string `description:"简介"`
+	Id                      int    `description:"用户id"`
+	HeadImgUrl              string `description:"头像地址"`
+	Introduction            string `description:"简介"`
+	Position                string
+	InvestmentCertificate   string
+	ProfessionalCertificate string
 }