commit
1747b19c18
@ -0,0 +1,46 @@
|
|||||||
|
--2020-11-24微信渠道-商户进件字段添加
|
||||||
|
alter table sys_wx_merchant_apply modify contact_phone varchar(20) not null;
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add merchant_country_code varchar(5) not null comment '商户国家编码';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add extra_merchant_type varchar(15) not null comment '商户类型:1.Enterprise 2.Individual';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add mcc_code varchar(4) not null comment 'Mcc编码';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add extra_reg_cer_number varchar(50) null comment '公司注册文件编号';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add extra_reg_cer_exp_date varchar(10) null comment '公司注册文件日期,格式:yyyy-MM-dd';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add stores_address varchar(128) null comment '店铺地址';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add business_type varchar(10) not null comment 'BOTH,OFFLINE,ONLINE,固定值为BOTH';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add director_name varchar(128) null comment '董事';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add director_id_number varchar(128) null comment '董事身份证号';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add principal_name varchar(128) null comment '负责人';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add principal_id_number varchar(128) null comment '负责人身份证号';
|
||||||
|
|
||||||
|
alter table sys_wx_merchant_apply
|
||||||
|
add is_valid tinyint(1) default '1' null comment '微信子商户进件信息是否有效';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- 商户表 增加信息
|
||||||
|
|
||||||
|
ALTER TABLE `sys_clients`
|
||||||
|
ADD COLUMN certificat_expire_date date DEFAULT NULL COMMENT '注册证书过期时间';
|
@ -0,0 +1,24 @@
|
|||||||
|
define(['../app'], function (app) {
|
||||||
|
'use strict';
|
||||||
|
var businessTypesMap = [
|
||||||
|
{
|
||||||
|
"label": "Both",
|
||||||
|
"value": "BOTH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Offline scenario",
|
||||||
|
"value": "OFFLINE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Online scenario",
|
||||||
|
"value": "ONLINE"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
app.factory('businessTypesMap', function () {
|
||||||
|
return {
|
||||||
|
configs: function () {
|
||||||
|
return businessTypesMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,320 @@
|
|||||||
|
<div class="content">
|
||||||
|
<form novalidate name="subForm">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Apply Wechat Sub Merchant Id</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="merchant_name_input">* Merchant Name</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_name"
|
||||||
|
type="text" name="merchant_name" id="merchant_name_input" required maxlength="50">
|
||||||
|
<div ng-messages="subForm.merchant_name.$error" ng-if="subForm.merchant_name.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_id.$invalid && subForm.merchant_id.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="business_category_input">* Merchant ID</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="merchant_id"
|
||||||
|
ng-model="subMerchantInfo.merchant_id"
|
||||||
|
id="merchant_id_input" required
|
||||||
|
ng-options="merchant_id.merchant_id as merchant_id.merchant_id for merchant_id in merchantIds">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.merchant_id.$error" ng-if="subForm.merchant_id.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_storename.$invalid && subForm.merchant_storename.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="merchant_storename_input">* Merchant Store Name</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.short_name"
|
||||||
|
type="text" name="merchant_storename" id="merchant_storename_input" required maxlength="50">
|
||||||
|
<div ng-messages="subForm.merchant_storename.$error" ng-if="subForm.merchant_storename.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.business_category.$invalid && subForm.business_category.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="business_category_input">* Business Category</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="business_category"
|
||||||
|
ng-model="subMerchantInfo.industry"
|
||||||
|
id="business_category_input" required
|
||||||
|
ng-options="industry.value as industry.label for industry in wxIndustries">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.businessType.$invalid && subForm.businessType.$dirty}">
|
||||||
|
<label class="control-label col-sm-3"
|
||||||
|
for="business_type_input">* Business Type</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="businessType"
|
||||||
|
ng-model="subMerchantInfo.business_type"
|
||||||
|
id="business_type_input"
|
||||||
|
ng-options="businessType.value as businessType.label for businessType in businessTypesMap">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.businessType.$error" ng-if="subForm.businessType.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-if="subMerchantInfo.business_type=='ONLINE'||subMerchantInfo.business_type=='BOTH'"
|
||||||
|
ng-class="{'has-error':subForm.company_website.$invalid && subForm.company_website.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="website_input">* Website</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_website"
|
||||||
|
type="url" name="company_website" id="website_input" required maxlength="128">
|
||||||
|
<p class="small " >( Not required when business type is Offline scenario)</p>
|
||||||
|
|
||||||
|
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="url">The beginning of http</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- store address 店铺地址 -->
|
||||||
|
<div class="form-group"
|
||||||
|
ng-if="subMerchantInfo.business_type=='OFFLINE'||subMerchantInfo.business_type=='BOTH'"
|
||||||
|
ng-class="{'has-error':subForm.address.$invalid && subForm.address.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="address_input">* Store Address</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.address"
|
||||||
|
type="text" name="address" id="address_input" required maxlength="128">
|
||||||
|
<p class="small " >(Not required when business type is Online scenario)</p>
|
||||||
|
|
||||||
|
<div ng-messages="subForm.address.$error" ng-if="subForm.address.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.office_phone.$invalid && subForm.office_phone.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="office_phone_input">* Office Phone</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_phone"
|
||||||
|
type="tel" name="office_phone" id="office_phone_input" required>
|
||||||
|
<div ng-messages="subForm.office_phone.$error" ng-if="subForm.office_phone.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.contact_name.$invalid && subForm.contact_person.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="contact_name_input">* Contact Name</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.contact_person"
|
||||||
|
type="text" name="contact_name" id="contact_name_input" required maxlength="32">
|
||||||
|
<div ng-messages="subForm.contact_name.$error" ng-if="subForm.contact_name.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 32</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.contact_phone.$invalid && subForm.contact_phone.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="contact_phone_input">* Contact Phone</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.contact_phone"
|
||||||
|
type="text" name="contact_phone" id="contact_phone_input" required maxlength="16">
|
||||||
|
<div ng-messages="subForm.contact_phone.$error" ng-if="subForm.contact_phone.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 16</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.contact_email.$invalid && subForm.contact_email.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="contact_email_input">* Contact Email</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.contact_email"
|
||||||
|
type="text" name="contact_email" id="contact_email_input" required maxlength="128">
|
||||||
|
<div ng-messages="subForm.contact_email.$error" ng-if="subForm.contact_email.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- mcc code -->
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.mcc_code.$invalid && subForm.mcc_code.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="mcc_code_input">* Mcc Code</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="mcc_code"
|
||||||
|
ng-model="subMerchantInfo.mcc_code"
|
||||||
|
id="mcc_code_input" required
|
||||||
|
ng-options="mccCode.value as mccCode.label for mccCode in wechatMccIndustries">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.mcc_code.$error" ng-if="subForm.mcc_code.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-messages="subForm.mcc_code.$error" ng-if="subForm.mcc_code.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_type.$invalid && subForm.merchant_type.$dirty}">
|
||||||
|
<label class="control-label col-sm-3"
|
||||||
|
for="merchant_type_select">* Merchant Type</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
|
||||||
|
<select class="form-control" ng-model="subMerchantInfo.merchant_type"
|
||||||
|
id="merchant_type_select"
|
||||||
|
name="merchant_type" >
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
<option value="ENTERPRISE" >ENTERPRISE</option>
|
||||||
|
<option value="INDIVIDUAL">INDIVIDUAL</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.merchant_type.$error" ng-if="subForm.merchant_type.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 公司注册号 -->
|
||||||
|
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"
|
||||||
|
ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_register_no"
|
||||||
|
type="text" name="company_register_no" id="company_register_no_input" required maxlength="50">
|
||||||
|
<div ng-messages="subForm.company_register_no.$error" ng-if="subForm.company_register_no.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 注册证书过期时间 -->
|
||||||
|
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"
|
||||||
|
ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" id="certificat_expire_date_input"
|
||||||
|
ng-model="subMerchantInfo.certificat_expire_date"
|
||||||
|
uib-datepicker-popup size="10"
|
||||||
|
required
|
||||||
|
name="certificat_expire_date"
|
||||||
|
is-open="certificat_expire_date.open"
|
||||||
|
ng-click="certificat_expire_date.open=true"
|
||||||
|
>
|
||||||
|
<div ng-messages="subForm.certificat_expire_date.$error" ng-if="subForm.certificat_expire_date.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<!– director name 法人姓名 –>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.director_name.$invalid && subForm.director_name.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="director_name_input">Director Name</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.director_name" maxlength="128"-->
|
||||||
|
<!--type="text" name="director_name" id="director_name_input">-->
|
||||||
|
<!--<div ng-messages="subForm.director_name.$error" ng-if="subForm.director_name.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<!– director id number 法人身份证号–>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.director_id_number.$invalid && subForm.director_id_number.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="director_id_number_input">Director Id</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.director_id_number" maxlength="128"-->
|
||||||
|
<!--type="text" name="director_id_number" id="director_id_number_input">-->
|
||||||
|
<!--<div ng-messages="subForm.director_id_number.$error" ng-if="subForm.director_id_number.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<!– principal name 负责人姓名 –>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type != 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.principal_name.$invalid && subForm.principal_name.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="marketing_person_input">Principal Name</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.principal_name" maxlength="128"-->
|
||||||
|
<!--type="text" name="principal_name" id="marketing_person_input">-->
|
||||||
|
<!--<div ng-messages="subForm.principal_name.$error" ng-if="subForm.principal_name.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<!– principal id number 负责人身份证号 –>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type != 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.principal_id_number.$invalid && subForm.principal_id_number.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="principal_id_number_input">Principal ID Number</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.principal_id_number" maxlength="128"-->
|
||||||
|
<!--type="text" name="principal_id_number" id="principal_id_number_input">-->
|
||||||
|
<!--<div ng-messages="subForm.principal_id_number.$error" ng-if="subForm.principal_id_number.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--end 商品基本资料-->
|
||||||
|
<!--<div class="panel panel-default">-->
|
||||||
|
<!--<div class="panel-heading">Goods Qr Code</div>-->
|
||||||
|
<!--<div class="panel-body">-->
|
||||||
|
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--end 商品二维码-->
|
||||||
|
<div class="btn-group margin-bottom margin-top">
|
||||||
|
<button class="btn btn-success" type="button"
|
||||||
|
ng-click="saveAppliy(subForm)">Submit
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
@ -0,0 +1,330 @@
|
|||||||
|
<div class="content">
|
||||||
|
<form novalidate name="subForm">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Update Apply Wechat Sub Merchant</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="merchant_name_input">* Merchant Name</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_name"
|
||||||
|
type="text" name="merchant_name" id="merchant_name_input" required maxlength="50">
|
||||||
|
<div ng-messages="subForm.merchant_name.$error" ng-if="subForm.merchant_name.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_id.$invalid && subForm.merchant_id.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="business_category_input">* Merchant ID</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="merchant_id"
|
||||||
|
ng-model="subMerchantInfo.merchant_id"
|
||||||
|
id="merchant_id_input" required
|
||||||
|
ng-options="merchant_id.merchant_id as merchant_id.merchant_id for merchant_id in merchantIds">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.merchant_id.$error" ng-if="subForm.merchant_id.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_storename.$invalid && subForm.merchant_storename.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="merchant_storename_input">* Merchant Store Name</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.short_name"
|
||||||
|
type="text" name="merchant_storename" id="merchant_storename_input" required maxlength="50">
|
||||||
|
<div ng-messages="subForm.merchant_storename.$error" ng-if="subForm.merchant_storename.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.business_category.$invalid && subForm.business_category.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="business_category_input">* Business Category</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="business_category"
|
||||||
|
ng-model="subMerchantInfo.industry"
|
||||||
|
id="business_category_input" required
|
||||||
|
ng-options="industry.value as industry.label for industry in wxIndustries">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.business_type.$invalid && subForm.business_type.$dirty}">
|
||||||
|
<label class="control-label col-sm-3"
|
||||||
|
for="business_type_input">* Business Type</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="business_type"
|
||||||
|
ng-model="subMerchantInfo.business_type"
|
||||||
|
id="business_type_input"
|
||||||
|
required
|
||||||
|
ng-options="businessType.value as businessType.label for businessType in businessTypesMap">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.business_type.$error" ng-if="subForm.business_type.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-if="subMerchantInfo.business_type=='ONLINE'||subMerchantInfo.business_type=='BOTH'"
|
||||||
|
ng-class="{'has-error':subForm.company_website.$invalid && subForm.company_website.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="website_input">* Website</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_website"
|
||||||
|
type="url" name="website" id="website_input" required maxlength="128">
|
||||||
|
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- store address 店铺地址 -->
|
||||||
|
<div class="form-group"
|
||||||
|
ng-if="subMerchantInfo.business_type=='OFFLINE'||subMerchantInfo.business_type=='BOTH'"
|
||||||
|
ng-class="{'has-error':subForm.address.$invalid && subForm.address.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="address_input">* Store Address</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.address"
|
||||||
|
type="text" name="address" id="address_input" required maxlength="128">
|
||||||
|
<div ng-messages="subForm.address.$error" ng-if="subForm.address.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.office_phone.$invalid && subForm.office_phone.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="office_phone_input">* Office Phone</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_phone"
|
||||||
|
type="tel" name="office_phone" id="office_phone_input" required>
|
||||||
|
<div ng-messages="subForm.office_phone.$error" ng-if="subForm.office_phone.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.contact_name.$invalid && subForm.contact_person.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="contact_name_input">* Contact Name</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.contact_person"
|
||||||
|
type="text" name="contact_name" id="contact_name_input" required maxlength="32">
|
||||||
|
<div ng-messages="subForm.contact_name.$error" ng-if="subForm.contact_name.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 32</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.contact_phone.$invalid && subForm.contact_phone.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="contact_phone_input">* Contact Phone</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.contact_phone"
|
||||||
|
type="text" name="contact_phone" id="contact_phone_input" required maxlength="16">
|
||||||
|
<div ng-messages="subForm.contact_phone.$error" ng-if="subForm.contact_phone.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 16</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.contact_email.$invalid && subForm.contact_email.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="contact_email_input">* Contact Email</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.contact_email"
|
||||||
|
type="text" name="contact_email" id="contact_email_input" required maxlength="128">
|
||||||
|
<div ng-messages="subForm.contact_email.$error" ng-if="subForm.contact_email.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- mcc code -->
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.mcc_code.$invalid && subForm.mcc_code.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="mcc_code_input">* Mcc Code</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select class="form-control" name="mcc_code"
|
||||||
|
ng-model="subMerchantInfo.mcc_code"
|
||||||
|
id="mcc_code_input" required
|
||||||
|
ng-options="mccCode.value as mccCode.label for mccCode in wechatMccIndustries">
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.mcc_code.$error" ng-if="subForm.mcc_code.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-messages="subForm.mcc_code.$error" ng-if="subForm.mcc_code.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="maxLength">More than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- store address 店铺地址 -->
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.address.$invalid && subForm.address.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="address_input">* Store Address</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.address"
|
||||||
|
type="text" name="address" id="address_input" required maxlength="128">
|
||||||
|
<div ng-messages="subForm.address.$error" ng-if="subForm.address.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':subForm.merchant_type.$invalid && subForm.merchant_type.$dirty}">
|
||||||
|
<label class="control-label col-sm-3"
|
||||||
|
for="merchant_type_select">* Merchant Type</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
|
||||||
|
<select class="form-control" ng-model="subMerchantInfo.merchant_type"
|
||||||
|
id="merchant_type_select"
|
||||||
|
name="merchant_type" >
|
||||||
|
<option value="">Please Choose</option>
|
||||||
|
<option value="ENTERPRISE" >ENTERPRISE</option>
|
||||||
|
<option value="INDIVIDUAL">INDIVIDUAL</option>
|
||||||
|
</select>
|
||||||
|
<div ng-messages="subForm.merchant_type.$error" ng-if="subForm.merchant_type.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 公司注册号 -->
|
||||||
|
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"
|
||||||
|
ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" ng-model="subMerchantInfo.company_register_no"
|
||||||
|
type="text" name="company_register_no" id="company_register_no_input" required maxlength="50">
|
||||||
|
<div ng-messages="subForm.company_register_no.$error" ng-if="subForm.company_register_no.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 注册证书过期时间 -->
|
||||||
|
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"
|
||||||
|
ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}">
|
||||||
|
<label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input class="form-control" id="certificat_expire_date_input"
|
||||||
|
ng-model="subMerchantInfo.certificat_expire_date"
|
||||||
|
uib-datepicker-popup size="10"
|
||||||
|
required
|
||||||
|
name="certificat_expire_date"
|
||||||
|
is-open="certificat_expire_date.open"
|
||||||
|
ng-click="certificat_expire_date.open=true"
|
||||||
|
>
|
||||||
|
<div ng-messages="subForm.certificat_expire_date.$error" ng-if="subForm.certificat_expire_date.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||||
|
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- director name 法人姓名 -->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.director_name.$invalid && subForm.director_name.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="director_name_input">Director Name</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.director_name" maxlength="128"-->
|
||||||
|
<!--type="text" name="director_name" id="director_name_input">-->
|
||||||
|
<!--<div ng-messages="subForm.director_name.$error" ng-if="subForm.director_name.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<!– director id number 法人身份证号–>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.director_id_number.$invalid && subForm.director_id_number.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="director_id_number_input">Director Id</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.director_id_number" maxlength="128"-->
|
||||||
|
<!--type="text" name="director_id_number" id="director_id_number_input">-->
|
||||||
|
<!--<div ng-messages="subForm.director_id_number.$error" ng-if="subForm.director_id_number.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<!– principal name 负责人姓名 –>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type != 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.principal_name.$invalid && subForm.principal_name.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="principal_name_input">Principal Name</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.principal_name" maxlength="128"-->
|
||||||
|
<!--type="text" name="principal_name" id="principal_name_input">-->
|
||||||
|
<!--<div ng-messages="subForm.principal_name.$error" ng-if="subForm.principal_name.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<!--<!– principal id number 负责人身份证号 –>-->
|
||||||
|
<!--<div class="form-group" ng-if="subMerchantInfo.merchant_type != 'ENTERPRISE'"-->
|
||||||
|
<!--ng-class="{'has-error':subForm.principal_id_number.$invalid && subForm.principal_id_number.$dirty}">-->
|
||||||
|
<!--<label class="control-label col-sm-3" for="principal_id_number_input">Principal ID Number</label>-->
|
||||||
|
<!--<div class="col-sm-8">-->
|
||||||
|
<!--<input class="form-control" ng-model="subMerchantInfo.principal_id_number" maxlength="128"-->
|
||||||
|
<!--type="text" name="principal_id_number_number" id="principal_id_number_input">-->
|
||||||
|
<!--<div ng-messages="subForm.principal_id_number.$error" ng-if="subForm.principal_id_number.$dirty">-->
|
||||||
|
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
|
||||||
|
<!--<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--end 商品基本资料-->
|
||||||
|
<!--<div class="panel panel-default">-->
|
||||||
|
<!--<div class="panel-heading">Goods Qr Code</div>-->
|
||||||
|
<!--<div class="panel-body">-->
|
||||||
|
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--end 商品二维码-->
|
||||||
|
<div class="btn-group margin-bottom margin-top">
|
||||||
|
<button class="btn btn-success" type="button"
|
||||||
|
ng-click="updateApply(subForm)">Submit
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
@ -0,0 +1,122 @@
|
|||||||
|
package au.com.royalpay.payment.manage.alipayregisty;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig;
|
||||||
|
import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
|
||||||
|
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
|
||||||
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.dom4j.Element;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
public class AlipayOnlineRegistryTest {
|
||||||
|
|
||||||
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ClientMapper clientMapper;
|
||||||
|
@Resource
|
||||||
|
private AlipayClient alipayClient;
|
||||||
|
int applyNum = 0;
|
||||||
|
/**
|
||||||
|
* 查询缺失字段
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void findMissingFields() {
|
||||||
|
///获取近半年有效交易的商户
|
||||||
|
Date to = new Date();
|
||||||
|
Calendar calendar1 = Calendar.getInstance();
|
||||||
|
calendar1.add(Calendar.MONTH, -6);
|
||||||
|
calendar1.set(Calendar.DAY_OF_MONTH,1);
|
||||||
|
Date from = calendar1.getTime();
|
||||||
|
// List<JSONObject> clients = clientMapper.halfYearHaveTransactionClients(from,to);
|
||||||
|
|
||||||
|
List<String> clients = new ArrayList<>();
|
||||||
|
clients.add("PLPR");
|
||||||
|
clients.add("MZZI");
|
||||||
|
clients.add("AGSH");
|
||||||
|
clients.add("AGBC");
|
||||||
|
clients.add("ISKI");
|
||||||
|
clients.add("BTGL");
|
||||||
|
clients.add("BTVL");
|
||||||
|
clients.add("HJCO");
|
||||||
|
clients.add("BAOC");
|
||||||
|
clients.add("WANR");
|
||||||
|
clients.add("XSPL");
|
||||||
|
clients.add("H20C");
|
||||||
|
clients.add("SDCN");
|
||||||
|
List<JSONObject> result = new ArrayList<>();
|
||||||
|
List<JSONObject> errorClients = new ArrayList<>();
|
||||||
|
|
||||||
|
clients.forEach(client->{
|
||||||
|
JSONObject clientInfo = clientMapper.findClientByMonikerAll(client);
|
||||||
|
try {
|
||||||
|
Element resultElement = alipayClient.queryOnlineGmsPortalStatus("2088821643021586", clientInfo);
|
||||||
|
if (StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
|
||||||
|
Element responseElement = resultElement.element("response");
|
||||||
|
Element element1 = responseElement.element("alipay");
|
||||||
|
// if (!StringUtils.equalsIgnoreCase("SUCCESS", element1.elementText("status"))) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
Element registerAddress = element1.element("register_address");
|
||||||
|
Element registrationNo = element1.element("registration_no");
|
||||||
|
|
||||||
|
if (registerAddress != null && registrationNo != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((clientInfo.containsKey("acn") || clientInfo.containsKey("abn"))
|
||||||
|
&& clientInfo.containsKey("country")
|
||||||
|
&& clientInfo.containsKey("state")
|
||||||
|
&& clientInfo.containsKey("suburb")
|
||||||
|
&& clientInfo.containsKey("address")) {
|
||||||
|
//重新进件
|
||||||
|
Element applyResponse = alipayClient.registerOnlineGmsPortal("2088821643021586", clientInfo);
|
||||||
|
if(!StringUtils.equalsIgnoreCase("SUCCESS", applyResponse.element("is_success").getText())){
|
||||||
|
logger.info("商户:"+clientInfo.getString("client_moniker")+",进件失败,失败原因:" + applyResponse.element("error").getText());
|
||||||
|
clientInfo.put("error_message",applyResponse.elementText("result_code") +
|
||||||
|
":" + responseElement.elementText("reject_reason"));
|
||||||
|
errorClients.add(clientInfo);
|
||||||
|
}else{
|
||||||
|
logger.info("商户:"+clientInfo.getString("client_moniker")+",重新进件");
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//打印缺失信息商户编码、所属BD
|
||||||
|
result.add(clientInfo);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println("非Alipay Online商户");
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
logger.info("重新进件商户为 "+applyNum+" 个");
|
||||||
|
logger.info("进见调用异常商户:"+errorClients.size());
|
||||||
|
logger.info("以下为数据缺失商户需BD补充 :");
|
||||||
|
result.forEach(client->{
|
||||||
|
String registrationNo = client.containsKey("acn") ? client.getString("acn"): (client.containsKey("abn") ? client.getString("abn") : "缺失");
|
||||||
|
logger.info("商户编码===>"+client.getString("client_moniker") +
|
||||||
|
" , registration_no===>" + registrationNo +
|
||||||
|
" , register_address===>" + (client.containsKey("country") ? (client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address")) : "缺失" )+
|
||||||
|
" , bd===>"+(client.containsKey("bd_user_name") ? client.getString("bd_user_name") : "-"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue