|
@@ -162,10 +162,6 @@ func GetFlowPercentDuration(advertiser string, action string) *adslib.FlogContro
|
162
|
162
|
|
163
|
163
|
// 设置回调回来的广告动作的次数
|
164
|
164
|
func SetDistributeActionNum(advertiser string, action string, bannerid int) {
|
165
|
|
- if adslib.GetConf().TestMode {
|
166
|
|
- return
|
167
|
|
- }
|
168
|
|
-
|
169
|
165
|
if advertiser == "" {
|
170
|
166
|
return
|
171
|
167
|
}
|
|
@@ -204,9 +200,6 @@ func GetDeviceIpReport(deviceId string, ip string) (bool, error) {
|
204
|
200
|
|
205
|
201
|
// 设置设备+ip上报的时间点
|
206
|
202
|
func SetDeviceIpReport(deviceid string, ip string) {
|
207
|
|
- if adslib.GetConf().TestMode {
|
208
|
|
- return
|
209
|
|
- }
|
210
|
203
|
conn := ads_redis.RedisConn.Get()
|
211
|
204
|
defer conn.Close()
|
212
|
205
|
|
|
@@ -216,9 +209,6 @@ func SetDeviceIpReport(deviceid string, ip string) {
|
216
|
209
|
|
217
|
210
|
// 设置总请求到广告的次数
|
218
|
211
|
func SetAdsRequestNum(advertiser string, bannerId int) {
|
219
|
|
- if adslib.GetConf().TestMode {
|
220
|
|
- return
|
221
|
|
- }
|
222
|
212
|
if advertiser == "" {
|
223
|
213
|
return
|
224
|
214
|
}
|
|
@@ -234,9 +224,6 @@ func SetAdsRequestNum(advertiser string, bannerId int) {
|
234
|
224
|
}
|
235
|
225
|
|
236
|
226
|
func SetAdsRealRequestNum(advertiser string) {
|
237
|
|
- if adslib.GetConf().TestMode {
|
238
|
|
- return
|
239
|
|
- }
|
240
|
227
|
if advertiser == "" {
|
241
|
228
|
return
|
242
|
229
|
}
|
|
@@ -277,9 +264,6 @@ func GetMinScriptOrderByAdv(advertiser string) (int64, error) {
|
277
|
264
|
|
278
|
265
|
// 设置来源的曝光次数
|
279
|
266
|
func SetReqSourceView(adv string, reqSource string, source string) {
|
280
|
|
- if adslib.GetConf().TestMode {
|
281
|
|
- return
|
282
|
|
- }
|
283
|
267
|
conn := ads_redis.RedisConn.Get()
|
284
|
268
|
defer conn.Close()
|
285
|
269
|
|
|
@@ -329,10 +313,6 @@ func GetFinishedDispatchCount(orderId int64, dispatchType string, curTime time.T
|
329
|
313
|
// 增加已经投放的量
|
330
|
314
|
// dispatchType: "click", "show"
|
331
|
315
|
func IncrFinishedDispatchCount(orderId int64, dispatchType string, incrCnt int, curTime time.Time) (int, error) {
|
332
|
|
- if adslib.GetConf().TestMode {
|
333
|
|
- return 0, nil
|
334
|
|
- }
|
335
|
|
-
|
336
|
316
|
conn := ads_redis.RedisConn.Get()
|
337
|
317
|
defer conn.Close()
|
338
|
318
|
|
|
@@ -371,10 +351,6 @@ func GetPreMinuteFinishedDispatchCount(orderId int64, dispatchType string, curTi
|
371
|
351
|
// 增加当前分钟已经投放的量
|
372
|
352
|
// dispatchType: "click", "show"
|
373
|
353
|
func IncrPreMinuteFinishedDispatchCount(orderId int64, dispatchType string, incrCnt int, curTime time.Time) (int, error) {
|
374
|
|
- if adslib.GetConf().TestMode {
|
375
|
|
- return 0, nil
|
376
|
|
- }
|
377
|
|
-
|
378
|
354
|
conn := ads_redis.RedisConn.Get()
|
379
|
355
|
defer conn.Close()
|
380
|
356
|
|
|
@@ -391,9 +367,6 @@ func IncrPreMinuteFinishedDispatchCount(orderId int64, dispatchType string, incr
|
391
|
367
|
// 设置总计划投放数量
|
392
|
368
|
// dispatchType: "click", "show"
|
393
|
369
|
func SetPlanDispatchCount(orderId int64, dispatchType string, cnt int, curTime time.Time) {
|
394
|
|
- if adslib.GetConf().TestMode {
|
395
|
|
- return
|
396
|
|
- }
|
397
|
370
|
conn := ads_redis.RedisConn.Get()
|
398
|
371
|
defer conn.Close()
|
399
|
372
|
|
|
@@ -404,9 +377,6 @@ func SetPlanDispatchCount(orderId int64, dispatchType string, cnt int, curTime t
|
404
|
377
|
// 设置订单计划投放数量
|
405
|
378
|
// dispatchType: "click", "show"
|
406
|
379
|
func SetOrderPlanDispatchCount(orderId int64, dispatchType string, cnt int, curTime time.Time) {
|
407
|
|
- if adslib.GetConf().TestMode {
|
408
|
|
- return
|
409
|
|
- }
|
410
|
380
|
conn := ads_redis.RedisConn.Get()
|
411
|
381
|
defer conn.Close()
|
412
|
382
|
|