1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- package services
- import (
- "fmt"
- "hongze/hongze_cygx/models"
- )
- //10.3版本上线需要更新的数据
- func init51111() {
- var condition string
- var pars []interface{}
- var err error
- fmt.Print()
- //处理上周纪要汇总
- condition = ` AND visible_range = 1 `
- listresearchsummary, err := models.GetReportSelectionListHome(condition, "cygx_minutes_summary", pars, 0, 100000)
- if err != nil {
- fmt.Println(err)
- }
- condition = ` AND source = 'minutessummary' `
- err = models.DeleteResourceDataList(condition, pars)
- if err != nil {
- fmt.Println(err)
- }
- for _, v := range listresearchsummary {
- go UpdateResourceData(v.ArticleId, "minutessummary", "add", v.PublishDate)
- }
- fmt.Println(listresearchsummary)
- }
- func init2222() {
- var condition string
- var pars []interface{}
- var err error
- fmt.Print()
- //处理本周纪要汇总
- condition = ` AND visible_range = 1 `
- listresearchsummary, err := models.GetReportSelectionListHome(condition, "cygx_research_summary", pars, 0, 100000)
- if err != nil {
- fmt.Println(err)
- }
- condition = ` AND source = 'researchsummary' `
- err = models.DeleteResourceDataList(condition, pars)
- if err != nil {
- fmt.Println(err)
- }
- for _, v := range listresearchsummary {
- go UpdateResourceData(v.ArticleId, "researchsummary", "add", v.PublishDate)
- }
- fmt.Println(listresearchsummary)
- }
- func init333() {
- var condition string
- var pars []interface{}
- var err error
- fmt.Print()
- //处理晨会精华
- listrMeet, err := models.GetCygxMorningMeetingReviewChapterList(condition, pars)
- if err != nil {
- fmt.Println(err)
- }
- condition = ` AND source = 'meetingreviewchapt' `
- err = models.DeleteResourceDataList(condition, pars)
- if err != nil {
- fmt.Println(err)
- }
- for _, v := range listrMeet {
- go UpdateResourceData(v.Id, "meetingreviewchapt", "add", v.PublishTime)
- }
- fmt.Println(listrMeet)
- }
- func init444() {
- listMap, err := models.GetCygxXzsChooseCategoryMapList()
- if err != nil {
- fmt.Println(err)
- }
- mapReport := make(map[int]int)
- for _, v := range listMap {
- mapReport[v.CategoryId] = v.Id
- }
- list, err := models.GetCygxXzsChooseCategoryWhithIdCygxList()
- if err != nil {
- fmt.Println(err)
- }
- for _, v := range list {
- fmt.Println(mapReport[v.CategoryId])
- err = models.UpdateCygxXzsChooseCategory(mapReport[v.CategoryId], v.Id)
- if err != nil {
- fmt.Println(err)
- }
- }
- }
|