| @@ 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'])) { |
|
| @@ 209-213 (lines=5) @@ | ||
| 206 | } |
|
| 207 | ||
| 208 | // tel |
|
| 209 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| 210 | $qb |
|
| 211 | ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel') |
|
| 212 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 213 | } |
|
| 214 | ||
| 215 | // buy_total |
|
| 216 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
| @@ 216-220 (lines=5) @@ | ||
| 213 | } |
|
| 214 | ||
| 215 | // buy_total |
|
| 216 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
| 217 | $qb |
|
| 218 | ->andWhere('c.buy_total >= :buy_total_start') |
|
| 219 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
| 220 | } |
|
| 221 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
| 222 | $qb |
|
| 223 | ->andWhere('c.buy_total <= :buy_total_end') |
|
| @@ 221-225 (lines=5) @@ | ||
| 218 | ->andWhere('c.buy_total >= :buy_total_start') |
|
| 219 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
| 220 | } |
|
| 221 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
| 222 | $qb |
|
| 223 | ->andWhere('c.buy_total <= :buy_total_end') |
|
| 224 | ->setParameter('buy_total_end', $searchData['buy_total_end']); |
|
| 225 | } |
|
| 226 | ||
| 227 | // buy_times |
|
| 228 | if (!empty($searchData['buy_times_start']) && $searchData['buy_times_start']) { |
|