|
|
|
|
@ -661,6 +661,17 @@ func Control(uid int, controlId int) error { |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
defaultTemplateRecharge := 300 * common.DecimalDigits |
|
|
|
|
userInfo, _ := call.GetUserInfo(uid) |
|
|
|
|
channelInfo := call.GetChannelByID(userInfo.ChannelID) |
|
|
|
|
if channelInfo.TemplateRecharge > 0 { |
|
|
|
|
defaultTemplateRecharge = channelInfo.TemplateRecharge |
|
|
|
|
} |
|
|
|
|
rechargeInfo := call.GetRechargeInfo(uid) |
|
|
|
|
if rechargeInfo.TotalRecharge >= int64(defaultTemplateRecharge) { |
|
|
|
|
req.TemplateId = "" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
log.Debug("sn control req, %+v", *req) |
|
|
|
|
reqBody, _ := json.Marshal(req) |
|
|
|
|
var tmpValue map[string]interface{} |
|
|
|
|
|