|
@@ -2,6 +2,7 @@ package happy_orchard |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db/model" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db/model" |
|
|
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md" |
|
|
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/happy_orchard/md" |
|
|
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/happy_orchard/md" |
|
|
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils" |
|
|
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/cache" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/cache" |
|
@@ -15,6 +16,14 @@ import ( |
|
|
"xorm.io/xorm" |
|
|
"xorm.io/xorm" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func Init(redisAddr string) (err error) { |
|
|
|
|
|
if redisAddr != "" { |
|
|
|
|
|
cache.NewRedis(redisAddr) |
|
|
|
|
|
} |
|
|
|
|
|
_, err = cache.SelectDb(md.RedisDataBase) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func HappyOrchardGiveWater(eg *xorm.Engine, masterId string, uid int, isMultiple int) (err error) { |
|
|
func HappyOrchardGiveWater(eg *xorm.Engine, masterId string, uid int, isMultiple int) (err error) { |
|
|
newHappyOrchardBasicSettingDb := implement.NewHappyOrchardBasicSettingDb(eg) |
|
|
newHappyOrchardBasicSettingDb := implement.NewHappyOrchardBasicSettingDb(eg) |
|
|
base, _ := newHappyOrchardBasicSettingDb.GetHappyOrchardBasicSetting() |
|
|
base, _ := newHappyOrchardBasicSettingDb.GetHappyOrchardBasicSetting() |
|
|