|
@@ -32,9 +32,7 @@ func OnlineReturnMoney() {
|
|
|
payWay = gconv.String(m["pay_way"])
|
|
|
)
|
|
|
|
|
|
- orderData, _ := g.DB().GetOne(ctx, "dataexport_order", map[string]interface{}{
|
|
|
- "order_code": orderCode,
|
|
|
- }, "", "")
|
|
|
+ orderData, _ := g.DB().GetOne(ctx, "SELECT * FROM dataexport_order WHERE order_code = ?", orderCode)
|
|
|
if orderData.IsEmpty() {
|
|
|
continue
|
|
|
}
|
|
@@ -116,28 +114,28 @@ func OnlineReturnMoney() {
|
|
|
}
|
|
|
|
|
|
if orderUpdate["return_status"] == 1 && consts.PhoneRegex.MatchString(gconv.String(orderData["user_phone"])) {
|
|
|
- productDetail, _ := g.DB().Ctx(ctx).Query(ctx, fmt.Sprintf(`SELECT * FROM jy_order_detail WHERE order_code ='%s' and returned_open =1 and returned_open = 0 and is_service_open = 0 and status =1`, orderCode))
|
|
|
+ productDetail, _ := g.DB().Ctx(ctx).Query(ctx, fmt.Sprintf(`SELECT * FROM jy_order_detail WHERE order_code ='%s' and returned_open =1 and is_service_open = 0 and status =1`, orderCode))
|
|
|
if !productDetail.IsEmpty() {
|
|
|
//全额回款开通权益
|
|
|
for _, o := range productDetail.List() {
|
|
|
- if !jyutil.IsServiceOpen(m) {
|
|
|
+ if !jyutil.IsServiceOpen(o) {
|
|
|
continue
|
|
|
}
|
|
|
- m["userMap"] = map[string]interface{}{
|
|
|
+ o["userMap"] = map[string]interface{}{
|
|
|
"userData": uData, "entId": entId, "userPositionId": userPositionId,
|
|
|
}
|
|
|
//参数注入
|
|
|
- m["phone"] = o["user_phone"]
|
|
|
- m["order_code"] = orderCode
|
|
|
- m["amount"] = m["final_price"]
|
|
|
- m["reqCompanyName"] = o["company_name"]
|
|
|
- m["reqSubject"] = o["buy_subject"]
|
|
|
- productCode := gconv.String(m["product_code"])
|
|
|
+ o["phone"] = orderData.Map()["user_phone"]
|
|
|
+ o["order_code"] = orderCode
|
|
|
+ o["amount"] = o["final_price"]
|
|
|
+ o["reqCompanyName"] = orderData.Map()["company_name"]
|
|
|
+ o["reqSubject"] = orderData.Map()["buy_subject"]
|
|
|
+ productCode := gconv.String(o["product_code"])
|
|
|
pFunc, err := product.JyProFunc.GetProductInitFuncByCode(productCode)
|
|
|
if err != nil {
|
|
|
continue
|
|
|
}
|
|
|
- pObj, err := pFunc(m)
|
|
|
+ pObj, err := pFunc(o)
|
|
|
if err != nil {
|
|
|
gerror.Wrap(err, fmt.Sprintf("获取%s商品异常", productCode))
|
|
|
continue
|