| @@ 210-214 (lines=5) @@ | ||
| 207 | } |
|
| 208 | ||
| 209 | // tel |
|
| 210 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| 211 | $qb |
|
| 212 | ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel') |
|
| 213 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 214 | } |
|
| 215 | ||
| 216 | // buy_total |
|
| 217 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
| @@ 217-221 (lines=5) @@ | ||
| 214 | } |
|
| 215 | ||
| 216 | // buy_total |
|
| 217 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
| 218 | $qb |
|
| 219 | ->andWhere('c.buy_total >= :buy_total_start') |
|
| 220 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
| 221 | } |
|
| 222 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
| 223 | $qb |
|
| 224 | ->andWhere('c.buy_total <= :buy_total_end') |
|
| @@ 222-226 (lines=5) @@ | ||
| 219 | ->andWhere('c.buy_total >= :buy_total_start') |
|
| 220 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
| 221 | } |
|
| 222 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
| 223 | $qb |
|
| 224 | ->andWhere('c.buy_total <= :buy_total_end') |
|
| 225 | ->setParameter('buy_total_end', $searchData['buy_total_end']); |
|
| 226 | } |
|
| 227 | ||
| 228 | // buy_times |
|
| 229 | if (!empty($searchData['buy_times_start']) && $searchData['buy_times_start']) { |
|
| @@ 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 | if (!empty($searchData['status']) && $searchData['status']) { |
|
| @@ 301-305 (lines=5) @@ | ||
| 298 | } |
|
| 299 | ||
| 300 | // name |
|
| 301 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
| 302 | $qb |
|
| 303 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
|
| 304 | ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
| 305 | } |
|
| 306 | ||
| 307 | // kana |
|
| 308 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| @@ 308-312 (lines=5) @@ | ||
| 305 | } |
|
| 306 | ||
| 307 | // kana |
|
| 308 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| 309 | $qb |
|
| 310 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
|
| 311 | ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
| 312 | } |
|
| 313 | ||
| 314 | ||
| 315 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| @@ 315-319 (lines=5) @@ | ||
| 312 | } |
|
| 313 | ||
| 314 | ||
| 315 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| 316 | $qb |
|
| 317 | ->andWhere('o.email like :email') |
|
| 318 | ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
| 319 | } |
|
| 320 | ||
| 321 | // tel |
|
| 322 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| @@ 322-326 (lines=5) @@ | ||
| 319 | } |
|
| 320 | ||
| 321 | // tel |
|
| 322 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| 323 | $qb |
|
| 324 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
|
| 325 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 326 | } |
|
| 327 | ||
| 328 | // sex |
|
| 329 | if (!empty($searchData['sex']) && count($searchData['sex']) > 0) { |
|
| @@ 421-425 (lines=5) @@ | ||
| 418 | } |
|
| 419 | ||
| 420 | // payment_total |
|
| 421 | if (isset($searchData['payment_total_start']) && Str::isNotBlank($searchData['payment_total_start'])) { |
|
| 422 | $qb |
|
| 423 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 424 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 425 | } |
|
| 426 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 427 | $qb |
|
| 428 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| @@ 426-430 (lines=5) @@ | ||
| 423 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 424 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 425 | } |
|
| 426 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 427 | $qb |
|
| 428 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| 429 | ->setParameter('payment_total_end', $searchData['payment_total_end']); |
|
| 430 | } |
|
| 431 | ||
| 432 | // buy_product_name |
|
| 433 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|