Example #1
0
 def test_005_del_merchant(self):
     """
     删除商户信息
     :return:
     """
     merchant_uuids = xqkj_query.get_tbl_infos('Tbl_MerchantProfile', 'merchant_uuid',
                                               'POSITION("{}" IN name)'.format(loginAction.sign))
     store_uuids = xqkj_query.get_tbl_infos('Tbl_Store', 'store_uuid',
                                            'POSITION("{}" IN manager_name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_MerchantProfile', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_Store', 'POSITION("{}" IN manager_name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_MerchantProfile', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantStoreRelation', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantMoneyConfig', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantLegalPersonRelation', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantImage', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantClearingAccountRelation', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantBusinessInformationRelation', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_BDMerchantRelation', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_WX_MerchantInformationDesc', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_LoanCount', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantProfileBond', 'merchant_uuid', merchant_uuids)
     xqkj_query.delete_infos('Tbl_MerchantStoreRelation', 'store_uuid', store_uuids)
     xqkj_query.delete_infos('Tbl_WX_UserStoreRelation', 'store_uuid', store_uuids)
     xqkj_query.delete_infos('Tbl_StoreBusiness', 'store_uuid', store_uuids)
     store_business_uuids = xqkj_query.select_infos('Tbl_StoreBusiness', 'store_business_uuid',
                                                    'store_uuid', store_uuids)
     xqkj_query.delete_infos('Tbl_StoreBusinessProduct', 'store_business_uuid', store_business_uuids)
     xqkj_query.delete_infos('Tbl_StoreImage', 'store_uuid', store_uuids)
     # 删除 微信 商户信息
     sht_query.update_wx_merchart_null()
     xqkj_query.delete_info('Tbl_WX_MerchantInformationDesc',
                            'created_uuid="{0}" OR updated_uuid="{0}" '.format(loginAction.wxUserUuid))
     xqkj_query.delete_info('Tbl_WX_UserStoreRelation', 'wx_user_uuid="{}"'.format(loginAction.wxUserUuid))
Example #2
0
 def test_005_del_merchant(self):
     # 删除商户信息
     merchant_uuids = xqkj_query.get_tbl_infos(
         'Tbl_MerchantProfile', 'merchant_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     store_uuids = xqkj_query.get_tbl_infos(
         'Tbl_Store', 'store_uuid',
         'POSITION("{}" IN manager_name)'.format(loginAction.sign))
     print(merchant_uuids)
     print(store_uuids)
     xqkj_query.delete_info(
         'Tbl_MerchantProfile',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info(
         'Tbl_Store',
         'POSITION("{}" IN manager_name)'.format(loginAction.sign))
     for merchant_uuid in merchant_uuids:
         xqkj_query.delete_info('Tbl_MerchantProfile',
                                'merchant_uuid="{}"'.format(merchant_uuid))
         xqkj_query.delete_info('Tbl_MerchantStoreRelation',
                                'merchant_uuid="{}"'.format(merchant_uuid))
         xqkj_query.delete_info('Tbl_MerchantMoneyConfig',
                                'merchant_uuid="{}"'.format(merchant_uuid))
         xqkj_query.delete_info('Tbl_MerchantLegalPersonRelation',
                                'merchant_uuid="{}"'.format(merchant_uuid))
         xqkj_query.delete_info('Tbl_MerchantImage',
                                'merchant_uuid="{}"'.format(merchant_uuid))
         xqkj_query.delete_info('Tbl_MerchantClearingAccountRelation',
                                'merchant_uuid="{}"'.format(merchant_uuid))
         xqkj_query.delete_info('Tbl_MerchantBusinessInformationRelation',
                                'merchant_uuid="{}"'.format(merchant_uuid))
     for store_uuid in store_uuids:
         xqkj_query.delete_info('Tbl_MerchantStoreRelation',
                                'store_uuid="{}"'.format(store_uuid))
Example #3
0
 def test_003_del_product(self):
     #  删除平台商品信息
     product_detail_uuids = xqkj_query.get_tbl_infos(
         'Tbl_ProductDetail', 'product_detail_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     print(product_detail_uuids)
     xqkj_query.delete_info(
         'Tbl_ProductDetail',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     for product_detail_uuid in product_detail_uuids:
         product_detail_config_uuids = xqkj_query.get_tbl_infos(
             'Tbl_ProductDetailConfig', 'product_detail_config_uuid',
             'product_detail_uuid="{}"'.format(product_detail_uuid))
         print(product_detail_config_uuids)
         xqkj_query.delete_info(
             'Tbl_ProductDetailConfig',
             'product_detail_uuid="{}"'.format(product_detail_uuid))
         for product_detail_config_uuid in product_detail_config_uuids:
             xqkj_query.delete_info(
                 'Tbl_ProductDetailConfigMerchantRelation',
                 'product_detail_config_uuid="{}"'.format(
                     product_detail_config_uuid))
         xqkj_query.delete_info(
             'Tbl_ProductFundPackageRelation',
             'product_detail_uuid="{}"'.format(product_detail_uuid))
         xqkj_query.delete_info(
             'Tbl_ProductMerchantRelation',
             'product_detail_uuid="{}"'.format(product_detail_uuid))
Example #4
0
 def test_004_del_fundside(self):
     """
     删除平台资金信息
     :return:
     """
     fund_package_uuids = xqkj_query.get_tbl_infos('Tbl_FundPackage', 'fund_package_uuid',
                                                   'POSITION("{}" IN name)'.format(loginAction.sign))
     fund_side_uuids = xqkj_query.get_tbl_infos('Tbl_FundSide', 'fund_side_uuid',
                                                'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_FundPackage', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_FundSide', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_FundSidePackageRelation', 'fund_package_uuid', fund_package_uuids)
     xqkj_query.delete_infos('Tbl_FundSidePackageRelation', 'fund_side_uuid', fund_side_uuids)
Example #5
0
 def test_002_del_user(self):
     """
     删除平台用户信息
     :return:
     """
     user_uuids = xqkj_query.get_tbl_infos('Tbl_PlatformUserProfile', 'platform_user_profile_uuid',
                                           'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_PlatformUserProfile', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_PlatformUserPrivilegeRelation', 'platform_user_uuid', user_uuids)
Example #6
0
 def test_008_del_clearingAccount(self):
     """
     删除平台机构结算信息
     :return:
     """
     clearing_account_uuids = xqkj_query.get_tbl_infos('Tbl_ClearingAccount', 'clearing_account_uuid',
                                                       'POSITION("{}" IN account_name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_ClearingAccount', 'POSITION("{}" IN account_name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_MerchantClearingAccountRelation', 'clearing_account_uuid', clearing_account_uuids)
     xqkj_query.delete_infos('Tbl_ChannelClearingAccountRelation', 'clearing_account_uuid', clearing_account_uuids)
Example #7
0
    def test_009_del_template(self):
        """
        删除进件配置信息
        :return:
        """
        product_template_uuids = xqkj_query.get_tbl_infos('Tbl_ProductParamTemplate', 'product_template_uuid',
                                                          'POSITION("{}" IN template_name)'.format(loginAction.sign))
        xqkj_query.delete_info('Tbl_ProductParamTemplate', 'POSITION("{}" IN template_name)'.format(loginAction.sign))

        xqkj_query.delete_infos('Tbl_ProductParamTemplateConfig', 'product_template_uuid', product_template_uuids)
Example #8
0
 def test_007_del_legalPerson(self):
     """
     删除平台法人代表信息
     :return:
     """
     legal_person_uuids = xqkj_query.get_tbl_infos('Tbl_LegalPerson', 'legal_person_uuid',
                                                   'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_LegalPerson', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_MerchantLegalPersonRelation', 'legal_person_uuid', legal_person_uuids)
     xqkj_query.delete_infos('Tbl_ChannelLegalPersonRelation', 'legal_person_uuid', legal_person_uuids)
Example #9
0
 def test_019_del_bd(self):
     """
     删除BD数据
     :return:
     """
     bd_info_uuids = xqkj_query.get_tbl_infos('Tbl_BDInfo', 'bd_info_uuid',
                                              'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_BDInfo', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_BDMerchantRelation', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_BDInfoLog', 'bd_info_uuid', bd_info_uuids)
     xqkj_query.delete_infos('Tbl_BDMerchantRelation', 'bd_info_uuid', bd_info_uuids)
Example #10
0
 def test_009_del_businessInformation(self):
     """
     删除平台机构结算信息
     :return:
     """
     business_information_uuids = xqkj_query.get_tbl_infos('Tbl_BusinessInformation', 'business_information_uuid',
                                                           'POSITION("{}" IN email)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_BusinessInformation', 'POSITION("{}" IN email)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_ChannelBusinessInformationRelation', 'business_information_uuid',
                             business_information_uuids)
     xqkj_query.delete_infos('Tbl_MerchantBusinessInformationRelation', 'business_information_uuid',
                             business_information_uuids)
Example #11
0
 def test_002_del_user(self):
     # 删除平台用户信息
     user_uuids = xqkj_query.get_tbl_infos(
         'Tbl_PlatformUserProfile', 'platform_user_profile_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     print(user_uuids)
     xqkj_query.delete_info(
         'Tbl_PlatformUserProfile',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     for user_uuid in user_uuids:
         xqkj_query.delete_info('Tbl_PlatformUserPrivilegeRelation',
                                'platform_user_uuid="{}"'.format(user_uuid))
Example #12
0
 def test_009_del_template(self):
     # 删除进件配置信息
     product_template_uuids = xqkj_query.get_tbl_infos(
         'Tbl_ProductParamTemplate', 'product_template_uuid',
         'POSITION("{}" IN template_name)'.format(loginAction.sign))
     print(product_template_uuids)
     xqkj_query.delete_info(
         'Tbl_ProductParamTemplate',
         'POSITION("{}" IN template_name)'.format(loginAction.sign))
     for product_template_uuid in product_template_uuids:
         xqkj_query.delete_info(
             'Tbl_ProductParamTemplateConfig',
             'product_template_uuid="{}"'.format(product_template_uuid))
Example #13
0
 def test_006_del_channel(self):
     """
     删除渠道信息
     :return:
     """
     channel_uuids = xqkj_query.get_tbl_infos('Tbl_ChannelProfile', 'channel_uuid',
                                              'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_ChannelProfile', 'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_infos('Tbl_ChannelMerchantRelation', 'channel_uuid', channel_uuids)
     xqkj_query.delete_infos('Tbl_ChannelLegalPersonRelation', 'channel_uuid', channel_uuids)
     xqkj_query.delete_infos('Tbl_ChannelClearingAccountRelation', 'channel_uuid', channel_uuids)
     xqkj_query.delete_infos('Tbl_ChannelBusinessInformationRelation', 'channel_uuid', channel_uuids)
     xqkj_query.delete_infos('Tbl_BDInfo', 'channel_uuid', channel_uuids)
Example #14
0
 def test_004_del_fundside(self):
     # 删除平台资金信息
     fund_package_uuids = xqkj_query.get_tbl_infos(
         'Tbl_FundPackage', 'fund_package_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     fund_side_uuids = xqkj_query.get_tbl_infos(
         'Tbl_FundSide', 'fund_side_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     print(fund_package_uuids)
     print(fund_side_uuids)
     xqkj_query.delete_info(
         'Tbl_FundPackage',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info(
         'Tbl_FundSide', 'POSITION("{}" IN name)'.format(loginAction.sign))
     for fund_package_uuid in fund_package_uuids:
         xqkj_query.delete_info(
             'Tbl_FundSidePackageRelation',
             'fund_package_uuid="{}"'.format(fund_package_uuid))
     for fund_side_uuid in fund_side_uuids:
         xqkj_query.delete_info(
             'Tbl_FundSidePackageRelation',
             'fund_side_uuid="{}"'.format(fund_side_uuid))
Example #15
0
 def test_001_api_78dk_app_process_saveContractImages(self):
     """
     保存影像资料
     :return:
     """
     contract_uuid1 = xqkj_query.get_contract_uuid_for_user(
         loginAction.global_dict.get('user_uuid'))
     image_keys = xqkj_query.get_tbl_infos(
         'Tbl_ContractImage', '`key`',
         'contract_uuid="{}"'.format(contract_uuid1))
     contractimagelist = [{"key": image_key} for image_key in image_keys]
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveContractImages(
             contractimagelist=contractimagelist))
     Assertion.verity(res['code'], '10000')
Example #16
0
 def test_003_del_product(self):
     """
     删除平台商品信息
     :return:
     """
     product_detail_uuids = xqkj_query.get_tbl_infos('Tbl_ProductDetail', 'product_detail_uuid',
                                                     'POSITION("{}" IN name)'.format(loginAction.sign))
     xqkj_query.delete_info('Tbl_ProductDetail', 'POSITION("{}" IN name)'.format(loginAction.sign))
     product_detail_config_uuids = xqkj_query.select_infos('Tbl_ProductDetailConfig',
         'product_detail_config_uuid', 'product_detail_uuid', product_detail_uuids)
     xqkj_query.delete_infos('Tbl_ProductDetailConfig', 'product_detail_uuid', product_detail_uuids)
     xqkj_query.delete_infos('Tbl_ProductDetailConfigMerchantRelation', 'product_detail_config_uuid',
                             product_detail_config_uuids)
     xqkj_query.delete_infos('Tbl_ProductFundPackageRelation', 'product_detail_uuid', product_detail_uuids)
     xqkj_query.delete_infos('Tbl_ProductMerchantRelation', 'product_detail_uuid', product_detail_uuids)
     xqkj_query.delete_infos('Tbl_ProductEarlySettle', 'product_detail_uuid', product_detail_uuids)
Example #17
0
 def test_007_del_legalPerson(self):
     # 删除平台法人代表信息
     legal_person_uuids = xqkj_query.get_tbl_infos(
         'Tbl_LegalPerson', 'legal_person_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     print(legal_person_uuids)
     xqkj_query.delete_info(
         'Tbl_LegalPerson',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     for legal_person_uuid in legal_person_uuids:
         xqkj_query.delete_info(
             'Tbl_MerchantLegalPersonRelation',
             'legal_person_uuid="{}"'.format(legal_person_uuid))
         xqkj_query.delete_info(
             'Tbl_ChannelLegalPersonRelation',
             'legal_person_uuid="{}"'.format(legal_person_uuid))
Example #18
0
 def test_008_del_clearingAccount(self):
     # 删除平台机构结算信息
     clearing_account_uuids = xqkj_query.get_tbl_infos(
         'Tbl_ClearingAccount', 'clearing_account_uuid',
         'POSITION("{}" IN account_name)'.format(loginAction.sign))
     print(clearing_account_uuids)
     xqkj_query.delete_info(
         'Tbl_ClearingAccount',
         'POSITION("{}" IN account_name)'.format(loginAction.sign))
     for clearing_account_uuid in clearing_account_uuids:
         xqkj_query.delete_info(
             'Tbl_MerchantClearingAccountRelation',
             'clearing_account_uuid="{}"'.format(clearing_account_uuid))
         xqkj_query.delete_info(
             'Tbl_ChannelClearingAccountRelation',
             'clearing_account_uuid="{}"'.format(clearing_account_uuid))
Example #19
0
 def test_006_del_channel(self):
     channel_uuids = xqkj_query.get_tbl_infos(
         'Tbl_ChannelProfile', 'channel_uuid',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     print(channel_uuids)
     xqkj_query.delete_info(
         'Tbl_ChannelProfile',
         'POSITION("{}" IN name)'.format(loginAction.sign))
     for channel_uuid in channel_uuids:
         xqkj_query.delete_info('Tbl_ChannelMerchantRelation',
                                'channel_uuid="{}"'.format(channel_uuid))
         xqkj_query.delete_info('Tbl_ChannelLegalPersonRelation',
                                'channel_uuid="{}"'.format(channel_uuid))
         xqkj_query.delete_info('Tbl_ChannelClearingAccountRelation',
                                'channel_uuid="{}"'.format(channel_uuid))
         xqkj_query.delete_info('Tbl_ChannelBusinessInformationRelation',
                                'channel_uuid="{}"'.format(channel_uuid))
Example #20
0
 def test_026_api_78dk_platform_sys_privilege_saveUserPrivilege_all_privilege(
         self):
     # 新增/修改权限
     privilege_uuids = xqkj_query.get_tbl_infos('Tbl_PlatformPrivilege',
                                                'platform_privilege_uuid',
                                                'state ="enabled"')
     user_uuid = xqkj_query.get_info('Tbl_PlatformUserProfile',
                                     'platform_user_profile_uuid',
                                     'name="{}"'.format(name),
                                     'state ="enabled"')[0]
     privilege = [{
         "platformPrivilegeUuid": uid,
         "platformUserUuid": user_uuid
     } for uid in privilege_uuids]
     res = specialAction.test_api_78dk_platform_sys_privilege_saveUserPrivilege(
         privilege)
     Assertion.verity(json.loads(res)['code'], '10000')
     Assertion.verity(json.loads(res)['msg'], '成功')
Example #21
0
 def test_009_del_businessInformation(self):
     # 删除平台机构结算信息
     business_information_uuids = xqkj_query.get_tbl_infos(
         'Tbl_BusinessInformation', 'business_information_uuid',
         'POSITION("{}" IN email)'.format(loginAction.sign))
     print(business_information_uuids)
     xqkj_query.delete_info(
         'Tbl_BusinessInformation',
         'POSITION("{}" IN email)'.format(loginAction.sign))
     for business_information_uuid in business_information_uuids:
         xqkj_query.delete_info(
             'Tbl_ChannelBusinessInformationRelation',
             'business_information_uuid="{}"'.format(
                 business_information_uuid))
         xqkj_query.delete_info(
             'Tbl_MerchantBusinessInformationRelation',
             'business_information_uuid="{}"'.format(
                 business_information_uuid))
Example #22
0
 def test_010_del_contract(self):
     """
     删除订单信息
     :return:
     """
     user_uuid = loginAction.get_user_uuid()
     contract_uuids = xqkj_query.get_tbl_infos('Tbl_Contract', 'contract_uuid', 'user_uuid="{}"'.format(user_uuid))
     xqkj_query.delete_info('Tbl_Contract', 'user_uuid="{}"'.format(user_uuid))
     xqkj_query.delete_infos('Tbl_ContractCustomerLabel', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_ContractImage', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_ContractInfo', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_ContractOperationLog', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_FinalCheckLog', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_FirstCheckLog', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_TelephoneCheckLog', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_QifaMachineLog', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_AuditComment', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_AuditCommentAttachment', 'contract_uuid', contract_uuids)
     xqkj_query.delete_infos('Tbl_AuditMonitor', 'contract_uuid', contract_uuids)