aa
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/permission"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
|
||||
@@ -570,7 +570,7 @@ func (c *OrderManager) GetWaybills(ctx *jxcontext.Context, fromDateStr, toDateSt
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
var waybills []*tWaybillExt
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -703,7 +703,7 @@ func (c *OrderManager) GetOrdersFinancial(ctx *jxcontext.Context, fromDateStr, t
|
||||
|
||||
var orders []*model.OrderFinancialExt
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1020,7 +1020,7 @@ func (c *OrderManager) GetAfsOrders(ctx *jxcontext.Context, keyword, afsOrderID,
|
||||
|
||||
var orders []*model.AfsOrder
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
push "git.rosy.net.cn/jx-callback/business/jxutils/unipush"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/aliupcapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -169,7 +169,7 @@ func AddCategory(ctx *jxcontext.Context, cat *model.SkuCategory, userName string
|
||||
}
|
||||
cat.Seq = maxSeq.MaxSeq + 1
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -230,7 +230,7 @@ func UpdateCategory(ctx *jxcontext.Context, categoryID int, payload map[string]i
|
||||
}
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -326,7 +326,7 @@ func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int,
|
||||
catsMap[cat.ID] = cat
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -390,7 +390,7 @@ func DeleteCategory(ctx *jxcontext.Context, categoryID int, userName string) (nu
|
||||
} else if countInfos[2].Ct != 0 {
|
||||
return 0, errors.New("还有商品类别使用此类别,不能删除")
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -636,7 +636,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku, isQueryMidPric
|
||||
offset = jxutils.FormalizePageOffset(offset)
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
skuNamesInfo = &SkuNamesInfo{}
|
||||
txDB , _ := dao.Begin(db) // todo 这里用事务的原因是,SQL_CALC_FOUND_ROWS会出错
|
||||
txDB, _ := dao.Begin(db) // todo 这里用事务的原因是,SQL_CALC_FOUND_ROWS会出错
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -857,7 +857,7 @@ func AddSkuName(ctx *jxcontext.Context, skuNameExt *model.SkuNameExt, userName s
|
||||
}
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -978,7 +978,7 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
|
||||
if payload["eclpID"] != nil {
|
||||
eclpID = payload["eclpID"].(string)
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1144,7 +1144,7 @@ func SetStoreSkuSyncStatus2(db *dao.DaoDB, storeIDs []int, vendorIDs, skuIDs []i
|
||||
|
||||
func DeleteSkuName(ctx *jxcontext.Context, nameID int, userName string) (num int64, err error) {
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1223,7 +1223,7 @@ func AddSku(ctx *jxcontext.Context, nameID int, sku *model.Sku, userName string)
|
||||
sku.LadderBoxPrice = 10
|
||||
}
|
||||
sku.LadderBoxNum = 1
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1292,7 +1292,7 @@ func UpdateSku(ctx *jxcontext.Context, skuID int, payload map[string]interface{}
|
||||
valid := dao.StrictMakeMapByStructObject(payload, sku, userName)
|
||||
if len(valid) > 0 {
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(valid, false))
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1372,7 +1372,7 @@ func refreshStoreSkuPrice(ctx *jxcontext.Context, db *dao.DaoDB, skuID int) (err
|
||||
storeSku.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), int(storeSku.Price))
|
||||
storeSku.LastOperator = ctx.GetUserName()
|
||||
storeSku.UpdatedAt = time.Now()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1392,7 +1392,7 @@ func refreshStoreSkuPrice(ctx *jxcontext.Context, db *dao.DaoDB, skuID int) (err
|
||||
|
||||
func DeleteSku(ctx *jxcontext.Context, skuID int, userName string) (num int64, err error) {
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1474,7 +1474,7 @@ func AddSkuNamePlace(ctx *jxcontext.Context, nameID, placeCode int, userName str
|
||||
}
|
||||
dao.WrapAddIDCULEntity(placeBind, userName)
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1501,7 +1501,7 @@ func DeleteSkuNamePlace(ctx *jxcontext.Context, nameID, placeCode int, userName
|
||||
placeBind.NameID = nameID
|
||||
placeBind.PlaceCode = placeCode
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1550,7 +1550,7 @@ func SortCategorySkus(ctx *jxcontext.Context, catID int, skuIDList []int) (err e
|
||||
}
|
||||
}
|
||||
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -1718,7 +1718,7 @@ func UpdateSkuNamesExPrefix(ctx *jxcontext.Context, nameIDs []int, imgWaterMark
|
||||
skuName.ID = nameID
|
||||
skuName.LastOperator = ctx.GetLoginID()
|
||||
skuName.UpdatedAt = time.Now()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -2689,7 +2689,7 @@ func AddVendorCategoryMap(ctx *jxcontext.Context, vendorCategoryMap *model.Vendo
|
||||
vendorOrgCodes, _ := dao.GetVendorOrgCode(db, vendorCategoryMap.VendorID, vendorCategoryMap.VendorOrgCode, model.VendorOrgTypePlatform)
|
||||
vendorCategoryMap.VendorCategoryName = strings.Trim(vendorCategoryMap.VendorCategoryName, " ")
|
||||
dao.WrapAddIDCULDEntity(vendorCategoryMap, ctx.GetUserName())
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -2800,7 +2800,7 @@ func UpdateVendorCategoryMap(ctx *jxcontext.Context, ID int, vendorCategoryMap *
|
||||
}
|
||||
}
|
||||
vendorOrgCodes, err := dao.GetVendorOrgCode(db, vendorCategoryMap2.VendorID, vendorCategoryMap2.VendorOrgCode, model.VendorOrgTypePlatform)
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -2834,7 +2834,7 @@ func ReorderVendorCategories(ctx *jxcontext.Context, parentID, vendorID int, ven
|
||||
for _, cat := range vendorCatsMap {
|
||||
catsMap[cat.CategoryID] = cat
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -2871,7 +2871,7 @@ func LoadStoreVendorCategories(ctx *jxcontext.Context, vendorOrgCode string, ven
|
||||
if vendorCatMap, _ := dao.GetVendorCategoryMap(db, -1, 0, vendorID, vendorOrgCode, 0); len(vendorCatMap) > 0 {
|
||||
return fmt.Errorf("该账号下已有分类,请在这里修改!")
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdshopapi"
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
|
||||
@@ -1072,7 +1071,7 @@ func TestDiff(ctx *jxcontext.Context, vendorIDList []int, storeIDList []int) {
|
||||
go func() {
|
||||
defer func() {
|
||||
if recover() != nil {
|
||||
beego.Info("执行任务失败")
|
||||
// beego.Info("执行任务失败")
|
||||
panic("API调用失败")
|
||||
}
|
||||
}()
|
||||
@@ -1090,7 +1089,7 @@ func TestDiff(ctx *jxcontext.Context, vendorIDList []int, storeIDList []int) {
|
||||
go func() {
|
||||
defer func() {
|
||||
if recover() != nil {
|
||||
beego.Info("比较任务失败")
|
||||
// beego.Info("比较任务失败")
|
||||
panic("比较任务失败")
|
||||
}
|
||||
}()
|
||||
@@ -1102,7 +1101,7 @@ func TestDiff(ctx *jxcontext.Context, vendorIDList []int, storeIDList []int) {
|
||||
go func() {
|
||||
defer func() {
|
||||
if recover() != nil {
|
||||
beego.Info("写入任务失败")
|
||||
// beego.Info("写入任务失败")
|
||||
panic("写入任务失败")
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/netspider"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
func pushToSingle(content, title string, storeID int) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
|
||||
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||
@@ -819,7 +819,7 @@ func SendStoreMessage(ctx *jxcontext.Context, title, content string, storeIDs []
|
||||
storeIDs = storeIDs2
|
||||
}
|
||||
}
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -920,7 +920,7 @@ func NotifyAdjustOrder(order *model.GoodsOrder) (err error) {
|
||||
|
||||
func SendUserMessage(ctx *jxcontext.Context, title, content string, userIDs []string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/client/orm"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery/dada"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/dadaapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type ActController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 预创建活动
|
||||
@@ -240,7 +240,7 @@ func (c *ActController) UpdateActStoreSkuBind() {
|
||||
err = fmt.Errorf("actStoreSkuAddList与actStoreSkuDeleteList不能都为空")
|
||||
} else {
|
||||
db := dao.GetDB()
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
|
||||
@@ -16,10 +16,10 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
func GetComposedCode(c *beego.Controller, code string) (composedCode string) {
|
||||
func GetComposedCode(c *web.Controller, code string) (composedCode string) {
|
||||
composedCode = code
|
||||
referer := c.Ctx.Request.Referer()
|
||||
globals.SugarLogger.Debugf("GetComposedCode referer:%s", referer)
|
||||
@@ -34,7 +34,7 @@ func GetComposedCode(c *beego.Controller, code string) (composedCode string) {
|
||||
}
|
||||
|
||||
type Auth2Controller struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 生成captcha
|
||||
|
||||
@@ -8,7 +8,7 @@ package controllers
|
||||
|
||||
// // 认证相关API
|
||||
// type AuthController struct {
|
||||
// beego.Controller
|
||||
// web.Controller
|
||||
// }
|
||||
|
||||
// var (
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/msghub"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type CmsController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 得到地点(省,城市,区)信息
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/userstore"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type FoodRecipeController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 创建菜谱
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type MsgController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 发送微信消息
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type SkuController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 得到厂商商品类别
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type StoreController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 得到京西门店信息
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type StoreSkuController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 得到商家商品信息
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type SyncController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 同步商家商品信息
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type TaskController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 查询长时间运行任务
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package controllers
|
||||
|
||||
// type UserController struct {
|
||||
// beego.Controller
|
||||
// web.Controller
|
||||
// }
|
||||
|
||||
// // @Title 得到门店用户信息
|
||||
|
||||
@@ -8,12 +8,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery/dada"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about ELMOrder
|
||||
type DadaDeliveryController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *DadaDeliveryController) Msg() {
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type DDAPIController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
type DDAPI struct {
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type DingDingController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type EbaiController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *EbaiController) Msg() {
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type EclpController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *EclpController) Msg() {
|
||||
|
||||
@@ -4,12 +4,12 @@ import (
|
||||
"net/http"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/elmapi"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about ELMOrder
|
||||
type ElemeController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// https://open.shop.ele.me/openapi/documents/httppushmethod
|
||||
|
||||
@@ -20,12 +20,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// 操作事件明细相关API
|
||||
type EventController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
//连接的客户端,吧每个客户端都放进来
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/financial"
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
type FinancialController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 发送文件给门店
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type FnController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *FnController) Msg() {
|
||||
|
||||
@@ -2,11 +2,11 @@ package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/initdata"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type InitDataController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 初始化place信息
|
||||
|
||||
@@ -9,12 +9,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about JDOrder
|
||||
type Djsw2Controller struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *Djsw2Controller) handleMsg(handler func(*jdapi.API, interface{}) *jdapi.CallbackResponse) (callbackResponse *jdapi.CallbackResponse) {
|
||||
|
||||
@@ -12,12 +12,12 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about JDOrder
|
||||
type DjswController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *DjswController) handleMsg(handler func(*jdapi.API, interface{}) *jdapi.CallbackResponse) (callbackResponse *jdapi.CallbackResponse) {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type JdsController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *JdsController) Msg() {
|
||||
|
||||
@@ -16,12 +16,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// 订单相关API
|
||||
type OrderController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *OrderController) URLMapping() {
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type JxOrderController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 创建京西商城订单
|
||||
|
||||
@@ -4,12 +4,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/report"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// 统计相关API
|
||||
type ReportController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 查询订单统计信息
|
||||
|
||||
@@ -2,11 +2,11 @@ package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/phpjx"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type JxShopController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 京西自营商城消息回调接口
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery/mtps"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
// Operations about ELMOrder
|
||||
type MtpsController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *MtpsController) Status() {
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type MtwmController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *MtwmController) onCallbackMsg(msgType string) {
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/netspider"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type NetSpiderController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 从网页拉取平台门店信息
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/permission"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type PowerController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 添加功能(菜单)
|
||||
|
||||
@@ -16,11 +16,11 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/eventhub/syseventhub"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type SysController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 得到微信token
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/tempop"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type TempOpController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 将为份的商品在京东转成SPU
|
||||
|
||||
@@ -11,12 +11,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"github.com/astaxie/beego/server/web/context"
|
||||
)
|
||||
|
||||
type TongLianController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *TongLianController) Msg() {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type WeimobController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *WeimobController) onCallbackMsg() {
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type WeixinController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *WeixinController) Msg() {
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type WXPayController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *WXPayController) Msg() {
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/yonghui"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
//读取永辉excelAPI
|
||||
type YongHuiController struct {
|
||||
beego.Controller
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 读取永辉excel文件
|
||||
|
||||
@@ -41,7 +41,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
"github.com/qiniu/api.v7/auth/qbox"
|
||||
)
|
||||
|
||||
@@ -113,7 +113,7 @@ func init() {
|
||||
func Init() {
|
||||
if !beego.AppConfig.DefaultBool("disableJd", false) {
|
||||
//初始化京东api
|
||||
// JdAPI = jdapi.New(beego.AppConfig.String("jdToken"), beego.AppConfig.String("jdAppKey"), beego.AppConfig.String("jdSecret"))
|
||||
// JdAPI = jdapi.New(beego.AppConfig.DefaultString("jdToken"), beego.AppConfig.DefaultString("jdAppKey"), beego.AppConfig.DefaultString("jdSecret"))
|
||||
JdAPI = jdapi.New("", "", "")
|
||||
|
||||
conf := platformapi.NewDefAPIConfig()
|
||||
@@ -121,54 +121,54 @@ func Init() {
|
||||
JdPageAPI = jdapi.NewPageOnly("", conf)
|
||||
|
||||
if globals.Jd2OrgCode != "" {
|
||||
// Jd2API = jdapi.New(beego.AppConfig.String("jd2Token"), beego.AppConfig.String("jd2AppKey"), beego.AppConfig.String("jd2Secret"))
|
||||
// Jd2API = jdapi.New(beego.AppConfig.DefaultString("jd2Token"), beego.AppConfig.DefaultString("jd2AppKey"), beego.AppConfig.DefaultString("jd2Secret"))
|
||||
Jd2API = jdapi.New("", "", "")
|
||||
}
|
||||
|
||||
if globals.Jd3OrgCode != "" {
|
||||
// Jd3API = jdapi.New(beego.AppConfig.String("jd3Token"), beego.AppConfig.String("jd3AppKey"), beego.AppConfig.String("jd3Secret"))
|
||||
// Jd3API = jdapi.New(beego.AppConfig.DefaultString("jd3Token"), beego.AppConfig.DefaultString("jd3AppKey"), beego.AppConfig.DefaultString("jd3Secret"))
|
||||
Jd3API = jdapi.New("", "", "")
|
||||
}
|
||||
|
||||
if globals.JdcsOrgCode != "" {
|
||||
// JdcsAPI = jdapi.New(beego.AppConfig.String("jdcsToken"), beego.AppConfig.String("jdcsAppKey"), beego.AppConfig.String("jdcsSecret"))
|
||||
// JdcsAPI = jdapi.New(beego.AppConfig.DefaultString("jdcsToken"), beego.AppConfig.DefaultString("jdcsAppKey"), beego.AppConfig.DefaultString("jdcsSecret"))
|
||||
JdAPI = jdapi.New("", "", "")
|
||||
}
|
||||
|
||||
if globals.JdydOrgCode != "" {
|
||||
// JdydAPI = jdapi.New(beego.AppConfig.String("jdydToken"), beego.AppConfig.String("jdydAppKey"), beego.AppConfig.String("jdydSecret"))
|
||||
// JdydAPI = jdapi.New(beego.AppConfig.DefaultString("jdydToken"), beego.AppConfig.DefaultString("jdydAppKey"), beego.AppConfig.DefaultString("jdydSecret"))
|
||||
JdAPI = jdapi.New("", "", "")
|
||||
}
|
||||
|
||||
fakeJdToken := beego.AppConfig.DefaultString("fakeJdToken", "")
|
||||
if fakeJdToken != "" {
|
||||
FakeJdAPI = jdapi.NewFakeJD(fakeJdToken, beego.AppConfig.String("fakeJdBaseURL"))
|
||||
FakeJdAPI = jdapi.NewFakeJD(fakeJdToken, beego.AppConfig.DefaultString("fakeJdBaseURL", ""))
|
||||
}
|
||||
} else {
|
||||
JdAPI = nil
|
||||
}
|
||||
if !beego.AppConfig.DefaultBool("disableJdEclp", false) {
|
||||
JdEclpAPI = jdeclpapi.New(beego.AppConfig.String("jdEclpAccessToken"), beego.AppConfig.String("jdEclpAppKey"), beego.AppConfig.String("jdEclpAppSecret"))
|
||||
JdEclpAPI = jdeclpapi.New(beego.AppConfig.DefaultString("jdEclpAccessToken", ""), beego.AppConfig.DefaultString("jdEclpAppKey", ""), beego.AppConfig.DefaultString("jdEclpAppSecret", ""))
|
||||
} else {
|
||||
JdEclpAPI = nil
|
||||
}
|
||||
if !beego.AppConfig.DefaultBool("disableJdShop", false) {
|
||||
JdShopAPI = jdshopapi.New(beego.AppConfig.String("jdShopAccessToken"), beego.AppConfig.String("jdShopAppKey"), beego.AppConfig.String("jdShopAppSecret"))
|
||||
JdShop2API = jdshopapi.New(beego.AppConfig.String("jdShopAccessToken2"), beego.AppConfig.String("jdShopAppKey2"), beego.AppConfig.String("jdShopAppSecret2"))
|
||||
JdShopAPI = jdshopapi.New(beego.AppConfig.DefaultString("jdShopAccessToken", ""), beego.AppConfig.DefaultString("jdShopAppKey", ""), beego.AppConfig.DefaultString("jdShopAppSecret", ""))
|
||||
JdShop2API = jdshopapi.New(beego.AppConfig.DefaultString("jdShopAccessToken2", ""), beego.AppConfig.DefaultString("jdShopAppKey2", ""), beego.AppConfig.DefaultString("jdShopAppSecret2", ""))
|
||||
} else {
|
||||
JdShopAPI = nil
|
||||
}
|
||||
if !beego.AppConfig.DefaultBool("disableElm", false) {
|
||||
ElmAPI = elmapi.New(beego.AppConfig.DefaultString("elmToken", ""), beego.AppConfig.String("elmAppKey"), beego.AppConfig.String("elmSecret"), beego.AppConfig.DefaultBool("elmIsProd", false))
|
||||
ElmAPI = elmapi.New(beego.AppConfig.DefaultString("elmToken", ""), beego.AppConfig.DefaultString("elmAppKey", ""), beego.AppConfig.DefaultString("elmSecret", ""), beego.AppConfig.DefaultBool("elmIsProd", false))
|
||||
} else {
|
||||
ElmAPI = nil
|
||||
}
|
||||
if !beego.AppConfig.DefaultBool("disableMtwm", false) {
|
||||
MtwmAPI = mtwmapi.New(beego.AppConfig.String("mtwmAppID"), beego.AppConfig.String("mtwmSecret"), beego.AppConfig.String("mtwmCallbackURL"), "")
|
||||
MtwmAPI = mtwmapi.New(beego.AppConfig.DefaultString("mtwmAppID", ""), beego.AppConfig.DefaultString("mtwmSecret", ""), beego.AppConfig.DefaultString("mtwmCallbackURL", ""), "")
|
||||
// if mtwmCookieStr := beego.AppConfig.DefaultString("mtwmCookieStr", ""); mtwmCookieStr != "" {
|
||||
// MtwmAPI.SetCookieWithStr(mtwmCookieStr)
|
||||
// }
|
||||
Mtwm2API = mtwmapi.New(beego.AppConfig.String("mtwmAppID2"), beego.AppConfig.String("mtwmSecret2"), beego.AppConfig.String("mtwmCallbackURL2"), "")
|
||||
Mtwm2API = mtwmapi.New(beego.AppConfig.DefaultString("mtwmAppID2", ""), beego.AppConfig.DefaultString("mtwmSecret2", ""), beego.AppConfig.DefaultString("mtwmCallbackURL2", ""), "")
|
||||
} else {
|
||||
MtwmAPI = nil
|
||||
}
|
||||
@@ -181,7 +181,7 @@ func Init() {
|
||||
WeimobAPI = nil
|
||||
}
|
||||
if !beego.AppConfig.DefaultBool("disableEbai", false) {
|
||||
EbaiAPI = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret"))
|
||||
EbaiAPI = ebaiapi.New(beego.AppConfig.DefaultString("ebaiSource", ""), beego.AppConfig.DefaultString("ebaiSecret", ""))
|
||||
// ebaiStorePageCookieWMUSS := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS", "")
|
||||
// ebaiStorePageCookieWMSTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN", "")
|
||||
// ebaiStorePageCookieExdTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieExdTOKEN", "")
|
||||
@@ -190,7 +190,7 @@ func Init() {
|
||||
// EbaiAPI.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN)
|
||||
// EbaiAPI.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN)
|
||||
// }
|
||||
Ebai2API = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret"))
|
||||
Ebai2API = ebaiapi.New(beego.AppConfig.DefaultString("ebaiSource", ""), beego.AppConfig.DefaultString("ebaiSecret", ""))
|
||||
// ebaiStorePageCookieWMUSS2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS2", "")
|
||||
// ebaiStorePageCookieWMSTOKEN2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN2", "")
|
||||
// if ebaiStorePageCookieWMUSS2 != "" && ebaiStorePageCookieWMSTOKEN2 != "" && ebaiStorePageCookieExdTOKEN != "" {
|
||||
@@ -204,13 +204,13 @@ func Init() {
|
||||
}
|
||||
|
||||
if !beego.AppConfig.DefaultBool("disableYb", false) {
|
||||
YinBaoAPI = yinbaoapi.New(beego.AppConfig.String("yinbaoAppKey"), beego.AppConfig.String("yinbaoAppID"))
|
||||
YinBaoAPI = yinbaoapi.New(beego.AppConfig.DefaultString("yinbaoAppKey", ""), beego.AppConfig.DefaultString("yinbaoAppID", ""))
|
||||
} else {
|
||||
YinBaoAPI = nil
|
||||
}
|
||||
|
||||
if !beego.AppConfig.DefaultBool("disableMtps", false) {
|
||||
MtpsAPI = mtpsapi.New(beego.AppConfig.String("mtpsAppKey"), beego.AppConfig.String("mtpsSecret"))
|
||||
MtpsAPI = mtpsapi.New(beego.AppConfig.DefaultString("mtpsAppKey", ""), beego.AppConfig.DefaultString("mtpsSecret", ""))
|
||||
// if mtpsStoreToken := beego.AppConfig.DefaultString("mtpsStoreToken", ""); mtpsStoreToken != "" {
|
||||
// MtpsAPI.SetCookie("token", mtpsStoreToken)
|
||||
// }
|
||||
@@ -218,13 +218,13 @@ func Init() {
|
||||
MtpsAPI = nil
|
||||
}
|
||||
if !beego.AppConfig.DefaultBool("disableDada", false) {
|
||||
DadaAPI = dadaapi.New(beego.AppConfig.String("dadaAppKey"), beego.AppConfig.String("dadaAppSecret"), beego.AppConfig.String("dadaSourceID"), beego.AppConfig.String("dadaCallbackURL"), beego.AppConfig.DefaultBool("dadaIsProd", false))
|
||||
DadaAPI = dadaapi.New(beego.AppConfig.DefaultString("dadaAppKey", ""), beego.AppConfig.DefaultString("dadaAppSecret", ""), beego.AppConfig.DefaultString("dadaSourceID", ""), beego.AppConfig.DefaultString("dadaCallbackURL", ""), beego.AppConfig.DefaultBool("dadaIsProd", false))
|
||||
} else {
|
||||
DadaAPI = nil
|
||||
}
|
||||
|
||||
if !beego.AppConfig.DefaultBool("disableWeixin", false) {
|
||||
WeixinAPI = weixinapi.New(beego.AppConfig.String("weixinAppID"), beego.AppConfig.String("weixinSecret"))
|
||||
WeixinAPI = weixinapi.New(beego.AppConfig.DefaultString("weixinAppID", ""), beego.AppConfig.DefaultString("weixinSecret", ""))
|
||||
// 这个主要是用于调试阶段使用,生产环境中用的是自动刷新那套
|
||||
if weixinToken := beego.AppConfig.DefaultString("weixinToken", ""); weixinToken != "" {
|
||||
WeixinAPI.CBSetToken(weixinToken)
|
||||
@@ -235,38 +235,38 @@ func Init() {
|
||||
} else {
|
||||
WeimobAPI = nil
|
||||
}
|
||||
WeixinMiniAPI = weixinapi.New(beego.AppConfig.String("weixinMiniAppID"), beego.AppConfig.String("weixinMiniSecret"))
|
||||
if WeixinMiniAppID2 = beego.AppConfig.String("weixinMiniAppID2"); WeixinMiniAppID2 != "" {
|
||||
WeixinMiniAPI2 = weixinapi.New(WeixinMiniAppID2, beego.AppConfig.String("weixinMiniSecret2"))
|
||||
WeixinMiniAPI = weixinapi.New(beego.AppConfig.DefaultString("weixinMiniAppID", ""), beego.AppConfig.DefaultString("weixinMiniSecret", ""))
|
||||
if WeixinMiniAppID2 = beego.AppConfig.DefaultString("weixinMiniAppID2", ""); WeixinMiniAppID2 != "" {
|
||||
WeixinMiniAPI2 = weixinapi.New(WeixinMiniAppID2, beego.AppConfig.DefaultString("weixinMiniSecret2", ""))
|
||||
}
|
||||
WeixinPageAPI = weixinapi.New(beego.AppConfig.String("weixinPageAppID"), beego.AppConfig.String("weixinPageSecret"))
|
||||
if WeixinMiniAppID3 = beego.AppConfig.String("weixinMiniAppID3"); WeixinMiniAppID3 != "" {
|
||||
WeixinApp = weixinapi.New(WeixinMiniAppID3, beego.AppConfig.String("weixinMiniSecret3"))
|
||||
WeixinPageAPI = weixinapi.New(beego.AppConfig.DefaultString("weixinPageAppID", ""), beego.AppConfig.DefaultString("weixinPageSecret", ""))
|
||||
if WeixinMiniAppID3 = beego.AppConfig.DefaultString("weixinMiniAppID3", ""); WeixinMiniAppID3 != "" {
|
||||
WeixinApp = weixinapi.New(WeixinMiniAppID3, beego.AppConfig.DefaultString("weixinMiniSecret3", ""))
|
||||
}
|
||||
if WeixinMiniAppIDsc = beego.AppConfig.String("weixinMiniAppIDsc"); WeixinMiniAppIDsc != "" {
|
||||
WeixinMiniAPIsc = weixinapi.New(WeixinMiniAppIDsc, beego.AppConfig.String("weixinMiniSecretsc"))
|
||||
if WeixinMiniAppIDsc = beego.AppConfig.DefaultString("weixinMiniAppIDsc", ""); WeixinMiniAppIDsc != "" {
|
||||
WeixinMiniAPIsc = weixinapi.New(WeixinMiniAppIDsc, beego.AppConfig.DefaultString("weixinMiniSecretsc", ""))
|
||||
}
|
||||
if globals.WxpayNotifyURL != "" {
|
||||
// WxpayAPI = wxpayapi.New(beego.AppConfig.String("wxpayAppID"), beego.AppConfig.String("wxpayAppKey"), beego.AppConfig.String("wxpayAppMchID"))
|
||||
WxpayAPI = wxpayapi.NewWithCertificate(beego.AppConfig.String("wxpayAppID"), beego.AppConfig.String("wxpayAppKey"), beego.AppConfig.String("wxpayAppMchID"),
|
||||
// WxpayAPI = wxpayapi.New(beego.AppConfig.DefaultString("wxpayAppID"), beego.AppConfig.DefaultString("wxpayAppKey"), beego.AppConfig.DefaultString("wxpayAppMchID"))
|
||||
WxpayAPI = wxpayapi.NewWithCertificate(beego.AppConfig.DefaultString("wxpayAppID", ""), beego.AppConfig.DefaultString("wxpayAppKey", ""), beego.AppConfig.DefaultString("wxpayAppMchID", ""),
|
||||
"conf/apiclient_cert.pem", "conf/apiclient_key.pem")
|
||||
}
|
||||
|
||||
if globals.TLPayNotifyURL != "" {
|
||||
TLpayAPI = tonglianpayapi.New(beego.AppConfig.String("tonglianPayAppID"), beego.AppConfig.String("tonglianPayKey"), beego.AppConfig.String("tonglianPayCusID"))
|
||||
TLpayAPI = tonglianpayapi.New(beego.AppConfig.DefaultString("tonglianPayAppID", ""), beego.AppConfig.DefaultString("tonglianPayKey", ""), beego.AppConfig.DefaultString("tonglianPayCusID", ""))
|
||||
}
|
||||
AutonaviAPI = autonavi.New(beego.AppConfig.String("autonaviKey"))
|
||||
BaiDuNaviAPI = baidunavi.New(beego.AppConfig.String("baidunaviAK"), beego.AppConfig.String("baidunaviSK"))
|
||||
QiniuAPI = qbox.NewMac(beego.AppConfig.String("qiniuAK"), beego.AppConfig.String("qiniuSK"))
|
||||
AutonaviAPI = autonavi.New(beego.AppConfig.DefaultString("autonaviKey", ""))
|
||||
BaiDuNaviAPI = baidunavi.New(beego.AppConfig.DefaultString("baidunaviAK", ""), beego.AppConfig.DefaultString("baidunaviSK", ""))
|
||||
QiniuAPI = qbox.NewMac(beego.AppConfig.DefaultString("qiniuAK", ""), beego.AppConfig.DefaultString("qiniuSK", ""))
|
||||
ShowAPI = showapi.New(beego.AppConfig.DefaultInt("showAppID", 0), beego.AppConfig.DefaultString("showAppSecret", ""))
|
||||
Cacher = redis.New(beego.AppConfig.DefaultString("redisHost", "localhost"), beego.AppConfig.DefaultInt("redisPort", 0), beego.AppConfig.DefaultString("redisPassword", ""))
|
||||
AliUpcAPI = aliupcapi.New(beego.AppConfig.String("aliUpcAppCode"))
|
||||
AliUpcAPI = aliupcapi.New(beego.AppConfig.DefaultString("aliUpcAppCode", ""))
|
||||
|
||||
DingDingAPI = dingdingapi.NewWithAgentID(beego.AppConfig.DefaultInt64("dingdingAgentID", 0), beego.AppConfig.DefaultString("dingdingCorpID", ""), beego.AppConfig.DefaultString("dingdingAppKey", ""), beego.AppConfig.DefaultString("dingdingSecret", ""))
|
||||
DingDingQRCodeAPI = dingdingapi.New(beego.AppConfig.DefaultString("dingdingCorpID", ""), beego.AppConfig.DefaultString("dingdingQRCodeAppKey", ""), beego.AppConfig.DefaultString("dingdingQRCodeSecret", ""))
|
||||
|
||||
if alipayAppID := beego.AppConfig.DefaultString("alipayAppID", ""); alipayAppID != "" {
|
||||
AliPayAPI = alipayapi.New(alipayAppID, []byte(beego.AppConfig.String("alipayPrivateKey")))
|
||||
AliPayAPI = alipayapi.New(alipayAppID, []byte(beego.AppConfig.DefaultString("alipayPrivateKey", "")))
|
||||
}
|
||||
|
||||
FnAPI = fnpsapi.New(beego.AppConfig.DefaultString("fnAppID", ""), beego.AppConfig.DefaultString("fnAppSecret", ""))
|
||||
|
||||
@@ -2,8 +2,8 @@ package globals
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/logs"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
_ "github.com/go-sql-driver/mysql" // import your used driver
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@@ -78,7 +78,7 @@ var (
|
||||
|
||||
func init() {
|
||||
logs.SetLogFuncCallDepth(3)
|
||||
beego.BConfig.Log.AccessLogs = true
|
||||
web.BConfig.Log.AccessLogs = true
|
||||
|
||||
logger, _ := zap.NewDevelopment()
|
||||
SugarLogger = logger.Sugar()
|
||||
@@ -91,77 +91,77 @@ func Init() {
|
||||
OutputDebugMsgLevel = 1
|
||||
}
|
||||
|
||||
SugarLogger.Infof("globals RunMode=%s", beego.BConfig.RunMode)
|
||||
ReallyCallPlatformAPI = (beego.BConfig.RunMode != "dev" && beego.BConfig.RunMode != "test")
|
||||
SugarLogger.Infof("globals RunMode=%s", web.BConfig.RunMode)
|
||||
ReallyCallPlatformAPI = (web.BConfig.RunMode != "dev" && web.BConfig.RunMode != "test")
|
||||
ReallySendWeixinMsg = ReallyCallPlatformAPI && IsProductEnv()
|
||||
|
||||
AliKey = beego.AppConfig.DefaultString("aliKey", "")
|
||||
AliSecret = beego.AppConfig.DefaultString("aliSecret", "")
|
||||
AliKey = web.AppConfig.DefaultString("aliKey", "")
|
||||
AliSecret = web.AppConfig.DefaultString("aliSecret", "")
|
||||
|
||||
EnableStoreWrite = beego.AppConfig.DefaultBool("enableStoreWrite", false)
|
||||
EnableJdStoreWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableJdStoreWrite", false)
|
||||
EnableEbaiStoreWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableEbaiStoreWrite", false)
|
||||
EnableElmStoreWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableElmStoreWrite", false)
|
||||
EnableMtwmStoreWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableMtwmStoreWrite", false)
|
||||
EnableWscStoreWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableWscStoreWrite", false)
|
||||
// EnablePendingChange = beego.AppConfig.DefaultBool("enablePendingChange", false)
|
||||
EnableYbStoreWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableYbStoreWrite", false)
|
||||
EnableJdShopWrite = EnableStoreWrite && beego.AppConfig.DefaultBool("enableJdShopWrite", false)
|
||||
EnableStoreWrite = web.AppConfig.DefaultBool("enableStoreWrite", false)
|
||||
EnableJdStoreWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableJdStoreWrite", false)
|
||||
EnableEbaiStoreWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableEbaiStoreWrite", false)
|
||||
EnableElmStoreWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableElmStoreWrite", false)
|
||||
EnableMtwmStoreWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableMtwmStoreWrite", false)
|
||||
EnableWscStoreWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableWscStoreWrite", false)
|
||||
// EnablePendingChange = web.AppConfig.DefaultBool("enablePendingChange", false)
|
||||
EnableYbStoreWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableYbStoreWrite", false)
|
||||
EnableJdShopWrite = EnableStoreWrite && web.AppConfig.DefaultBool("enableJdShopWrite", false)
|
||||
|
||||
QiniuBucket = beego.AppConfig.String("qiniuBucket")
|
||||
QiniuBucket = web.AppConfig.DefaultString("qiniuBucket", "")
|
||||
|
||||
WeimobCallbackURL = beego.AppConfig.DefaultString("weimobCallbackURL", "")
|
||||
WeimobStateSecret = beego.AppConfig.DefaultString("weimobStateSecret", "")
|
||||
WeimobCallbackURL = web.AppConfig.DefaultString("weimobCallbackURL", "")
|
||||
WeimobStateSecret = web.AppConfig.DefaultString("weimobStateSecret", "")
|
||||
|
||||
BackstageHost = beego.AppConfig.DefaultString("backstageHost", "")
|
||||
WxBackstageHost = beego.AppConfig.DefaultString("wxBackstageHost", "")
|
||||
BackstageHost = web.AppConfig.DefaultString("backstageHost", "")
|
||||
WxBackstageHost = web.AppConfig.DefaultString("wxBackstageHost", "")
|
||||
|
||||
GetWeixinTokenURL = beego.AppConfig.DefaultString("getWeixinTokenURL", "")
|
||||
GetWeixin2TokenURL = beego.AppConfig.DefaultString("getWeixin2TokenURL", "")
|
||||
GetYLYTokenURL = beego.AppConfig.DefaultString("getYLYTokenURL", "")
|
||||
GetWeimobTokenURL = beego.AppConfig.DefaultString("getWeimobTokenURL", "")
|
||||
GetWeixinTokenKey = beego.AppConfig.DefaultString("getWeixinTokenKey", "")
|
||||
GetPushTokenURL = beego.AppConfig.DefaultString("getPushTokenURL", "")
|
||||
GetWeixinTokenURL = web.AppConfig.DefaultString("getWeixinTokenURL", "")
|
||||
GetWeixin2TokenURL = web.AppConfig.DefaultString("getWeixin2TokenURL", "")
|
||||
GetYLYTokenURL = web.AppConfig.DefaultString("getYLYTokenURL", "")
|
||||
GetWeimobTokenURL = web.AppConfig.DefaultString("getWeimobTokenURL", "")
|
||||
GetWeixinTokenKey = web.AppConfig.DefaultString("getWeixinTokenKey", "")
|
||||
GetPushTokenURL = web.AppConfig.DefaultString("getPushTokenURL", "")
|
||||
|
||||
StoreName = beego.AppConfig.String("storeName")
|
||||
StoreNameMtwm = beego.AppConfig.String("storeNameMtwm")
|
||||
StoreNameEbai = beego.AppConfig.String("storeNameEbai")
|
||||
StoreNameEbai2 = beego.AppConfig.String("storeNameEbai2")
|
||||
StoreName = web.AppConfig.DefaultString("storeName", "")
|
||||
StoreNameMtwm = web.AppConfig.DefaultString("storeNameMtwm", "")
|
||||
StoreNameEbai = web.AppConfig.DefaultString("storeNameEbai", "")
|
||||
StoreNameEbai2 = web.AppConfig.DefaultString("storeNameEbai2", "")
|
||||
|
||||
SMSSignName = beego.AppConfig.String("smsSignName")
|
||||
SMSMobileVerifyTemplate = beego.AppConfig.String("smsMobileVerifyTemplate")
|
||||
SMSNewOrderTemplate = beego.AppConfig.String("smsNewOrderTemplate")
|
||||
SMSNewOrderTemplateQ = beego.AppConfig.String("smsNewOrderTemplateQ")
|
||||
SMSOrderCanceledTemplate = beego.AppConfig.String("smsOrderCanceledTemplate")
|
||||
SMSNewUserOrderTemplate = beego.AppConfig.String("smsNewUserOrderTemplate")
|
||||
SMSSignName = web.AppConfig.DefaultString("smsSignName", "")
|
||||
SMSMobileVerifyTemplate = web.AppConfig.DefaultString("smsMobileVerifyTemplate", "")
|
||||
SMSNewOrderTemplate = web.AppConfig.DefaultString("smsNewOrderTemplate", "")
|
||||
SMSNewOrderTemplateQ = web.AppConfig.DefaultString("smsNewOrderTemplateQ", "")
|
||||
SMSOrderCanceledTemplate = web.AppConfig.DefaultString("smsOrderCanceledTemplate", "")
|
||||
SMSNewUserOrderTemplate = web.AppConfig.DefaultString("smsNewUserOrderTemplate", "")
|
||||
|
||||
EnableWXAuth2 = true // beego.BConfig.RunMode == "beta"
|
||||
EnableWXAuth2 = true // web.BConfig.RunMode == "beta"
|
||||
DisableWXAuth1 = true
|
||||
|
||||
WxpayNotifyURL = beego.AppConfig.DefaultString("wxpayNotifyURL", "")
|
||||
TLPayNotifyURL = beego.AppConfig.DefaultString("tonglianPayNotifyURL", "")
|
||||
FnNotifyURL = beego.AppConfig.DefaultString("fnCallbackURL", "")
|
||||
JdOrgCode = beego.AppConfig.DefaultString("jdOrgCode", "")
|
||||
Jd2OrgCode = beego.AppConfig.DefaultString("jd2OrgCode", "")
|
||||
Jd3OrgCode = beego.AppConfig.DefaultString("jd3OrgCode", "")
|
||||
JdcsOrgCode = beego.AppConfig.DefaultString("jdcsOrgCode", "")
|
||||
JdydOrgCode = beego.AppConfig.DefaultString("jdydOrgCode", "")
|
||||
JdLoginName = beego.AppConfig.DefaultString("jdLoginName", "")
|
||||
IsAddEvent = beego.AppConfig.DefaultBool("addEvent", false)
|
||||
WxpayNotifyURL = web.AppConfig.DefaultString("wxpayNotifyURL", "")
|
||||
TLPayNotifyURL = web.AppConfig.DefaultString("tonglianPayNotifyURL", "")
|
||||
FnNotifyURL = web.AppConfig.DefaultString("fnCallbackURL", "")
|
||||
JdOrgCode = web.AppConfig.DefaultString("jdOrgCode", "")
|
||||
Jd2OrgCode = web.AppConfig.DefaultString("jd2OrgCode", "")
|
||||
Jd3OrgCode = web.AppConfig.DefaultString("jd3OrgCode", "")
|
||||
JdcsOrgCode = web.AppConfig.DefaultString("jdcsOrgCode", "")
|
||||
JdydOrgCode = web.AppConfig.DefaultString("jdydOrgCode", "")
|
||||
JdLoginName = web.AppConfig.DefaultString("jdLoginName", "")
|
||||
IsAddEvent = web.AppConfig.DefaultBool("addEvent", false)
|
||||
IsStoreSkuAct = !IsProductEnv()
|
||||
|
||||
MtwmCode = beego.AppConfig.DefaultString("mtwmAppID", "")
|
||||
Mtwm2Code = beego.AppConfig.DefaultString("mtwmAppID2", "")
|
||||
MtwmCode = web.AppConfig.DefaultString("mtwmAppID", "")
|
||||
Mtwm2Code = web.AppConfig.DefaultString("mtwmAppID2", "")
|
||||
}
|
||||
|
||||
func IsCallbackAlwaysReturnSuccess() bool {
|
||||
return beego.BConfig.RunMode == "beta"
|
||||
return web.BConfig.RunMode == "beta"
|
||||
}
|
||||
|
||||
func IsMainProductEnv() bool {
|
||||
return beego.BConfig.RunMode == "prod"
|
||||
return web.BConfig.RunMode == "prod"
|
||||
}
|
||||
|
||||
func IsProductEnv() bool {
|
||||
return IsMainProductEnv() || beego.BConfig.RunMode == "jxgy"
|
||||
return IsMainProductEnv() || web.BConfig.RunMode == "jxgy"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/beegodb"
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
|
||||
2
main.go
2
main.go
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/yb"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
_ "git.rosy.net.cn/jx-callback/routers"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user