|
@@ -496,9 +496,19 @@ func memberSetMap(userId, waitEmpowerId int64, orderData map[string]interface{})
|
|
}
|
|
}
|
|
if resourceType != "" {
|
|
if resourceType != "" {
|
|
number := common.IntAll((*serverData)["s_count_year"])
|
|
number := common.IntAll((*serverData)["s_count_year"])
|
|
- cycle := common.IntAll((*filterMap)["cycle"]) //购买时长
|
|
|
|
- cycleType := common.IntAll((*filterMap)["cycleType"]) //时间类型
|
|
|
|
- cycleFmt := common.If(cycleType == 0, 12, 366).(int)
|
|
|
|
|
|
+ cycle := common.IntAll((*filterMap)["buy_cycle"]) + common.IntAll((*filterMap)["give_cycle"]) //购买时长
|
|
|
|
+ cycleType := common.If(common.IntAll((*filterMap)["buy_type"]) != 0, common.IntAll((*filterMap)["buy_type"]), common.IntAll((*filterMap)["give_type"])).(int) //时间类型
|
|
|
|
+ var cycleFmt int
|
|
|
|
+ switch cycleType {
|
|
|
|
+ case 1:
|
|
|
|
+ cycleFmt = 360
|
|
|
|
+ case 2:
|
|
|
|
+ cycleFmt = 12
|
|
|
|
+ case 3:
|
|
|
|
+ cycleFmt = 1
|
|
|
|
+ case 4:
|
|
|
|
+ cycleFmt = 4
|
|
|
|
+ }
|
|
number = number * (cycle / cycleFmt)
|
|
number = number * (cycle / cycleFmt)
|
|
frequency = number
|
|
frequency = number
|
|
if number > 0 {
|
|
if number > 0 {
|