12345678910111213141516171819202122232425 |
- package cache
- import (
- "eta_gn/eta_api/models/data_manage"
- "eta_gn/eta_api/utils"
- "fmt"
- )
- // 将替换指标操作加入到队列中
- func AddReplaceEdbInfo(oldEdbInfo, newEdbInfo *data_manage.EdbInfo, userId int) bool {
- record := new(data_manage.ReplaceEdbInfoItem)
- record.OldEdbInfo = oldEdbInfo
- record.NewEdbInfo = newEdbInfo
- record.UserId = userId
- if utils.Re == nil {
- err := utils.Rc.LPush(utils.CACHE_KEY_REPLACE_EDB, record)
- utils.FileLog.Info(fmt.Sprintf("指标替换 加入缓存 AddReplaceEdbInfo LPush: 旧指标ID:%d,新指标ID:%d", oldEdbInfo.EdbInfoId, newEdbInfo.EdbInfoId))
- if err != nil {
- fmt.Println("AddReplaceEdbInfo LPush Err:" + err.Error())
- }
- return true
- }
- return false
- }
|