|
@@ -138,14 +138,9 @@ WHERE
|
|
log.Println("自动回款创建回款记录成功", id, orderCode)
|
|
log.Println("自动回款创建回款记录成功", id, orderCode)
|
|
g.DB().Update(ctx, "dataexport_order", updateData, map[string]interface{}{"order_code": orderCode})
|
|
g.DB().Update(ctx, "dataexport_order", updateData, map[string]interface{}{"order_code": orderCode})
|
|
g.DB().Update(ctx, "transaction", map[string]interface{}{"ISRELATION": 1, "return_id": fmt.Sprint(returnId)}, map[string]interface{}{"id": id})
|
|
g.DB().Update(ctx, "transaction", map[string]interface{}{"ISRELATION": 1, "return_id": fmt.Sprint(returnId)}, map[string]interface{}{"id": id})
|
|
- fMap := gconv.Map(o["filter"])
|
|
|
|
- paybackOpenServer := false
|
|
|
|
- if v1, ok := (fMap["paybackOpenServer"]).(bool); ok {
|
|
|
|
- paybackOpenServer = v1
|
|
|
|
- }
|
|
|
|
- log.Println("自动回款开通权益", orderCode, gconv.Int(o["return_status"]), paybackOpenServer, updateData["return_status"], returned_money, returnMoney, money)
|
|
|
|
- if gconv.Int(o["return_status"]) != 1 && paybackOpenServer && updateData["return_status"] == 1 {
|
|
|
|
- productDetail, err := g.DB().Ctx(ctx).Query(ctx, fmt.Sprintf(`SELECT * FROM jy_order_detail WHERE order_code ='%s'`, orderCode))
|
|
|
|
|
|
+ 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 {
|
|
|
|
+ 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() {
|
|
if err != nil || productDetail.IsEmpty() {
|
|
continue
|
|
continue
|
|
}
|
|
}
|