1 |
0.11 ms |
SET SESSION time_zone = '+00:00'
SET SESSION time_zone = '+00:00';
|
2 |
2.87 ms |
SELECT t0.id AS id_1, t0.company_name AS company_name_2, t0.company_kana AS company_kana_3, t0.postal_code AS postal_code_4, t0.addr01 AS addr01_5, t0.addr02 AS addr02_6, t0.phone_number AS phone_number_7, t0.business_hour AS business_hour_8, t0.email01 AS email01_9, t0.email02 AS email02_10, t0.email03 AS email03_11, t0.email04 AS email04_12, t0.shop_name AS shop_name_13, t0.shop_kana AS shop_kana_14, t0.shop_name_eng AS shop_name_eng_15, t0.update_date AS update_date_16, t0.good_traded AS good_traded_17, t0.message AS message_18, t0.delivery_free_amount AS delivery_free_amount_19, t0.delivery_free_quantity AS delivery_free_quantity_20, t0.option_mypage_order_status_display AS option_mypage_order_status_display_21, t0.option_nostock_hidden AS option_nostock_hidden_22, t0.option_favorite_product AS option_favorite_product_23, t0.option_product_delivery_fee AS option_product_delivery_fee_24, t0.option_product_tax_rule AS option_product_tax_rule_25, t0.option_customer_activate AS option_customer_activate_26, t0.option_remember_me AS option_remember_me_27, t0.authentication_key AS authentication_key_28, t0.php_path AS php_path_29, t0.option_point AS option_point_30, t0.basic_point_rate AS basic_point_rate_31, t0.point_conversion_rate AS point_conversion_rate_32, t0.chainstore_from_email AS chainstore_from_email_33, t0.magazine_chainstore_from_email AS magazine_chainstore_from_email_34, t0.magazine_customer_from_email AS magazine_customer_from_email_35, t0.option_chainstore_activate AS option_chainstore_activate_36, t0.country_id AS country_id_37, t0.pref_id AS pref_id_38, t0.retail_usage_fee_product_id AS retail_usage_fee_product_id_39, t0.discriminator_type FROM dtb_base_info t0 WHERE t0.id = ? AND t0.discriminator_type IN ('baseinfo')
SELECT t0.id AS id_1, t0.company_name AS company_name_2, t0.company_kana AS company_kana_3, t0.postal_code AS postal_code_4, t0.addr01 AS addr01_5, t0.addr02 AS addr02_6, t0.phone_number AS phone_number_7, t0.business_hour AS business_hour_8, t0.email01 AS email01_9, t0.email02 AS email02_10, t0.email03 AS email03_11, t0.email04 AS email04_12, t0.shop_name AS shop_name_13, t0.shop_kana AS shop_kana_14, t0.shop_name_eng AS shop_name_eng_15, t0.update_date AS update_date_16, t0.good_traded AS good_traded_17, t0.message AS message_18, t0.delivery_free_amount AS delivery_free_amount_19, t0.delivery_free_quantity AS delivery_free_quantity_20, t0.option_mypage_order_status_display AS option_mypage_order_status_display_21, t0.option_nostock_hidden AS option_nostock_hidden_22, t0.option_favorite_product AS option_favorite_product_23, t0.option_product_delivery_fee AS option_product_delivery_fee_24, t0.option_product_tax_rule AS option_product_tax_rule_25, t0.option_customer_activate AS option_customer_activate_26, t0.option_remember_me AS option_remember_me_27, t0.authentication_key AS authentication_key_28, t0.php_path AS php_path_29, t0.option_point AS option_point_30, t0.basic_point_rate AS basic_point_rate_31, t0.point_conversion_rate AS point_conversion_rate_32, t0.chainstore_from_email AS chainstore_from_email_33, t0.magazine_chainstore_from_email AS magazine_chainstore_from_email_34, t0.magazine_customer_from_email AS magazine_customer_from_email_35, t0.option_chainstore_activate AS option_chainstore_activate_36, t0.country_id AS country_id_37, t0.pref_id AS pref_id_38, t0.retail_usage_fee_product_id AS retail_usage_fee_product_id_39, t0.discriminator_type FROM dtb_base_info t0 WHERE t0.id = 1 AND t0.discriminator_type IN ('baseinfo');
|
3 |
1.34 ms |
SELECT d0_.id AS id_0, d0_.page_name AS page_name_1, d0_.url AS url_2, d0_.file_name AS file_name_3, d0_.edit_type AS edit_type_4, d0_.author AS author_5, d0_.description AS description_6, d0_.keyword AS keyword_7, d0_.create_date AS create_date_8, d0_.update_date AS update_date_9, d0_.meta_robots AS meta_robots_10, d0_.meta_tags AS meta_tags_11, d1_.page_id AS page_id_12, d1_.layout_id AS layout_id_13, d1_.sort_no AS sort_no_14, d2_.id AS id_15, d2_.layout_name AS layout_name_16, d2_.create_date AS create_date_17, d2_.update_date AS update_date_18, d0_.discriminator_type AS discriminator_type_19, d0_.master_page_id AS master_page_id_20, d1_.discriminator_type AS discriminator_type_21, d1_.page_id AS page_id_22, d1_.layout_id AS layout_id_23, d2_.discriminator_type AS discriminator_type_24, d2_.device_type_id AS device_type_id_25 FROM dtb_page d0_ LEFT JOIN dtb_page_layout d1_ ON d0_.id = d1_.page_id AND d1_.discriminator_type IN ('pagelayout') LEFT JOIN dtb_layout d2_ ON d1_.layout_id = d2_.id AND d2_.discriminator_type IN ('layout') WHERE (d0_.url = ?) AND d0_.discriminator_type IN ('page')
Parameters: [
"calc_cashback"
]
SELECT d0_.id AS id_0, d0_.page_name AS page_name_1, d0_.url AS url_2, d0_.file_name AS file_name_3, d0_.edit_type AS edit_type_4, d0_.author AS author_5, d0_.description AS description_6, d0_.keyword AS keyword_7, d0_.create_date AS create_date_8, d0_.update_date AS update_date_9, d0_.meta_robots AS meta_robots_10, d0_.meta_tags AS meta_tags_11, d1_.page_id AS page_id_12, d1_.layout_id AS layout_id_13, d1_.sort_no AS sort_no_14, d2_.id AS id_15, d2_.layout_name AS layout_name_16, d2_.create_date AS create_date_17, d2_.update_date AS update_date_18, d0_.discriminator_type AS discriminator_type_19, d0_.master_page_id AS master_page_id_20, d1_.discriminator_type AS discriminator_type_21, d1_.page_id AS page_id_22, d1_.layout_id AS layout_id_23, d2_.discriminator_type AS discriminator_type_24, d2_.device_type_id AS device_type_id_25 FROM dtb_page d0_ LEFT JOIN dtb_page_layout d1_ ON d0_.id = d1_.page_id AND d1_.discriminator_type IN ('pagelayout') LEFT JOIN dtb_layout d2_ ON d1_.layout_id = d2_.id AND d2_.discriminator_type IN ('layout') WHERE (d0_.url = 'calc_cashback') AND d0_.discriminator_type IN ('page');
|
4 |
0.06 ms |
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
5 |
0.04 ms |
"START TRANSACTION"
|
6 |
0.18 ms |
SELECT t0.id AS id_1, t0.authentication_id AS authentication_id_2, t0.shop_code AS shop_code_3, t0.connect_password AS connect_password_4, t0.transaction_api AS transaction_api_5, t0.get_author_api AS get_author_api_6, t0.modify_cancel_transaction_api AS modify_cancel_transaction_api_7, t0.fix_request_api AS fix_request_api_8, t0.modify_cancel_fix_request_api AS modify_cancel_fix_request_api_9, t0.reduce_billing_api AS reduce_billing_api_10, t0.modify_buyer_api AS modify_buyer_api_11, t0.register_buyer_api AS register_buyer_api_12, t0.creditFacility_get_buyer_credit_facility_api AS creditFacility_get_buyer_credit_facility_api_13, t0.credit_facility_modify_buyer_api AS credit_facility_modify_buyer_api_14, t0.credit_facility_register_buyer_api AS credit_facility_register_buyer_api_15, t0.credit_facility AS credit_facility_16, t0.credit_facility_customer AS credit_facility_customer_17, t0.ok_title AS ok_title_18, t0.ok_body AS ok_body_19, t0.author_title AS author_title_20, t0.author_body AS author_body_21, t0.create_date AS create_date_22, t0.update_date AS update_date_23 FROM plg_gmops_kb_config t0 WHERE t0.id = ?
SELECT t0.id AS id_1, t0.authentication_id AS authentication_id_2, t0.shop_code AS shop_code_3, t0.connect_password AS connect_password_4, t0.transaction_api AS transaction_api_5, t0.get_author_api AS get_author_api_6, t0.modify_cancel_transaction_api AS modify_cancel_transaction_api_7, t0.fix_request_api AS fix_request_api_8, t0.modify_cancel_fix_request_api AS modify_cancel_fix_request_api_9, t0.reduce_billing_api AS reduce_billing_api_10, t0.modify_buyer_api AS modify_buyer_api_11, t0.register_buyer_api AS register_buyer_api_12, t0.creditFacility_get_buyer_credit_facility_api AS creditFacility_get_buyer_credit_facility_api_13, t0.credit_facility_modify_buyer_api AS credit_facility_modify_buyer_api_14, t0.credit_facility_register_buyer_api AS credit_facility_register_buyer_api_15, t0.credit_facility AS credit_facility_16, t0.credit_facility_customer AS credit_facility_customer_17, t0.ok_title AS ok_title_18, t0.ok_body AS ok_body_19, t0.author_title AS author_title_20, t0.author_body AS author_body_21, t0.create_date AS create_date_22, t0.update_date AS update_date_23 FROM plg_gmops_kb_config t0 WHERE t0.id = 1;
|
7 |
0.13 ms |
SELECT t0.id AS id_1, t0.name AS name_2, t0.sort_no AS sort_no_3, t0.discriminator_type FROM mtb_order_item_type t0 WHERE t0.id = ? AND t0.discriminator_type IN ('orderitemtype')
SELECT t0.id AS id_1, t0.name AS name_2, t0.sort_no AS sort_no_3, t0.discriminator_type FROM mtb_order_item_type t0 WHERE t0.id = 1 AND t0.discriminator_type IN ('orderitemtype');
|
8 |
0.09 ms |
SELECT t0.id AS id_1, t0.pre_order_id AS pre_order_id_2, t0.order_no AS order_no_3, t0.message AS message_4, t0.name01 AS name01_5, t0.name02 AS name02_6, t0.kana01 AS kana01_7, t0.kana02 AS kana02_8, t0.company_name AS company_name_9, t0.email AS email_10, t0.phone_number AS phone_number_11, t0.postal_code AS postal_code_12, t0.addr01 AS addr01_13, t0.addr02 AS addr02_14, t0.birth AS birth_15, t0.subtotal AS subtotal_16, t0.discount AS discount_17, t0.delivery_fee_total AS delivery_fee_total_18, t0.charge AS charge_19, t0.tax AS tax_20, t0.total AS total_21, t0.payment_total AS payment_total_22, t0.payment_method AS payment_method_23, t0.note AS note_24, t0.create_date AS create_date_25, t0.update_date AS update_date_26, t0.order_date AS order_date_27, t0.payment_date AS payment_date_28, t0.currency_code AS currency_code_29, t0.complete_message AS complete_message_30, t0.complete_mail_message AS complete_mail_message_31, t0.use_coupon AS use_coupon_32, t0.is_usage_fee_service AS is_usage_fee_service_33, t0.manual_coupon AS manual_coupon_34, t0.zeus_request_data AS zeus_request_data_35, t0.zeus_response_data AS zeus_response_data_36, t0.zeus_memo AS zeus_memo_37, t0.zeus_order_id AS zeus_order_id_38, t0.zeus_sale_type AS zeus_sale_type_39, t0.gmops_kb_http_info_http_header AS gmops_kb_http_info_http_header_40, t0.gmops_kb_http_info_device_info AS gmops_kb_http_info_device_info_41, t0.gmops_kb_department_name AS gmops_kb_department_name_42, t0.gmops_kb_president_name_family AS gmops_kb_president_name_family_43, t0.gmops_kb_president_name AS gmops_kb_president_name_44, t0.gmops_kb_president_name_family_kana AS gmops_kb_president_name_family_kana_45, t0.gmops_kb_president_name_kana AS gmops_kb_president_name_kana_46, t0.gmops_kb_birthday AS gmops_kb_birthday_47, t0.gmops_kb_shop_customer_id AS gmops_kb_shop_customer_id_48, t0.add_point AS add_point_49, t0.use_point AS use_point_50, t0.customer_id AS customer_id_51, t0.country_id AS country_id_52, t0.pref_id AS pref_id_53, t0.sex_id AS sex_id_54, t0.job_id AS job_id_55, t0.payment_id AS payment_id_56, t0.device_type_id AS device_type_id_57, t0.order_status_id AS order_status_id_58, t0.order_status_id AS order_status_id_59, t0.order_status_id AS order_status_id_60, t0.discriminator_type FROM dtb_order t0 WHERE t0.pre_order_id IS NULL AND t0.discriminator_type IN ('order') LIMIT 1
SELECT
t0.id AS id_1,
t0.pre_order_id AS pre_order_id_2,
t0.order_no AS order_no_3,
t0.message AS message_4,
t0.name01 AS name01_5,
t0.name02 AS name02_6,
t0.kana01 AS kana01_7,
t0.kana02 AS kana02_8,
t0.company_name AS company_name_9,
t0.email AS email_10,
t0.phone_number AS phone_number_11,
t0.postal_code AS postal_code_12,
t0.addr01 AS addr01_13,
t0.addr02 AS addr02_14,
t0.birth AS birth_15,
t0.subtotal AS subtotal_16,
t0.discount AS discount_17,
t0.delivery_fee_total AS delivery_fee_total_18,
t0.charge AS charge_19,
t0.tax AS tax_20,
t0.total AS total_21,
t0.payment_total AS payment_total_22,
t0.payment_method AS payment_method_23,
t0.note AS note_24,
t0.create_date AS create_date_25,
t0.update_date AS update_date_26,
t0.order_date AS order_date_27,
t0.payment_date AS payment_date_28,
t0.currency_code AS currency_code_29,
t0.complete_message AS complete_message_30,
t0.complete_mail_message AS complete_mail_message_31,
t0.use_coupon AS use_coupon_32,
t0.is_usage_fee_service AS is_usage_fee_service_33,
t0.manual_coupon AS manual_coupon_34,
t0.zeus_request_data AS zeus_request_data_35,
t0.zeus_response_data AS zeus_response_data_36,
t0.zeus_memo AS zeus_memo_37,
t0.zeus_order_id AS zeus_order_id_38,
t0.zeus_sale_type AS zeus_sale_type_39,
t0.gmops_kb_http_info_http_header AS gmops_kb_http_info_http_header_40,
t0.gmops_kb_http_info_device_info AS gmops_kb_http_info_device_info_41,
t0.gmops_kb_department_name AS gmops_kb_department_name_42,
t0.gmops_kb_president_name_family AS gmops_kb_president_name_family_43,
t0.gmops_kb_president_name AS gmops_kb_president_name_44,
t0.gmops_kb_president_name_family_kana AS gmops_kb_president_name_family_kana_45,
t0.gmops_kb_president_name_kana AS gmops_kb_president_name_kana_46,
t0.gmops_kb_birthday AS gmops_kb_birthday_47,
t0.gmops_kb_shop_customer_id AS gmops_kb_shop_customer_id_48,
t0.add_point AS add_point_49,
t0.use_point AS use_point_50,
t0.customer_id AS customer_id_51,
t0.country_id AS country_id_52,
t0.pref_id AS pref_id_53,
t0.sex_id AS sex_id_54,
t0.job_id AS job_id_55,
t0.payment_id AS payment_id_56,
t0.device_type_id AS device_type_id_57,
t0.order_status_id AS order_status_id_58,
t0.order_status_id AS order_status_id_59,
t0.order_status_id AS order_status_id_60,
t0.discriminator_type
FROM
dtb_order t0
WHERE
t0.pre_order_id IS NULL
AND t0.discriminator_type IN ('order')
LIMIT
1
SELECT t0.id AS id_1, t0.pre_order_id AS pre_order_id_2, t0.order_no AS order_no_3, t0.message AS message_4, t0.name01 AS name01_5, t0.name02 AS name02_6, t0.kana01 AS kana01_7, t0.kana02 AS kana02_8, t0.company_name AS company_name_9, t0.email AS email_10, t0.phone_number AS phone_number_11, t0.postal_code AS postal_code_12, t0.addr01 AS addr01_13, t0.addr02 AS addr02_14, t0.birth AS birth_15, t0.subtotal AS subtotal_16, t0.discount AS discount_17, t0.delivery_fee_total AS delivery_fee_total_18, t0.charge AS charge_19, t0.tax AS tax_20, t0.total AS total_21, t0.payment_total AS payment_total_22, t0.payment_method AS payment_method_23, t0.note AS note_24, t0.create_date AS create_date_25, t0.update_date AS update_date_26, t0.order_date AS order_date_27, t0.payment_date AS payment_date_28, t0.currency_code AS currency_code_29, t0.complete_message AS complete_message_30, t0.complete_mail_message AS complete_mail_message_31, t0.use_coupon AS use_coupon_32, t0.is_usage_fee_service AS is_usage_fee_service_33, t0.manual_coupon AS manual_coupon_34, t0.zeus_request_data AS zeus_request_data_35, t0.zeus_response_data AS zeus_response_data_36, t0.zeus_memo AS zeus_memo_37, t0.zeus_order_id AS zeus_order_id_38, t0.zeus_sale_type AS zeus_sale_type_39, t0.gmops_kb_http_info_http_header AS gmops_kb_http_info_http_header_40, t0.gmops_kb_http_info_device_info AS gmops_kb_http_info_device_info_41, t0.gmops_kb_department_name AS gmops_kb_department_name_42, t0.gmops_kb_president_name_family AS gmops_kb_president_name_family_43, t0.gmops_kb_president_name AS gmops_kb_president_name_44, t0.gmops_kb_president_name_family_kana AS gmops_kb_president_name_family_kana_45, t0.gmops_kb_president_name_kana AS gmops_kb_president_name_kana_46, t0.gmops_kb_birthday AS gmops_kb_birthday_47, t0.gmops_kb_shop_customer_id AS gmops_kb_shop_customer_id_48, t0.add_point AS add_point_49, t0.use_point AS use_point_50, t0.customer_id AS customer_id_51, t0.country_id AS country_id_52, t0.pref_id AS pref_id_53, t0.sex_id AS sex_id_54, t0.job_id AS job_id_55, t0.payment_id AS payment_id_56, t0.device_type_id AS device_type_id_57, t0.order_status_id AS order_status_id_58, t0.order_status_id AS order_status_id_59, t0.order_status_id AS order_status_id_60, t0.discriminator_type FROM dtb_order t0 WHERE t0.pre_order_id IS NULL AND t0.discriminator_type IN ('order') LIMIT 1;
|
9 |
21.61 ms |
WITH base AS (
SELECT c.id, company_name, stock_number, ct.name AS contract_type_name, contract_type_id, margin_not_included, contract_begin_ymd
FROM dtb_chain_store c INNER JOIN mtb_contract_type ct ON c.contract_type_id = ct.id
WHERE c.chain_store_status_id = 2
UNION
SELECT 'SYS', '未登録', NULL, NULL, NULL, false, DATE(NOW()-INTERVAL 90 DAY)
), coupon AS (
SELECT IFNULL(sum_coupon.chain_store_id, 'SYS') AS chain_store_id,
sum_coupon.contract_type_id,
SUM(CASE WHEN sum_coupon.contract_type_id = 1 OR sum_coupon.contract_type_id = 2 OR sum_coupon.contract_type_id IS NULL THEN
sum_coupon.coupon_total
ELSE
0
END) AS coupon_total
FROM base LEFT JOIN (
SELECT c.chain_store_id
,cs.contract_type_id
,FLOOR(SUM((o.subtotal))/COUNT(o.id)) coupon_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
LEFT JOIN plg_coupon_order co ON o.id = co.order_id
LEFT JOIN plg_coupon c ON co.coupon_id = c.coupon_id
LEFT JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
GROUP BY c.chain_store_id, cs.contract_type_id, o.id
) sum_coupon ON base.id = sum_coupon.chain_store_id OR sum_coupon.chain_store_id IS NULL
GROUP BY sum_coupon.chain_store_id, sum_coupon.contract_type_id
), chain AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.payment_total)) AS self_total
FROM `dtb_shipping` s
INNER JOIN dtb_order o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
GROUP BY c.chain_store_id
), chain_notax AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.subtotal)) AS self_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
GROUP BY c.chain_store_id
), chain_total AS (
SELECT SUM(self_total) total
FROM chain
WHERE contract_type_id = 3
), chain_total_notax AS (
SELECT SUM(self_total) total
FROM chain_notax
WHERE contract_type_id = 3
), support_cnt AS (
SELECT COUNT(id) cnt
FROM base
WHERE contract_type_id = 2
), upload_cashback AS (
SELECT chain_store_id,
FLOOR(SUM(adj_amount)) uploadAmount
FROM dtb_upload_cashback_data
WHERE reference_ym = ?
GROUP BY chain_store_id
), summary_memo AS (
SELECT chain_store_id,
FLOOR(SUM(adj_amount)) memoAmount
FROM dtb_cashback_summary_memo
WHERE reference_ym = ?
GROUP BY chain_store_id
), result AS (
SELECT base.*,
SUM(coupon.coupon_total) AS coupon_total,
CASE WHEN base.id = 'SYS' THEN
0
ELSE
FLOOR(SUM(coupon.coupon_total) * 0.1)
END AS coupon_margin,
CASE WHEN base.contract_type_id = 3 THEN
SUM(chain.self_total)
ELSE
0
END AS kouri_self_total,
CASE WHEN base.contract_type_id = 2 THEN
SUM(chain.self_total)
ELSE
0
END AS oen_self_total,
CASE WHEN base.contract_type_id = 1 THEN
SUM(chain.self_total)
ELSE
0
END AS self_total,
CASE WHEN base.contract_type_id = 2 THEN
CASE WHEN base.margin_not_included OR DATE_FORMAT(base.contract_begin_ymd, '%Y-%m') > ? THEN
0
ELSE
CASE WHEN FLOOR(SUM((chain_total_notax.total * 0.03) / support_cnt.cnt)) >= 15000 THEN
FLOOR(SUM((chain_total_notax.total * 0.03) / support_cnt.cnt))
ELSE
15000
END
END
ELSE
0
END AS support_total,
IFNULL(SUM(upload_cashback.uploadAmount),0) * 0.1 AS upload_amount
FROM base
LEFT JOIN coupon ON base.id = coupon.chain_store_id
LEFT JOIN chain ON base.id = chain.chain_store_id
LEFT JOIN upload_cashback ON base.id = upload_cashback.chain_store_id
LEFT JOIN summary_memo ON base.id = summary_memo.chain_store_id
LEFT JOIN chain_total ON 1 = 1
LEFT JOIN chain_total_notax ON 1 = 1
LEFT JOIN support_cnt ON 1 = 1
WHERE ((coupon_total != 0
OR self_total != 0
OR upload_cashback.uploadAmount != 0
OR memoAmount != 0)
OR base.contract_type_id = 2)
GROUP BY base.id, base.company_name, base.stock_number, base.contract_type_name
ORDER BY base.contract_type_name, base.company_name
)
SELECT result.*,
(IFNULL(result.coupon_margin,0) + IFNULL(result.support_total,0)) AS margin_total
FROM result
Parameters: [
"2024-09"
"2024-09"
"2024-09"
"2024-09"
"2024-09"
"2024-09"
]
WITH base AS (
SELECT
c.id,
company_name,
stock_number,
ct.name AS contract_type_name,
contract_type_id,
margin_not_included,
contract_begin_ymd
FROM
dtb_chain_store c
INNER JOIN mtb_contract_type ct ON c.contract_type_id = ct.id
WHERE
c.chain_store_status_id = 2
UNION
SELECT
'SYS',
'未登録',
NULL,
NULL,
NULL,
false,
DATE(NOW() - INTERVAL 90 DAY)
),
coupon AS (
SELECT
IFNULL(
sum_coupon.chain_store_id, 'SYS'
) AS chain_store_id,
sum_coupon.contract_type_id,
SUM(
CASE WHEN sum_coupon.contract_type_id = 1
OR sum_coupon.contract_type_id = 2
OR sum_coupon.contract_type_id IS NULL THEN sum_coupon.coupon_total ELSE 0 END
) AS coupon_total
FROM
base
LEFT JOIN (
SELECT
c.chain_store_id,
cs.contract_type_id,
FLOOR(
SUM(
(o.subtotal)
)/ COUNT(o.id)
) coupon_total
FROM
`dtb_shipping` s
INNER JOIN (
SELECT
oo.id,
oo.customer_id,
oo.order_status_id,
SUM(oi.price * oi.quantity) subtotal,
SUM(oi.tax) taxtotal
FROM
dtb_order oo
LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE
oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY
oi.order_id,
oo.customer_id,
oo.order_status_id
) o ON s.order_id = o.id
LEFT JOIN plg_coupon_order co ON o.id = co.order_id
LEFT JOIN plg_coupon c ON co.coupon_id = c.coupon_id
LEFT JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE
o.order_status_id = 5
AND DATE_FORMAT(
DATE_ADD(s.shipping_date, INTERVAL 9 HOUR),
'%Y-%m'
) = ?
GROUP BY
c.chain_store_id,
cs.contract_type_id,
o.id
) sum_coupon ON base.id = sum_coupon.chain_store_id
OR sum_coupon.chain_store_id IS NULL
GROUP BY
sum_coupon.chain_store_id,
sum_coupon.contract_type_id
),
chain AS (
SELECT
c.chain_store_id,
cs.contract_type_id,
FLOOR(
SUM(o.payment_total)
) AS self_total
FROM
`dtb_shipping` s
INNER JOIN dtb_order o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE
o.order_status_id = 5
AND DATE_FORMAT(
DATE_ADD(s.shipping_date, INTERVAL 9 HOUR),
'%Y-%m'
) = ?
GROUP BY
c.chain_store_id
),
chain_notax AS (
SELECT
c.chain_store_id,
cs.contract_type_id,
FLOOR(
SUM(o.subtotal)
) AS self_total
FROM
`dtb_shipping` s
INNER JOIN (
SELECT
oo.id,
oo.customer_id,
oo.order_status_id,
SUM(oi.price * oi.quantity) subtotal,
SUM(oi.tax) taxtotal
FROM
dtb_order oo
LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE
oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY
oi.order_id,
oo.customer_id,
oo.order_status_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE
o.order_status_id = 5
AND DATE_FORMAT(
DATE_ADD(s.shipping_date, INTERVAL 9 HOUR),
'%Y-%m'
) = ?
GROUP BY
c.chain_store_id
),
chain_total AS (
SELECT
SUM(self_total) total
FROM
chain
WHERE
contract_type_id = 3
),
chain_total_notax AS (
SELECT
SUM(self_total) total
FROM
chain_notax
WHERE
contract_type_id = 3
),
support_cnt AS (
SELECT
COUNT(id) cnt
FROM
base
WHERE
contract_type_id = 2
),
upload_cashback AS (
SELECT
chain_store_id,
FLOOR(
SUM(adj_amount)
) uploadAmount
FROM
dtb_upload_cashback_data
WHERE
reference_ym = ?
GROUP BY
chain_store_id
),
summary_memo AS (
SELECT
chain_store_id,
FLOOR(
SUM(adj_amount)
) memoAmount
FROM
dtb_cashback_summary_memo
WHERE
reference_ym = ?
GROUP BY
chain_store_id
),
result AS (
SELECT
base.*,
SUM(coupon.coupon_total) AS coupon_total,
CASE WHEN base.id = 'SYS' THEN 0 ELSE FLOOR(
SUM(coupon.coupon_total) * 0.1
) END AS coupon_margin,
CASE WHEN base.contract_type_id = 3 THEN SUM(chain.self_total) ELSE 0 END AS kouri_self_total,
CASE WHEN base.contract_type_id = 2 THEN SUM(chain.self_total) ELSE 0 END AS oen_self_total,
CASE WHEN base.contract_type_id = 1 THEN SUM(chain.self_total) ELSE 0 END AS self_total,
CASE WHEN base.contract_type_id = 2 THEN
CASE WHEN base.margin_not_included
OR DATE_FORMAT(
base.contract_begin_ymd, '%Y-%m'
) > ? THEN 0 ELSE
CASE WHEN FLOOR(
SUM(
(chain_total_notax.total * 0.03) / support_cnt.cnt
)
) >= 15000 THEN FLOOR(
SUM(
(chain_total_notax.total * 0.03) / support_cnt.cnt
)
) ELSE 15000 END END ELSE 0 END AS support_total,
IFNULL(
SUM(upload_cashback.uploadAmount),
0
) * 0.1 AS upload_amount
FROM
base
LEFT JOIN coupon ON base.id = coupon.chain_store_id
LEFT JOIN chain ON base.id = chain.chain_store_id
LEFT JOIN upload_cashback ON base.id = upload_cashback.chain_store_id
LEFT JOIN summary_memo ON base.id = summary_memo.chain_store_id
LEFT JOIN chain_total ON 1 = 1
LEFT JOIN chain_total_notax ON 1 = 1
LEFT JOIN support_cnt ON 1 = 1
WHERE
(
(
coupon_total != 0
OR self_total != 0
OR upload_cashback.uploadAmount != 0
OR memoAmount != 0
)
OR base.contract_type_id = 2
)
GROUP BY
base.id,
base.company_name,
base.stock_number,
base.contract_type_name
ORDER BY
base.contract_type_name,
base.company_name
)
SELECT
result.*,
(
IFNULL(result.coupon_margin, 0) + IFNULL(result.support_total, 0)
) AS margin_total
FROM
result
WITH base AS (
SELECT c.id, company_name, stock_number, ct.name AS contract_type_name, contract_type_id, margin_not_included, contract_begin_ymd
FROM dtb_chain_store c INNER JOIN mtb_contract_type ct ON c.contract_type_id = ct.id
WHERE c.chain_store_status_id = 2
UNION
SELECT 'SYS', '未登録', NULL, NULL, NULL, false, DATE(NOW()-INTERVAL 90 DAY)
), coupon AS (
SELECT IFNULL(sum_coupon.chain_store_id, 'SYS') AS chain_store_id,
sum_coupon.contract_type_id,
SUM(CASE WHEN sum_coupon.contract_type_id = 1 OR sum_coupon.contract_type_id = 2 OR sum_coupon.contract_type_id IS NULL THEN
sum_coupon.coupon_total
ELSE
0
END) AS coupon_total
FROM base LEFT JOIN (
SELECT c.chain_store_id
,cs.contract_type_id
,FLOOR(SUM((o.subtotal))/COUNT(o.id)) coupon_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
LEFT JOIN plg_coupon_order co ON o.id = co.order_id
LEFT JOIN plg_coupon c ON co.coupon_id = c.coupon_id
LEFT JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-09'
GROUP BY c.chain_store_id, cs.contract_type_id, o.id
) sum_coupon ON base.id = sum_coupon.chain_store_id OR sum_coupon.chain_store_id IS NULL
GROUP BY sum_coupon.chain_store_id, sum_coupon.contract_type_id
), chain AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.payment_total)) AS self_total
FROM `dtb_shipping` s
INNER JOIN dtb_order o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-09'
GROUP BY c.chain_store_id
), chain_notax AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.subtotal)) AS self_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-09'
GROUP BY c.chain_store_id
), chain_total AS (
SELECT SUM(self_total) total
FROM chain
WHERE contract_type_id = 3
), chain_total_notax AS (
SELECT SUM(self_total) total
FROM chain_notax
WHERE contract_type_id = 3
), support_cnt AS (
SELECT COUNT(id) cnt
FROM base
WHERE contract_type_id = 2
), upload_cashback AS (
SELECT chain_store_id,
FLOOR(SUM(adj_amount)) uploadAmount
FROM dtb_upload_cashback_data
WHERE reference_ym = '2024-09'
GROUP BY chain_store_id
), summary_memo AS (
SELECT chain_store_id,
FLOOR(SUM(adj_amount)) memoAmount
FROM dtb_cashback_summary_memo
WHERE reference_ym = '2024-09'
GROUP BY chain_store_id
), result AS (
SELECT base.*,
SUM(coupon.coupon_total) AS coupon_total,
CASE WHEN base.id = 'SYS' THEN
0
ELSE
FLOOR(SUM(coupon.coupon_total) * 0.1)
END AS coupon_margin,
CASE WHEN base.contract_type_id = 3 THEN
SUM(chain.self_total)
ELSE
0
END AS kouri_self_total,
CASE WHEN base.contract_type_id = 2 THEN
SUM(chain.self_total)
ELSE
0
END AS oen_self_total,
CASE WHEN base.contract_type_id = 1 THEN
SUM(chain.self_total)
ELSE
0
END AS self_total,
CASE WHEN base.contract_type_id = 2 THEN
CASE WHEN base.margin_not_included OR DATE_FORMAT(base.contract_begin_ymd, '%Y-%m') > '2024-09' THEN
0
ELSE
CASE WHEN FLOOR(SUM((chain_total_notax.total * 0.03) / support_cnt.cnt)) >= 15000 THEN
FLOOR(SUM((chain_total_notax.total * 0.03) / support_cnt.cnt))
ELSE
15000
END
END
ELSE
0
END AS support_total,
IFNULL(SUM(upload_cashback.uploadAmount),0) * 0.1 AS upload_amount
FROM base
LEFT JOIN coupon ON base.id = coupon.chain_store_id
LEFT JOIN chain ON base.id = chain.chain_store_id
LEFT JOIN upload_cashback ON base.id = upload_cashback.chain_store_id
LEFT JOIN summary_memo ON base.id = summary_memo.chain_store_id
LEFT JOIN chain_total ON 1 = 1
LEFT JOIN chain_total_notax ON 1 = 1
LEFT JOIN support_cnt ON 1 = 1
WHERE ((coupon_total != 0
OR self_total != 0
OR upload_cashback.uploadAmount != 0
OR memoAmount != 0)
OR base.contract_type_id = 2)
GROUP BY base.id, base.company_name, base.stock_number, base.contract_type_name
ORDER BY base.contract_type_name, base.company_name
)
SELECT result.*,
(IFNULL(result.coupon_margin,0) + IFNULL(result.support_total,0)) AS margin_total
FROM result
;
|
10 |
0.42 ms |
DELETE FROM dtb_dealer_summary WHERE (reference_ym = ?) AND discriminator_type IN ('dealersummary')
Parameters: [
"2024-09"
]
DELETE FROM dtb_dealer_summary WHERE (reference_ym = '2024-09') AND discriminator_type IN ('dealersummary');
|
11 |
7.62 ms |
WITH base AS (
SELECT c.id, c.dealer_code, c.company_name, c.stock_number, ct.name AS contract_type_name, contract_type_id, contract_begin_ymd
FROM dtb_chain_store c INNER JOIN mtb_contract_type ct ON c.contract_type_id = ct.id
WHERE c.chain_store_status_id = 2
UNION
SELECT 'SYS', NULL, '未登録', NULL, NULL, NULL, DATE(NOW()-INTERVAL 90 DAY)
), sales AS (
SELECT IFNULL(sum_sales.chain_store_id, 'SYS') AS chain_store_id,
sum_sales.contract_type_id,
SUM(CASE WHEN contract_type_id = 1 OR contract_type_id = 2 OR contract_type_id IS NULL THEN
sum_sales.sales_total
ELSE
0
END) AS sales_total
FROM (
SELECT c.chain_store_id
,cs.contract_type_id
,FLOOR(SUM((o.subtotal))/COUNT(o.id)) sales_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
LEFT JOIN plg_coupon_order co ON o.id = co.order_id
LEFT JOIN plg_coupon c ON co.coupon_id = c.coupon_id
LEFT JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
GROUP BY c.chain_store_id, cs.contract_type_id, o.id
) sum_sales
GROUP BY sum_sales.chain_store_id, sum_sales.contract_type_id
), chain AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.payment_total)) AS self_total
FROM `dtb_shipping` s
INNER JOIN dtb_order o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
GROUP BY c.chain_store_id
), chain_notax AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.subtotal)) AS self_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
GROUP BY c.chain_store_id
), upload_cashback AS (
SELECT chain_store_id,
FLOOR(SUM(adj_amount)) uploadAmount
FROM dtb_upload_cashback_data
WHERE reference_ym = ?
GROUP BY chain_store_id
), result AS (
SELECT base.*,
SUM(sales.sales_total) AS sales_total,
CASE WHEN base.id = 'SYS' THEN
0
ELSE
FLOOR((IFNULL(SUM(sales.sales_total),0) + IFNULL(SUM(upload_cashback.uploadAmount),0)) * 0.03)
END AS sales_margin,
CASE WHEN base.contract_type_id = 3 THEN
SUM(chain_notax.self_total)
ELSE
0
END AS kouri_self_total,
CASE WHEN base.contract_type_id = 2 THEN
0
ELSE
0
END AS oen_self_total,
CASE WHEN base.contract_type_id = 1 THEN
SUM(chain_notax.self_total)
ELSE
0
END AS self_total,
CASE WHEN base.contract_type_id = 1 THEN
FLOOR(SUM(chain_notax.self_total) * 0.03)
ELSE
0
END AS chain_total
FROM base
LEFT JOIN sales ON base.id = sales.chain_store_id
LEFT JOIN chain ON base.id = chain.chain_store_id
LEFT JOIN chain_notax ON base.id = chain_notax.chain_store_id
LEFT JOIN upload_cashback ON base.id = upload_cashback.chain_store_id
WHERE (sales_total != 0
OR chain.self_total != 0
OR upload_cashback.uploadAmount != 0)
GROUP BY base.id, base.dealer_code, base.company_name, base.stock_number, base.contract_type_name
ORDER BY base.contract_type_name, base.company_name
)
SELECT result.*,
(IFNULL(result.sales_margin,0) + IFNULL(result.chain_total, 0)) AS margin_total
FROM result
Parameters: [
"2024-09"
"2024-09"
"2024-09"
"2024-09"
]
WITH base AS (
SELECT
c.id,
c.dealer_code,
c.company_name,
c.stock_number,
ct.name AS contract_type_name,
contract_type_id,
contract_begin_ymd
FROM
dtb_chain_store c
INNER JOIN mtb_contract_type ct ON c.contract_type_id = ct.id
WHERE
c.chain_store_status_id = 2
UNION
SELECT
'SYS',
NULL,
'未登録',
NULL,
NULL,
NULL,
DATE(NOW() - INTERVAL 90 DAY)
),
sales AS (
SELECT
IFNULL(sum_sales.chain_store_id, 'SYS') AS chain_store_id,
sum_sales.contract_type_id,
SUM(
CASE WHEN contract_type_id = 1
OR contract_type_id = 2
OR contract_type_id IS NULL THEN sum_sales.sales_total ELSE 0 END
) AS sales_total
FROM
(
SELECT
c.chain_store_id,
cs.contract_type_id,
FLOOR(
SUM(
(o.subtotal)
)/ COUNT(o.id)
) sales_total
FROM
`dtb_shipping` s
INNER JOIN (
SELECT
oo.id,
oo.customer_id,
oo.order_status_id,
SUM(oi.price * oi.quantity) subtotal,
SUM(oi.tax) taxtotal
FROM
dtb_order oo
LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE
oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY
oi.order_id,
oo.customer_id,
oo.order_status_id
) o ON s.order_id = o.id
LEFT JOIN plg_coupon_order co ON o.id = co.order_id
LEFT JOIN plg_coupon c ON co.coupon_id = c.coupon_id
LEFT JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE
o.order_status_id = 5
AND DATE_FORMAT(
DATE_ADD(s.shipping_date, INTERVAL 9 HOUR),
'%Y-%m'
) = ?
GROUP BY
c.chain_store_id,
cs.contract_type_id,
o.id
) sum_sales
GROUP BY
sum_sales.chain_store_id,
sum_sales.contract_type_id
),
chain AS (
SELECT
c.chain_store_id,
cs.contract_type_id,
FLOOR(
SUM(o.payment_total)
) AS self_total
FROM
`dtb_shipping` s
INNER JOIN dtb_order o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE
o.order_status_id = 5
AND DATE_FORMAT(
DATE_ADD(s.shipping_date, INTERVAL 9 HOUR),
'%Y-%m'
) = ?
GROUP BY
c.chain_store_id
),
chain_notax AS (
SELECT
c.chain_store_id,
cs.contract_type_id,
FLOOR(
SUM(o.subtotal)
) AS self_total
FROM
`dtb_shipping` s
INNER JOIN (
SELECT
oo.id,
oo.customer_id,
oo.order_status_id,
SUM(oi.price * oi.quantity) subtotal,
SUM(oi.tax) taxtotal
FROM
dtb_order oo
LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE
oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY
oi.order_id,
oo.customer_id,
oo.order_status_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE
o.order_status_id = 5
AND DATE_FORMAT(
DATE_ADD(s.shipping_date, INTERVAL 9 HOUR),
'%Y-%m'
) = ?
GROUP BY
c.chain_store_id
),
upload_cashback AS (
SELECT
chain_store_id,
FLOOR(
SUM(adj_amount)
) uploadAmount
FROM
dtb_upload_cashback_data
WHERE
reference_ym = ?
GROUP BY
chain_store_id
),
result AS (
SELECT
base.*,
SUM(sales.sales_total) AS sales_total,
CASE WHEN base.id = 'SYS' THEN 0 ELSE FLOOR(
(
IFNULL(
SUM(sales.sales_total),
0
) + IFNULL(
SUM(upload_cashback.uploadAmount),
0
)
) * 0.03
) END AS sales_margin,
CASE WHEN base.contract_type_id = 3 THEN SUM(chain_notax.self_total) ELSE 0 END AS kouri_self_total,
CASE WHEN base.contract_type_id = 2 THEN 0
ELSE 0 END AS oen_self_total,
CASE WHEN base.contract_type_id = 1 THEN SUM(chain_notax.self_total) ELSE 0 END AS self_total,
CASE WHEN base.contract_type_id = 1 THEN FLOOR(
SUM(chain_notax.self_total) * 0.03
) ELSE 0 END AS chain_total
FROM
base
LEFT JOIN sales ON base.id = sales.chain_store_id
LEFT JOIN chain ON base.id = chain.chain_store_id
LEFT JOIN chain_notax ON base.id = chain_notax.chain_store_id
LEFT JOIN upload_cashback ON base.id = upload_cashback.chain_store_id
WHERE
(
sales_total != 0
OR chain.self_total != 0
OR upload_cashback.uploadAmount != 0
)
GROUP BY
base.id,
base.dealer_code,
base.company_name,
base.stock_number,
base.contract_type_name
ORDER BY
base.contract_type_name,
base.company_name
)
SELECT
result.*,
(
IFNULL(result.sales_margin, 0) + IFNULL(result.chain_total, 0)
) AS margin_total
FROM
result
WITH base AS (
SELECT c.id, c.dealer_code, c.company_name, c.stock_number, ct.name AS contract_type_name, contract_type_id, contract_begin_ymd
FROM dtb_chain_store c INNER JOIN mtb_contract_type ct ON c.contract_type_id = ct.id
WHERE c.chain_store_status_id = 2
UNION
SELECT 'SYS', NULL, '未登録', NULL, NULL, NULL, DATE(NOW()-INTERVAL 90 DAY)
), sales AS (
SELECT IFNULL(sum_sales.chain_store_id, 'SYS') AS chain_store_id,
sum_sales.contract_type_id,
SUM(CASE WHEN contract_type_id = 1 OR contract_type_id = 2 OR contract_type_id IS NULL THEN
sum_sales.sales_total
ELSE
0
END) AS sales_total
FROM (
SELECT c.chain_store_id
,cs.contract_type_id
,FLOOR(SUM((o.subtotal))/COUNT(o.id)) sales_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
LEFT JOIN plg_coupon_order co ON o.id = co.order_id
LEFT JOIN plg_coupon c ON co.coupon_id = c.coupon_id
LEFT JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-09'
GROUP BY c.chain_store_id, cs.contract_type_id, o.id
) sum_sales
GROUP BY sum_sales.chain_store_id, sum_sales.contract_type_id
), chain AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.payment_total)) AS self_total
FROM `dtb_shipping` s
INNER JOIN dtb_order o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-09'
GROUP BY c.chain_store_id
), chain_notax AS (
SELECT c.chain_store_id
, cs.contract_type_id
,FLOOR(SUM(o.subtotal)) AS self_total
FROM `dtb_shipping` s
INNER JOIN (
SELECT oo.id, oo.customer_id, oo.order_status_id, SUM(oi.price * oi.quantity) subtotal, SUM(oi.tax) taxtotal
FROM dtb_order oo LEFT JOIN dtb_order_item oi ON oo.id = oi.order_id
LEFT JOIN dtb_product p ON oi.product_id = p.id
WHERE oi.order_item_type_id = 1
AND p.option_margin_activate = 1
GROUP BY oi.order_id, oo.customer_id, oo.order_status_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE o.order_status_id = 5
AND DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-09'
GROUP BY c.chain_store_id
), upload_cashback AS (
SELECT chain_store_id,
FLOOR(SUM(adj_amount)) uploadAmount
FROM dtb_upload_cashback_data
WHERE reference_ym = '2024-09'
GROUP BY chain_store_id
), result AS (
SELECT base.*,
SUM(sales.sales_total) AS sales_total,
CASE WHEN base.id = 'SYS' THEN
0
ELSE
FLOOR((IFNULL(SUM(sales.sales_total),0) + IFNULL(SUM(upload_cashback.uploadAmount),0)) * 0.03)
END AS sales_margin,
CASE WHEN base.contract_type_id = 3 THEN
SUM(chain_notax.self_total)
ELSE
0
END AS kouri_self_total,
CASE WHEN base.contract_type_id = 2 THEN
0
ELSE
0
END AS oen_self_total,
CASE WHEN base.contract_type_id = 1 THEN
SUM(chain_notax.self_total)
ELSE
0
END AS self_total,
CASE WHEN base.contract_type_id = 1 THEN
FLOOR(SUM(chain_notax.self_total) * 0.03)
ELSE
0
END AS chain_total
FROM base
LEFT JOIN sales ON base.id = sales.chain_store_id
LEFT JOIN chain ON base.id = chain.chain_store_id
LEFT JOIN chain_notax ON base.id = chain_notax.chain_store_id
LEFT JOIN upload_cashback ON base.id = upload_cashback.chain_store_id
WHERE (sales_total != 0
OR chain.self_total != 0
OR upload_cashback.uploadAmount != 0)
GROUP BY base.id, base.dealer_code, base.company_name, base.stock_number, base.contract_type_name
ORDER BY base.contract_type_name, base.company_name
)
SELECT result.*,
(IFNULL(result.sales_margin,0) + IFNULL(result.chain_total, 0)) AS margin_total
FROM result
;
|
12 |
0.14 ms |
DELETE FROM dtb_cashback_summary_memo WHERE (adjust_type = 'reback' AND reference_ym = ?) AND discriminator_type IN ('cashbacksummarymemo')
Parameters: [
"2024-09"
]
DELETE FROM dtb_cashback_summary_memo WHERE (adjust_type = 'reback' AND reference_ym = '2024-09') AND discriminator_type IN ('cashbacksummarymemo');
|
13 |
4.50 ms |
WITH base AS (
SELECT c.chain_store_id
,cs.contract_type_id
,o.category_id
,SUM(o.quantity) quantity
,SUM(o.subtotal) subtotal
FROM dtb_shipping s
INNER JOIN (
SELECT oo.id, oo.customer_id, pt.category_id,
SUM(CASE WHEN oi.order_item_type_id = 7 THEN
oi.quantity
ELSE
oi.quantity * IFNULL(pc.deliveryplus_size,1)
END) quantity,
SUM(CASE WHEN oi.order_item_type_id = 7 THEN
pc.price02 * oi.quantity
ELSE
oi.price * oi.quantity
END) subtotal
FROM dtb_order oo
INNER JOIN dtb_order_item oi ON oo.id = oi.order_id
INNER JOIN dtb_product p ON oi.product_id = p.id
INNER JOIN dtb_product_class pc ON pc.id = oi.product_class_id
INNER JOIN dtb_product_category pt ON oi.product_id = pt.product_id
WHERE oi.order_item_type_id IN (1,7)
AND oo.order_status_id = 5
AND oi.product_id NOT IN (SELECT product_id FROM plg_ks_product)
GROUP BY oi.order_id, oo.customer_id, pt.category_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = ?
AND cs.contract_type_id = 1
AND cs.chain_store_status_id = 2
AND o.category_id IN (1,5)
GROUP BY c.chain_store_id, cs.contract_type_id, o.category_id
), result_price AS (
SELECT base.*
,(subtotal / 0.6) list_price
,CASE WHEN category_id = 1 THEN
CASE WHEN quantity >= 4020 THEN
'net50'
ELSE
CASE WHEN quantity >= 820 THEN
'net55'
ELSE
'net60'
END
END
ELSE
CASE WHEN quantity >= 1506 THEN
'net50'
ELSE
CASE WHEN quantity >= 306 THEN
'net55'
ELSE
'net60'
END
END
END percentage
FROM base
)
SELECT result_price.*, '' category_name, 0 diff_price, '' memo
FROM result_price
Parameters: [
"2024-08"
]
WITH base AS (
SELECT c.chain_store_id
,cs.contract_type_id
,o.category_id
,SUM(o.quantity) quantity
,SUM(o.subtotal) subtotal
FROM dtb_shipping s
INNER JOIN (
SELECT oo.id, oo.customer_id, pt.category_id,
SUM(CASE WHEN oi.order_item_type_id = 7 THEN
oi.quantity
ELSE
oi.quantity * IFNULL(pc.deliveryplus_size,1)
END) quantity,
SUM(CASE WHEN oi.order_item_type_id = 7 THEN
pc.price02 * oi.quantity
ELSE
oi.price * oi.quantity
END) subtotal
FROM dtb_order oo
INNER JOIN dtb_order_item oi ON oo.id = oi.order_id
INNER JOIN dtb_product p ON oi.product_id = p.id
INNER JOIN dtb_product_class pc ON pc.id = oi.product_class_id
INNER JOIN dtb_product_category pt ON oi.product_id = pt.product_id
WHERE oi.order_item_type_id IN (1,7)
AND oo.order_status_id = 5
AND oi.product_id NOT IN (SELECT product_id FROM plg_ks_product)
GROUP BY oi.order_id, oo.customer_id, pt.category_id
) o ON s.order_id = o.id
INNER JOIN dtb_customer c ON o.customer_id = c.id
INNER JOIN dtb_chain_store cs ON c.chain_store_id = cs.id
WHERE DATE_FORMAT(DATE_ADD(s.shipping_date, INTERVAL 9 HOUR), '%Y-%m') = '2024-08'
AND cs.contract_type_id = 1
AND cs.chain_store_status_id = 2
AND o.category_id IN (1,5)
GROUP BY c.chain_store_id, cs.contract_type_id, o.category_id
), result_price AS (
SELECT base.*
,(subtotal / 0.6) list_price
,CASE WHEN category_id = 1 THEN
CASE WHEN quantity >= 4020 THEN
'net50'
ELSE
CASE WHEN quantity >= 820 THEN
'net55'
ELSE
'net60'
END
END
ELSE
CASE WHEN quantity >= 1506 THEN
'net50'
ELSE
CASE WHEN quantity >= 306 THEN
'net55'
ELSE
'net60'
END
END
END percentage
FROM base
)
SELECT result_price.*, '' category_name, 0 diff_price, '' memo
FROM result_price
;
|
14 |
0.61 ms |
SELECT t0.id AS id_1, t0.reference_ym AS reference_ym_2, t0.margin_price AS margin_price_3, t0.previous_margin_price AS previous_margin_price_4, t0.coupon_margin AS coupon_margin_5, t0.oen_support_total AS oen_support_total_6, t0.purchase_amount AS purchase_amount_7, t0.request_amount AS request_amount_8, t0.margin_balance AS margin_balance_9, t0.carried_forward AS carried_forward_10, t0.note AS note_11, t0.export_cnt AS export_cnt_12, t0.chain_store_id AS chain_store_id_13, t0.discriminator_type FROM dtb_cashback_summary t0 WHERE t0.reference_ym = ? AND t0.discriminator_type IN ('cashbacksummary')
Parameters: [
"2024-08"
]
SELECT t0.id AS id_1, t0.reference_ym AS reference_ym_2, t0.margin_price AS margin_price_3, t0.previous_margin_price AS previous_margin_price_4, t0.coupon_margin AS coupon_margin_5, t0.oen_support_total AS oen_support_total_6, t0.purchase_amount AS purchase_amount_7, t0.request_amount AS request_amount_8, t0.margin_balance AS margin_balance_9, t0.carried_forward AS carried_forward_10, t0.note AS note_11, t0.export_cnt AS export_cnt_12, t0.chain_store_id AS chain_store_id_13, t0.discriminator_type FROM dtb_cashback_summary t0 WHERE t0.reference_ym = '2024-08' AND t0.discriminator_type IN ('cashbacksummary');
|
15 |
0.19 ms |
SELECT t0.id AS id_1, t0.adjust_type AS adjust_type_2, t0.reference_ym AS reference_ym_3, t0.adj_amount AS adj_amount_4, t0.note AS note_5, t0.chain_store_id AS chain_store_id_6, t0.discriminator_type FROM dtb_cashback_summary_memo t0 WHERE t0.reference_ym = ? AND t0.discriminator_type IN ('cashbacksummarymemo')
Parameters: [
"2024-09"
]
SELECT t0.id AS id_1, t0.adjust_type AS adjust_type_2, t0.reference_ym AS reference_ym_3, t0.adj_amount AS adj_amount_4, t0.note AS note_5, t0.chain_store_id AS chain_store_id_6, t0.discriminator_type FROM dtb_cashback_summary_memo t0 WHERE t0.reference_ym = '2024-09' AND t0.discriminator_type IN ('cashbacksummarymemo');
|
16 |
0.16 ms |
SELECT t0.id AS id_1, t0.reference_ym AS reference_ym_2, t0.adj_amount AS adj_amount_3, t0.note AS note_4, t0.chain_store_id AS chain_store_id_5, t0.discriminator_type FROM dtb_upload_cashback_data t0 WHERE t0.reference_ym = ? AND t0.discriminator_type IN ('uploadcashbackdata')
Parameters: [
"2024-09"
]
SELECT t0.id AS id_1, t0.reference_ym AS reference_ym_2, t0.adj_amount AS adj_amount_3, t0.note AS note_4, t0.chain_store_id AS chain_store_id_5, t0.discriminator_type FROM dtb_upload_cashback_data t0 WHERE t0.reference_ym = '2024-09' AND t0.discriminator_type IN ('uploadcashbackdata');
|
17 |
0.90 ms |
DELETE FROM dtb_cashback_summary WHERE (reference_ym = ?) AND discriminator_type IN ('cashbacksummary')
Parameters: [
"2024-09"
]
DELETE FROM dtb_cashback_summary WHERE (reference_ym = '2024-09') AND discriminator_type IN ('cashbacksummary');
|
18 |
0.73 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '40' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
19 |
0.16 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "0.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "0"
10 => null
11 => 0
12 => 40
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '0.00', '0', '0', '0', '0', '0', '0', NULL, 0, 40, 'cashbacksummary');
|
20 |
0.67 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '50' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
21 |
0.11 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "15000"
3 => "0.00"
4 => "0"
5 => "15000"
6 => "0"
7 => "0"
8 => "15000"
9 => "0"
10 => null
11 => 0
12 => 50
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '15000', '0.00', '0', '15000', '0', '0', '15000', '0', NULL, 0, 50, 'cashbacksummary');
|
22 |
0.45 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '93' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
23 |
0.10 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "0.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "0"
10 => null
11 => 0
12 => 93
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '0.00', '0', '0', '0', '0', '0', '0', NULL, 0, 93, 'cashbacksummary');
|
24 |
0.40 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '30' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
25 |
0.09 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "15000"
3 => "0.00"
4 => "0"
5 => "15000"
6 => "0"
7 => "0"
8 => "15000"
9 => "0"
10 => null
11 => 0
12 => 30
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '15000', '0.00', '0', '15000', '0', '0', '15000', '0', NULL, 0, 30, 'cashbacksummary');
|
26 |
0.39 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '33' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
27 |
0.08 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "15000"
3 => "0.00"
4 => "0"
5 => "15000"
6 => "0"
7 => "0"
8 => "15000"
9 => "0"
10 => null
11 => 0
12 => 33
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '15000', '0.00', '0', '15000', '0', '0', '15000', '0', NULL, 0, 33, 'cashbacksummary');
|
28 |
0.39 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '23' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
29 |
0.11 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "15000"
3 => "0.00"
4 => "0"
5 => "15000"
6 => "0"
7 => "0"
8 => "15000"
9 => "0"
10 => null
11 => 0
12 => 23
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '15000', '0.00', '0', '15000', '0', '0', '15000', '0', NULL, 0, 23, 'cashbacksummary');
|
30 |
0.44 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '25' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
31 |
0.08 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "15000"
3 => "0.00"
4 => "0"
5 => "15000"
6 => "0"
7 => "0"
8 => "15000"
9 => "0"
10 => null
11 => 0
12 => 25
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '15000', '0.00', '0', '15000', '0', '0', '15000', '0', NULL, 0, 25, 'cashbacksummary');
|
32 |
0.45 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '104' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
33 |
0.10 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "600.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "600"
10 => null
11 => 0
12 => 104
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '600.00', '0', '0', '0', '0', '0', '600', NULL, 0, 104, 'cashbacksummary');
|
34 |
0.46 ms |
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = ? AND t0.discriminator_type IN ('chainstore') LIMIT 1
SELECT
t0.id AS id_1,
t0.corporate_number AS corporate_number_2,
t0.stock_number AS stock_number_3,
t0.timestamp AS timestamp_4,
t0.contract_begin_ymd AS contract_begin_ymd_5,
t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6,
t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7,
t0.company_name AS company_name_8,
t0.company_name_kana AS company_name_kana_9,
t0.torokubango AS torokubango_10,
t0.begin_day AS begin_day_11,
t0.chainstore_postal_code AS chainstore_postal_code_12,
t0.chainstore_address_full AS chainstore_address_full_13,
t0.chainstore_address01 AS chainstore_address01_14,
t0.chainstore_address02 AS chainstore_address02_15,
t0.addr01_ka AS addr01_ka_16,
t0.full_name AS full_name_17,
t0.name01 AS name01_18,
t0.name02 AS name02_19,
t0.kana01 AS kana01_20,
t0.kana02 AS kana02_21,
t0.contact_phone_number AS contact_phone_number_22,
t0.cellphone_number AS cellphone_number_23,
t0.mediator_company_name AS mediator_company_name_24,
t0.mediator_company_name_kana AS mediator_company_name_kana_25,
t0.mediator_fullname AS mediator_fullname_26,
t0.mediator_name01 AS mediator_name01_27,
t0.mediator_name02 AS mediator_name02_28,
t0.mediator_kana01 AS mediator_kana01_29,
t0.mediator_kana02 AS mediator_kana02_30,
t0.mediator_address01 AS mediator_address01_31,
t0.dealer_code AS dealer_code_32,
t0.mediator_phone_number AS mediator_phone_number_33,
t0.bank_branch_id AS bank_branch_id_34,
t0.bank_account AS bank_account_35,
t0.code_number AS code_number_36,
t0.account_number AS account_number_37,
t0.bank_holder_name AS bank_holder_name_38,
t0.bank_holder AS bank_holder_39,
t0.chainstore_business_other_type AS chainstore_business_other_type_40,
t0.chainstore_name AS chainstore_name_41,
t0.chainstore_name_kana AS chainstore_name_kana_42,
t0.operating_name AS operating_name_43,
t0.operating_kana AS operating_kana_44,
t0.postal_code AS postal_code_45,
t0.addr02 AS addr02_46,
t0.addr03 AS addr03_47,
t0.main_name01 AS main_name01_48,
t0.main_name02 AS main_name02_49,
t0.main_kana01 AS main_kana01_50,
t0.main_kana02 AS main_kana02_51,
t0.phone_number AS phone_number_52,
t0.chainstore_email AS chainstore_email_53,
t0.option_webshop AS option_webshop_54,
t0.webshop_name AS webshop_name_55,
t0.webshop_url AS webshop_url_56,
t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57,
t0.webshop_main_operation_name AS webshop_main_operation_name_58,
t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59,
t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60,
t0.option_partner AS option_partner_61,
t0.partner_company_name AS partner_company_name_62,
t0.partner_company_name_kana AS partner_company_name_kana_63,
t0.partner_name01 AS partner_name01_64,
t0.partner_name02 AS partner_name02_65,
t0.partner_kana01 AS partner_kana01_66,
t0.partner_kana02 AS partner_kana02_67,
t0.partner_phone_number AS partner_phone_number_68,
t0.shop_day_off AS shop_day_off_69,
t0.shop_opening_time AS shop_opening_time_70,
t0.shop_website_url AS shop_website_url_71,
t0.shop_website_isopen AS shop_website_isopen_72,
t0.negotiate_start_date AS negotiate_start_date_73,
t0.memo AS memo_74,
t0.shop_image AS shop_image_75,
t0.shop_shikaku AS shop_shikaku_76,
t0.shop_todokede AS shop_todokede_77,
t0.shop_kyoka AS shop_kyoka_78,
t0.coupon_name_option AS coupon_name_option_79,
t0.note AS note_80,
t0.create_date AS create_date_81,
t0.update_date AS update_date_82,
t0.option_order_limit AS option_order_limit_83,
t0.order_limit_text AS order_limit_text_84,
t0.margin_price AS margin_price_85,
t0.margin_not_included AS margin_not_included_86,
t0.margin_not_included_update_time AS margin_not_included_update_time_87,
t0.purchasing_limit_price AS purchasing_limit_price_88,
t0.delivery_registrations AS delivery_registrations_89,
t0.sort_no AS sort_no_90,
t0.special AS special_91,
t0.owner_same_representative AS owner_same_representative_92,
t0.owner_name01 AS owner_name01_93,
t0.owner_name02 AS owner_name02_94,
t0.owner_kana01 AS owner_kana01_95,
t0.owner_kana02 AS owner_kana02_96,
t0.owner_postal_code AS owner_postal_code_97,
t0.owner_address01 AS owner_address01_98,
t0.owner_address02 AS owner_address02_99,
t0.owner_addr01_ka AS owner_addr01_ka_100,
t0.owner_department_name AS owner_department_name_101,
t0.owner_phone_number AS owner_phone_number_102,
t0.owner_email AS owner_email_103,
t0.direct_contract AS direct_contract_104,
t0.pre_chainstore_id AS pre_chainstore_id_105,
t0.contract_type_id AS contract_type_id_106,
t0.applicant_contract_type_id AS applicant_contract_type_id_107,
t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108,
t0.pref_id AS pref_id_109,
t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110,
t0.bank_id AS bank_id_111,
t0.bank_account_type_id AS bank_account_type_id_112,
t0.related_chainstore_type_id AS related_chainstore_type_id_113,
t0.chainstore_business_type_id AS chainstore_business_type_id_114,
t0.chainstore_provide_type_id AS chainstore_provide_type_id_115,
t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116,
t0.addr01_id AS addr01_id_117,
t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118,
t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119,
t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120,
t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121,
t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122,
t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123,
t0.chain_store_status_id AS chain_store_status_id_124,
t0.owner_pref_id AS owner_pref_id_125,
t0.discriminator_type
FROM
dtb_chain_store t0
WHERE
t0.id = ?
AND t0.discriminator_type IN ('chainstore')
LIMIT
1
SELECT t0.id AS id_1, t0.corporate_number AS corporate_number_2, t0.stock_number AS stock_number_3, t0.timestamp AS timestamp_4, t0.contract_begin_ymd AS contract_begin_ymd_5, t0.auto_usage_fee_begin_ymd AS auto_usage_fee_begin_ymd_6, t0.auto_usage_fee_end_ymd AS auto_usage_fee_end_ymd_7, t0.company_name AS company_name_8, t0.company_name_kana AS company_name_kana_9, t0.torokubango AS torokubango_10, t0.begin_day AS begin_day_11, t0.chainstore_postal_code AS chainstore_postal_code_12, t0.chainstore_address_full AS chainstore_address_full_13, t0.chainstore_address01 AS chainstore_address01_14, t0.chainstore_address02 AS chainstore_address02_15, t0.addr01_ka AS addr01_ka_16, t0.full_name AS full_name_17, t0.name01 AS name01_18, t0.name02 AS name02_19, t0.kana01 AS kana01_20, t0.kana02 AS kana02_21, t0.contact_phone_number AS contact_phone_number_22, t0.cellphone_number AS cellphone_number_23, t0.mediator_company_name AS mediator_company_name_24, t0.mediator_company_name_kana AS mediator_company_name_kana_25, t0.mediator_fullname AS mediator_fullname_26, t0.mediator_name01 AS mediator_name01_27, t0.mediator_name02 AS mediator_name02_28, t0.mediator_kana01 AS mediator_kana01_29, t0.mediator_kana02 AS mediator_kana02_30, t0.mediator_address01 AS mediator_address01_31, t0.dealer_code AS dealer_code_32, t0.mediator_phone_number AS mediator_phone_number_33, t0.bank_branch_id AS bank_branch_id_34, t0.bank_account AS bank_account_35, t0.code_number AS code_number_36, t0.account_number AS account_number_37, t0.bank_holder_name AS bank_holder_name_38, t0.bank_holder AS bank_holder_39, t0.chainstore_business_other_type AS chainstore_business_other_type_40, t0.chainstore_name AS chainstore_name_41, t0.chainstore_name_kana AS chainstore_name_kana_42, t0.operating_name AS operating_name_43, t0.operating_kana AS operating_kana_44, t0.postal_code AS postal_code_45, t0.addr02 AS addr02_46, t0.addr03 AS addr03_47, t0.main_name01 AS main_name01_48, t0.main_name02 AS main_name02_49, t0.main_kana01 AS main_kana01_50, t0.main_kana02 AS main_kana02_51, t0.phone_number AS phone_number_52, t0.chainstore_email AS chainstore_email_53, t0.option_webshop AS option_webshop_54, t0.webshop_name AS webshop_name_55, t0.webshop_url AS webshop_url_56, t0.chainstore_webshop_opening_other_type AS chainstore_webshop_opening_other_type_57, t0.webshop_main_operation_name AS webshop_main_operation_name_58, t0.chainstore_webshop_phone_other_type AS chainstore_webshop_phone_other_type_59, t0.chainstore_webshop_mail_other_type AS chainstore_webshop_mail_other_type_60, t0.option_partner AS option_partner_61, t0.partner_company_name AS partner_company_name_62, t0.partner_company_name_kana AS partner_company_name_kana_63, t0.partner_name01 AS partner_name01_64, t0.partner_name02 AS partner_name02_65, t0.partner_kana01 AS partner_kana01_66, t0.partner_kana02 AS partner_kana02_67, t0.partner_phone_number AS partner_phone_number_68, t0.shop_day_off AS shop_day_off_69, t0.shop_opening_time AS shop_opening_time_70, t0.shop_website_url AS shop_website_url_71, t0.shop_website_isopen AS shop_website_isopen_72, t0.negotiate_start_date AS negotiate_start_date_73, t0.memo AS memo_74, t0.shop_image AS shop_image_75, t0.shop_shikaku AS shop_shikaku_76, t0.shop_todokede AS shop_todokede_77, t0.shop_kyoka AS shop_kyoka_78, t0.coupon_name_option AS coupon_name_option_79, t0.note AS note_80, t0.create_date AS create_date_81, t0.update_date AS update_date_82, t0.option_order_limit AS option_order_limit_83, t0.order_limit_text AS order_limit_text_84, t0.margin_price AS margin_price_85, t0.margin_not_included AS margin_not_included_86, t0.margin_not_included_update_time AS margin_not_included_update_time_87, t0.purchasing_limit_price AS purchasing_limit_price_88, t0.delivery_registrations AS delivery_registrations_89, t0.sort_no AS sort_no_90, t0.special AS special_91, t0.owner_same_representative AS owner_same_representative_92, t0.owner_name01 AS owner_name01_93, t0.owner_name02 AS owner_name02_94, t0.owner_kana01 AS owner_kana01_95, t0.owner_kana02 AS owner_kana02_96, t0.owner_postal_code AS owner_postal_code_97, t0.owner_address01 AS owner_address01_98, t0.owner_address02 AS owner_address02_99, t0.owner_addr01_ka AS owner_addr01_ka_100, t0.owner_department_name AS owner_department_name_101, t0.owner_phone_number AS owner_phone_number_102, t0.owner_email AS owner_email_103, t0.direct_contract AS direct_contract_104, t0.pre_chainstore_id AS pre_chainstore_id_105, t0.contract_type_id AS contract_type_id_106, t0.applicant_contract_type_id AS applicant_contract_type_id_107, t0.auto_usage_fee_payment_id AS auto_usage_fee_payment_id_108, t0.pref_id AS pref_id_109, t0.chainstore_trading_account_type_id AS chainstore_trading_account_type_id_110, t0.bank_id AS bank_id_111, t0.bank_account_type_id AS bank_account_type_id_112, t0.related_chainstore_type_id AS related_chainstore_type_id_113, t0.chainstore_business_type_id AS chainstore_business_type_id_114, t0.chainstore_provide_type_id AS chainstore_provide_type_id_115, t0.chainstore_provide_style_type_id AS chainstore_provide_style_type_id_116, t0.addr01_id AS addr01_id_117, t0.chainstore_webshop_opening_type_id AS chainstore_webshop_opening_type_id_118, t0.chainstore_webshop_owner_type_id AS chainstore_webshop_owner_type_id_119, t0.chainstore_webshop_phone_type_id AS chainstore_webshop_phone_type_id_120, t0.chainstore_webshop_mail_type_id AS chainstore_webshop_mail_type_id_121, t0.chain_store_make_contract_type_id AS chain_store_make_contract_type_id_122, t0.chain_store_make_contract_type2_id AS chain_store_make_contract_type2_id_123, t0.chain_store_status_id AS chain_store_status_id_124, t0.owner_pref_id AS owner_pref_id_125, t0.discriminator_type FROM dtb_chain_store t0 WHERE t0.id = '7' AND t0.discriminator_type IN ('chainstore') LIMIT 1;
|
35 |
0.08 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "15000"
3 => "0.00"
4 => "0"
5 => "15000"
6 => "0"
7 => "0"
8 => "15000"
9 => "0"
10 => null
11 => 0
12 => 7
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '15000', '0.00', '0', '15000', '0', '0', '15000', '0', NULL, 0, 7, 'cashbacksummary');
|
36 |
0.11 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "1650.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "1650"
10 => null
11 => 0
12 => 2
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '1650.00', '0', '0', '0', '0', '0', '1650', NULL, 0, 2, 'cashbacksummary');
|
37 |
0.12 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "900.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "900"
10 => null
11 => 0
12 => 106
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '900.00', '0', '0', '0', '0', '0', '900', NULL, 0, 106, 'cashbacksummary');
|
38 |
0.11 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "277.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "277"
10 => null
11 => 0
12 => 60
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '277.00', '0', '0', '0', '0', '0', '277', NULL, 0, 60, 'cashbacksummary');
|
39 |
0.18 ms |
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1 => "2024-09"
2 => "0"
3 => "555.00"
4 => "0"
5 => "0"
6 => "0"
7 => "0"
8 => "0"
9 => "555"
10 => null
11 => 0
12 => 5
13 => "cashbacksummary"
]
INSERT INTO dtb_cashback_summary (reference_ym, margin_price, previous_margin_price, coupon_margin, oen_support_total, purchase_amount, request_amount, margin_balance, carried_forward, note, export_cnt, chain_store_id, discriminator_type) VALUES ('2024-09', '0', '555.00', '0', '0', '0', '0', '0', '555', NULL, 0, 5, 'cashbacksummary');
|
40 |
1.92 ms |
SELECT t0.url_parameter AS url_parameter_1, t0.reg_url_parameter AS reg_url_parameter_2, t0.reg_dc_url_parameter AS reg_dc_url_parameter_3, t0.page_coupon_list AS page_coupon_list_4, t0.page_coupon_analytic AS page_coupon_analytic_5, t0.is_hidden AS is_hidden_6, t0.show_product AS show_product_7, t0.payment_limit AS payment_limit_8, t0.payment_limit_corporate AS payment_limit_corporate_9, t0.payment_limit_corporate_sp AS payment_limit_corporate_sp_10, t0.payment_limit_sole_proprietor AS payment_limit_sole_proprietor_11, t0.payment_limit_sole_proprietor_sp AS payment_limit_sole_proprietor_sp_12, t0.payment_limit_person AS payment_limit_person_13, t0.payment_limit_person_sp AS payment_limit_person_sp_14, t0.id AS id_15, t0.name AS name_16, t0.sort_no AS sort_no_17, t0.class_category_id AS class_category_id_18, t0.discriminator_type FROM mtb_contract_type t0 WHERE t0.id = ? AND t0.discriminator_type IN ('contracttype')
SELECT t0.url_parameter AS url_parameter_1, t0.reg_url_parameter AS reg_url_parameter_2, t0.reg_dc_url_parameter AS reg_dc_url_parameter_3, t0.page_coupon_list AS page_coupon_list_4, t0.page_coupon_analytic AS page_coupon_analytic_5, t0.is_hidden AS is_hidden_6, t0.show_product AS show_product_7, t0.payment_limit AS payment_limit_8, t0.payment_limit_corporate AS payment_limit_corporate_9, t0.payment_limit_corporate_sp AS payment_limit_corporate_sp_10, t0.payment_limit_sole_proprietor AS payment_limit_sole_proprietor_11, t0.payment_limit_sole_proprietor_sp AS payment_limit_sole_proprietor_sp_12, t0.payment_limit_person AS payment_limit_person_13, t0.payment_limit_person_sp AS payment_limit_person_sp_14, t0.id AS id_15, t0.name AS name_16, t0.sort_no AS sort_no_17, t0.class_category_id AS class_category_id_18, t0.discriminator_type FROM mtb_contract_type t0 WHERE t0.id = 2 AND t0.discriminator_type IN ('contracttype');
|