check_publishtime.go 804 B

123456789101112131415161718192021222324252627282930
  1. package main
  2. import (
  3. qu "qfw/util"
  4. )
  5. func getCheckDataPublishtime(tmp map[string]interface{},update_check *map[string]interface{}) {
  6. publishtime := qu.IntAll(tmp["publishtime"])
  7. bidopentime := qu.IntAll(tmp["bidopentime"])
  8. bidendtime := qu.IntAll(tmp["bidendtime"])
  9. if (bidopentime > 0 || bidendtime > 0) && publishtime > 0 {
  10. //验证-是否超过周期16天
  11. bid_time := 0
  12. if bidopentime>0 {
  13. bid_time = bidopentime
  14. }else {
  15. bid_time = bidendtime
  16. }
  17. if bidendtime<bidopentime && bidendtime>0 && bidopentime>0 {
  18. bid_time = bidendtime
  19. }
  20. if publishtime-bid_time>16*86400 && publishtime>0 && bid_time>0{ //需要修复-异常时间数据
  21. (*update_check)["dataging"] = 1
  22. (*update_check)["publishtime"] = bid_time
  23. (*update_check)["pt_modify"] = publishtime
  24. }
  25. }
  26. }