Browse Source

no message

xingzai 10 months ago
parent
commit
5da778d36a
1 changed files with 15 additions and 9 deletions
  1. 15 9
      controllers/cygx/order.go

+ 15 - 9
controllers/cygx/order.go

@@ -76,7 +76,7 @@ func (this *OrderController) OrderList() {
 
 	if startDate != "" && endDate != "" { //时间范围
 		condition += ` 	AND create_time  BETWEEN ?   AND  ? `
-		pars = append(pars, startDate, endDate)
+		pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
 	}
 
 	if adminId != "" { //所属销售筛选
@@ -151,11 +151,11 @@ func (this *OrderController) OrderList() {
 		item.SourceTitle = v.SourceTitle
 		switch v.Source {
 		case utils.CYGX_OBJ_ARTICLE: //文章详情
-			item.HttpUrl = utils.CYGX_WEB_URL + "/material/info/" + strconv.Itoa(v.SourceId)
+			item.HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.SourceId)
 		case utils.CYGX_OBJ_ACTIVITY: //活动详情
-			item.HttpUrl = utils.CYGX_WEB_URL + "/activity/detail/" + strconv.Itoa(v.SourceId)
+			item.HttpUrl = utils.CYGX_MFYX_URL + "/activity/detail/" + strconv.Itoa(v.SourceId)
 		case utils.CYGX_OBJ_YANXUANSPECIAL: //专栏详情
-			item.HttpUrl = utils.CYGX_WEB_URL + "/column/detail/" + strconv.Itoa(v.SourceId)
+			item.HttpUrl = utils.CYGX_MFYX_URL + "/column/detail/" + strconv.Itoa(v.SourceId)
 		}
 		item.OrderStatus = v.OrderStatus
 
@@ -215,6 +215,9 @@ func (this *OrderController) OrderList() {
 		item.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
 		resp.List = append(resp.List, item)
 	}
+	if len(resp.List) == 0 {
+		resp.List = make([]*cygx.OrderListResp, 0)
+	}
 
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp.Paging = page
@@ -292,7 +295,7 @@ func (this *UserController) OrderRefund() {
 	}
 	br.Ret = 200
 	br.Success = true
-	br.Msg = "操作成功"
+	br.Msg = "已提交退款,请到退款记录页面查看"
 }
 
 // @Title 退款记录列表
@@ -355,7 +358,7 @@ func (this *OrderController) OrderRefundList() {
 
 	if startDate != "" && endDate != "" { //时间范围
 		condition += ` 	AND create_time  BETWEEN ?   AND  ? `
-		pars = append(pars, startDate, endDate)
+		pars = append(pars, startDate+" 00:00:01", endDate+" 23:59:59")
 	}
 
 	if adminId != "" { //所属销售筛选
@@ -429,11 +432,11 @@ func (this *OrderController) OrderRefundList() {
 		item.SourceTitle = v.SourceTitle
 		switch v.Source {
 		case utils.CYGX_OBJ_ARTICLE: //文章详情
-			item.HttpUrl = utils.CYGX_WEB_URL + "/material/info/" + strconv.Itoa(v.SourceId)
+			item.HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.SourceId)
 		case utils.CYGX_OBJ_ACTIVITY: //活动详情
-			item.HttpUrl = utils.CYGX_WEB_URL + "/activity/detail/" + strconv.Itoa(v.SourceId)
+			item.HttpUrl = utils.CYGX_MFYX_URL + "/activity/detail/" + strconv.Itoa(v.SourceId)
 		case utils.CYGX_OBJ_YANXUANSPECIAL: //专栏详情
-			item.HttpUrl = utils.CYGX_WEB_URL + "/column/detail/" + strconv.Itoa(v.SourceId)
+			item.HttpUrl = utils.CYGX_MFYX_URL + "/column/detail/" + strconv.Itoa(v.SourceId)
 		}
 		//OrderStatus      int       `comment:"订单状态,0:已取消、1:待支付、2:已支付、3:退款成功、4:退款处理中、5:退款异常、6:退款关闭"`
 		item.OrderStatus = v.OrderStatus
@@ -489,6 +492,9 @@ func (this *OrderController) OrderRefundList() {
 		item.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
 		resp.List = append(resp.List, item)
 	}
+	if len(resp.List) == 0 {
+		resp.List = make([]*cygx.OrderListResp, 0)
+	}
 
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp.Paging = page