| @@ 199-203 (lines=5) @@ | ||
| 196 | } |
|
| 197 | ||
| 198 | // tel |
|
| 199 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| 200 | $qb |
|
| 201 | ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel') |
|
| 202 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 203 | } |
|
| 204 | ||
| 205 | // buy_total |
|
| 206 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
| @@ 206-210 (lines=5) @@ | ||
| 203 | } |
|
| 204 | ||
| 205 | // buy_total |
|
| 206 | if (isset($searchData['buy_total_start']) && Str::isNotBlank($searchData['buy_total_start'])) { |
|
| 207 | $qb |
|
| 208 | ->andWhere('c.buy_total >= :buy_total_start') |
|
| 209 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
| 210 | } |
|
| 211 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
| 212 | $qb |
|
| 213 | ->andWhere('c.buy_total <= :buy_total_end') |
|
| @@ 211-215 (lines=5) @@ | ||
| 208 | ->andWhere('c.buy_total >= :buy_total_start') |
|
| 209 | ->setParameter('buy_total_start', $searchData['buy_total_start']); |
|
| 210 | } |
|
| 211 | if (isset($searchData['buy_total_end']) && Str::isNotBlank($searchData['buy_total_end'])) { |
|
| 212 | $qb |
|
| 213 | ->andWhere('c.buy_total <= :buy_total_end') |
|
| 214 | ->setParameter('buy_total_end', $searchData['buy_total_end']); |
|
| 215 | } |
|
| 216 | ||
| 217 | // buy_times |
|
| 218 | if (!empty($searchData['buy_times_start']) && $searchData['buy_times_start']) { |
|
| @@ 71-75 (lines=5) @@ | ||
| 68 | $joinedCustomer = false; |
|
| 69 | ||
| 70 | // order_id_start |
|
| 71 | if (isset($searchData['order_id_start']) && Str::isNotBlank($searchData['order_id_start'])) { |
|
| 72 | $qb |
|
| 73 | ->andWhere('o.id >= :order_id_start') |
|
| 74 | ->setParameter('order_id_start', $searchData['order_id_start']); |
|
| 75 | } |
|
| 76 | ||
| 77 | // order_id_end |
|
| 78 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
| @@ 78-82 (lines=5) @@ | ||
| 75 | } |
|
| 76 | ||
| 77 | // order_id_end |
|
| 78 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
| 79 | $qb |
|
| 80 | ->andWhere('o.id <= :order_id_end') |
|
| 81 | ->setParameter('order_id_end', $searchData['order_id_end']); |
|
| 82 | } |
|
| 83 | ||
| 84 | // status |
|
| 85 | if (!empty($searchData['status']) && $searchData['status']) { |
|
| @@ 92-96 (lines=5) @@ | ||
| 89 | } |
|
| 90 | ||
| 91 | // name |
|
| 92 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
| 93 | $qb |
|
| 94 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
|
| 95 | ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
| 96 | } |
|
| 97 | ||
| 98 | // kana |
|
| 99 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| @@ 99-103 (lines=5) @@ | ||
| 96 | } |
|
| 97 | ||
| 98 | // kana |
|
| 99 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| 100 | $qb |
|
| 101 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
|
| 102 | ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
| 103 | } |
|
| 104 | ||
| 105 | ||
| 106 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| @@ 106-110 (lines=5) @@ | ||
| 103 | } |
|
| 104 | ||
| 105 | ||
| 106 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| 107 | $qb |
|
| 108 | ->andWhere('o.email = :email') |
|
| 109 | ->setParameter('email', $searchData['email']); |
|
| 110 | } |
|
| 111 | ||
| 112 | // tel |
|
| 113 | if (isset($searchData['tel01']) && Str::isNotBlank($searchData['tel01'])) { |
|
| @@ 113-117 (lines=5) @@ | ||
| 110 | } |
|
| 111 | ||
| 112 | // tel |
|
| 113 | if (isset($searchData['tel01']) && Str::isNotBlank($searchData['tel01'])) { |
|
| 114 | $qb |
|
| 115 | ->andWhere('o.tel01 = :tel01') |
|
| 116 | ->setParameter('tel01', $searchData['tel01']); |
|
| 117 | } |
|
| 118 | if (isset($searchData['tel02']) && Str::isNotBlank($searchData['tel02'])) { |
|
| 119 | $qb |
|
| 120 | ->andWhere('o.tel02 = :tel02') |
|
| @@ 118-122 (lines=5) @@ | ||
| 115 | ->andWhere('o.tel01 = :tel01') |
|
| 116 | ->setParameter('tel01', $searchData['tel01']); |
|
| 117 | } |
|
| 118 | if (isset($searchData['tel02']) && Str::isNotBlank($searchData['tel02'])) { |
|
| 119 | $qb |
|
| 120 | ->andWhere('o.tel02 = :tel02') |
|
| 121 | ->setParameter('tel02', $searchData['tel02']); |
|
| 122 | } |
|
| 123 | if (isset($searchData['tel03']) && Str::isNotBlank($searchData['tel03'])) { |
|
| 124 | $qb |
|
| 125 | ->andWhere('o.tel03 = :tel03') |
|
| @@ 123-127 (lines=5) @@ | ||
| 120 | ->andWhere('o.tel02 = :tel02') |
|
| 121 | ->setParameter('tel02', $searchData['tel02']); |
|
| 122 | } |
|
| 123 | if (isset($searchData['tel03']) && Str::isNotBlank($searchData['tel03'])) { |
|
| 124 | $qb |
|
| 125 | ->andWhere('o.tel03 = :tel03') |
|
| 126 | ->setParameter('tel03', $searchData['tel03']); |
|
| 127 | } |
|
| 128 | ||
| 129 | // birth |
|
| 130 | if (!empty($searchData['birth_start']) && $searchData['birth_start']) { |
|
| @@ 217-221 (lines=5) @@ | ||
| 214 | } |
|
| 215 | ||
| 216 | // payment_total |
|
| 217 | if (isset($searchData['payment_total_start']) && Str::isNotBlank($searchData['payment_total_start'])) { |
|
| 218 | $qb |
|
| 219 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 220 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 221 | } |
|
| 222 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 223 | $qb |
|
| 224 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| @@ 222-226 (lines=5) @@ | ||
| 219 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 220 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 221 | } |
|
| 222 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 223 | $qb |
|
| 224 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| 225 | ->setParameter('payment_total_end', $searchData['payment_total_end']); |
|
| 226 | } |
|
| 227 | ||
| 228 | // buy_product_name |
|
| 229 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
| @@ 253-257 (lines=5) @@ | ||
| 250 | $qb = $this->createQueryBuilder('o'); |
|
| 251 | ||
| 252 | // order_id_start |
|
| 253 | if (isset($searchData['order_id_start']) && Str::isNotBlank($searchData['order_id_start'])) { |
|
| 254 | $qb |
|
| 255 | ->andWhere('o.id >= :order_id_start') |
|
| 256 | ->setParameter('order_id_start', $searchData['order_id_start']); |
|
| 257 | } |
|
| 258 | // multi |
|
| 259 | if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
| 260 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
|
| @@ 269-273 (lines=5) @@ | ||
| 266 | } |
|
| 267 | ||
| 268 | // order_id_end |
|
| 269 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
| 270 | $qb |
|
| 271 | ->andWhere('o.id <= :order_id_end') |
|
| 272 | ->setParameter('order_id_end', $searchData['order_id_end']); |
|
| 273 | } |
|
| 274 | ||
| 275 | // status |
|
| 276 | $filterStatus = false; |
|
| @@ 299-303 (lines=5) @@ | ||
| 296 | } |
|
| 297 | ||
| 298 | // name |
|
| 299 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
| 300 | $qb |
|
| 301 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
|
| 302 | ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
| 303 | } |
|
| 304 | ||
| 305 | // kana |
|
| 306 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| @@ 306-310 (lines=5) @@ | ||
| 303 | } |
|
| 304 | ||
| 305 | // kana |
|
| 306 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| 307 | $qb |
|
| 308 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
|
| 309 | ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
| 310 | } |
|
| 311 | ||
| 312 | ||
| 313 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| @@ 313-317 (lines=5) @@ | ||
| 310 | } |
|
| 311 | ||
| 312 | ||
| 313 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| 314 | $qb |
|
| 315 | ->andWhere('o.email like :email') |
|
| 316 | ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
| 317 | } |
|
| 318 | ||
| 319 | // tel |
|
| 320 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| @@ 320-324 (lines=5) @@ | ||
| 317 | } |
|
| 318 | ||
| 319 | // tel |
|
| 320 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| 321 | $qb |
|
| 322 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
|
| 323 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 324 | } |
|
| 325 | ||
| 326 | // sex |
|
| 327 | if (!empty($searchData['sex']) && count($searchData['sex']) > 0) { |
|
| @@ 411-415 (lines=5) @@ | ||
| 408 | } |
|
| 409 | ||
| 410 | // payment_total |
|
| 411 | if (isset($searchData['payment_total_start']) && Str::isNotBlank($searchData['payment_total_start'])) { |
|
| 412 | $qb |
|
| 413 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 414 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 415 | } |
|
| 416 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 417 | $qb |
|
| 418 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| @@ 416-420 (lines=5) @@ | ||
| 413 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 414 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 415 | } |
|
| 416 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 417 | $qb |
|
| 418 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| 419 | ->setParameter('payment_total_end', $searchData['payment_total_end']); |
|
| 420 | } |
|
| 421 | ||
| 422 | // buy_product_name |
|
| 423 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
| @@ 47-51 (lines=5) @@ | ||
| 44 | $qb = $this->createQueryBuilder('o'); |
|
| 45 | ||
| 46 | // order_id_start |
|
| 47 | if (isset($searchData['order_id_start']) && Str::isNotBlank($searchData['order_id_start'])) { |
|
| 48 | $qb |
|
| 49 | ->andWhere('o.id >= :order_id_start') |
|
| 50 | ->setParameter('order_id_start', $searchData['order_id_start']); |
|
| 51 | } |
|
| 52 | // multi |
|
| 53 | if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
| 54 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
|
| @@ 63-67 (lines=5) @@ | ||
| 60 | } |
|
| 61 | ||
| 62 | // order_id_end |
|
| 63 | if (isset($searchData['order_id_end']) && Str::isNotBlank($searchData['order_id_end'])) { |
|
| 64 | $qb |
|
| 65 | ->andWhere('o.id <= :order_id_end') |
|
| 66 | ->setParameter('order_id_end', $searchData['order_id_end']); |
|
| 67 | } |
|
| 68 | ||
| 69 | // name |
|
| 70 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
| @@ 70-74 (lines=5) @@ | ||
| 67 | } |
|
| 68 | ||
| 69 | // name |
|
| 70 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
| 71 | $qb |
|
| 72 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
|
| 73 | ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
| 74 | } |
|
| 75 | ||
| 76 | // kana |
|
| 77 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| @@ 77-81 (lines=5) @@ | ||
| 74 | } |
|
| 75 | ||
| 76 | // kana |
|
| 77 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
|
| 78 | $qb |
|
| 79 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
|
| 80 | ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
| 81 | } |
|
| 82 | ||
| 83 | ||
| 84 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| @@ 84-88 (lines=5) @@ | ||
| 81 | } |
|
| 82 | ||
| 83 | ||
| 84 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
|
| 85 | $qb |
|
| 86 | ->andWhere('o.email like :email') |
|
| 87 | ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
| 88 | } |
|
| 89 | ||
| 90 | // tel |
|
| 91 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| @@ 91-95 (lines=5) @@ | ||
| 88 | } |
|
| 89 | ||
| 90 | // tel |
|
| 91 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
|
| 92 | $qb |
|
| 93 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
|
| 94 | ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
| 95 | } |
|
| 96 | ||
| 97 | // sex |
|
| 98 | if (!empty($searchData['sex']) && count($searchData['sex']) > 0) { |
|
| @@ 182-186 (lines=5) @@ | ||
| 179 | } |
|
| 180 | ||
| 181 | // payment_total |
|
| 182 | if (isset($searchData['payment_total_start']) && Str::isNotBlank($searchData['payment_total_start'])) { |
|
| 183 | $qb |
|
| 184 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 185 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 186 | } |
|
| 187 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 188 | $qb |
|
| 189 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| @@ 187-191 (lines=5) @@ | ||
| 184 | ->andWhere('o.payment_total >= :payment_total_start') |
|
| 185 | ->setParameter('payment_total_start', $searchData['payment_total_start']); |
|
| 186 | } |
|
| 187 | if (isset($searchData['payment_total_end']) && Str::isNotBlank($searchData['payment_total_end'])) { |
|
| 188 | $qb |
|
| 189 | ->andWhere('o.payment_total <= :payment_total_end') |
|
| 190 | ->setParameter('payment_total_end', $searchData['payment_total_end']); |
|
| 191 | } |
|
| 192 | ||
| 193 | // buy_product_name |
|
| 194 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|