|
@@ -24,6 +24,8 @@ type OrderController struct {
|
|
|
// @Param StartDate query string false "开始时间 ,列如2021-03-06 "
|
|
|
// @Param EndDate query string false "结束时间,列如2021-03-06 "
|
|
|
// @Param AdminId query string false "销售ID "
|
|
|
+// @Param ShareId query string false "推荐人ID "
|
|
|
+// @Param PaymentType query string false "支付渠道 取值范围:1微信小程序,2微信扫码支付,3微信H5支付。 "
|
|
|
// @Param OrderType query int false "订单类型 1:畅读卡订单,2:单场付费订单"
|
|
|
// @Param OrderStatus query int false "订单状态,0:已取消、1:待支付、2:已支付、3:退款成功、4:退款处理中、5:退款异常、6:退款关闭"
|
|
|
// @Param PaymentProject query string false "付款项目"
|
|
@@ -52,6 +54,8 @@ func (this *OrderController) OrderList() {
|
|
|
startDate := this.GetString("StartDate")
|
|
|
endDate := this.GetString("EndDate")
|
|
|
adminId := this.GetString("AdminId")
|
|
|
+ shareId := this.GetString("ShareId")
|
|
|
+ paymentType, _ := this.GetInt("PaymentType")
|
|
|
orderCode := this.GetString("OrderCode")
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
paymentProject := this.GetString("PaymentProject")
|
|
@@ -79,6 +83,15 @@ func (this *OrderController) OrderList() {
|
|
|
condition += ` AND seller_id IN (` + adminId + `) `
|
|
|
}
|
|
|
|
|
|
+ if shareId != "" { //推荐人ID
|
|
|
+ condition += ` AND share_id IN (` + shareId + `) `
|
|
|
+ }
|
|
|
+
|
|
|
+ if paymentType > 0 { // 支付渠道
|
|
|
+ condition += ` AND payment_type = ? `
|
|
|
+ pars = append(pars, paymentType)
|
|
|
+ }
|
|
|
+
|
|
|
if orderStatus > -1 { //订单状态
|
|
|
condition += ` AND order_status = ? `
|
|
|
pars = append(pars, orderStatus)
|
|
@@ -151,6 +164,16 @@ func (this *OrderController) OrderList() {
|
|
|
case 6:
|
|
|
item.OrderStatusText = "退款关闭"
|
|
|
}
|
|
|
+
|
|
|
+ switch v.PaymentType {
|
|
|
+ case 1:
|
|
|
+ item.PaymentTypeText = "小程序"
|
|
|
+ case 2:
|
|
|
+ item.PaymentTypeText = "PC"
|
|
|
+ case 3:
|
|
|
+ item.PaymentTypeText = "H5"
|
|
|
+ }
|
|
|
+
|
|
|
item.UserId = v.UserId
|
|
|
item.RealName = v.RealName
|
|
|
item.Mobile = v.Mobile
|
|
@@ -158,7 +181,11 @@ func (this *OrderController) OrderList() {
|
|
|
item.CompanyId = v.CompanyId
|
|
|
item.CompanyName = v.CompanyName
|
|
|
item.SellerName = v.SellerName
|
|
|
- item.InviteName = inviteNameMap[v.Mobile]
|
|
|
+ if v.ShareName != "" {
|
|
|
+ item.InviteName = v.ShareName
|
|
|
+ } else {
|
|
|
+ item.InviteName = inviteNameMap[v.Mobile]
|
|
|
+ }
|
|
|
item.PaymentProject = v.GoodsName
|
|
|
|
|
|
if v.OrderStatus != 0 && v.OrderStatus != 1 {
|
|
@@ -263,6 +290,8 @@ func (this *UserController) OrderRefund() {
|
|
|
// @Param StartDate query string false "开始时间 ,列如2021-03-06 "
|
|
|
// @Param EndDate query string false "结束时间,列如2021-03-06 "
|
|
|
// @Param AdminId query string false "销售ID "
|
|
|
+// @Param ShareId query string false "推荐人ID "
|
|
|
+// @Param PaymentType query string false "支付渠道 取值范围:1微信小程序,2微信扫码支付,3微信H5支付。 "
|
|
|
// @Param OrderType query int false "订单类型 1:畅读卡订单,2:单场付费订单"
|
|
|
// @Param OrderStatus query int false "订单状态,0:已取消、1:待支付、2:已支付、3:退款成功、4:退款处理中、5:退款异常、6:退款关闭"
|
|
|
// @Param PaymentProject query string false "付款项目"
|
|
@@ -291,6 +320,8 @@ func (this *OrderController) OrderRefundList() {
|
|
|
startDate := this.GetString("StartDate")
|
|
|
endDate := this.GetString("EndDate")
|
|
|
adminId := this.GetString("AdminId")
|
|
|
+ shareId := this.GetString("ShareId")
|
|
|
+ paymentType, _ := this.GetInt("PaymentType")
|
|
|
orderCode := this.GetString("OrderCode")
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
paymentProject := this.GetString("PaymentProject")
|
|
@@ -319,6 +350,15 @@ func (this *OrderController) OrderRefundList() {
|
|
|
condition += ` AND seller_id IN (` + adminId + `) `
|
|
|
}
|
|
|
|
|
|
+ if shareId != "" { //推荐人ID
|
|
|
+ condition += ` AND share_id IN (` + shareId + `) `
|
|
|
+ }
|
|
|
+
|
|
|
+ if paymentType > 0 { // 支付渠道
|
|
|
+ condition += ` AND payment_type = ? `
|
|
|
+ pars = append(pars, paymentType)
|
|
|
+ }
|
|
|
+
|
|
|
if orderStatus > -1 { //订单状态
|
|
|
condition += ` AND order_status = ? `
|
|
|
pars = append(pars, orderStatus)
|
|
@@ -384,6 +424,15 @@ func (this *OrderController) OrderRefundList() {
|
|
|
case 6:
|
|
|
item.OrderStatusText = "退款关闭"
|
|
|
}
|
|
|
+
|
|
|
+ switch v.PaymentType {
|
|
|
+ case 1:
|
|
|
+ item.PaymentTypeText = "小程序"
|
|
|
+ case 2:
|
|
|
+ item.PaymentTypeText = "PC"
|
|
|
+ case 3:
|
|
|
+ item.PaymentTypeText = "H5"
|
|
|
+ }
|
|
|
item.UserId = v.UserId
|
|
|
item.RealName = v.RealName
|
|
|
item.Mobile = v.Mobile
|
|
@@ -391,7 +440,11 @@ func (this *OrderController) OrderRefundList() {
|
|
|
item.CompanyId = v.CompanyId
|
|
|
item.CompanyName = v.CompanyName
|
|
|
item.SellerName = v.SellerName
|
|
|
- item.InviteName = inviteNameMap[v.Mobile]
|
|
|
+ if v.ShareName != "" {
|
|
|
+ item.InviteName = v.ShareName
|
|
|
+ } else {
|
|
|
+ item.InviteName = inviteNameMap[v.Mobile]
|
|
|
+ }
|
|
|
item.PaymentProject = v.GoodsName
|
|
|
item.RefundTime = v.RefundTime.Format(utils.FormatDateTime)
|
|
|
item.RefundRemark = v.RefundRemark
|