| | |
| | | values (?, ?, 'EXCELLENT', 'Store consume 10 percent off', 0.9000, 1, 1) |
| | | """, "rule-" + System.nanoTime(), merchantId); |
| | | String suffix = String.valueOf(System.nanoTime()); |
| | | // A paid store-consumption order may only be created once the merchant can actually collect, |
| | | // so the fixture approves the onboarding and its settlement card. |
| | | String reference = suffix.substring(Math.max(0, suffix.length() - 8)); |
| | | jdbc.update(""" |
| | | insert into merchant_onboarding_application(merchant_id, store_id, application_no, subject_type, subject_name, |
| | | contact_name, contact_mobile, idempotency_key, status, provider_huifu_id, |
| | | auto_settle_status, cash_switch_status, merchant_stat, capability_verified_at) |
| | | values (?, ?, ?, 'individual', 'Verification owner', 'Verification owner', '13800000000', ?, 'approved', ?, '0', '1', 'NORMAL', current_timestamp) |
| | | """, merchantId, storeId, "MO-VERIFY-" + suffix, "verification-onboarding-" + suffix, "H" + reference); |
| | | Long applicationId = jdbc.queryForObject("select max(id) from merchant_onboarding_application", Long.class); |
| | | jdbc.update(""" |
| | | insert into merchant_bank_card(merchant_id, store_id, bank_name, branch_name, city_code, card_tail, card_masked, |
| | | card_hash, status, idempotency_key, provider_token_no) |
| | | values (?, ?, '中国建设银行', '攀枝花东区支行', '510400', '8888', '**** **** **** 8888', ?, 'approved', ?, ?) |
| | | """, merchantId, storeId, "hash-verification-" + suffix, "verification-card-" + suffix, "T" + reference); |
| | | jdbc.update("update merchant_onboarding_application set initial_bank_card_id = (select max(id) from merchant_bank_card) where id = ?", applicationId); |
| | | jdbc.update(""" |
| | | insert into talent_user(openid, name, mobile, talent_level, status, deleted) |
| | | values (?, ?, ?, ?, 1, 0) |