添加Store.OperatorPhone2
门店搜索支持电话号码
This commit is contained in:
@@ -3,8 +3,8 @@ package model
|
||||
type CasbinRule struct {
|
||||
ID int `orm:"column(id)" json:"id"`
|
||||
PType string
|
||||
V0 string
|
||||
V1 string
|
||||
V0 string `orm:"index"`
|
||||
V1 string `orm:"index"`
|
||||
V2 string
|
||||
V3 string
|
||||
V4 string
|
||||
|
||||
@@ -99,7 +99,7 @@ func GetStoreListByMobile(db *DaoDB, mobile string) (storeList []*StoreWithCityN
|
||||
FROM (
|
||||
SELECT *
|
||||
FROM store t1
|
||||
WHERE (t1.market_man_phone = ? OR t1.operator_phone = ?)
|
||||
WHERE (t1.market_man_phone = ? OR t1.operator_phone = ? OR t1.operator_phone2 = ?)
|
||||
UNION DISTINCT
|
||||
SELECT t1.*
|
||||
FROM store t1
|
||||
@@ -111,6 +111,7 @@ func GetStoreListByMobile(db *DaoDB, mobile string) (storeList []*StoreWithCityN
|
||||
WHERE t1.deleted_at = ?
|
||||
ORDER BY t1.name`
|
||||
sqlParams := []interface{}{
|
||||
mobile,
|
||||
mobile,
|
||||
mobile,
|
||||
mobile,
|
||||
@@ -132,8 +133,8 @@ func GetStoreListByMobileOrStoreIDs(db *DaoDB, mobile string, shortRoleNameList
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if mobile != "" {
|
||||
sql += " OR t1.market_man_phone = ? OR t1.operator_phone = ?"
|
||||
sqlParams = append(sqlParams, mobile, mobile)
|
||||
sql += " OR t1.market_man_phone = ? OR t1.operator_phone = ? OR t1.operator_phone2 = ?"
|
||||
sqlParams = append(sqlParams, mobile, mobile, mobile)
|
||||
}
|
||||
if len(shortRoleNameList) > 0 {
|
||||
questionMarks := GenQuestionMarks(len(shortRoleNameList))
|
||||
|
||||
@@ -301,7 +301,9 @@ type Store struct {
|
||||
// OperatorName string `orm:"size(8)" json:"operatorName"` // 运营人姓名
|
||||
OperatorPhone string `orm:"size(16)" json:"operatorPhone"` // 运营人电话
|
||||
OperatorRole string `orm:"size(32)" json:"operatorRole"` // 京东运营人组(角色)
|
||||
OperatorRole2 string `orm:"size(32)" json:"operatorRole2"` // 非京东运营人组(角色)
|
||||
|
||||
OperatorPhone2 string `orm:"size(16)" json:"operatorPhone2"` // 非京东运营人电话
|
||||
OperatorRole2 string `orm:"size(32)" json:"operatorRole2"` // 非京东运营人组(角色)
|
||||
}
|
||||
|
||||
func (*Store) TableUnique() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user