- all db orm use beego orm, don't use gorm anymore.

This commit is contained in:
gazebo
2018-09-08 12:55:39 +08:00
parent 711013fab4
commit 8c130a15a4
28 changed files with 780 additions and 448 deletions

View File

@@ -10,7 +10,6 @@ import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/globals/api"
"git.rosy.net.cn/jx-callback/globals/gormdb"
)
func (p *PurchaseHandler) ReadStore(vendorStoreID string) (*model.Store, error) {
@@ -32,7 +31,7 @@ func (p *PurchaseHandler) ReadStore(vendorStoreID string) (*model.Store, error)
}
cityCode := int(utils.MustInterface2Int64(result["city"]))
if cityCode != 0 {
db := gormdb.GetDB()
db := dao.GetDB()
if city, err2 := dao.GetPlaceByJdCode(db, cityCode); err2 == nil {
retVal.CityCode = city.Code
districtName := utils.Interface2String(result["countyName"]) // 京东的市区号码与通用数据完全无法关联,只有通过名字来关联