瀏覽代碼

refactor(mcs_api): 修改为gomodule模式,支持v2版influxdb

sunmiao 4 年之前
父節點
當前提交
415762db9f
共有 21 個文件被更改,包括 224 次插入103 次删除
  1. 6 6
      backend/src/dashoo.cn/mcs_api/business/actions/actionsService.go
  2. 1 1
      backend/src/dashoo.cn/mcs_api/business/authcodeman/authcodemanService.go
  3. 4 4
      backend/src/dashoo.cn/mcs_api/business/baseUser/baseUserService.go
  4. 11 11
      backend/src/dashoo.cn/mcs_api/business/company/basecompanyService.go
  5. 32 32
      backend/src/dashoo.cn/mcs_api/business/device/deviceService.go
  6. 14 14
      backend/src/dashoo.cn/mcs_api/business/equipment/equipmentService.go
  7. 1 1
      backend/src/dashoo.cn/mcs_api/business/ledscreenmessage/ledscreenmessageService.go
  8. 7 7
      backend/src/dashoo.cn/mcs_api/business/logsinfo/logsinfoService.go
  9. 8 8
      backend/src/dashoo.cn/mcs_api/business/organize/organizeService.go
  10. 3 3
      backend/src/dashoo.cn/mcs_api/business/trigger/triggerService.go
  11. 1 1
      backend/src/dashoo.cn/mcs_api/business/triggerabnormal/triggerabnormalService.go
  12. 1 1
      backend/src/dashoo.cn/mcs_api/business/triggerhistory/triggerhistoryService.go
  13. 2 2
      backend/src/dashoo.cn/mcs_api/business/userchannels/userchannelsService.go
  14. 8 1
      backend/src/dashoo.cn/mcs_api/conf/app.conf
  15. 10 3
      backend/src/dashoo.cn/mcs_api/controllers/base.go
  16. 15 4
      backend/src/dashoo.cn/mcs_api/controllers/common.go
  17. 1 1
      backend/src/dashoo.cn/mcs_api/controllers/dataexports.go
  18. 2 1
      backend/src/dashoo.cn/mcs_api/go.mod
  19. 94 0
      backend/src/dashoo.cn/mcs_api/go.sum
  20. 1 1
      backend/src/dashoo.cn/mms_api_mobile/business/baseUser/baseUserService.go
  21. 2 1
      backend/src/dashoo.cn/mms_api_weixin/business/UserWeixin/baseUserWeixinService.go

+ 6 - 6
backend/src/dashoo.cn/mcs_api/business/actions/actionsService.go

@@ -1,7 +1,7 @@
 package actions
 
 import (
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
@@ -20,21 +20,21 @@ func GetActionsService(xormEngine *xorm.Engine) *ActionsService {
 func (s *ActionsService) GetAlertor(alertor string) Actions {
 	var model Actions
 	sql := "select * from Actions where AItem=4 and SPara4='" + alertor + "'"
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	return model
 }
 
 func (s *ActionsService) GetByWdid(wdid string) Actions {
 	var model Actions
 	sql := "select * from Actions where Wdid='" + wdid + "'"
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	return model
 }
 
 func (s *ActionsService) GetEntitiesWithOrderSearch(searchstring string) []Actions {
 	sql := `select * from Actions where ` + searchstring
 	List := make([]Actions, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -46,7 +46,7 @@ func (s *ActionsService) GetCIds(searchstring string) string {
 		where ` + searchstring
 	var cids = "-1"
 	List := make([]Actions, 0)
-	s.DBE.Sql(sql).Find(&List)
+	s.DBE.SQL(sql).Find(&List)
 	for i, j := 0, len(List); i < j; i++ {
 		cids += "," + utils.ToStr(List[i].Id)
 	}
@@ -59,6 +59,6 @@ func (s *ActionsService) IsUsed_TriggerAbnormal(aid string) bool {
 		aid = "-1"
 	}
 	sql := `select count(*) Id from Trigger_Abnormal where FIND_IN_SET(` + aid + `,AId)>0`
-	s.DBE.Sql(sql).Get(&idmodel)
+	s.DBE.SQL(sql).Get(&idmodel)
 	return idmodel.Id > 0
 }

+ 1 - 1
backend/src/dashoo.cn/mcs_api/business/authcodeman/authcodemanService.go

@@ -2,7 +2,7 @@ package authcodeman
 
 import (
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type AuthCodeManService struct {

+ 4 - 4
backend/src/dashoo.cn/mcs_api/business/baseUser/baseUserService.go

@@ -5,7 +5,7 @@ import (
 
 	"dashoo.cn/base_common/business/userRole"
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type BaseUserService struct {
@@ -19,7 +19,7 @@ func GetBaseUserService(xormEngine *xorm.Engine) *BaseUserService {
 }
 
 func (s *BaseUserService) Getid(name string) (entity userRole.Base_User) {
-	s.DBE.Sql(` select Id, from Base_User where UserName=` + name).Get(&entity)
+	s.DBE.SQL(` select Id, from Base_User where UserName=` + name).Get(&entity)
 	return
 }
 
@@ -34,7 +34,7 @@ where RoleId in (10000121,10000122) and UserId=%v`, userid)
 //根据AccCode查ID
 func (s *BaseUserService) GetIdbyAccCode(where string) (ids []string) {
 	var idList []Id_Str
-	s.DBE.Sql(` select Id from Base_User ` + where).Find(&idList)
+	s.DBE.SQL(` select Id from Base_User ` + where).Find(&idList)
 	ids = s.GetIdsFromId_StrList(idList)
 	if len(ids) == 0 {
 		ids = append(ids, "-1")
@@ -47,7 +47,7 @@ func (s *BaseUserService) GetIdbyAcccodeAndUid(acccode string, uid int) (ids []s
 	var idList []Id_Str
 	sql := fmt.Sprintf(` select Id from Base_User where Id =%v `,
 		uid)
-	s.DBE.Sql(sql).Find(&idList)
+	s.DBE.SQL(sql).Find(&idList)
 	ids = s.GetIdsFromId_StrList(idList)
 	if len(ids) == 0 {
 		ids = append(ids, "-1")

+ 11 - 11
backend/src/dashoo.cn/mcs_api/business/company/basecompanyService.go

@@ -5,7 +5,7 @@ import (
 
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type BaseCompanyService struct {
@@ -36,7 +36,7 @@ func (s *BaseCompanyService) AddCompany(fullname, shortname, domain, agentcode,
 //根据Domain,ID查企业ID
 func (s *BaseCompanyService) GetCompanyid(where string) (ids []string) {
 	var idList []Id_Str
-	s.DBE.Sql(` select Id from Base_Company ` + where).Find(&idList)
+	s.DBE.SQL(` select Id from Base_Company ` + where).Find(&idList)
 	ids = s.GetIdsFromId_StrList(idList)
 	if len(ids) == 0 {
 		ids = append(ids, "-1")
@@ -66,7 +66,7 @@ func (s *BaseCompanyService) GetFullnameByAccode(Accode string) string {
 //获取公司列表
 func (s *BaseCompanyService) GetCompanyTree(companytitle string) []Base_Companytree {
 	var tree []Base_Companytree
-	s.DBE.Sql(`select
+	s.DBE.SQL(`select
 		0 Id,-1 ParentId,'` + companytitle + `' Fullname union all
 		select Id,0 ParentId,Fullname from Base_Company order by Id`).Find(&tree)
 	return tree
@@ -86,7 +86,7 @@ func (s *BaseCompanyService) GetPagingEntitiesWithOrderSearch(pageIndex, itemsPe
 		Base_Company b on a.AccCode=b.Id where ` + where + ` order by ` + order + ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 
 	List := make([]UserCompany, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -102,7 +102,7 @@ func (s *BaseCompanyService) GetPagingEntitiesWithOrderSearch(pageIndex, itemsPe
 }
 
 func (s *BaseCompanyService) GetBindingTree(whereorg, wherecompany string) (tree []Base_Companytree) {
-	s.DBE.Sql(`select concat('o',Id) Id,concat('o',ParentId) ParentId,Fullname, 'true' IsParent,'false' Nocheck from Base_Organize
+	s.DBE.SQL(`select concat('o',Id) Id,concat('o',ParentId) ParentId,Fullname, 'true' IsParent,'false' Nocheck from Base_Organize
 		where ` + whereorg + `
 		union all
 		select Id,concat('o',OrganizeId) ParentId,Fullname, 'false' IsParent ,'false' Nocheck
@@ -118,13 +118,13 @@ func (s *BaseCompanyService) GetEntityByUserid(userId string) (Base_Company, boo
 	sql := `select b.* from Base_User a
 		inner join Base_Company b on a.AccCode=b.Id
 		where a.Id=` + userId
-	has, _ := s.DBE.Sql(sql).Get(&model)
+	has, _ := s.DBE.SQL(sql).Get(&model)
 	return model, has
 }
 
 func (s *BaseCompanyService) GetDevicesNumByOrg(whereorg, wherecompany string) int {
 	var num Id_Int
-	s.DBE.Sql(`select count(*) Id from Channels a
+	s.DBE.SQL(`select count(*) Id from Channels a
 		inner join Base_User b on a.CreateUserId=b.Id
 		inner join Base_Company c on b.AccCode=c.Id and ` + wherecompany + `
 		inner join Base_Organize d on c.OrganizeId=d.Id and
@@ -135,7 +135,7 @@ func (s *BaseCompanyService) GetDevicesNumByOrg(whereorg, wherecompany string) i
 
 func (s *BaseCompanyService) GetDevicesNumByCompany(wherecompany string) int {
 	var num Id_Int
-	s.DBE.Sql(`select count(*) Id from Channels a
+	s.DBE.SQL(`select count(*) Id from Channels a
 		inner join Base_User b on a.CreateUserId=b.Id
 		inner join Base_Company c on b.AccCode=c.Id and ` + wherecompany).Get(&num)
 	return num.Id
@@ -143,7 +143,7 @@ func (s *BaseCompanyService) GetDevicesNumByCompany(wherecompany string) int {
 }
 
 func (s *BaseCompanyService) GetIndexTree(whereorg, wherecompany string) (tree []Base_Indextree) {
-	s.DBE.Sql(`select concat('o',Id) Id,concat('o',ParentId) ParentId,Fullname, 'true' IsParent,'true' Nocheck,0 Longitude,0 Latitude,0 DeviceState from Base_Organize
+	s.DBE.SQL(`select concat('o',Id) Id,concat('o',ParentId) ParentId,Fullname, 'true' IsParent,'true' Nocheck,0 Longitude,0 Latitude,0 DeviceState from Base_Organize
 		where ` + whereorg + `
 		union all
 		select Id,concat('o',OrganizeId) ParentId,Fullname, 'false' IsParent ,'false' Nocheck,Longitude,Latitude,DeviceState
@@ -154,7 +154,7 @@ func (s *BaseCompanyService) GetIndexTree(whereorg, wherecompany string) (tree [
 }
 
 func (s *BaseCompanyService) GetIndexTree1(whereorg, wherecompany string) (tree []Base_Indextree1) {
-	s.DBE.Sql(`select concat('o',Id) Id,concat('o',ParentId) ParentId,Fullname from Base_Organize
+	s.DBE.SQL(`select concat('o',Id) Id,concat('o',ParentId) ParentId,Fullname from Base_Organize
 		where ` + whereorg + `
 		union all
 		select Id,concat('o',OrganizeId) ParentId,Fullname
@@ -166,7 +166,7 @@ func (s *BaseCompanyService) GetIndexTree1(whereorg, wherecompany string) (tree
 
 func (s *BaseCompanyService) GetUidByCompanyid(companyid string) int {
 	var uid Id_Int
-	s.DBE.Sql("select Id from Base_User where CreateUserId='0' and AccCode=" + companyid + " limit 1").Get(&uid)
+	s.DBE.SQL("select Id from Base_User where CreateUserId='0' and AccCode=" + companyid + " limit 1").Get(&uid)
 	return uid.Id
 
 }

+ 32 - 32
backend/src/dashoo.cn/mcs_api/business/device/deviceService.go

@@ -4,12 +4,12 @@ import (
 	"fmt"
 	"strconv"
 
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 
-	"dashoo.cn/mcs_api/business/equipment"
-	"dashoo.cn/mcs_api/business/organize"
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
+	"dashoo.cn/mcs_api/business/equipment"
+	"dashoo.cn/mcs_api/business/organize"
 )
 
 type DeviceService struct {
@@ -26,7 +26,7 @@ func GetDeviceService(xormEngine *xorm.Engine) *DeviceService {
 func (s *DeviceService) GetChannelids(userid string) (ids []string) {
 	var idList []Id_Str
 
-	err := s.DBE.Sql(`select Id FROM Device where CreateUserId= ` + userid).Find(&idList)
+	err := s.DBE.SQL(`select Id FROM Device where CreateUserId= ` + userid).Find(&idList)
 	LogError(err)
 	ids = s.GetIdsFromId_StrList(idList)
 	if len(ids) == 0 {
@@ -41,7 +41,7 @@ func (s *DeviceService) GetEntitiesWithOrderSearch(order, searchstring string) [
 		where ` + searchstring + ` order by ` + order
 
 	List := make([]Device, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 
 	return List
 }
@@ -75,7 +75,7 @@ func (s *DeviceService) GetChannelsListOrder(pageIndex, itemsPerPage int64, orde
 		left join Base_User d on a.CreateUserId=d.Id
 		where ` + searchstring + ` order by ` + order + limitstr
 	List := make([]DeviceChannels, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -106,7 +106,7 @@ func (s *DeviceService) GetChannelsList(pageIndex, itemsPerPage int64, searchstr
 		left join EquipMentSort b on a.EquipMentId = b.EquipMentlId and b.CreateUserId=` + Uid + `
 		where ` + searchstring + ` order by b.SortCode,a.Id desc ` + limitstr
 	List := make([]DeviceChannels, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -174,7 +174,7 @@ func (s *DeviceService) GetDeviceChannel(did int, channels interface{}) {
 }
 func (s *DeviceService) GetDeviceTreeByRole(roleid, permissionitem string) (utree []DeviceShowr) {
 
-	s.DBE.Sql(`select distinct a.TargetId  Id,c.Title FullName
+	s.DBE.SQL(`select distinct a.TargetId  Id,c.Title FullName
 			from Base_PermissionScope a
 			left join Device c on a.TargetId=c.Id
 			where a.ResourceCategory='Base_Role'
@@ -226,7 +226,7 @@ func (s *DeviceService) GetDTitleBySerial(serial string) string {
 func (s *DeviceService) GetWdidByCode(code string) int {
 	var devices Device
 	sql := `select a.WDid from Device a left join Channels b on a.Id=b.DId where b.Code='` + code + `'`
-	s.DBE.Sql(sql).Get(&devices)
+	s.DBE.SQL(sql).Get(&devices)
 	return devices.Wdid
 }
 
@@ -243,7 +243,7 @@ func (s *DeviceService) GetCIds(searchstring string) string {
 		where ` + searchstring
 	var cids = "-1"
 	List := make([]Channels, 0)
-	s.DBE.Sql(sql).Find(&List)
+	s.DBE.SQL(sql).Find(&List)
 	for i, j := 0, len(List); i < j; i++ {
 		cids += "," + utils.ToStr(List[i].Code)
 	}
@@ -264,7 +264,7 @@ func (s *DeviceService) GetDeviceAlertor(code, alerttype, binddatatype string) *
 		inner join Channels c on a.Id=c.DId and c.DataItem=` + binddatatype + `
 		where a.DataItem=4 and b.Code='` + code + `' 
 		group by a.Id`
-	s.DBE.Sql(sql).Get(entity)
+	s.DBE.SQL(sql).Get(entity)
 	return entity
 }
 
@@ -278,7 +278,7 @@ func (s *DeviceService) GetCode(searchstring, Uid string) string {
 		where ` + searchstring
 	var cids = "-1"
 	List := make([]DeviceChannels, 0)
-	s.DBE.Sql(sql).Find(&List)
+	s.DBE.SQL(sql).Find(&List)
 	for i, j := 0, len(List); i < j; i++ {
 		cids += "," + utils.ToStr(List[i].Code)
 	}
@@ -293,7 +293,7 @@ func (s *DeviceService) Getlist(order string, where, Uid string) []DeviceChannel
 		where ` + where + ` order by ` + order
 
 	List := make([]DeviceChannels, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 
 	return List
 }
@@ -313,7 +313,7 @@ func (s *DeviceService) GetAbnormal(pageIndex, itemsPerPage int64, order string,
 	}
 	sql = "select a.Title,a.Serial,a.Tags,a.ChannelState,a.DataItem,a.DeviceState,a.CJTime,a.CSTime,a.CreateOn BindingTime,b.Realname,b.UserName,b.Mobile,b.Telephone,c.`Local`  from Channels a left join Base_User b on a.CreateUserId=b.Id	left join Device c on a.DId=c.Id left join Base_Company  d on d.Id=b.AccCode where " + searchstring + " order by " + order + limitstr
 	List := make([]Abnormal, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -343,7 +343,7 @@ func (s *DeviceService) GetBlackboxquery(pageIndex, itemsPerPage int64, order st
 	}
 	sql = "select a.Title,a.Serial,a.ChannelState,a.CreateOn BindingTime,b.Realname,b.UserName from Channels a left join Base_User b on a.CreateUserId=b.Id left join Base_Company  d on d.Id=b.AccCode where " + searchstring + " order by " + order + limitstr
 	List := make([]Blackboxquery, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -363,7 +363,7 @@ func (s *DeviceService) GetDeviceModel(order, searchstring string) []DeviceModel
 		where ` + searchstring + ` order by ` + order
 
 	List := make([]DeviceModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -371,7 +371,7 @@ func (s *DeviceService) GetDeviceModelDItem(searchstring string) []DeviceModel {
 	sql := `select distinct DItem from DeviceModel
 		where ` + searchstring + ` order by DItem`
 	List := make([]DeviceModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -379,7 +379,7 @@ func (s *DeviceService) GetDeviceModelBrands(searchstring string) []DeviceModel
 	sql := `select distinct Brands from DeviceModel
 		where ` + searchstring + ` order by Brands`
 	List := make([]DeviceModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -387,7 +387,7 @@ func (s *DeviceService) GetDeviceModelDModel(searchstring string) []DeviceModel
 	sql := `select distinct DModel,Photo,Id from DeviceModel
 		where ` + searchstring + ` order by DModel`
 	List := make([]DeviceModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -395,7 +395,7 @@ func (s *DeviceService) GetDeviceModelStructure(searchstring string) []DeviceMod
 	sql := `select distinct Structure from DeviceModel
 		where ` + searchstring + ` order by Structure`
 	List := make([]DeviceModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -403,7 +403,7 @@ func (s *DeviceService) GetDeviceModelPhoto(searchstring string) []DeviceModel {
 	sql := `select distinct Photo from DeviceModel
 		where ` + searchstring + ` order by Photo`
 	List := make([]DeviceModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 func (s *DeviceService) GetChannelsTitles(searchstring string) string {
@@ -413,12 +413,12 @@ func (s *DeviceService) GetChannelsTitles(searchstring string) string {
 	var entity TitleStr
 	sql := `select group_concat(Title) Title from Channels
 		where Code in (` + searchstring + `)`
-	utils.DBE.Sql(sql).Get(&entity)
+	utils.DBE.SQL(sql).Get(&entity)
 	return entity.Title
 }
 
 func (s *DeviceService) GetTree_Org(whereorg string) (tree []organize.Base_Organizetree) {
-	s.DBE.Sql(`select Id, ParentId,Fullname, '/static/img/1_open.png' Icon from Base_Organize
+	s.DBE.SQL(`select Id, ParentId,Fullname, '/static/img/1_open.png' Icon from Base_Organize
 		where ` + whereorg).Find(&tree)
 	return
 
@@ -439,13 +439,13 @@ func (s *DeviceService) GetTree_OrgAndDevice(whereorg, searchstring, uid string,
 		left join Base_User d on a.CreateUserId=d.Id  
 		where ` + searchstring + " order by c.SortCode,a.CreateOn desc"
 	}
-	s.DBE.Sql(sql).Find(&tree)
+	s.DBE.SQL(sql).Find(&tree)
 	return
 }
 
 func (s *DeviceService) GetDistinctLocal(uid int) (list []Channels) {
 	sql := fmt.Sprintf("select distinct Local,Latitude,Longitude from Channels where CreateUserId=%v and Local<>'' and Local is not null order by CreateOn desc", uid)
-	s.DBE.Sql(sql).Find(&list)
+	s.DBE.SQL(sql).Find(&list)
 	return
 }
 
@@ -454,7 +454,7 @@ func (s *DeviceService) GetChannelSerialStrS(searchstring string) string {
 	sql := `select group_concat(Serial) Id from Channels a 
 		left join Base_User b on a.CreateUserId=b.Id
 		where ` + searchstring
-	utils.DBE.Sql(sql).Get(&ids)
+	utils.DBE.SQL(sql).Get(&ids)
 	return ids.Id
 }
 
@@ -494,7 +494,7 @@ func (s *DeviceService) GetSerialsByEquipids(equipids string) string {
 		equipids = "-1"
 	}
 	sql := `select  group_concat(Serial) Id from Channels where EquipMentId in (` + equipids + `)`
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	return model.Id
 }
 
@@ -505,7 +505,7 @@ func (s *DeviceService) GetCodesByEquipids(equipids string) string {
 		equipids = "-1"
 	}
 	sql := `select  group_concat(Code) Id from Channels where EquipMentId in (` + equipids + `)`
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	return model.Id
 }
 
@@ -516,7 +516,7 @@ func (s *DeviceService) GetSerialsByids(ids string) string {
 		ids = "-1"
 	}
 	sql := `select  group_concat(Serial) Id from Channels where Id in (` + ids + `)`
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	return model.Id
 }
 
@@ -527,7 +527,7 @@ func (s *DeviceService) GetCodeByids(ids string) string {
 		ids = "-1"
 	}
 	sql := `select  group_concat(Code) Id from Channels where Id in (` + ids + `)`
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	return model.Id
 }
 
@@ -551,7 +551,7 @@ func (s *DeviceService) GetAllIdsByOrgTopId(topids []string, uid string) (ids []
 		EquipMentSort b on a.EquipMentId = b.EquipMentlId and b.UserId=` + uid + `
 		where a.EquipMentId in 
 		(select Id from EquipMent where OrganizeId in (` + orgidstrs + ") and " + where + ") order by b.SortCode,a.Id desc"
-	s.DBE.Sql(sql).Find(&ids)
+	s.DBE.SQL(sql).Find(&ids)
 	return
 }
 
@@ -583,6 +583,6 @@ func (s *DeviceService) GetAllSerialsByOrgTopIdDitem(topids []string, item, uid
 		(select a.Id from EquipMent a
 		inner join EquipMentModel b on a.ModelId=b.Id where ` + where + ` ) 
 		order by b.SortCode,a.Id desc`
-	s.DBE.Sql(sql).Find(&ids)
+	s.DBE.SQL(sql).Find(&ids)
 	return
 }

+ 14 - 14
backend/src/dashoo.cn/mcs_api/business/equipment/equipmentService.go

@@ -4,13 +4,13 @@ import (
 	"fmt"
 	"strconv"
 
+	"xorm.io/xorm"
+
 	"dashoo.cn/base_common/business/userRole"
 	"dashoo.cn/mcs_api/business/organize"
-
 	"dashoo.cn/mms_api_weixin/business/userweixin"
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
 )
 
 type EquipmentService struct {
@@ -30,7 +30,7 @@ func GetEquipmentService(xormEngine *xorm.Engine) *EquipmentService {
 func (s *EquipmentService) GetAllBrands() (brands []string) {
 	BrandList := make([]EquipMentModel, 0)
 
-	err := s.DBE.Sql(`select distinct Brands from EquipMentModel where 1=1 order by SortCode`).Find(&BrandList)
+	err := s.DBE.SQL(`select distinct Brands from EquipMentModel where 1=1 order by SortCode`).Find(&BrandList)
 	LogError(err)
 	for i := 0; i < len(BrandList); i++ {
 		brands = append(brands, BrandList[i].Brands)
@@ -41,7 +41,7 @@ func (s *EquipmentService) GetAllBrands() (brands []string) {
 func (s *EquipmentService) GetModelsByBrand(brand string) (models []string) {
 	ModelList := make([]EquipMentModel, 0)
 
-	err := s.DBE.Sql(`select DModel from EquipMentModel where Brands = '` + brand + `' order by SortCode desc`).Find(&ModelList)
+	err := s.DBE.SQL(`select DModel from EquipMentModel where Brands = '` + brand + `' order by SortCode desc`).Find(&ModelList)
 	LogError(err)
 	for i := 0; i < len(ModelList); i++ {
 		models = append(models, ModelList[i].DModel)
@@ -76,7 +76,7 @@ func (s *EquipmentService) GetEquipmentList(pageIndex, itemsPerPage int64, orgid
 		group by a.Id order by sSortCode,Id desc`
 
 	List := make([]EquipmentSet, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 	if len(resultsSlice) > 0 {
@@ -99,7 +99,7 @@ func (s *EquipmentService) GetPagingEntitiesWithOrderSearch2(searchstring string
 	sql = `select c.Serial from EquipMentModel a left join EquipMent b on a.Id=
 	b.ModelId left join Channels c on c.EquipMentId=b.Id where a.Id=b.ModelId and ` + searchstring
 	List := make([]SampleModel, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -136,7 +136,7 @@ func (s *EquipmentService) GetEquipmentReport(pageIndex, itemsPerPage int64, ord
 		where ` + searchstring + `
 		group by b.DItem,a.OrganizeId ` + limitstr
 	List := make([]EquipmentReport, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -158,7 +158,7 @@ func (s *EquipmentService) GetEquipmentAll(uid string, searchstring string) []Eq
 		where ` + searchstring + `
 		order by b.SortCode,a.Id desc`
 	List := make([]EquipMent, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -182,7 +182,7 @@ func (s *EquipmentService) GetAllIdsByOrgTopId(topids []string, uid string) (ids
 		left join EquipMentSort b on a.Id = b.EquipMentlId and b.UserId=` + uid + `
 		where a.OrganizeId in (` + orgidstrs + `) and ` + where + `
 		order by b.SortCode,a.Id desc`
-	s.DBE.Sql(sql).Find(&ids)
+	s.DBE.SQL(sql).Find(&ids)
 	return
 }
 
@@ -196,7 +196,7 @@ func (s *EquipmentService) BatchSetState(state, ids string) {
 //权限,根据id获取有权限的设备ids
 func (s *EquipmentService) GetEquipmentidsByUid(userid string) (ids string) {
 	var idmodel Id_Str
-	s.DBE.Sql(`select group_concat(EquipmentId) Id FROM Base_UserEquipments where UserId= ` + userid).Get(&idmodel)
+	s.DBE.SQL(`select group_concat(EquipmentId) Id FROM Base_UserEquipments where UserId= ` + userid).Get(&idmodel)
 	if idmodel.Id == "" {
 		ids = "-1"
 	} else {
@@ -223,7 +223,7 @@ func (s *EquipmentService) ClearUserEquipmentByEquid(eid int) {
 func (s *EquipmentService) GetOrgidsByEqids(eids string) (oids string) {
 	var idmodel Id_Str
 
-	s.DBE.Sql(`select group_concat(distinct OrganizeId) Id FROM EquipMent where Id in (` + eids + `) `).Get(&idmodel)
+	s.DBE.SQL(`select group_concat(distinct OrganizeId) Id FROM EquipMent where Id in (` + eids + `) `).Get(&idmodel)
 	if idmodel.Id == "" {
 		oids = "-1"
 	} else {
@@ -240,7 +240,7 @@ func (s *EquipmentService) GetEquipMentModelItems(uid string) (items string) {
 	sql := `select group_concat(distinct b.DItem) Id from EquipMent a left join EquipMentModel b
 		on a.ModelId=b.Id
 		where ` + where
-	s.DBE.Sql(sql).Get(&model)
+	s.DBE.SQL(sql).Get(&model)
 	if model.Id == "" {
 		items = "-1"
 	} else {
@@ -253,7 +253,7 @@ func (s *EquipmentService) GetEquipMentModelItems(uid string) (items string) {
 func (s *EquipmentService) GetEquipmentAl111l() []Trigger_Abnormal1 {
 	sql := `select CreateBy,CreateOn,Serial from channels where CreateOn > "2018-03-01 00:22:33"  and CreateOn < "2018-06-30 23:22:33"  `
 	List := make([]Trigger_Abnormal1, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }
 
@@ -271,6 +271,6 @@ func (s *EquipmentService) GetRecordHistory(searchstring string) []Record_Histor
 	sql := `select * from record_history where ` + searchstring + `
 		order by CreateOn   limit 0,100`
 	List := make([]Record_History, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	return List
 }

+ 1 - 1
backend/src/dashoo.cn/mcs_api/business/ledscreenmessage/ledscreenmessageService.go

@@ -2,7 +2,7 @@ package ledscreenmessage
 
 import (
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type LEDScreenMessageService struct {

+ 7 - 7
backend/src/dashoo.cn/mcs_api/business/logsinfo/logsinfoService.go

@@ -6,7 +6,7 @@ import (
 
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type LogsinfoService struct {
@@ -23,7 +23,7 @@ func GetLogsinfoService(xormEngine *xorm.Engine) *LogsinfoService {
 //func (s *LogsinfoService) GetUserNameById(id string) []Base_Company {
 //	entity := new(Logsinfo)
 //	sql := "select * from Base_Updated where Id='" + id + "'"
-//	s.DBE.Sql(sql).Get(entity)
+//	s.DBE.SQL(sql).Get(entity)
 //	return entity
 //}
 
@@ -42,7 +42,7 @@ func (s *LogsinfoService) GetPagingEntitiesWithOrderSearch(pageIndex, itemsPerPa
 	}
 	sql = `select * from Base_Updated  ` + searchstring + ` order by ` + order + limitstr
 	List := make([]Logsinfo, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 
@@ -61,7 +61,7 @@ func (s *LogsinfoService) GetPagingEntitiesWithOrderSearch(pageIndex, itemsPerPa
 func (s *LogsinfoService) GetContantById(id string) *Logsinfo {
 	entity := new(Logsinfo)
 	sql := "select * from Base_Updated where Id='" + id + "'"
-	s.DBE.Sql(sql).Get(entity)
+	s.DBE.SQL(sql).Get(entity)
 	return entity
 }
 
@@ -69,16 +69,16 @@ func (s *LogsinfoService) GetContantById(id string) *Logsinfo {
 func (s *LogsinfoService) GetNextContantById(id, fieldtablename, tablename, recordId string, model interface{}) string {
 	entity := new(Logsinfo)
 	sql := "select * from Base_Updated where TableName = '" + fieldtablename + "'" + " and RecordId = '" + recordId + "' and Id > '" + id + "' order by Id limit 1"
-	has, _ := s.DBE.Sql(sql).Get(entity)
+	has, _ := s.DBE.SQL(sql).Get(entity)
 	if !has {
 		sql = "select * from " + tablename + " where Id = '" + recordId + "' limit 1"
-		has, _ := s.DBE.Sql(sql).Get(model)
+		has, _ := s.DBE.SQL(sql).Get(model)
 		if has {
 			j, _ := json.Marshal(model)
 			return string(j)
 		}
 		sql = "select * from Base_Deleted where TableName = '" + fieldtablename + "'" + " and RecordId = '" + recordId + "' limit 1"
-		s.DBE.Sql(sql).Get(entity)
+		s.DBE.SQL(sql).Get(entity)
 		return entity.RecordData
 	}
 	return entity.RecordData

+ 8 - 8
backend/src/dashoo.cn/mcs_api/business/organize/organizeService.go

@@ -5,7 +5,7 @@ import (
 
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type OrganizeService struct {
@@ -21,42 +21,42 @@ func GetOrganizeService(xormEngine *xorm.Engine) *OrganizeService {
 //获得某节点的所有子节点(包括自身)
 func (s *OrganizeService) GetAllChildByTopId(topid, uid string) string {
 	mod := new(Id_Str)
-	s.DBE.Sql(`select fun_getOrganizechildlistuserid('` + topid + `','` + uid + `') as Id`).Get(mod)
+	s.DBE.SQL(`select fun_getOrganizechildlistuserid('` + topid + `','` + uid + `') as Id`).Get(mod)
 	return mod.Id
 }
 
 //获得某节点的所有父节点(包括自身)
 func (s *OrganizeService) GetAllParentByTopId(topid, uid string) string {
 	mod := new(Id_Str)
-	s.DBE.Sql(`select fun_getOrganizeparentlistuserid('` + topid + `','` + uid + `') as Id`).Get(mod)
+	s.DBE.SQL(`select fun_getOrganizeparentlistuserid('` + topid + `','` + uid + `') as Id`).Get(mod)
 	return mod.Id
 }
 
 //根据ID获得名称
 func (s *OrganizeService) GetNameById(id string) string {
 	mod := new(Id_Str)
-	s.DBE.Sql(`select Fullname Id from Base_Organize where Id = ` + id).Get(mod)
+	s.DBE.SQL(`select Fullname Id from Base_Organize where Id = ` + id).Get(mod)
 	return mod.Id
 }
 
 //判断是否有子节点
 func (s *OrganizeService) IsHaveChild(id string) bool {
 	mod := new(Id_Int)
-	s.DBE.Sql(`select count(1) Id from Base_Organize where ParentId = ` + id).Get(mod)
+	s.DBE.SQL(`select count(1) Id from Base_Organize where ParentId = ` + id).Get(mod)
 	return mod.Id > 0
 }
 
 //判断是否有用户使用
 func (s *OrganizeService) IsHaveUserUse(id string) bool {
 	mod := new(Id_Int)
-	s.DBE.Sql(`select count(1) Id from Base_User where DepartmentId = ` + id).Get(mod)
+	s.DBE.SQL(`select count(1) Id from Base_User where DepartmentId = ` + id).Get(mod)
 	return mod.Id > 0
 }
 
 //判断是否有设备使用
 func (s *OrganizeService) IsHaveEquiUse(id string) bool {
 	mod := new(Id_Int)
-	s.DBE.Sql(`select count(1) Id from EquipMent where OrganizeId = ` + id).Get(mod)
+	s.DBE.SQL(`select count(1) Id from EquipMent where OrganizeId = ` + id).Get(mod)
 	return mod.Id > 0
 }
 
@@ -73,7 +73,7 @@ func (s *OrganizeService) GetListbandparentname(pageIndex, itemsPerPage int64, o
 		left join Base_Organize b on a.ParentId=b.Id
 		where ` + searchstring + ` order by ` + order + limitstr
 	List := make([]Base_Organizebandparentname, 0)
-	utils.DBE.Sql(sql).Find(&List)
+	utils.DBE.SQL(sql).Find(&List)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 

+ 3 - 3
backend/src/dashoo.cn/mcs_api/business/trigger/triggerService.go

@@ -5,7 +5,7 @@ import (
 
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type TriggerService struct {
@@ -19,7 +19,7 @@ func GetTriggerService(xormEngine *xorm.Engine) *TriggerService {
 }
 
 func (s *TriggerService) GetTriggerList() (entity Trigger, has bool) {
-	has, _ = s.DBE.Sql(`select TItem,TItemName from Trigger`).Get(&entity)
+	has, _ = s.DBE.SQL(`select TItem,TItemName from Trigger`).Get(&entity)
 	return
 }
 
@@ -31,7 +31,7 @@ func (s *TriggerService) GetTriggerActionsList(did, cid string) (int64, []Trigge
 	var sql string
 	sql = "select a.TItemName,a.TValue,a.AId,b.AName from `Trigger` a inner join Actions b on a.AId=b.Id where a.DId='" + did + "' and a.CId='" + cid + "'"
 	TriggerActionsListes := make([]TriggerActionsList, 0)
-	utils.DBE.Sql(sql).Find(&TriggerActionsListes)
+	utils.DBE.SQL(sql).Find(&TriggerActionsListes)
 	resultsSlice, err := s.DBE.Query(sqlCount)
 	LogError(err)
 

+ 1 - 1
backend/src/dashoo.cn/mcs_api/business/triggerabnormal/triggerabnormalService.go

@@ -2,7 +2,7 @@ package triggerabnormal
 
 import (
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type TriggerAbnormalService struct {

+ 1 - 1
backend/src/dashoo.cn/mcs_api/business/triggerhistory/triggerhistoryService.go

@@ -2,7 +2,7 @@ package triggerhistory
 
 import (
 	. "dashoo.cn/base_common/utils/db"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 )
 
 type TriggerhistoryService struct {

+ 2 - 2
backend/src/dashoo.cn/mcs_api/business/userchannels/userchannelsService.go

@@ -4,7 +4,7 @@ import (
 	//"fmt"
 
 	//"github.com/astaxie/beego"
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 
 	//"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"
@@ -23,7 +23,7 @@ func GetUserChannelService(xormEngine *xorm.Engine) *UserChannelService {
 func (s *UserChannelService) GetChannelids(userid string) (ids []string) {
 	var idList []Id_Str
 
-	err := s.DBE.Sql(`select ChannelsId Id FROM Base_UserChannels where UserId= ` + userid).Find(&idList)
+	err := s.DBE.SQL(`select ChannelsId Id FROM Base_UserChannels where UserId= ` + userid).Find(&idList)
 	LogError(err)
 	ids = s.GetIdsFromId_StrList(idList)
 	if len(ids) == 0 {

+ 8 - 1
backend/src/dashoo.cn/mcs_api/conf/app.conf

@@ -22,4 +22,11 @@ addr = 39.98.34.197:26379
 
 [nsq]
 nsqd_tcp_addr = 47.92.249.239:9150
-topic = mcs_facelock_check
+topic = mcs_facelock_check
+
+[influxdb]
+addr = 49.234.101.160:9086
+name = seed
+user = seedadmin
+password = PSjCkI6TNY8R
+token = -cCMKI12TJdVWcPvRvav6bqCb_P9ufgou2AfD5UNkUuY3xnH-RrG3yyaQJsKbHB03DqSRWjRKvxEUP6uHKLdUA==

+ 10 - 3
backend/src/dashoo.cn/mcs_api/controllers/base.go

@@ -107,12 +107,19 @@ func (this *BaseController) GetAccode() string {
 	return this.User.AccCode
 }
 
-//10.29.164.119  121.42.244.202
-func (this *BaseController) GetupdbAndHost() (string, string, string, string) {
+// 获取influxdb连接配置
+// 返回值 user, password, token, db, server_ipport
+func (this *BaseController) GetupdbAndHost() (string, string, string, string, string) {
+	addr := utils.Cfg.MustValue("influxdb", "addr")
+	dbname := utils.Cfg.MustValue("influxdb", "name")
+	user := utils.Cfg.MustValue("influxdb", "user")
+	password := utils.Cfg.MustValue("influxdb", "password")
+	token := utils.Cfg.MustValue("influxdb", "token")
+	return user, password, token, dbname, addr
 	// return "coldcloud", "cc@1qaz2wsx", "coldcloud", "114.215.27.56:9086"
 	//	return "coldcloud", "cc@1qaz2wsx", "coldcloud", "121.42.244.202:9086"
 	//新三台
-	return "coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.249.239:9086"
+	//return "coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.249.239:9086"
 	//第四台
 	// return "coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.212.59:9086"
 

+ 15 - 4
backend/src/dashoo.cn/mcs_api/controllers/common.go

@@ -151,8 +151,18 @@ func WriteAlertBindValue(code, value string) (err error) {
 	return
 }
 
+func getupdbAndHost() (string, string, string, string, string) {
+	addr := utils.Cfg.MustValue("influxdb", "addr")
+	dbname := utils.Cfg.MustValue("influxdb", "name")
+	user := utils.Cfg.MustValue("influxdb", "user")
+	password := utils.Cfg.MustValue("influxdb", "password")
+	token := utils.Cfg.MustValue("influxdb", "token")
+	return user, password, token, dbname, addr
+}
+
 func GetChannelInfov2(code, u, p string, ftype int, startandend ...int64) (ctype string, cols []string, arrs [][]interface{}) {
-	client := labsop.GetLabSopClient("coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.249.239:9086") //bs03 121.42.244.202 10.29.164.119
+	// client := labsop.GetLabSopClient("coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.249.239:9086") //bs03 121.42.244.202 10.29.164.119
+	client := labsop.GetLabSopClient(getupdbAndHost())
 	sql := fmt.Sprintf("select * from %v ", code)
 	if len(startandend) == 2 {
 		sql = sql + fmt.Sprintf(" where time>%vs and time<%vs ", startandend[0], startandend[1])
@@ -169,7 +179,8 @@ func GetChannelInfov2(code, u, p string, ftype int, startandend ...int64) (ctype
 }
 
 func GetChannelInfov2with30m(timeinterval, code, u, p string, ftype int, startandend ...int64) (ctype string, cols []string, arrs [][]interface{}) {
-	client := labsop.GetLabSopClient("coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.249.239:9086") //bs03 121.42.244.202 10.29.164.119
+	// client := labsop.GetLabSopClient("coldcloud", "cc@1qaz2wsx", "coldcloud", "47.92.249.239:9086") //bs03 121.42.244.202 10.29.164.119
+	client := labsop.GetLabSopClient(getupdbAndHost())
 	sql := fmt.Sprintf("select MEDIAN(temperature) as temperature,MEDIAN(humidity) as humidity,MEDIAN(voltage) as voltage,MEDIAN(rssi) as rssi,MEDIAN(o2) as o2,MEDIAN(co2) as co2 ,MEDIAN(windspeed) as windspeed ,MEDIAN(pressure) as pressure,MEDIAN(clo2) as clo2,MEDIAN(c2h4) as c2h4,MEDIAN(c2h2) as c2h2,MEDIAN(cl2) as cl2,MEDIAN(o3) as o3,MEDIAN(tvoc) as tvoc from %v ", code)
 
 	if len(startandend) == 2 {
@@ -199,8 +210,8 @@ func CoderGBKtoUTF8(str string) string {
 
 //设备类型汇总
 const (
-	Device_Box         = "0"                                                                      //设备,普通box
-	Device_Alertor     = "4"                                                                      //设备,报警器
+	Device_Box         = "0"                                                                         //设备,普通box
+	Device_Alertor     = "4"                                                                         //设备,报警器
 	ChannelItem_Sensor = "0,6,7,9,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33" //sensor 0:常温,6:深低温,7:o2,9:co2,10:特殊(隐藏湿度的常温),13:功率,14:外接设备1,15:外接液位设备,16:常温带定位,
 	//	17:氧气设备,18:风速,19:气压,20:二氧化氯,21:乙烯,22:氯气,23:臭氧,24:TVOC,25:乙炔,26:纯二氧化碳,27:电导率,28:二氧化硫,29:压力,30:位移,31:智能锁,32:基点5传感器,33:人脸识别锁
 	ChannelItem_Report          = "0,6,7,9,10,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,32" //sensor报表使用,不需要功率,常温,深低温,o2,co2,特殊(隐藏湿度的常温),外接设备1,外接液位设备,常温带定位,氧气设备

+ 1 - 1
backend/src/dashoo.cn/mcs_api/controllers/dataexports.go

@@ -10,9 +10,9 @@ import (
 	"github.com/signintech/gopdf"
 	"github.com/tealeg/xlsx"
 
+	"dashoo.cn/base_common/utils"
 	"dashoo.cn/mcs_api/business/device"
 	"dashoo.cn/mcs_api/business/equipment"
-	"dashoo.cn/base_common/utils"
 )
 
 type DataExportsController struct {

+ 2 - 1
backend/src/dashoo.cn/mcs_api/go.mod

@@ -10,12 +10,13 @@ require (
 	github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394
 	github.com/beego/i18n v0.0.0
 	github.com/dgrijalva/jwt-go v3.2.0+incompatible
-	github.com/go-xorm/xorm v0.7.9
+	github.com/go-xorm/xorm v0.7.9 // indirect
 	github.com/kr/pretty v0.2.1 // indirect
 	github.com/nsqio/go-nsq v1.0.8
 	github.com/signintech/gopdf v0.9.15
 	github.com/smartystreets/goconvey v1.6.4
 	github.com/tealeg/xlsx v0.0.0
+	xorm.io/xorm v1.1.2
 
 )
 

+ 94 - 0
backend/src/dashoo.cn/mcs_api/go.sum

@@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.37.4 h1:glPeL3BQJsbF6aIIYfZizMwc5LTYz250bDMjttbBGAU=
 cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
+gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
+gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
 github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
@@ -49,9 +51,13 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4 h1:YcpmyvADGYw5LqMnHqSkyIELsHCGF6PkrmM31V8rF7o=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
+github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk=
+github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
 github.com/dgrijalva/jwt-go v1.0.2 h1:KPldsxuKGsS2FPWsNeg9ZO18aCrGKujPoWXn2yo+KQM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
 github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
 github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
@@ -59,6 +65,7 @@ github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt
 github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
 github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk=
 github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
+github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
 github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
@@ -77,6 +84,8 @@ github.com/go-xorm/xorm v0.7.9/go.mod h1:XiVxrMMIhFkwSkh96BW7PACl7UhLtx2iJIHMdmj
 github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
@@ -90,6 +99,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
 github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
 github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
 github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
@@ -101,6 +112,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
 github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
 github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
 github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
@@ -113,21 +127,27 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z
 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
 github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
 github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
 github.com/jackc/pgx v3.6.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
 github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
 github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
+github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
 github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
 github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
 github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
+github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
 github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
@@ -135,11 +155,15 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
 github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.0 h1:Zx5DJFEYQXio93kgXnQ09fXNiUKsqv4OUEu2UtGcB1E=
 github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lunny/godbc v0.0.0-20131220142036-57f94ee1eb13 h1:aQopy7KTYTKDFWHzYusiT8lLRIiHECYk2v7VShtkWNE=
 github.com/lunny/godbc v0.0.0-20131220142036-57f94ee1eb13/go.mod h1:8e6WOK6PpJb5JSDf2cutQwrywJw3TimZhvpj8Z3m7F0=
+github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
 github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg=
 github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
 github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
 github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -147,8 +171,10 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/mediocregopher/radix.v2 v0.0.0-20181115013041-b67df6e626f9 h1:ViNuGS149jgnttqhc6XQNPwdupEMBXqCx9wtlW7P3sA=
 github.com/mediocregopher/radix.v2 v0.0.0-20181115013041-b67df6e626f9/go.mod h1:fLRUbhbSd5Px2yKUaGYYPltlyxi1guJz1vCmo1RQL50=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -157,8 +183,10 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA
 github.com/nsqio/go-nsq v1.0.8 h1:3L2F8tNLlwXXlp2slDUrUWSBn2O3nMh8R1/KEDFTHPk=
 github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
 github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
+github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
@@ -194,6 +222,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT
 github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
 github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
+github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
 github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo=
 github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
 github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
@@ -221,6 +251,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
 github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
+github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
+github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
 github.com/tealeg/xlsx v1.0.0 h1:h90Zg7jJK4UcmuvrHBPe0Gsc+kKPc6qvKf0bdktVRbk=
 github.com/tealeg/xlsx v1.0.0/go.mod h1:uxu5UY2ovkuRPWKQ8Q7JG0JbSivrISjdPzZQKeo74mA=
 github.com/tealeg/xlsx v1.0.1 h1:pwK27zRp12IRTFGGz/Vng4lyeEltxf1wVe33dR4bwFg=
@@ -228,11 +260,13 @@ github.com/tealeg/xlsx v1.0.1/go.mod h1:uxu5UY2ovkuRPWKQ8Q7JG0JbSivrISjdPzZQKeo7
 github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
 github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
 github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
+github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
 github.com/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs=
 github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
 github.com/unknwon/goconfig v0.0.0-20200908083735-df7de6a44db8 h1:b/rWs6xu47ewpFN3BZDJ5ppuaPC/yObRC0WJFIlQUZk=
 github.com/unknwon/goconfig v0.0.0-20200908083735-df7de6a44db8/go.mod h1:qu2ZQ/wcC/if2u32263HTVC39PeOQRSmidQk3DuDFQ8=
 github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
 github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
 github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
@@ -243,10 +277,14 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0F
 golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
 golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -260,13 +298,17 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -279,20 +321,35 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193
 golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80=
 golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 h1:M8tBwCtWD/cZV9DZpFYRUgaymAYAr+aIUTWzDaM3uPs=
+golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -309,6 +366,9 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE
 google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
 google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
@@ -316,8 +376,10 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
 gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
@@ -329,8 +391,40 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+modernc.org/cc/v3 v3.31.5-0.20210308123301-7a3e9dab9009 h1:u0oCo5b9wyLr++HF3AN9JicGhkUxJhMz51+8TIZH9N0=
+modernc.org/cc/v3 v3.31.5-0.20210308123301-7a3e9dab9009/go.mod h1:0R6jl1aZlIl2avnYfbfHBS1QB6/f+16mihBObaBC878=
+modernc.org/ccgo/v3 v3.9.0 h1:JbcEIqjw4Agf+0g3Tc85YvfYqkkFOv6xBwS4zkfqSoA=
+modernc.org/ccgo/v3 v3.9.0/go.mod h1:nQbgkn8mwzPdp4mm6BT6+p85ugQ7FrGgIcYaE7nSrpY=
+modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
+modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
+modernc.org/libc v1.7.13-0.20210308123627-12f642a52bb8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w=
+modernc.org/libc v1.8.0 h1:Pp4uv9g0csgBMpGPABKtkieF6O5MGhfGo6ZiOdlYfR8=
+modernc.org/libc v1.8.0/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w=
+modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
+modernc.org/mathutil v1.2.2 h1:+yFk8hBprV+4c0U9GjFtL+dV3N8hOJ8JCituQcMShFY=
+modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
+modernc.org/memory v1.0.4 h1:utMBrFcpnQDdNsmM6asmyH/FM9TqLPS7XF7otpJmrwM=
+modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc=
+modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A=
+modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
+modernc.org/sqlite v1.10.1-0.20210314190707-798bbeb9bb84 h1:rgEUzE849tFlHSoeCrKyS9cZAljC+DY7MdMHKq6R6sY=
+modernc.org/sqlite v1.10.1-0.20210314190707-798bbeb9bb84/go.mod h1:PGzq6qlhyYjL6uVbSgS6WoF7ZopTW/sI7+7p+mb4ZVU=
+modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc=
+modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
+modernc.org/tcl v1.5.0 h1:euZSUNfE0Fd4W8VqXI1Ly1v7fqDJoBuAV88Ea+SnaSs=
+modernc.org/tcl v1.5.0/go.mod h1:gb57hj4pO8fRrK54zveIfFXBaMHK3SKJNWcmRw1cRzc=
+modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk=
+modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
+modernc.org/z v1.0.1-0.20210308123920-1f282aa71362/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA=
+modernc.org/z v1.0.1 h1:WyIDpEpAIx4Hel6q/Pcgj/VhaQV5XPJ2I6ryIYbjnpc=
+modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA=
 xorm.io/builder v0.3.6 h1:ha28mQ2M+TFx96Hxo+iq6tQgnkC9IZkM6D8w9sKHHF8=
 xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU=
+xorm.io/builder v0.3.8 h1:P/wPgRqa9kX5uE0aA1/ukJ23u9KH0aSRpHLwDKXigSE=
+xorm.io/builder v0.3.8/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
 xorm.io/core v0.7.2-0.20190928055935-90aeac8d08eb/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=
 xorm.io/core v0.7.3 h1:W8ws1PlrnkS1CZU1YWaYLMQcQilwAmQXU0BJDJon+H0=
 xorm.io/core v0.7.3/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=
+xorm.io/xorm v1.1.0/go.mod h1:EDzNHMuCVZNszkIRSLL2nI0zX+nQE8RstAVranlSfqI=
+xorm.io/xorm v1.1.2 h1:bje+1KZvK3m5AHtZNfUDlKEEyuw/IRHT+an0CLIG5TU=
+xorm.io/xorm v1.1.2/go.mod h1:Cb0DKYTHbyECMaSfgRnIZp5aiUgQozxcJJ0vzcLGJSg=

+ 1 - 1
backend/src/dashoo.cn/mms_api_mobile/business/baseUser/baseUserService.go

@@ -3,7 +3,7 @@ package baseUser
 import (
 	"fmt"
 
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 
 	"dashoo.cn/business/userRole"
 	. "dashoo.cn/utils/db"

+ 2 - 1
backend/src/dashoo.cn/mms_api_weixin/business/UserWeixin/baseUserWeixinService.go

@@ -4,7 +4,8 @@ import (
 	//"fmt"
 	//"strings"
 
-	"github.com/go-xorm/xorm"
+	//"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 
 	"dashoo.cn/base_common/utils"
 	. "dashoo.cn/base_common/utils/db"