xingzai 3 år sedan
förälder
incheckning
821cf2e683
66 ändrade filer med 118 tillägg och 113 borttagningar
  1. 0 3
      .gitignore
  2. 1 1
      controllers/activity.go
  3. 1 1
      controllers/base_auth.go
  4. 1 1
      controllers/home.go
  5. 1 1
      controllers/report.go
  6. 1 1
      controllers/search.go
  7. 1 1
      controllers/tactics.go
  8. 1 1
      controllers/user.go
  9. 2 2
      models/activity.go
  10. 1 1
      models/activity_fastsearch_keywords.go
  11. 1 1
      models/activity_help_ask.go
  12. 1 1
      models/activity_meet_detail_log.go
  13. 1 1
      models/activity_meeting_reminder.go
  14. 1 1
      models/activity_mirror_word.go
  15. 1 1
      models/activity_signup.go
  16. 1 1
      models/activity_type.go
  17. 1 1
      models/activity_user_search_content.go
  18. 2 2
      models/advice.go
  19. 1 1
      models/apply_record.go
  20. 1 1
      models/article.go
  21. 1 1
      models/article_ask.go
  22. 1 1
      models/article_author.go
  23. 7 8
      models/article_collect.go
  24. 2 2
      models/article_department.go
  25. 1 1
      models/article_department_follow.go
  26. 1 1
      models/article_history_record.go
  27. 1 1
      models/article_interview_apply.go
  28. 1 1
      models/article_view_record.go
  29. 1 1
      models/chart_permission.go
  30. 1 1
      models/company.go
  31. 1 1
      models/config.go
  32. 1 1
      models/cygx_industry_top.go
  33. 1 1
      models/cygx_user_record.go
  34. 1 1
      models/db.go
  35. 1 1
      models/db_base.go
  36. 2 2
      models/home.go
  37. 1 1
      models/industrial_management.go
  38. 1 1
      models/industry_fllow.go
  39. 6 6
      models/industry_map.go
  40. 1 1
      models/minutesSummary.go
  41. 1 1
      models/msg_code.go
  42. 1 1
      models/page_history_record.go
  43. 3 3
      models/report.go
  44. 1 1
      models/report_history_record.go
  45. 1 1
      models/report_mapping.go
  46. 2 2
      models/report_selection.go
  47. 1 1
      models/researchSummary.go
  48. 2 2
      models/resource.go
  49. 3 3
      models/search.go
  50. 1 1
      models/search_key_word.go
  51. 1 1
      models/seller.go
  52. 2 2
      models/session.go
  53. 2 2
      models/tactics.go
  54. 2 2
      models/user.go
  55. 1 1
      models/user_record.go
  56. 1 1
      models/user_search_key_word.go
  57. 2 2
      models/wechat.go
  58. 1 1
      models/wx_template_msg.go
  59. 1 1
      models/wx_user.go
  60. 5 5
      models/wx_user_code.go
  61. 1 1
      models/wx_user_log.go
  62. 1 1
      models/wx_user_white.go
  63. 4 5
      services/aliyun.go
  64. 3 5
      services/baidu.go
  65. 1 1
      services/wechat.go
  66. 20 8
      utils/config.go

+ 0 - 3
.gitignore

@@ -1,7 +1,4 @@
-/routers/commentsRouter_controllers.go
 /*.exe
-/go.sum
-/go.mod
 /rdlucklog
 /binlog
 /.idea

+ 1 - 1
controllers/activity.go

@@ -4,13 +4,13 @@ import (
 	"encoding/json"
 	"fmt"
 	"github.com/medivhzhan/weapp/v2"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"github.com/tealeg/xlsx"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
 	"os"
 	"path/filepath"
-	"rdluck_tools/paging"
 	"strconv"
 	"strings"
 	"time"

+ 1 - 1
controllers/base_auth.go

@@ -12,7 +12,7 @@ import (
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/utils"
 
-	"rdluck_tools/log"
+	"github.com/rdlucklib/rdluck_tools/log"
 )
 
 var apiLog *log.Log

+ 1 - 1
controllers/home.go

@@ -1,10 +1,10 @@
 package controllers
 
 import (
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/paging"
 	"strings"
 )
 

+ 1 - 1
controllers/report.go

@@ -3,11 +3,11 @@ package controllers
 import (
 	"encoding/json"
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
 	"html"
-	"rdluck_tools/paging"
 	"strconv"
 	"strings"
 	"time"

+ 1 - 1
controllers/search.go

@@ -2,10 +2,10 @@ package controllers
 
 import (
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/paging"
 	"time"
 )
 

+ 1 - 1
controllers/tactics.go

@@ -2,11 +2,11 @@ package controllers
 
 import (
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
 	"html"
-	"rdluck_tools/paging"
 	"regexp"
 	"strconv"
 	"strings"

+ 1 - 1
controllers/user.go

@@ -3,10 +3,10 @@ package controllers
 import (
 	"encoding/json"
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/paging"
 	"strconv"
 	"strings"
 	"time"

+ 2 - 2
models/activity.go

@@ -1,8 +1,8 @@
 package models
 
 import (
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"time"
 )
 

+ 1 - 1
models/activity_fastsearch_keywords.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type ActivityFastsearchKeywords struct {

+ 1 - 1
models/activity_help_ask.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/activity_meet_detail_log.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/activity_meeting_reminder.go

@@ -2,7 +2,7 @@ package models
 
 import (
 	"fmt"
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/activity_mirror_word.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type CygxActivityMirrorWord struct {

+ 1 - 1
models/activity_signup.go

@@ -2,7 +2,7 @@ package models
 
 import (
 	"fmt"
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/activity_type.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type ActivityType struct {

+ 1 - 1
models/activity_user_search_content.go

@@ -2,7 +2,7 @@ package models
 
 import (
 	"fmt"
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 2 - 2
models/advice.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 
@@ -27,6 +27,6 @@ func AddCygxAdvice(item *CygxAdvice) (lastId int64, err error) {
 }
 
 type AddCygxAdviceReq struct {
-	Advice       string   `description:"优化建议"`
+	Advice       string `description:"优化建议"`
 	AdviceImgUrl string `description:"图片,多张用#分割"`
 }

+ 1 - 1
models/apply_record.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/article.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/article_ask.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/article_author.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type CygxArticleAuthor struct {

+ 7 - 8
models/article_collect.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 
@@ -19,9 +19,8 @@ func AddCygxArticleCollect(item *CygxArticleCollect) (lastId int64, err error) {
 	return
 }
 
-
 type ArticleCollectReq struct {
-	ArticleId   int `description:"报告id"`
+	ArticleId int `description:"报告id"`
 }
 
 type ArticleCollectResp struct {
@@ -49,10 +48,10 @@ func GetArticleCollectCount(userId, articleId int) (count int, err error) {
 }
 
 type ArticleCollectList struct {
-	Id         int `orm:"column(id);pk"`
-	ArticleId  int
-	UserId     int
-	CreateTime time.Time
+	Id              int `orm:"column(id);pk"`
+	ArticleId       int
+	UserId          int
+	CreateTime      time.Time
 	Title           string `description:"标题"`
 	TitleEn         string `description:"英文标题 "`
 	UpdateFrequency string `description:"更新周期"`
@@ -62,4 +61,4 @@ type ArticleCollectList struct {
 	Abstract        string `description:"摘要"`
 	CategoryName    string `description:"一级分类"`
 	SubCategoryName string `description:"二级分类"`
-}
+}

+ 2 - 2
models/article_department.go

@@ -1,8 +1,8 @@
 package models
 
 import (
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"time"
 )
 

+ 1 - 1
models/article_department_follow.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/article_history_record.go

@@ -2,8 +2,8 @@ package models
 
 import (
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/article_interview_apply.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/article_view_record.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/chart_permission.go

@@ -1,6 +1,6 @@
 package models
 
-import "rdluck_tools/orm"
+import "github.com/rdlucklib/rdluck_tools/orm"
 
 type ChartPermission struct {
 	ChartPermissionId int    `description:"权限id"`

+ 1 - 1
models/company.go

@@ -1,6 +1,6 @@
 package models
 
-import "rdluck_tools/orm"
+import "github.com/rdlucklib/rdluck_tools/orm"
 
 type CompanyDetail struct {
 	CompanyId   int    `orm:"column(company_id);pk"`

+ 1 - 1
models/config.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/cygx_industry_top.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/cygx_user_record.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/db.go

@@ -5,7 +5,7 @@ import (
 	"hongze/hongze_cygx/utils"
 	"time"
 
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 func init() {

+ 1 - 1
models/db_base.go

@@ -3,7 +3,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 // 是否存在

+ 2 - 2
models/home.go

@@ -1,8 +1,8 @@
 package models
 
 import (
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 )
 
 func GetHomeCount(condition string, pars []interface{}) (count int, err error) {

+ 1 - 1
models/industrial_management.go

@@ -1,8 +1,8 @@
 package models
 
 import (
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/orm"
 	"strconv"
 	"time"
 )

+ 1 - 1
models/industry_fllow.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 6 - 6
models/industry_map.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 
@@ -30,7 +30,7 @@ type CygxIndustryMapItems struct {
 	IndustryMapId   int `orm:"column(industry_map_id);" description:"行业图谱id"`
 	IndustryMapName string
 	ParentId        int
-	Level        int
+	Level           int
 	Children        []*CygxIndustryMapItems
 }
 
@@ -60,16 +60,16 @@ func GetFirstCygxIndustryItemByName(industryName string) (items *CygxIndustryMap
 func GetFirstCygxIndustryListByName(industryName string) (list []*CygxIndustryMapItems, err error) {
 	o := orm.NewOrm()
 	sql := ` SELECT * FROM cygx_industry_map WHERE industry_map_name like '%` + industryName + `%' order by level,industry_map_id asc`
-	_,err = o.Raw(sql).QueryRows(&list)
+	_, err = o.Raw(sql).QueryRows(&list)
 	return
 }
 
 //根据名称模糊匹配获取一条数据
-func FixLevelData(industryMapId int,level int) (list []*CygxIndustryMapItems, err error) {
+func FixLevelData(industryMapId int, level int) (list []*CygxIndustryMapItems, err error) {
 	o := orm.NewOrm()
 	sql := ` UPDATE cygx_industry_map set level = ? WHERE industry_map_id = ?`
-	_,err = o.Raw(sql,level,industryMapId).QueryRows(&list)
+	_, err = o.Raw(sql, level, industryMapId).QueryRows(&list)
 	return
 }
 
-//func
+//func

+ 1 - 1
models/minutesSummary.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type DetailCygxMinutesSummaryRep struct {

+ 1 - 1
models/msg_code.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/page_history_record.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 3 - 3
models/report.go

@@ -1,10 +1,10 @@
 package models
 
 import (
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"strconv"
-	//"rdluck_tools/paging"
+	//"github.com/rdlucklib/rdluck_tools/paging"
 )
 
 type IndustrialManagementList struct {

+ 1 - 1
models/report_history_record.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/report_mapping.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type ReportMapping struct {

+ 2 - 2
models/report_selection.go

@@ -1,8 +1,8 @@
 package models
 
 import (
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"time"
 )
 

+ 1 - 1
models/researchSummary.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 2 - 2
models/resource.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 
@@ -15,7 +15,7 @@ type Resource struct {
 type ResourceResp struct {
 	Id          int64  `orm:"column(id);" description:"用户id"`
 	ResourceUrl string `description:"资源地址"`
-	PlaySeconds    uint32 `description:"播放时长,单位秒"`
+	PlaySeconds uint32 `description:"播放时长,单位秒"`
 }
 
 func AddResource(item *Resource) (newId int64, err error) {

+ 3 - 3
models/search.go

@@ -1,8 +1,8 @@
 package models
 
 import (
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 )
 
 type SearchItem struct {
@@ -30,4 +30,4 @@ func GetCategoryByCompanyId(companyId int) (items []*CategoryItem, err error) {
 type SearchResp struct {
 	Paging *paging.PagingItem
 	List   []*SearchItem
-}
+}

+ 1 - 1
models/search_key_word.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/seller.go

@@ -1,6 +1,6 @@
 package models
 
-import "rdluck_tools/orm"
+import "github.com/rdlucklib/rdluck_tools/orm"
 
 type AdminItem struct {
 	AdminId        int    `description:"系统用户id"`

+ 2 - 2
models/session.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 
@@ -50,4 +50,4 @@ func GetTokenByOpenId(openId string) (item *CygxSession, err error) {
 	o := orm.NewOrm()
 	err = o.Raw(sql, openId).QueryRow(&item)
 	return
-}
+}

+ 2 - 2
models/tactics.go

@@ -2,8 +2,8 @@ package models
 
 import (
 	"fmt"
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"strconv"
 	"time"
 )

+ 2 - 2
models/user.go

@@ -2,9 +2,9 @@ package models
 
 import (
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/orm"
-	"rdluck_tools/paging"
 	"time"
 )
 

+ 1 - 1
models/user_record.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/user_search_key_word.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 2 - 2
models/wechat.go

@@ -3,9 +3,9 @@ package models
 import (
 	"encoding/json"
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/http"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/http"
-	"rdluck_tools/orm"
 	"strings"
 	"time"
 )

+ 1 - 1
models/wx_template_msg.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 type SendTemplateResponse struct {

+ 1 - 1
models/wx_user.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 5 - 5
models/wx_user_code.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 
@@ -23,9 +23,9 @@ func AddWxUserCode(item *WxUserCode) (lastId int64, err error) {
 	return
 }
 
-func GetWxUserCode(wxCode string)(item *WxUserCode,err error)  {
+func GetWxUserCode(wxCode string) (item *WxUserCode, err error) {
 	o := orm.NewOrm()
-	sql:=`SELECT * FROM wx_user_code WHERE wx_code=? `
-	err=o.Raw(sql,wxCode).QueryRow(&item)
+	sql := `SELECT * FROM wx_user_code WHERE wx_code=? `
+	err = o.Raw(sql, wxCode).QueryRow(&item)
 	return
-}
+}

+ 1 - 1
models/wx_user_log.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/wx_user_white.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 4 - 5
services/aliyun.go

@@ -9,7 +9,7 @@ import (
 	"net/http"
 	"strings"
 
-	rhttp "rdluck_tools/http"
+	rhttp "github.com/rdlucklib/rdluck_tools/http"
 )
 
 const (
@@ -33,7 +33,6 @@ type OcrResult struct {
 func AliyunBusinessCard(imgUrl string) (result *OcrResult, err error) {
 	postUrl := `https://dm-57.data.aliyun.com/rest/160601/ocr/ocr_business_card.json`
 
-
 	imgBody, err := rhttp.Get(imgUrl)
 	if err != nil {
 		return
@@ -59,8 +58,8 @@ func AliyunBusinessCard(imgUrl string) (result *OcrResult, err error) {
 	req.Header.Set("Content-Type", "application/json")
 	req.Header.Set("Authorization", "APPCODE "+AlAppCode)
 	resp, err := client.Do(req)
-	if err!=nil {
-		fmt.Println("client.Do Err:"+err.Error())
+	if err != nil {
+		fmt.Println("client.Do Err:" + err.Error())
 		return
 	}
 	fmt.Println("resp")
@@ -71,7 +70,7 @@ func AliyunBusinessCard(imgUrl string) (result *OcrResult, err error) {
 		fmt.Println("err:" + err.Error())
 		return
 	}
-	fmt.Println("body:",string(body))
+	fmt.Println("body:", string(body))
 	err = json.Unmarshal(body, &result)
 	return
 }

+ 3 - 5
services/baidu.go

@@ -5,8 +5,8 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"net/url"
-	"rdluck_tools/http"
 )
 
 /*
@@ -93,7 +93,7 @@ func GetBusinessCard(imgUrl string) (item *BdBussinessCard, err error) {
 	param := url.Values{}
 	param.Set("image", imgData)
 	cardBody, err := http.Post(bussinessCardUrl, param.Encode())
-	fmt.Println("body:",string(cardBody))
+	fmt.Println("body:", string(cardBody))
 	//fmt.Println(string(cardBody))
 	if err != nil {
 		fmt.Println("err:", err.Error())
@@ -201,8 +201,6 @@ func GetBusinessCardByAccurate(imgUrl string) (item *CardAccurate, err error) {
 	return
 }
 
-
-
 //通用文字(高精度)
 func GetBdGeneralBasic(imgUrl string) (item *CardAccurate, err error) {
 	imgBody, err := http.Get(imgUrl)
@@ -227,4 +225,4 @@ func GetBdGeneralBasic(imgUrl string) (item *CardAccurate, err error) {
 	}
 	err = json.Unmarshal(cardBody, &item)
 	return
-}
+}

+ 1 - 1
services/wechat.go

@@ -4,8 +4,8 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"hongze/hongze_cygx/utils"
-	"rdluck_tools/http"
 	"strconv"
 	"strings"
 	"time"

+ 20 - 8
utils/config.go

@@ -2,8 +2,8 @@ package utils
 
 import (
 	"fmt"
-	beego "github.com/beego/beego/v2/adapter"
-	"rdluck_tools/cache"
+	"github.com/beego/beego/v2/server/web"
+	"github.com/rdlucklib/rdluck_tools/cache"
 )
 
 var (
@@ -37,7 +37,7 @@ var (
 	WxMsgTemplateIdAskMsg           string //手机号用户【XXX】发送模板消息模板ID
 	WxMsgTemplateIdAskMsgXzs        string //手机号用户【XXX】发送模板消息模板ID(小助手)
 	WxMsgTemplateIdAskMsgMobile     string //手机号用户【XXX】发送模板消息
-	WxMsgTemplateIdAskMsgMobileAll  string //手机号用户【XXX】发送模板消
+	WxMsgTemplateIdAskMsgMobileAll  string //手机号用户【XXX】发送模板消rm -
 )
 
 //微信公众号配置信息
@@ -62,13 +62,25 @@ var (
 )
 
 func init() {
-	RunMode = beego.AppConfig.String("run_mode")
-
-	config, err := beego.AppConfig.GetSection(RunMode)
+	tmpRunMode, err := web.AppConfig.String("run_mode")
+	if err != nil {
+		panic("配置文件读取run_mode错误 " + err.Error())
+	}
+	fmt.Println("line 80:", tmpRunMode, err)
+	RunMode = tmpRunMode
+	if RunMode == "" {
+		RunMode = "release"
+		configPath := `/home/code/config/hongze_cygx/conf/app.conf`
+		err := web.LoadAppConfig("ini", configPath)
+		if err != nil {
+			fmt.Println("web.LoadAppConfig Err:" + err.Error())
+		}
+	}
+	config, err := web.AppConfig.GetSection(RunMode)
 	if err != nil {
 		panic("配置文件读取错误 " + err.Error())
 	}
-	beego.Info(RunMode + " 模式")
+	//beego.Info(RunMode + " 模式")
 	MYSQL_URL = config["mysql_url"]
 	MYSQL_URL_RDDP = config["mysql_url_rddp"]
 	MYSQL_URL_TACTICS = config["mysql_url_tactics"]
@@ -82,7 +94,7 @@ func init() {
 		fmt.Println(Re)
 		panic(Re)
 	}
-	IsTask, err = beego.AppConfig.Bool("IsTask")
+	IsTask, err = web.AppConfig.Bool("IsTask")
 	if err != nil {
 		panic("定时任务配置文件读取错误 " + err.Error())
 	}