Browse Source

fix:管理后台订单搜索逻辑修改

duxin 1 year ago
parent
commit
cc0ca5dae1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/order/orderManageController.go

+ 4 - 2
src/order/orderManageController.go

@@ -343,9 +343,11 @@ func orderList(context *admin.Context) (interface{}, error) {
 			} else {
 				userIdStr = `"` + userIdArr[0] + `","` + userIdArr[1] + `"`
 			}
-			str += " (( e.user_id in (" + userIdStr + " ))  OR ( e.user_phone like '%" + param.Phone + "%' AND e.is_backstage_order = 1 )  ) and"
+			//str += " (( e.user_id in (" + userIdStr + " ))  OR ( e.user_phone like '%" + param.Phone + "%' AND e.is_backstage_order = 1 )  ) and"
+			str += " ( e.user_id in (" + userIdStr + " )  OR  e.user_phone like '%" + param.Phone + "%'  ) and"
 		} else {
-			str += " ( e.user_phone like '%" + param.Phone + "%' AND e.is_backstage_order = 1 )   and"
+			//str += " ( e.user_phone like '%" + param.Phone + "%' AND e.is_backstage_order = 1 )   and"
+			str += "  e.user_phone like '%" + param.Phone + "%'   and"
 		}
 	}
 	if param.ContractNature != 0 {