门店查询关键字支持linkStoreID
This commit is contained in:
@@ -326,8 +326,8 @@ func getStoresSql(ctx *jxcontext.Context, keyword string, params map[string]inte
|
|||||||
prefix := autils.NewRole("", 0).GetFullName()
|
prefix := autils.NewRole("", 0).GetFullName()
|
||||||
sqlWhereParams = append(sqlWhereParams, keyword+"%", autils.NewStoreBossRole(-1).GetFullName(), prefix, prefix, prefix) // 必须要前缀,不然不能用过些会很慢
|
sqlWhereParams = append(sqlWhereParams, keyword+"%", autils.NewStoreBossRole(-1).GetFullName(), prefix, prefix, prefix) // 必须要前缀,不然不能用过些会很慢
|
||||||
}
|
}
|
||||||
sqlWhere += " OR t1.id = ? OR t1.city_code = ? OR t1.district_code = ?"
|
sqlWhere += " OR t1.id = ? OR t1.city_code = ? OR t1.district_code = ? OR t1.link_store_id = ?"
|
||||||
sqlWhereParams = append(sqlWhereParams, keywordInt64, keywordInt64, keywordInt64)
|
sqlWhereParams = append(sqlWhereParams, keywordInt64, keywordInt64, keywordInt64, keywordInt64)
|
||||||
if jxutils.GuessVendorIDFromVendorStoreID(keywordInt64) != model.VendorIDUnknown {
|
if jxutils.GuessVendorIDFromVendorStoreID(keywordInt64) != model.VendorIDUnknown {
|
||||||
sqlWhere += `
|
sqlWhere += `
|
||||||
OR (SELECT COUNT(*) FROM store_map tsm WHERE t1.id = tsm.store_id AND tsm.deleted_at = ? AND tsm.vendor_store_id = ?) > 0
|
OR (SELECT COUNT(*) FROM store_map tsm WHERE t1.id = tsm.store_id AND tsm.deleted_at = ? AND tsm.vendor_store_id = ?) > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user