aa
This commit is contained in:
@@ -29,7 +29,7 @@ const (
|
||||
func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *model.GoodsOrder, courierVendorIDs, excludeCourierVendorIDs []int, maxDeliveryFee int64, createOnlyOne bool) (bills []*model.Waybill, err error) {
|
||||
userName := ctx.GetUserName()
|
||||
globals.SugarLogger.Infof("CreateWaybillOnProviders orderID:%s userName:%s, courierVendorIDs:%v, excludeCourierVendorIDs:%v", order.VendorOrderID, userName, courierVendorIDs, excludeCourierVendorIDs)
|
||||
storeCourierList, err := dao.GetStoreCourierList(dao.GetDB(), []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, model.StoreStatusOpened, model.StoreAuditStatusOnline)
|
||||
storeCourierList, err := dao.GetStoreCourierList2(dao.GetDB(), []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, model.StoreStatusOpened, []int{model.StoreAuditStatusOnline, model.StoreAuditStatusUpdated})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -2969,8 +2969,13 @@ func LoadStoreVendorCategories(ctx *jxcontext.Context, vendorOrgCode string, ven
|
||||
return err
|
||||
}
|
||||
dao.Commit(db)
|
||||
catList, _ := dao.GetSkuCategoryWithVendor(db, []int{vendorID}, []string{vendorOrgCode}, -1, nil, false)
|
||||
for _, v := range storeCats {
|
||||
OnUpdateThing(ctx, db, vendorOrgCodes, int64(v.CategoryID), model.ThingTypeCategory)
|
||||
if len(catList) > 0 {
|
||||
OnUpdateThing(ctx, db, vendorOrgCodes, int64(v.CategoryID), model.ThingTypeCategory)
|
||||
} else {
|
||||
OnCreateThing(ctx, db, vendorOrgCodes, int64(v.CategoryID), model.ThingTypeCategory, model.SyncFlagNewMask, true)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -18,8 +18,10 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/authz"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize"
|
||||
@@ -1190,15 +1192,24 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
return nil, fmt.Errorf("必须指定平台分账号信息")
|
||||
}
|
||||
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
||||
store, err2 := handler.ReadStore(ctx, vendorOrgCode, storeMap.VendorStoreID)
|
||||
if err = err2; err == nil || storeMap.IsSync == 0 {
|
||||
if store != nil {
|
||||
storeMap.DeliveryType = store.DeliveryType
|
||||
storeMap.Status = store.Status
|
||||
if vendorOrgCode != globals.Mtwm2Code {
|
||||
store, err2 := handler.ReadStore(ctx, vendorOrgCode, storeMap.VendorStoreID)
|
||||
if err = err2; err == nil || storeMap.IsSync == 0 {
|
||||
if store != nil {
|
||||
storeMap.DeliveryType = store.DeliveryType
|
||||
storeMap.Status = store.Status
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
} else {
|
||||
//美团商超获取token
|
||||
mtapi := apimanager.CurAPIManager.GetAPI(model.VendorIDMTWM, outStoreMap.VendorOrgCode).(*mtwmapi.API)
|
||||
if token, err := mtapi.GetAccessToken2(outStoreMap.VendorStoreID); err == nil && token != nil {
|
||||
storeMap.MtwmToken = token.AccessToken
|
||||
storeMap.MtwmToken = token.RefreshToken
|
||||
}
|
||||
err = nil
|
||||
storeMap.SyncStatus = model.SyncFlagModifiedMask | model.SyncFlagStoreName | model.SyncFlagStoreAddress // 新增绑定门店是修改的概念
|
||||
}
|
||||
storeMap.SyncStatus = model.SyncFlagModifiedMask | model.SyncFlagStoreName | model.SyncFlagStoreAddress // 新增绑定门店是修改的概念
|
||||
} else {
|
||||
err = ErrCanNotFindVendor
|
||||
}
|
||||
@@ -1258,7 +1269,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
}
|
||||
dao.Commit(db)
|
||||
outStoreMap = storeMap
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)
|
||||
} else {
|
||||
dao.Rollback(db)
|
||||
}
|
||||
@@ -1273,21 +1283,11 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
if _, err = SetStoreSkuSyncStatus2(db, []int{storeID}, []int{model.VendorIDJDShop}, findSkusBetweenJdsMainStore(db, storeID), model.SyncFlagSaleMask); err == nil {
|
||||
// CurVendorSync.SyncStoresSkus(ctx, nil, 0, db, nil, []int{storeID}, nil, false, true, true)
|
||||
}
|
||||
} else if vendorID == model.VendorIDMTWM {
|
||||
//如果是绑的美团超市,要去更新token
|
||||
if outStoreMap.VendorOrgCode == globals.Mtwm2Code {
|
||||
// mtapi := apimanager.CurAPIManager.GetAPI(model.VendorIDMTWM, outStoreMap.VendorOrgCode).(*mtwmapi.API)
|
||||
// if result, err := mtapi.GetOAuthCode(outStoreMap.VendorStoreID); result != nil && err == nil {
|
||||
// if token, err := mtapi.GetAccessToken(result.(string)); err == nil && token != nil {
|
||||
// outStoreMap.MtwmToken = token.(string)
|
||||
// dao.UpdateEntity(db, outStoreMap, "MtwmToken")
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
if globals.IsAddEvent {
|
||||
err = AddEventDetail(db, ctx, model.OperateAdd, vendorID, model.ThingTypeStore, storeID, "", `{"VendorID":`+utils.Int2Str(vendorID)+`}`)
|
||||
}
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)
|
||||
_, err = CurVendorSync.FullSyncStoresSkus(ctx, db, []int{vendorID}, []int{storeID}, true, nil, true, true)
|
||||
return outStoreMap, err
|
||||
}
|
||||
@@ -3999,14 +3999,23 @@ func GetBrandStore(ctx *jxcontext.Context, name string) (brands []*model.BrandSt
|
||||
}
|
||||
|
||||
func RefreshMTWMToken(ctx *jxcontext.Context) (err error) {
|
||||
// var (
|
||||
// db = dao.GetDB()
|
||||
// )
|
||||
// if time.Now().Weekday() != time.Sunday {
|
||||
// return
|
||||
// }
|
||||
// //token是1个月过期,每周刷一次吧
|
||||
// dao.GetStoresMapList(db, []int{model.VendorIDMTWM}, nil, nil, status, isSync, "", "", globals.Mtwm2Code)
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
if time.Now().YearDay()%20 != 0 {
|
||||
return
|
||||
}
|
||||
//token是1个月过期,每20天刷一次吧
|
||||
storeMaps, _ := dao.GetStoresMapList(db, []int{model.VendorIDMTWM}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", globals.Mtwm2Code)
|
||||
for _, v := range storeMaps {
|
||||
if v.MtwmRefreshToken != "" {
|
||||
if result, err := api.Mtwm2API.RefreshAccessToken(v.MtwmRefreshToken); err == nil {
|
||||
v.MtwmToken = result.AccessToken
|
||||
v.MtwmRefreshToken = result.RefreshToken
|
||||
dao.UpdateEntity(db, v, "MtwmToken", "MtwmRefreshToken")
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -1865,6 +1865,18 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// }, storeMaps)
|
||||
// tasksch.HandleTask(task, nil, true).Run()
|
||||
// _, err = task.GetResult(0)
|
||||
stores := []int{}
|
||||
for i := 1; i < 26; i++ {
|
||||
result, _ := api.JdShop2API.ShopList(i)
|
||||
for _, v := range result.List {
|
||||
if v.Kilometres == "" {
|
||||
if err = api.JdShop2API.CreateGisFence(v.StoreID, "1"); err != nil {
|
||||
stores = append(stores, v.StoreID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("resultstores112", stores)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -261,6 +261,37 @@ func GetStoreCourierList(db *DaoDB, storeIDs, vendorIDs []int, status, auditStat
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func GetStoreCourierList2(db *DaoDB, storeIDs, vendorIDs []int, status int, auditStatuss []int) (courierStoreList []*model.StoreCourierMap, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store_courier_map t1
|
||||
WHERE t1.deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if len(storeIDs) > 0 {
|
||||
sql += " AND t1.store_id IN (" + GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
if len(vendorIDs) > 0 {
|
||||
sql += " AND t1.vendor_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
}
|
||||
if status != model.StoreStatusAll {
|
||||
sql += " AND t1.status = ?"
|
||||
sqlParams = append(sqlParams, status)
|
||||
}
|
||||
if len(auditStatuss) > 0 {
|
||||
sql += " AND t1.audit_status IN (" + GenQuestionMarks(len(auditStatuss)) + ")"
|
||||
sqlParams = append(sqlParams, auditStatuss)
|
||||
}
|
||||
if err = GetRows(db, &courierStoreList, sql, sqlParams...); err == nil {
|
||||
return courierStoreList, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs, storeStatuss []int, status, isSync int, pricePack, name, vendorOrgCode string, mustDirty bool) (storeMapList []*model.StoreMap, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
|
||||
@@ -456,8 +456,9 @@ type StoreMap struct {
|
||||
YbAppKey string `orm:"size(255)" json:"ybAppKey"`
|
||||
YbStorePrefix string `orm:"size(255)" json:"ybStorePrefix"`
|
||||
|
||||
MtwmToken string `orm:"size(255)" json:"mtwmToken"` //美团外卖商超token,有效期30天,每20天刷一次
|
||||
EbaiSupplierID string `orm:"column(ebai_supplier_id)" json:"ebaiSupplierID"` //饿百供应商ID
|
||||
MtwmToken string `orm:"size(255)" json:"mtwmToken"` //美团外卖商超token,有效期30天,每20天刷一次
|
||||
MtwmRefreshToken string `orm:"size(255)" json:"mtwmRefreshToken"` //美团外卖商超refreshToken
|
||||
EbaiSupplierID string `orm:"column(ebai_supplier_id)" json:"ebaiSupplierID"` //饿百供应商ID
|
||||
}
|
||||
|
||||
func (*StoreMap) TableUnique() [][]string {
|
||||
|
||||
@@ -2,6 +2,7 @@ package jd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -155,7 +156,7 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
param = &jdapi.OpSkuParam{
|
||||
TraceID: ctx.GetTrackInfo(),
|
||||
OutSkuID: utils.Int2Str(sku.SkuID),
|
||||
ShopCategories: []int64{utils.Str2Int64(sku.VendorCatID)},
|
||||
ShopCategories: []int64{},
|
||||
CategoryID: sku.VendorVendorCatID,
|
||||
BrandID: DefBrandID,
|
||||
SkuName: utils.LimitUTF8StringLen(sku.SkuName, jdapi.MaxSkuNameCharCount),
|
||||
@@ -167,6 +168,9 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
Upc: sku.Upc,
|
||||
// Images: jxutils.BatchString2Slice(sku.Img, sku.Img2),
|
||||
}
|
||||
if sku.VendorCatID != "" {
|
||||
param.ShopCategories = append(param.ShopCategories, utils.Str2Int64(sku.VendorCatID))
|
||||
}
|
||||
if sku.ImgMix != "" {
|
||||
param.Images = jxutils.BatchString2Slice(sku.ImgMix, sku.Img2, sku.Img3)
|
||||
} else {
|
||||
@@ -194,6 +198,21 @@ func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSy
|
||||
param := skuInfo2Param(ctx, sku)
|
||||
if globals.EnableJdStoreWrite {
|
||||
sku.VendorSkuID, err = getAPI(sku.VendorOrgCode).AddSku2(param)
|
||||
if err != nil && strings.Contains(err.Error(), jdapi.ErrMustUPC) {
|
||||
result, err2 := getAPI(sku.VendorOrgCode).BatchAddSkuByUPC([]*jdapi.CreateByUpcParam2{
|
||||
&jdapi.CreateByUpcParam2{
|
||||
OutSkuId: utils.Int2Str(sku.SkuID),
|
||||
Upc: sku.Upc,
|
||||
JdPrice: utils.Int64ToStr(sku.Price),
|
||||
ShopCategoryID: utils.Str2Int64WithDefault((sku.VendorCatID), 0),
|
||||
},
|
||||
})
|
||||
if err2 == nil {
|
||||
sku.VendorSkuID = result.SkuID
|
||||
} else {
|
||||
err = err2
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sku.VendorSkuID = utils.Int64ToStr(jxutils.GenFakeID())
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ func BuyerCancelOrder(ctx *jxcontext.Context, orderID int64, reason string) (can
|
||||
return canceled, err
|
||||
}
|
||||
|
||||
func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType string) (orderPay *model.OrderPay, err error) {
|
||||
func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType, subAppID string) (orderPay *model.OrderPay, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
@@ -319,7 +319,7 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
case model.PayTypeTL:
|
||||
if orderPay, err = pay4OrderByTL(ctx, order, payType, vendorPayType); err == nil && orderPay != nil {
|
||||
if orderPay, err = pay4OrderByTL(ctx, order, payType, vendorPayType, subAppID); err == nil && orderPay != nil {
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
@@ -336,7 +336,7 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
|
||||
ActualPayPrice: priceDefendOrders[0].ActualPayPrice,
|
||||
VendorID: model.VendorIDJX,
|
||||
}
|
||||
if orderPay, err = pay4OrderByTL(ctx, order2, payType, vendorPayType); err == nil && orderPay != nil {
|
||||
if orderPay, err = pay4OrderByTL(ctx, order2, payType, vendorPayType, subAppID); err == nil && orderPay != nil {
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
@@ -344,7 +344,7 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
func Pay4User(ctx *jxcontext.Context, thingID int, vendorOrderID string, payType int, vendorPayType string) (orderPay *model.OrderPay, err error) {
|
||||
func Pay4User(ctx *jxcontext.Context, thingID int, vendorOrderID string, payType int, vendorPayType, subAppID string) (orderPay *model.OrderPay, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
order *model.GoodsOrder
|
||||
@@ -368,7 +368,7 @@ func Pay4User(ctx *jxcontext.Context, thingID int, vendorOrderID string, payType
|
||||
ActualPayPrice: int64(discountCard.Price),
|
||||
VendorID: model.VendorIDJX,
|
||||
}
|
||||
if orderPay, err = pay4OrderByTL(ctx, order, payType, vendorPayType); err == nil && orderPay != nil {
|
||||
if orderPay, err = pay4OrderByTL(ctx, order, payType, vendorPayType, subAppID); err == nil && orderPay != nil {
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
@@ -398,7 +398,7 @@ func Pay4User(ctx *jxcontext.Context, thingID int, vendorOrderID string, payType
|
||||
ActualPayPrice: int64(storeOrder.ActualPayPrice),
|
||||
VendorID: model.VendorIDJX,
|
||||
}
|
||||
if orderPay, err = pay4OrderByTL(ctx, order, payType, vendorPayType); err == nil && orderPay != nil {
|
||||
if orderPay, err = pay4OrderByTL(ctx, order, payType, vendorPayType, subAppID); err == nil && orderPay != nil {
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int, vendorPayType string) (orderPay *model.OrderPay, err error) {
|
||||
func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int, vendorPayType, subAppID string) (orderPay *model.OrderPay, err error) {
|
||||
// if order.FromStoreID != 0 {
|
||||
// result, _ := orderman.GetMatterStoreOrderCount(nil, order.FromStoreID)
|
||||
// if !result.Flag {
|
||||
@@ -31,13 +31,14 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
||||
NotifyUrl: globals.TLPayNotifyURL,
|
||||
Reqsn: order.VendorOrderID,
|
||||
PayType: vendorPayType,
|
||||
SubAppID: subAppID,
|
||||
}
|
||||
//暂时做兼容处理
|
||||
if vendorPayType == "JSAPI" {
|
||||
param.PayType = tonglianpayapi.PayTypeWxXcx
|
||||
}
|
||||
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||
param.Acct = authInfo.GetAuthID()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ func (c *JxOrderController) CreateOrder() {
|
||||
// @Title 请求支付京西商城订单
|
||||
// @Description 请求支付京西商城订单
|
||||
// @Param token header string true "认证token"
|
||||
// @Param subAppID formData string true "appID"
|
||||
// @Param vendorOrderID formData string true "订单ID"
|
||||
// @Param payType formData int true "支付类型"
|
||||
// @Param vendorPayType formData string true "平台支付类型"
|
||||
@@ -48,7 +49,7 @@ func (c *JxOrderController) CreateOrder() {
|
||||
// @router /Pay4Order [post]
|
||||
func (c *JxOrderController) Pay4Order() {
|
||||
c.callPay4Order(func(params *tJxorderPay4OrderParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = localjx.Pay4Order(params.Ctx, utils.Str2Int64(params.VendorOrderID), params.PayType, params.VendorPayType)
|
||||
retVal, err = localjx.Pay4Order(params.Ctx, utils.Str2Int64(params.VendorOrderID), params.PayType, params.VendorPayType, params.SubAppID)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
@@ -57,6 +58,7 @@ func (c *JxOrderController) Pay4Order() {
|
||||
// @Description 请求支付京西商城相关用户支付项目
|
||||
// @Param token header string true "认证token"
|
||||
// @Param thingID formData int fasle "项目ID"
|
||||
// @Param subAppID formData string true "appID"
|
||||
// @Param vendorOrderID formData string fasle "订单ID"
|
||||
// @Param payType formData int true "支付类型"
|
||||
// @Param vendorPayType formData string true "平台支付类型"
|
||||
@@ -65,7 +67,7 @@ func (c *JxOrderController) Pay4Order() {
|
||||
// @router /Pay4User [post]
|
||||
func (c *JxOrderController) Pay4User() {
|
||||
c.callPay4User(func(params *tJxorderPay4UserParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = localjx.Pay4User(params.Ctx, params.ThingID, params.VendorOrderID, params.PayType, params.VendorPayType)
|
||||
retVal, err = localjx.Pay4User(params.Ctx, params.ThingID, params.VendorOrderID, params.PayType, params.VendorPayType, params.SubAppID)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ func Init() {
|
||||
}
|
||||
|
||||
if globals.TLPayNotifyURL != "" {
|
||||
TLpayAPI = tonglianpayapi.New(beego.AppConfig.String("tonglianPayAppID"), beego.AppConfig.String("tonglianPayKey"), beego.AppConfig.String("tonglianPayCusID"), beego.AppConfig.String("wxpayAppID"))
|
||||
TLpayAPI = tonglianpayapi.New(beego.AppConfig.String("tonglianPayAppID"), beego.AppConfig.String("tonglianPayKey"), beego.AppConfig.String("tonglianPayCusID"))
|
||||
}
|
||||
AutonaviAPI = autonavi.New(beego.AppConfig.String("autonaviKey"))
|
||||
BaiDuNaviAPI = baidunavi.New(beego.AppConfig.String("baidunaviAK"), beego.AppConfig.String("baidunaviSK"))
|
||||
|
||||
@@ -105,7 +105,6 @@ func Init() {
|
||||
orm.RegisterModel(&model.StoreAcctExpend{})
|
||||
orm.RegisterModel(&model.StoreAcctIncome{})
|
||||
orm.RegisterModel(&model.StoreAcctOrder{})
|
||||
|
||||
// create table
|
||||
orm.RunSyncdb("default", false, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user