|
@@ -9,6 +9,7 @@ import (
|
|
|
"github.com/gogf/gf/v2/errors/gerror"
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
+ "jyOrderManager/internal/consts"
|
|
|
"jyOrderManager/internal/jyutil"
|
|
|
"jyOrderManager/internal/logic/order"
|
|
|
"jyOrderManager/internal/logic/product"
|
|
@@ -141,6 +142,10 @@ WHERE
|
|
|
g.DB().Update(ctx, "transaction", map[string]interface{}{"ISRELATION": 1, "return_id": fmt.Sprint(returnId)}, map[string]interface{}{"id": id})
|
|
|
log.Println("自动回款开通权益", orderCode, gconv.Int(o["return_status"]), updateData["return_status"], returned_money, returnMoney, money)
|
|
|
if gconv.Int(o["return_status"]) != 1 && updateData["return_status"] == 1 {
|
|
|
+ //全额回款开通权益
|
|
|
+ if !consts.PhoneRegex.MatchString(gconv.String(o["user_phone"])) {
|
|
|
+ continue
|
|
|
+ }
|
|
|
productDetail, err := g.DB().Ctx(ctx).Query(ctx, fmt.Sprintf(`SELECT * FROM jy_order_detail WHERE order_code ='%s' and returned_open =1`, orderCode))
|
|
|
if err != nil || productDetail.IsEmpty() {
|
|
|
continue
|