im
This commit is contained in:
@@ -2,6 +2,9 @@ package model
|
||||
|
||||
// VendorIDJD, VendorIDMTWM与VendorIDELM的定义和老系统是兼容的
|
||||
const (
|
||||
IMVendorIDMT = "10" //美团IM
|
||||
IMVendorIDELM = "11" //饿了么im
|
||||
|
||||
VendorTypeUnknown = 0 // 未知
|
||||
VendorTypePurchase = 1 // 购物平台
|
||||
VendorTypeDelivery = 2 // 快递平台
|
||||
|
||||
@@ -1646,3 +1646,17 @@ func BindJXPrintToStore(storeId int64, printSn, printKey string) error {
|
||||
_, err := ExecuteSQL(GetDB(), sql, []interface{}{printSn, printKey, model.VendorIDJxprint, model.NO, storeId})
|
||||
return err
|
||||
}
|
||||
|
||||
// GetStoreBaseByVendorStoreID 根据vendorStoreID获取门店基本信息
|
||||
func GetStoreBaseByVendorStoreID(vendorStoreID string, vendorID int) (storeDetail *model.Store, err error) {
|
||||
if len(vendorStoreID) == 0 {
|
||||
return nil, errors.New("vendorStoreID不能为空")
|
||||
}
|
||||
|
||||
DefaultTimeValue := utils.Str2Time("1970-01-01 00:00:00")
|
||||
sql := `SELECT t.* FROM store t WHERE t.id = (SELECT s.store_id FROM store_map s WHERE s.vendor_store_id= ? AND s.vendor_id= ? AND s.deleted_at= ? )`
|
||||
if err := GetRow(GetDB(), &storeDetail, sql, []interface{}{vendorStoreID, vendorID, DefaultTimeValue}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return storeDetail, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user