Quellcode durchsuchen

公对公转账 提示信息纠正

wangshan vor 4 Jahren
Ursprung
Commit
de60941774

+ 3 - 3
src/jfw/modules/subscribepay/src/entity/jyCourseStruct.go

@@ -66,8 +66,8 @@ func init() {
 }
 
 //给运营人员发送邮件通知   0:支付成功 1:对公转账凭证提交  2:申请退款
-func SendMailToOperation(ic int, orderCode string, auth []*mail.GmailAuth) {
-	var mail_title = "剑鱼标讯-招投标课程"
+func SendMailToOperation(ic int, orderCode, productType string, auth []*mail.GmailAuth) {
+	var mail_title = "剑鱼标讯-" + productType
 	var subject = "支付成功"
 	if ic == 1 {
 		subject = "公对公转账凭证审核"
@@ -111,7 +111,7 @@ func (this *jyCourse) PayCallBack(param *CallBackParam) bool {
 		}
 		if update {
 			//0:支付成功 1:对公转账凭证提交  2:申请退款
-			go SendMailToOperation(0, orderCode, config.GmailAuth)
+			go SendMailToOperation(0, orderCode, "招投标课程", config.GmailAuth)
 		}
 	}
 	return update

+ 3 - 2
src/jfw/modules/subscribepay/src/service/commonAction.go

@@ -331,6 +331,7 @@ func (this *CommonAction) SaveTransferAccounts() {
 	orderCode := this.GetString("orderCode")
 	transferV := this.GetString("transferV")
 	userId := qutil.ObjToString(this.GetSession("userId"))
+	productType := ""
 	r := func() *entity.FuncResult {
 		if !imgReg.MatchString(transferV) {
 			return &entity.FuncResult{false, errors.New("上传图片异常"), nil}
@@ -343,7 +344,7 @@ func (this *CommonAction) SaveTransferAccounts() {
 		if !(qutil.IntAll((*rSearch)["order_status"]) == 0 && (qutil.IntAll((*rSearch)["course_status"]) == 0 || qutil.IntAll((*rSearch)["course_status"]) == 1 || qutil.IntAll((*rSearch)["course_status"]) == 3)) {
 			return &entity.FuncResult{false, errors.New("操作异常"), nil}
 		}
-		productType := qutil.ObjToString((*rSearch)["product_type"])
+		productType = qutil.ObjToString((*rSearch)["product_type"])
 		if !(productType == "招投标课程" || productType == "大会员") {
 			return &entity.FuncResult{false, errors.New("非法请求"), nil}
 		}
@@ -372,7 +373,7 @@ func (this *CommonAction) SaveTransferAccounts() {
 			return &entity.FuncResult{false, errors.New("保存失败"), nil}
 		}
 		go func() {
-			entity.SendMailToOperation(1, orderCode, config.GmailAuth)
+			entity.SendMailToOperation(1, orderCode, productType, config.GmailAuth)
 			//关闭之前支付串(防止重复支付)
 			if qutil.ObjToString((*rSearch)["pay_way"]) != "" {
 				if !pay.CloseOrder(qutil.ObjToString((*rSearch)["out_trade_no"]), qutil.ObjToString((*rSearch)["pay_way"])) {

+ 5 - 3
src/jfw/modules/subscribepay/src/service/courseAction.go

@@ -94,7 +94,7 @@ func (this *CourseAction) SaveVoucher() {
 		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
 	} else {
 		//0:支付成功 1:对公转账凭证提交  2:申请退款
-		go entity.SendMailToOperation(1, this.GetString("orderCode"), config.GmailAuth)
+		go entity.SendMailToOperation(1, this.GetString("orderCode"), "招投标课程", config.GmailAuth)
 	}
 	this.ServeJson(r.Format())
 }
@@ -666,13 +666,14 @@ func (this *CourseAction) OrderInfo() {
 //退款
 func (this *CourseAction) Refund() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
+	productType := ""
 	r := func() *entity.FuncResult {
 		orderCode := this.GetString("orderCode")
 		refundReason := this.GetString("refundReason") //退款原因
 		orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
 			"order_code": orderCode,
 			"user_id":    userId,
-		}, "id,course_status,filter", "")
+		}, "id,course_status,filter,product_type", "")
 		if orderdata == nil {
 			return &entity.FuncResult{false, errors.New("未找到订单"), nil}
 		}
@@ -683,6 +684,7 @@ func (this *CourseAction) Refund() {
 		}
 		vmsg := entity.JyCourseDetailMsg{}
 		filterStr := qutil.ObjToString((*orderdata)["filter"])
+		productType = qutil.ObjToString((*orderdata)["product_type"])
 		if err := json.Unmarshal([]byte(filterStr), &vmsg); err != nil {
 			log.Printf("%s course PayCallBack Unmarshal 出错 [%s]\n", userId, filterStr)
 			return &entity.FuncResult{false, errors.New("序列化出错"), nil}
@@ -710,7 +712,7 @@ func (this *CourseAction) Refund() {
 		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
 	} else {
 		//0:支付成功 1:对公转账凭证提交  2:申请退款
-		go entity.SendMailToOperation(2, this.GetString("orderCode"), config.GmailAuth)
+		go entity.SendMailToOperation(2, this.GetString("orderCode"), productType, config.GmailAuth)
 	}
 	this.ServeJson(r.Format())
 }

+ 0 - 2
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -120,7 +120,6 @@ func (o *OrderListDetails) MyOrder() {
 	}
 
 	typ := o.GetString("type") // 0全部 1未支付 2已支付 3已取消
-	log.Println("-----:", typ)
 	if typ != "0" && typ != "" {
 		if typ == "1" {
 			queryM["order_status"] = orderStatus_unPaid
@@ -170,7 +169,6 @@ func (o *OrderListDetails) DeleteOrder() error {
 		typ := o.GetString("type")
 		cancel := o.GetString("cancel")
 		pageNum, _ := o.GetInteger("pageNum")
-		log.Println("-----:", typ)
 		if typ != "0" && typ != "" {
 			if typ == "1" {
 				queryM["order_status"] = orderStatus_unPaid