| @@ 146-152 (lines=7) @@ | ||
| 143 | ->andWhere('c.birth >= :birth_start') |
|
| 144 | ->setParameter('birth_start', $searchData['birth_start']); |
|
| 145 | } |
|
| 146 | if (!empty($searchData['birth_end']) && $searchData['birth_end']) { |
|
| 147 | $date = clone $searchData['birth_end']; |
|
| 148 | $date->modify('+1 days'); |
|
| 149 | $qb |
|
| 150 | ->andWhere('c.birth < :birth_end') |
|
| 151 | ->setParameter('birth_end', $date); |
|
| 152 | } |
|
| 153 | ||
| 154 | // tel |
|
| 155 | if (isset($searchData['phone_number']) && StringUtil::isNotBlank($searchData['phone_number'])) { |
|
| @@ 192-198 (lines=7) @@ | ||
| 189 | ->andWhere('c.create_date >= :create_date_start') |
|
| 190 | ->setParameter('create_date_start', $searchData['create_date_start']); |
|
| 191 | } |
|
| 192 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 193 | $date = clone $searchData['create_date_end']; |
|
| 194 | $date->modify('+1 days'); |
|
| 195 | $qb |
|
| 196 | ->andWhere('c.create_date < :create_date_end') |
|
| 197 | ->setParameter('create_date_end', $date); |
|
| 198 | } |
|
| 199 | ||
| 200 | // update_date |
|
| 201 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 206-212 (lines=7) @@ | ||
| 203 | ->andWhere('c.update_date >= :update_date_start') |
|
| 204 | ->setParameter('update_date_start', $searchData['update_date_start']); |
|
| 205 | } |
|
| 206 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 207 | $date = clone $searchData['update_date_end']; |
|
| 208 | $date->modify('+1 days'); |
|
| 209 | $qb |
|
| 210 | ->andWhere('c.update_date < :update_date_end') |
|
| 211 | ->setParameter('update_date_end', $date); |
|
| 212 | } |
|
| 213 | ||
| 214 | // last_buy |
|
| 215 | if (!empty($searchData['last_buy_start']) && $searchData['last_buy_start']) { |
|
| @@ 220-226 (lines=7) @@ | ||
| 217 | ->andWhere('c.last_buy_date >= :last_buy_start') |
|
| 218 | ->setParameter('last_buy_start', $searchData['last_buy_start']); |
|
| 219 | } |
|
| 220 | if (!empty($searchData['last_buy_end']) && $searchData['last_buy_end']) { |
|
| 221 | $date = clone $searchData['last_buy_end']; |
|
| 222 | $date->modify('+1 days'); |
|
| 223 | $qb |
|
| 224 | ->andWhere('c.last_buy_date < :last_buy_end') |
|
| 225 | ->setParameter('last_buy_end', $date); |
|
| 226 | } |
|
| 227 | ||
| 228 | // status |
|
| 229 | if (!empty($searchData['customer_status']) && count($searchData['customer_status']) > 0) { |
|
| @@ 256-261 (lines=6) @@ | ||
| 253 | } |
|
| 254 | ||
| 255 | // crate_date |
|
| 256 | if (!empty($searchData['create_date_start']) && $searchData['create_date_start']) { |
|
| 257 | $date = $searchData['create_date_start']; |
|
| 258 | $qb |
|
| 259 | ->andWhere('p.create_date >= :create_date_start') |
|
| 260 | ->setParameter('create_date_start', $date); |
|
| 261 | } |
|
| 262 | ||
| 263 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 264 | $date = clone $searchData['create_date_end']; |
|
| @@ 263-270 (lines=8) @@ | ||
| 260 | ->setParameter('create_date_start', $date); |
|
| 261 | } |
|
| 262 | ||
| 263 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 264 | $date = clone $searchData['create_date_end']; |
|
| 265 | $date = $date |
|
| 266 | ->modify('+1 days'); |
|
| 267 | $qb |
|
| 268 | ->andWhere('p.create_date < :create_date_end') |
|
| 269 | ->setParameter('create_date_end', $date); |
|
| 270 | } |
|
| 271 | ||
| 272 | // update_date |
|
| 273 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 273-278 (lines=6) @@ | ||
| 270 | } |
|
| 271 | ||
| 272 | // update_date |
|
| 273 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 274 | $date = $searchData['update_date_start']; |
|
| 275 | $qb |
|
| 276 | ->andWhere('p.update_date >= :update_date_start') |
|
| 277 | ->setParameter('update_date_start', $date); |
|
| 278 | } |
|
| 279 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 280 | $date = clone $searchData['update_date_end']; |
|
| 281 | $date = $date |
|
| @@ 279-286 (lines=8) @@ | ||
| 276 | ->andWhere('p.update_date >= :update_date_start') |
|
| 277 | ->setParameter('update_date_start', $date); |
|
| 278 | } |
|
| 279 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 280 | $date = clone $searchData['update_date_end']; |
|
| 281 | $date = $date |
|
| 282 | ->modify('+1 days'); |
|
| 283 | $qb |
|
| 284 | ->andWhere('p.update_date < :update_date_end') |
|
| 285 | ->setParameter('update_date_end', $date); |
|
| 286 | } |
|
| 287 | ||
| 288 | // Order By |
|
| 289 | $qb |
|
| @@ 153-158 (lines=6) @@ | ||
| 150 | } |
|
| 151 | ||
| 152 | // oreder_date |
|
| 153 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 154 | $date = $searchData['order_date_start']; |
|
| 155 | $qb |
|
| 156 | ->andWhere('o.order_date >= :order_date_start') |
|
| 157 | ->setParameter('order_date_start', $date); |
|
| 158 | } |
|
| 159 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 160 | $date = clone $searchData['order_date_end']; |
|
| 161 | $date = $date |
|
| @@ 159-166 (lines=8) @@ | ||
| 156 | ->andWhere('o.order_date >= :order_date_start') |
|
| 157 | ->setParameter('order_date_start', $date); |
|
| 158 | } |
|
| 159 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 160 | $date = clone $searchData['order_date_end']; |
|
| 161 | $date = $date |
|
| 162 | ->modify('+1 days'); |
|
| 163 | $qb |
|
| 164 | ->andWhere('o.order_date < :order_date_end') |
|
| 165 | ->setParameter('order_date_end', $date); |
|
| 166 | } |
|
| 167 | ||
| 168 | // shipping_delivery_date |
|
| 169 | if (!empty($searchData['shipping_delivery_date_start']) && $searchData['shipping_delivery_date_start']) { |
|
| @@ 169-174 (lines=6) @@ | ||
| 166 | } |
|
| 167 | ||
| 168 | // shipping_delivery_date |
|
| 169 | if (!empty($searchData['shipping_delivery_date_start']) && $searchData['shipping_delivery_date_start']) { |
|
| 170 | $date = $searchData['shipping_delivery_date_start']; |
|
| 171 | $qb |
|
| 172 | ->andWhere('s.shipping_delivery_date >= :shipping_delivery_date_start') |
|
| 173 | ->setParameter('shipping_delivery_date_start', $date); |
|
| 174 | } |
|
| 175 | if (!empty($searchData['shipping_delivery_date_end']) && $searchData['shipping_delivery_date_end']) { |
|
| 176 | $date = clone $searchData['shipping_delivery_date_end']; |
|
| 177 | $date = $date |
|
| @@ 175-182 (lines=8) @@ | ||
| 172 | ->andWhere('s.shipping_delivery_date >= :shipping_delivery_date_start') |
|
| 173 | ->setParameter('shipping_delivery_date_start', $date); |
|
| 174 | } |
|
| 175 | if (!empty($searchData['shipping_delivery_date_end']) && $searchData['shipping_delivery_date_end']) { |
|
| 176 | $date = clone $searchData['shipping_delivery_date_end']; |
|
| 177 | $date = $date |
|
| 178 | ->modify('+1 days'); |
|
| 179 | $qb |
|
| 180 | ->andWhere('s.shipping_delivery_date < :shipping_delivery_date_end') |
|
| 181 | ->setParameter('shipping_delivery_date_end', $date); |
|
| 182 | } |
|
| 183 | ||
| 184 | // shipping_date |
|
| 185 | if (!empty($searchData['shipping_date_start']) && $searchData['shipping_date_start']) { |
|
| @@ 185-190 (lines=6) @@ | ||
| 182 | } |
|
| 183 | ||
| 184 | // shipping_date |
|
| 185 | if (!empty($searchData['shipping_date_start']) && $searchData['shipping_date_start']) { |
|
| 186 | $date = $searchData['shipping_date_start']; |
|
| 187 | $qb |
|
| 188 | ->andWhere('s.shipping_date >= :shipping_date_start') |
|
| 189 | ->setParameter('shipping_date_start', $date); |
|
| 190 | } |
|
| 191 | if (!empty($searchData['shipping_date_end']) && $searchData['shipping_date_end']) { |
|
| 192 | $date = clone $searchData['shipping_date_end']; |
|
| 193 | $date = $date |
|
| @@ 191-198 (lines=8) @@ | ||
| 188 | ->andWhere('s.shipping_date >= :shipping_date_start') |
|
| 189 | ->setParameter('shipping_date_start', $date); |
|
| 190 | } |
|
| 191 | if (!empty($searchData['shipping_date_end']) && $searchData['shipping_date_end']) { |
|
| 192 | $date = clone $searchData['shipping_date_end']; |
|
| 193 | $date = $date |
|
| 194 | ->modify('+1 days'); |
|
| 195 | $qb |
|
| 196 | ->andWhere('s.shipping_date < :shipping_date_end') |
|
| 197 | ->setParameter('shipping_date_end', $date); |
|
| 198 | } |
|
| 199 | ||
| 200 | // update_date |
|
| 201 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 201-206 (lines=6) @@ | ||
| 198 | } |
|
| 199 | ||
| 200 | // update_date |
|
| 201 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 202 | $date = $searchData['update_date_start']; |
|
| 203 | $qb |
|
| 204 | ->andWhere('s.update_date >= :update_date_start') |
|
| 205 | ->setParameter('update_date_start', $date); |
|
| 206 | } |
|
| 207 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 208 | $date = clone $searchData['update_date_end']; |
|
| 209 | $date = $date |
|
| @@ 207-214 (lines=8) @@ | ||
| 204 | ->andWhere('s.update_date >= :update_date_start') |
|
| 205 | ->setParameter('update_date_start', $date); |
|
| 206 | } |
|
| 207 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 208 | $date = clone $searchData['update_date_end']; |
|
| 209 | $date = $date |
|
| 210 | ->modify('+1 days'); |
|
| 211 | $qb |
|
| 212 | ->andWhere('s.update_date < :update_date_end') |
|
| 213 | ->setParameter('update_date_end', $date); |
|
| 214 | } |
|
| 215 | ||
| 216 | // payment_total |
|
| 217 | if (isset($searchData['payment_total_start']) && StringUtil::isNotBlank($searchData['payment_total_start'])) { |
|
| @@ 189-194 (lines=6) @@ | ||
| 186 | } |
|
| 187 | ||
| 188 | // oreder_date |
|
| 189 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 190 | $date = $searchData['order_date_start']; |
|
| 191 | $qb |
|
| 192 | ->andWhere('o.create_date >= :order_date_start') |
|
| 193 | ->setParameter('order_date_start', $date); |
|
| 194 | } |
|
| 195 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 196 | $date = clone $searchData['order_date_end']; |
|
| 197 | $date = $date |
|
| @@ 195-202 (lines=8) @@ | ||
| 192 | ->andWhere('o.create_date >= :order_date_start') |
|
| 193 | ->setParameter('order_date_start', $date); |
|
| 194 | } |
|
| 195 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 196 | $date = clone $searchData['order_date_end']; |
|
| 197 | $date = $date |
|
| 198 | ->modify('+1 days'); |
|
| 199 | $qb |
|
| 200 | ->andWhere('o.create_date < :order_date_end') |
|
| 201 | ->setParameter('order_date_end', $date); |
|
| 202 | } |
|
| 203 | ||
| 204 | // create_date |
|
| 205 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 205-210 (lines=6) @@ | ||
| 202 | } |
|
| 203 | ||
| 204 | // create_date |
|
| 205 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 206 | $date = $searchData['update_date_start']; |
|
| 207 | $qb |
|
| 208 | ->andWhere('o.update_date >= :update_date_start') |
|
| 209 | ->setParameter('update_date_start', $date); |
|
| 210 | } |
|
| 211 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 212 | $date = clone $searchData['update_date_end']; |
|
| 213 | $date = $date |
|
| @@ 211-218 (lines=8) @@ | ||
| 208 | ->andWhere('o.update_date >= :update_date_start') |
|
| 209 | ->setParameter('update_date_start', $date); |
|
| 210 | } |
|
| 211 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 212 | $date = clone $searchData['update_date_end']; |
|
| 213 | $date = $date |
|
| 214 | ->modify('+1 days'); |
|
| 215 | $qb |
|
| 216 | ->andWhere('o.update_date < :update_date_end') |
|
| 217 | ->setParameter('update_date_end', $date); |
|
| 218 | } |
|
| 219 | ||
| 220 | // payment_total |
|
| 221 | if (isset($searchData['payment_total_start']) && StringUtil::isNotBlank($searchData['payment_total_start'])) { |
|
| @@ 367-372 (lines=6) @@ | ||
| 364 | } |
|
| 365 | ||
| 366 | // oreder_date |
|
| 367 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 368 | $date = $searchData['order_date_start']; |
|
| 369 | $qb |
|
| 370 | ->andWhere('o.order_date >= :order_date_start') |
|
| 371 | ->setParameter('order_date_start', $date); |
|
| 372 | } |
|
| 373 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 374 | $date = clone $searchData['order_date_end']; |
|
| 375 | $date = $date |
|
| @@ 373-380 (lines=8) @@ | ||
| 370 | ->andWhere('o.order_date >= :order_date_start') |
|
| 371 | ->setParameter('order_date_start', $date); |
|
| 372 | } |
|
| 373 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 374 | $date = clone $searchData['order_date_end']; |
|
| 375 | $date = $date |
|
| 376 | ->modify('+1 days'); |
|
| 377 | $qb |
|
| 378 | ->andWhere('o.order_date < :order_date_end') |
|
| 379 | ->setParameter('order_date_end', $date); |
|
| 380 | } |
|
| 381 | ||
| 382 | // payment_date |
|
| 383 | if (!empty($searchData['payment_date_start']) && $searchData['payment_date_start']) { |
|
| @@ 383-388 (lines=6) @@ | ||
| 380 | } |
|
| 381 | ||
| 382 | // payment_date |
|
| 383 | if (!empty($searchData['payment_date_start']) && $searchData['payment_date_start']) { |
|
| 384 | $date = $searchData['payment_date_start']; |
|
| 385 | $qb |
|
| 386 | ->andWhere('o.payment_date >= :payment_date_start') |
|
| 387 | ->setParameter('payment_date_start', $date); |
|
| 388 | } |
|
| 389 | if (!empty($searchData['payment_date_end']) && $searchData['payment_date_end']) { |
|
| 390 | $date = clone $searchData['payment_date_end']; |
|
| 391 | $date = $date |
|
| @@ 389-396 (lines=8) @@ | ||
| 386 | ->andWhere('o.payment_date >= :payment_date_start') |
|
| 387 | ->setParameter('payment_date_start', $date); |
|
| 388 | } |
|
| 389 | if (!empty($searchData['payment_date_end']) && $searchData['payment_date_end']) { |
|
| 390 | $date = clone $searchData['payment_date_end']; |
|
| 391 | $date = $date |
|
| 392 | ->modify('+1 days'); |
|
| 393 | $qb |
|
| 394 | ->andWhere('o.payment_date < :payment_date_end') |
|
| 395 | ->setParameter('payment_date_end', $date); |
|
| 396 | } |
|
| 397 | ||
| 398 | // shipping_date |
|
| 399 | if (!empty($searchData['shipping_date_start']) && $searchData['shipping_date_start']) { |
|
| @@ 399-404 (lines=6) @@ | ||
| 396 | } |
|
| 397 | ||
| 398 | // shipping_date |
|
| 399 | if (!empty($searchData['shipping_date_start']) && $searchData['shipping_date_start']) { |
|
| 400 | $date = $searchData['shipping_date_start']; |
|
| 401 | $qb |
|
| 402 | ->andWhere('o.shipping_date >= :shipping_date_start') |
|
| 403 | ->setParameter('shipping_date_start', $date); |
|
| 404 | } |
|
| 405 | if (!empty($searchData['shipping_date_end']) && $searchData['shipping_date_end']) { |
|
| 406 | $date = clone $searchData['shipping_date_end']; |
|
| 407 | $date = $date |
|
| @@ 405-412 (lines=8) @@ | ||
| 402 | ->andWhere('o.shipping_date >= :shipping_date_start') |
|
| 403 | ->setParameter('shipping_date_start', $date); |
|
| 404 | } |
|
| 405 | if (!empty($searchData['shipping_date_end']) && $searchData['shipping_date_end']) { |
|
| 406 | $date = clone $searchData['shipping_date_end']; |
|
| 407 | $date = $date |
|
| 408 | ->modify('+1 days'); |
|
| 409 | $qb |
|
| 410 | ->andWhere('o.shipping_date < :shipping_date_end') |
|
| 411 | ->setParameter('shipping_date_end', $date); |
|
| 412 | } |
|
| 413 | ||
| 414 | // update_date |
|
| 415 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 415-420 (lines=6) @@ | ||
| 412 | } |
|
| 413 | ||
| 414 | // update_date |
|
| 415 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 416 | $date = $searchData['update_date_start']; |
|
| 417 | $qb |
|
| 418 | ->andWhere('o.update_date >= :update_date_start') |
|
| 419 | ->setParameter('update_date_start', $date); |
|
| 420 | } |
|
| 421 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 422 | $date = clone $searchData['update_date_end']; |
|
| 423 | $date = $date |
|
| @@ 421-428 (lines=8) @@ | ||
| 418 | ->andWhere('o.update_date >= :update_date_start') |
|
| 419 | ->setParameter('update_date_start', $date); |
|
| 420 | } |
|
| 421 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 422 | $date = clone $searchData['update_date_end']; |
|
| 423 | $date = $date |
|
| 424 | ->modify('+1 days'); |
|
| 425 | $qb |
|
| 426 | ->andWhere('o.update_date < :update_date_end') |
|
| 427 | ->setParameter('update_date_end', $date); |
|
| 428 | } |
|
| 429 | ||
| 430 | // payment_total |
|
| 431 | if (isset($searchData['payment_total_start']) && StringUtil::isNotBlank($searchData['payment_total_start'])) { |
|