config.go 578 B

12345678910111213141516171819202122232425262728293031
  1. package services
  2. import (
  3. "fmt"
  4. "hongze/hongze_cygx/models"
  5. )
  6. //是否展示限免标签
  7. func GetShowSustainable() (isShowSustainable bool) {
  8. total, err := models.GetShowSustainable()
  9. if err != nil {
  10. fmt.Println("GetShowSustainable Err:", err.Error())
  11. return
  12. }
  13. if total > 0 {
  14. isShowSustainable = true
  15. }
  16. return
  17. }
  18. func GetShowSustainableNew() (isShowSustainable bool, err error) {
  19. total, err := models.GetShowSustainable()
  20. if err != nil {
  21. fmt.Println("GetShowSustainable Err:", err.Error())
  22. return
  23. }
  24. if total > 0 {
  25. isShowSustainable = true
  26. }
  27. return
  28. }