1
This commit is contained in:
@@ -562,16 +562,9 @@ func setStoreMapInfo(ctx *jxcontext.Context, db *dao.DaoDB, storesInfo *StoresIn
|
|||||||
// todo 门店绑定信息可以考虑以数组形式返回,而不是现在这样
|
// todo 门店绑定信息可以考虑以数组形式返回,而不是现在这样
|
||||||
func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interface{}, offset, pageSize int, orderTimeFrom, orderTimeTo time.Time, orderCountFrom, orderCountTo int) (retVal *StoresInfo, err error) {
|
func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interface{}, offset, pageSize int, orderTimeFrom, orderTimeTo time.Time, orderCountFrom, orderCountTo int) (retVal *StoresInfo, err error) {
|
||||||
briefLevel := int(utils.ForceInterface2Int64(params["briefLevel"]))
|
briefLevel := int(utils.ForceInterface2Int64(params["briefLevel"]))
|
||||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
|
||||||
globals.SugarLogger.Debugf("======params:%s", utils.Format4Output(params, false))
|
|
||||||
}
|
|
||||||
//权限
|
//权限
|
||||||
if permission.IsRoled(ctx) {
|
if permission.IsRoled(ctx) {
|
||||||
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
||||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
|
||||||
globals.SugarLogger.Debugf("======storeIDsMap:%s", utils.Format4Output(storeIDsMap, false))
|
|
||||||
}
|
|
||||||
|
|
||||||
var storeIDs2 []int
|
var storeIDs2 []int
|
||||||
if params["storeIDs"] != nil {
|
if params["storeIDs"] != nil {
|
||||||
var storeIDs []int
|
var storeIDs []int
|
||||||
@@ -607,7 +600,6 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("===============params := %s", utils.Format4Output(params, false))
|
|
||||||
sql, sqlParams, _, _, err := getStoresSql(ctx, keyword, params, orderTimeFrom, orderTimeTo)
|
sql, sqlParams, _, _, err := getStoresSql(ctx, keyword, params, orderTimeFrom, orderTimeTo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -643,16 +635,8 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
|||||||
pageSize = jxutils.FormalizePageSize(pageSize)
|
pageSize = jxutils.FormalizePageSize(pageSize)
|
||||||
sqlParams = append(sqlParams, pageSize, offset)
|
sqlParams = append(sqlParams, pageSize, offset)
|
||||||
//mapLimit := false
|
//mapLimit := false
|
||||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
|
||||||
globals.SugarLogger.Debugf("======sql:%s", sql)
|
|
||||||
globals.SugarLogger.Debugf("======sql:%s", sqlParams)
|
|
||||||
}
|
|
||||||
txDB, _ := dao.Begin(db)
|
txDB, _ := dao.Begin(db)
|
||||||
if err = dao.GetRowsTx(txDB, &storeList, sql, sqlParams...); err == nil {
|
if err = dao.GetRowsTx(txDB, &storeList, sql, sqlParams...); err == nil {
|
||||||
if ctx.GetUserID() == "6D914A8BB71611EDB37F525400E86DC0" {
|
|
||||||
globals.SugarLogger.Debugf("======storeList:%s", utils.Format4Output(storeList, false))
|
|
||||||
}
|
|
||||||
|
|
||||||
retVal.Stores = storeList
|
retVal.Stores = storeList
|
||||||
retVal.TotalCount = dao.GetLastTotalRowCount2(db, txDB)
|
retVal.TotalCount = dao.GetLastTotalRowCount2(db, txDB)
|
||||||
// 地图区域限制过滤
|
// 地图区域限制过滤
|
||||||
@@ -1149,7 +1133,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
|||||||
return num, err
|
return num, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateVendorStoreStatusAndDeliveryStatus 当门店被禁用时,将三方平台和三方配送全部关闭
|
//// updateVendorStoreStatusAndDeliveryStatus 当门店被禁用时,将三方平台和三方配送全部关闭
|
||||||
//func updateVendorStoreStatusAndDeliveryStatus(ctx *jxcontext.Context, storeId int) error {
|
//func updateVendorStoreStatusAndDeliveryStatus(ctx *jxcontext.Context, storeId int) error {
|
||||||
// var (
|
// var (
|
||||||
// db = dao.GetDB()
|
// db = dao.GetDB()
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package permission
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -353,9 +352,6 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
||||||
if userID == "6D914A8BB71611EDB37F525400E86DC0" {
|
|
||||||
globals.SugarLogger.Debugf("======userRoles:%s", utils.Format4Output(userRoles, false))
|
|
||||||
}
|
|
||||||
err = err2
|
err = err2
|
||||||
for _, v := range userRoles {
|
for _, v := range userRoles {
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -145,9 +145,8 @@ type GoodsOrder struct {
|
|||||||
StatusTime time.Time `orm:"type(datetime)" json:"statusTime"` // last status time
|
StatusTime time.Time `orm:"type(datetime)" json:"statusTime"` // last status time
|
||||||
PickDeadline time.Time `orm:"type(datetime);null" json:"pickDeadline"`
|
PickDeadline time.Time `orm:"type(datetime);null" json:"pickDeadline"`
|
||||||
DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间
|
DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间
|
||||||
ModelTimeInfo `json:"-"`
|
ModelTimeInfo `json:"-"` // 1
|
||||||
Flag int `json:"flag"` // 非运单调整相关的其它状态
|
Flag int `json:"flag"` // 非运单调整相关的其它状态
|
||||||
|
|
||||||
InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头
|
InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头
|
||||||
InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码
|
InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码
|
||||||
InvoiceEmail string `orm:"size(64)" json:"invoiceEmail"` // 发票邮箱
|
InvoiceEmail string `orm:"size(64)" json:"invoiceEmail"` // 发票邮箱
|
||||||
@@ -157,10 +156,10 @@ type GoodsOrder struct {
|
|||||||
AddressID int64 `orm:"column(address_id)" json:"addressID"` // 配送地址ID
|
AddressID int64 `orm:"column(address_id)" json:"addressID"` // 配送地址ID
|
||||||
EarningType int `json:"earningType"` // 订单结算方式,2为扣点,1为报价
|
EarningType int `json:"earningType"` // 订单结算方式,2为扣点,1为报价
|
||||||
OrderType int `json:"orderType"` // 订单类型,0为普通订单,1为物料订单,2为进货订单
|
OrderType int `json:"orderType"` // 订单类型,0为普通订单,1为物料订单,2为进货订单
|
||||||
OrderPayPercentage int `json:"orderPayPercentage"`
|
OrderPayPercentage int `json:"orderPayPercentage"` // 调价包?
|
||||||
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` // 优惠券IDs(京西商城)
|
CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` // 优惠券IDs(京西商城)
|
||||||
NotifyType int `json:"notifyType"` // 0表示没有通知,1表示发的短信,2表示发的语音
|
NotifyType int `json:"notifyType"` // 0表示没有通知,1表示发的短信,2表示发的语音
|
||||||
PhoneAscription string `orm:"column(phone_ascription)" json:"phoneAscription"` // 电话号码归属地
|
PhoneAscription string `orm:"column(phone_ascription)" json:"phoneAscription"` // 电话号码归属地,{代表抖音号码归宿地[yes-四川成都]}
|
||||||
|
|
||||||
// 以下只是用于传递数据
|
// 以下只是用于传递数据
|
||||||
OriginalData string `orm:"-" json:"-"`
|
OriginalData string `orm:"-" json:"-"`
|
||||||
@@ -244,7 +243,7 @@ type Waybill struct {
|
|||||||
ModelTimeInfo `json:"-"`
|
ModelTimeInfo `json:"-"`
|
||||||
OriginalData string `orm:"type(text)" json:"-"`
|
OriginalData string `orm:"type(text)" json:"-"`
|
||||||
Remark string `orm:"-" json:"-"` // 用于传递remark
|
Remark string `orm:"-" json:"-"` // 用于传递remark
|
||||||
|
//OtherFee int64 `orm:"column(other_fee)" json:"otherFee"` // 对应美团外卖运单的保险费
|
||||||
VendorOrgCode string `orm:"size(64)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
VendorOrgCode string `orm:"size(64)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package controllers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/jx-callback/business/bidding"
|
"git.rosy.net.cn/jx-callback/business/bidding"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -827,6 +828,7 @@ func (c *OrderController) RefreshHistoryOrdersEarningPrice() {
|
|||||||
// @router /PartRefundOrder [put]
|
// @router /PartRefundOrder [put]
|
||||||
func (c *OrderController) PartRefundOrder() {
|
func (c *OrderController) PartRefundOrder() {
|
||||||
c.callPartRefundOrder(func(params *tOrderPartRefundOrderParams) (retVal interface{}, errCode string, err error) {
|
c.callPartRefundOrder(func(params *tOrderPartRefundOrderParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
return nil, "", errors.New("接口暂停使用")
|
||||||
var skuList []*model.OrderSku
|
var skuList []*model.OrderSku
|
||||||
err = jxutils.Strings2Objs(params.RefundSkuList, &skuList)
|
err = jxutils.Strings2Objs(params.RefundSkuList, &skuList)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user