@@ 79-83 (lines=5) @@ | ||
76 | $joinedCustomer = false; |
|
77 | ||
78 | // order_id_start |
|
79 | if (isset($searchData['order_id_start']) && Str::isNotBlank($searchData['order_id_start'])) { |
|
80 | $qb |
|
81 | ->andWhere('o.id >= :order_id_start') |
|
82 | ->setParameter('order_id_start', $searchData['order_id_start']); |
|
83 | } |
|
84 | ||
85 | // order_id_end |
|
86 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
@@ 86-90 (lines=5) @@ | ||
83 | } |
|
84 | ||
85 | // order_id_end |
|
86 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
87 | $qb |
|
88 | ->andWhere('o.id <= :order_id_end') |
|
89 | ->setParameter('order_id_end', $searchData['order_id_end']); |
|
90 | } |
|
91 | ||
92 | // status |
|
93 | if (!empty($searchData['status']) && $searchData['status']) { |
|
@@ 100-104 (lines=5) @@ | ||
97 | } |
|
98 | ||
99 | // name |
|
100 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
101 | $qb |
|
102 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
|
103 | ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
104 | } |
|
105 | ||
106 | // kana |
|
107 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
@@ 107-111 (lines=5) @@ | ||
104 | } |
|
105 | ||
106 | // kana |
|
107 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
108 | $qb |
|
109 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
|
110 | ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
111 | } |
|
112 | ||
113 | ||
114 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
@@ 114-118 (lines=5) @@ | ||
111 | } |
|
112 | ||
113 | ||
114 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
115 | $qb |
|
116 | ->andWhere('o.email = :email') |
|
117 | ->setParameter('email', $searchData['email']); |
|
118 | } |
|
119 | ||
120 | // tel |
|
121 | if (isset($searchData['tel01']) && Str::isNotBlank($searchData['tel01'])) { |
|
@@ 121-125 (lines=5) @@ | ||
118 | } |
|
119 | ||
120 | // tel |
|
121 | if (isset($searchData['tel01']) && Str::isNotBlank($searchData['tel01'])) { |
|
122 | $qb |
|
123 | ->andWhere('o.tel01 = :tel01') |
|
124 | ->setParameter('tel01', $searchData['tel01']); |
|
125 | } |
|
126 | if (isset($searchData['tel02']) && Str::isNotBlank($searchData['tel02'])) { |
|
127 | $qb |
|
128 | ->andWhere('o.tel02 = :tel02') |
|
@@ 126-130 (lines=5) @@ | ||
123 | ->andWhere('o.tel01 = :tel01') |
|
124 | ->setParameter('tel01', $searchData['tel01']); |
|
125 | } |
|
126 | if (isset($searchData['tel02']) && Str::isNotBlank($searchData['tel02'])) { |
|
127 | $qb |
|
128 | ->andWhere('o.tel02 = :tel02') |
|
129 | ->setParameter('tel02', $searchData['tel02']); |
|
130 | } |
|
131 | if (isset($searchData['tel03']) && Str::isNotBlank($searchData['tel03'])) { |
|
132 | $qb |
|
133 | ->andWhere('o.tel03 = :tel03') |
|
@@ 131-135 (lines=5) @@ | ||
128 | ->andWhere('o.tel02 = :tel02') |
|
129 | ->setParameter('tel02', $searchData['tel02']); |
|
130 | } |
|
131 | if (isset($searchData['tel03']) && Str::isNotBlank($searchData['tel03'])) { |
|
132 | $qb |
|
133 | ->andWhere('o.tel03 = :tel03') |
|
134 | ->setParameter('tel03', $searchData['tel03']); |
|
135 | } |
|
136 | ||
137 | // birth |
|
138 | if (!empty($searchData['birth_start']) && $searchData['birth_start']) { |
|
@@ 231-235 (lines=5) @@ | ||
228 | } |
|
229 | ||
230 | // payment_total |
|
231 | if (isset($searchData['payment_total_start']) && Str::isNotBlank($searchData['payment_total_start'])) { |
|
232 | $qb |
|
233 | ->andWhere('o.payment_total >= :payment_total_start') |
|
234 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
235 | } |
|
236 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
237 | $qb |
|
238 | ->andWhere('o.payment_total <= :payment_total_end') |
|
@@ 236-240 (lines=5) @@ | ||
233 | ->andWhere('o.payment_total >= :payment_total_start') |
|
234 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
235 | } |
|
236 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
237 | $qb |
|
238 | ->andWhere('o.payment_total <= :payment_total_end') |
|
239 | ->setParameter('payment_total_end', $searchData['payment_total_end']); |
|
240 | } |
|
241 | ||
242 | // buy_product_name |
|
243 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
@@ 267-271 (lines=5) @@ | ||
264 | $qb = $this->createQueryBuilder('o'); |
|
265 | ||
266 | // order_id_start |
|
267 | if (isset($searchData['order_id_start']) && Str::isNotBlank($searchData['order_id_start'])) { |
|
268 | $qb |
|
269 | ->andWhere('o.id >= :order_id_start') |
|
270 | ->setParameter('order_id_start', $searchData['order_id_start']); |
|
271 | } |
|
272 | // multi |
|
273 | if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
274 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
|
@@ 283-287 (lines=5) @@ | ||
280 | } |
|
281 | ||
282 | // order_id_end |
|
283 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
284 | $qb |
|
285 | ->andWhere('o.id <= :order_id_end') |
|
286 | ->setParameter('order_id_end', $searchData['order_id_end']); |
|
287 | } |
|
288 | ||
289 | // status |
|
290 | $filterStatus = false; |
|
@@ 313-317 (lines=5) @@ | ||
310 | } |
|
311 | ||
312 | // name |
|
313 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
314 | $qb |
|
315 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
|
316 | ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
317 | } |
|
318 | ||
319 | // kana |
|
320 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
@@ 320-324 (lines=5) @@ | ||
317 | } |
|
318 | ||
319 | // kana |
|
320 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
321 | $qb |
|
322 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
|
323 | ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
324 | } |
|
325 | ||
326 | ||
327 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
@@ 327-331 (lines=5) @@ | ||
324 | } |
|
325 | ||
326 | ||
327 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
328 | $qb |
|
329 | ->andWhere('o.email like :email') |
|
330 | ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
331 | } |
|
332 | ||
333 | // tel |
|
334 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
@@ 334-338 (lines=5) @@ | ||
331 | } |
|
332 | ||
333 | // tel |
|
334 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
335 | $qb |
|
336 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
|
337 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
338 | } |
|
339 | ||
340 | // sex |
|
341 | if (!empty($searchData['sex']) && count($searchData['sex']) > 0) { |
|
@@ 433-437 (lines=5) @@ | ||
430 | } |
|
431 | ||
432 | // payment_total |
|
433 | if (isset($searchData['payment_total_start']) && Str::isNotBlank($searchData['payment_total_start'])) { |
|
434 | $qb |
|
435 | ->andWhere('o.payment_total >= :payment_total_start') |
|
436 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
437 | } |
|
438 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
439 | $qb |
|
440 | ->andWhere('o.payment_total <= :payment_total_end') |
|
@@ 438-442 (lines=5) @@ | ||
435 | ->andWhere('o.payment_total >= :payment_total_start') |
|
436 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
437 | } |
|
438 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
439 | $qb |
|
440 | ->andWhere('o.payment_total <= :payment_total_end') |
|
441 | ->setParameter('payment_total_end', $searchData['payment_total_end']); |
|
442 | } |
|
443 | ||
444 | // buy_product_name |
|
445 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
@@ 205-209 (lines=5) @@ | ||
202 | } |
|
203 | ||
204 | // tel |
|
205 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
206 | $qb |
|
207 | ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel') |
|
208 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
209 | } |
|
210 | ||
211 | // buy_total |
|
212 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
@@ 212-216 (lines=5) @@ | ||
209 | } |
|
210 | ||
211 | // buy_total |
|
212 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
213 | $qb |
|
214 | ->andWhere('c.buy_total >= :buy_total_start') |
|
215 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
216 | } |
|
217 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
218 | $qb |
|
219 | ->andWhere('c.buy_total <= :buy_total_end') |
|
@@ 217-221 (lines=5) @@ | ||
214 | ->andWhere('c.buy_total >= :buy_total_start') |
|
215 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
216 | } |
|
217 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
218 | $qb |
|
219 | ->andWhere('c.buy_total <= :buy_total_end') |
|
220 | ->setParameter('buy_total_end', $searchData['buy_total_end']); |
|
221 | } |
|
222 | ||
223 | // buy_times |
|
224 | if (!empty($searchData['buy_times_start']) && $searchData['buy_times_start']) { |