Merge branch 'develop'

master
AlanFenng 4 years ago
commit 1747b19c18

@ -5,11 +5,11 @@
<parent> <parent>
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId> <artifactId>payment-parent</artifactId>
<version>2.2.21</version> <version>2.2.24</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>2.3.72</version> <version>2.3.73</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version> <jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>

@ -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 '注册证书过期时间';

@ -724,3 +724,50 @@ alter pmt_custom_reports add PRIMARY key (report_serial);
alter table sys_org add COLUMN `state` varchar(20) DEFAULT NULL COMMENT '州 (使用标准码 NSW,QLD,WA,VIC,ACT,NT,TAS,SA)'; alter table sys_org add COLUMN `state` varchar(20) DEFAULT NULL COMMENT '州 (使用标准码 NSW,QLD,WA,VIC,ACT,NT,TAS,SA)';
INSERT INTO `royalpay`.`sys_configs`(`config_key`, `config_value`, `config_desc`) VALUES ('rick_interior_send_email', 'dll19920503@qq.com', '内部调用测试发送邮箱'); INSERT INTO `royalpay`.`sys_configs`(`config_key`, `config_value`, `config_desc`) VALUES ('rick_interior_send_email', 'dll19920503@qq.com', '内部调用测试发送邮箱');
--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 '注册证书过期时间';

@ -155,4 +155,11 @@ public interface ClientMapper {
PageList<JSONObject> listCompletedContractKycClients(JSONObject params, PageBounds pageBounds); PageList<JSONObject> listCompletedContractKycClients(JSONObject params, PageBounds pageBounds);
int countKycClients(JSONObject params); int countKycClients(JSONObject params);
/**
*
* @return
*/
List<JSONObject> halfYearHaveTransactionClients(@Param("from") Date fromDate, @Param("to") Date toDate);
} }

@ -1,13 +1,13 @@
package au.com.royalpay.payment.manage.mappers.system; package au.com.royalpay.payment.manage.mappers.system;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper; import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql; import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType; import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List; import java.util.List;
/** /**
@ -15,10 +15,27 @@ import java.util.List;
*/ */
@AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id") @AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id")
public interface SysWxMerchantApplyMapper { public interface SysWxMerchantApplyMapper {
@AutoSql(SqlType.SELECT)
@Select("SELECT * FROM sys_wx_merchant_apply WHERE client_id = #{client_id} and is_valid = 1")
List<JSONObject> listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds); List<JSONObject> listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds);
@AutoSql(SqlType.INSERT) @AutoSql(SqlType.INSERT)
void insertWxMerchantApply(JSONObject params); void insertWxMerchantApply(JSONObject params);
@AutoSql(SqlType.SELECT)
JSONObject findByClientIdAndSubMerchantAppId(@Param("client_id") int clientId, @Param("merchant_app_id")String merchantAppId);
@AutoSql(SqlType.SELECT)
List<JSONObject> findByClientIdAndSubMerchantId(@Param("client_id") int client_id,@Param("sub_merchant_id") String subMerchantId);
/**
*
* @param client_id
* @param sub_merchant_id
*/
@Update("UPDATE sys_wx_merchant_apply SET is_valid=0 WHERE client_id = #{client_id} and sub_merchant_id = #{sub_merchant_id}")
void failureSubMerchantByClientIdAndSubMerchantId(@Param("client_id")int client_id, @Param("sub_merchant_id")String sub_merchant_id);
@AutoSql(SqlType.UPDATE)
void updateSubMerchantInfoByMerchantAppId(JSONObject updateSubMerchantInfo);
} }

@ -6,6 +6,7 @@ import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
import java.util.Date;
/** /**
* Created by yixian on 2016-06-29. * Created by yixian on 2016-06-29.
@ -129,6 +130,14 @@ public class ClientRegisterInfo {
@JSONField(name = "enable_card_payment") @JSONField(name = "enable_card_payment")
private boolean enableCardPayment = false; private boolean enableCardPayment = false;
private String director_name;
private String director_id_number;
private String principal_name;
private String principal_id_number;
private Date certificat_expire_date;//注册证书过期时间
private String mc_code;//微信mccode
public JSONObject insertObject() { public JSONObject insertObject() {
if (industry == null) { if (industry == null) {
setIndustry("331"); setIndustry("331");
@ -633,4 +642,52 @@ public class ClientRegisterInfo {
public void setEnableCrossPayment(boolean enableCrossPayment) { public void setEnableCrossPayment(boolean enableCrossPayment) {
this.enableCrossPayment = enableCrossPayment; this.enableCrossPayment = enableCrossPayment;
} }
public String getDirector_name() {
return director_name;
}
public void setDirector_name(String director_name) {
this.director_name = director_name;
}
public String getDirector_id_number() {
return director_id_number;
}
public void setDirector_id_number(String director_id_number) {
this.director_id_number = director_id_number;
}
public String getPrincipal_name() {
return principal_name;
}
public void setPrincipal_name(String principal_name) {
this.principal_name = principal_name;
}
public String getPrincipal_id_number() {
return principal_id_number;
}
public void setPrincipal_id_number(String principal_id_number) {
this.principal_id_number = principal_id_number;
}
public Date getCertificat_expire_date() {
return certificat_expire_date;
}
public void setCertificat_expire_date(Date certificat_expire_date) {
this.certificat_expire_date = certificat_expire_date;
}
public String getMc_code() {
return mc_code;
}
public void setMccode(String mc_code) {
this.mc_code = mc_code;
}
} }

@ -0,0 +1,323 @@
package au.com.royalpay.payment.manage.merchants.beans;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* Created by yuan on 2018/1/19.
*/
public class NewSubMerchantIdApply {
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 50)
@JSONField(name = "company_name")
private String merchant_name;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 10)
@JSONField(name = "merchant_id")
private String merchant_id;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 20)
@JSONField(name = "short_name")
private String merchant_shortname;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 20)
@JSONField(name = "company_phone")
private String office_phone;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 32)
@JSONField(name = "contact_person")
private String contact_name;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 16)
private String contact_phone;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 128)
private String contact_email;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 10)
@JSONField(name = "industry")
private String business_category;
@Length(max = 128)
@JSONField(name = "company_website")
private String website;
//2020-11-16
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 20)
@JSONField(name = "merchant_type")
private String merchant_type;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(max = 7)
@JSONField(name = "mcc_code")//数据库中用的是mc_code
private String mcc_code;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(min = 4, max = 128)
@JSONField(name = "address")
private String address;
@Length(min=1 ,max = 128)
@JSONField(name = "director_name")
private String legal_director_name;
@Length(min=1 ,max = 128)
@JSONField(name = "director_id_number")
private String director_id_number;
@Length(min=1 ,max = 128)
@JSONField(name = "principal_name")
@Length(min=1 ,max = 128)
private String principal_name;
@JSONField(name = "principal_id_number")
private String principal_id_number;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(min=1 ,max = 50)
@JSONField(name = "company_register_no")
private String company_register_no;
@NotBlank(message = "error.payment.valid.param_missing")
@Length(min=1 ,max = 10)
@JSONField(name = "certificat_expire_date")
private String certificat_expire_date;
@NotBlank(message = "error.payment.valid.param_missing")
@JSONField(name = "business_type")
private String business_type;
public JSONObject insertObject(JSONObject client) {
JSONObject params = new JSONObject();
if(StringUtils.isNotEmpty(merchant_name)){
params.put("merchant_name",merchant_name);
}
if(StringUtils.isNotEmpty(merchant_shortname)){
params.put("merchant_shortname",merchant_shortname);
}
if(StringUtils.isNotEmpty(office_phone)){
params.put("office_phone",office_phone);
}
if(StringUtils.isNotEmpty(contact_name)){
params.put("contact_name",contact_name);
}
if(StringUtils.isNotEmpty(contact_phone)){
params.put("contact_phone",contact_phone);
}
if(StringUtils.isNotEmpty(contact_email)){
params.put("contact_email",contact_email);
}
if(StringUtils.isNotEmpty(business_category)){
params.put("business_category",business_category);
}
if(StringUtils.isNotEmpty(website)){
params.put("website",website);
}
if(StringUtils.isNotEmpty(address)){
params.put("stores_address", address);
}
if(StringUtils.isNotEmpty(company_register_no)){
params.put("extra_reg_cer_number", company_register_no);
}
if(StringUtils.isNotEmpty(certificat_expire_date)){
params.put("extra_reg_cer_exp_date", certificat_expire_date);
}
if(StringUtils.isNotEmpty(merchant_type)){
params.put("extra_merchant_type",merchant_type);
if(StringUtils.equals("ENTERPRISE",merchant_type)){
params.put("director_name",legal_director_name);//董事、项目主持人
params.put("director_id_number", director_id_number);
}else{
params.put("principal_name",principal_name);//[企业]主要负责人
params.put("principal_id_number",principal_id_number);
}
}
if(StringUtils.isNotEmpty(mcc_code)){
params.put("mcc_code", mcc_code);
}
if(StringUtils.isNotEmpty(business_type)){
params.put("business_type", business_type);
}
params.put("merchant_country_code","036");//固定值036-澳大利亚国家编码
params.put("merchant_remark",client.getString("client_moniker"));
return params;
}
public static JSONObject resultParams(JSONObject subMerchantApplyInfo){
return new JSONObject(){{
put("company_name",subMerchantApplyInfo.getString("merchant_name"));
put("merchant_id",subMerchantApplyInfo.getString("merchant_id"));
put("short_name",subMerchantApplyInfo.getString("merchant_shortname"));
put("company_phone",subMerchantApplyInfo.getString("office_phone"));
put("contact_person",subMerchantApplyInfo.getString("contact_name"));
put("contact_phone",subMerchantApplyInfo.getString("contact_phone"));
put("contact_email",subMerchantApplyInfo.getString("contact_email"));
put("industry",subMerchantApplyInfo.getString("business_category"));
put("company_website",subMerchantApplyInfo.getString("website"));
put("mcc_code",subMerchantApplyInfo.getString("mcc_code"));
put("address",subMerchantApplyInfo.getString("stores_address"));
put("company_register_no",subMerchantApplyInfo.getString("extra_reg_cer_number"));
put("certificat_expire_date",subMerchantApplyInfo.getString("extra_reg_cer_exp_date"));
put("merchant_type",subMerchantApplyInfo.getString("extra_merchant_type"));
put("director_name",subMerchantApplyInfo.getString("director_name"));
put("director_id_number",subMerchantApplyInfo.getString("director_id_number"));
put("principal_name",subMerchantApplyInfo.getString("principal_name"));
put("principal_id_number",subMerchantApplyInfo.getString("principal_id_number"));
put("business_type",subMerchantApplyInfo.getString("business_type"));
}};
}
public NewSubMerchantIdApply() {
}
public String getMerchant_name() {
return this.merchant_name;
}
public String getMerchant_id() {
return merchant_id;
}
public void setMerchant_id(String merchant_id) {
this.merchant_id = merchant_id;
}
public void setMerchant_name(String merchant_name) {
this.merchant_name = merchant_name;
}
public String getMerchant_shortname() {
return this.merchant_shortname;
}
public void setMerchant_shortname(String merchant_shortname) {
this.merchant_shortname = merchant_shortname;
}
public String getOffice_phone() {
return this.office_phone;
}
public void setOffice_phone(String office_phone) {
this.office_phone = office_phone;
}
public String getContact_name() {
return this.contact_name;
}
public void setContact_name(String contact_name) {
this.contact_name = contact_name;
}
public String getContact_phone() {
return this.contact_phone;
}
public void setContact_phone(String contact_phone) {
this.contact_phone = contact_phone;
}
public String getContact_email() {
return this.contact_email;
}
public void setContact_email(String contact_email) {
this.contact_email = contact_email;
}
public String getBusiness_category() {
return this.business_category;
}
public void setBusiness_category(String business_category) {
this.business_category = business_category;
}
public String getWebsite() {
return this.website;
}
public void setWebsite(String website) {
this.website = website;
}
public void setAddress(String address) {
this.address = address;
}
public String getAddress() {
return this.address;
}
public String getMerchant_type() {
return merchant_type;
}
public void setMerchant_type(String merchant_type) {
this.merchant_type = merchant_type;
}
public String getLegal_director_name() {
return legal_director_name;
}
public void setLegal_director_name(String legal_director_name) {
this.legal_director_name = legal_director_name;
}
public String getDirector_id_number() {
return director_id_number;
}
public void setDirector_id_number(String director_id_number) {
this.director_id_number = director_id_number;
}
public String getPrincipal_name() {
return principal_name;
}
public void setPrincipal_name(String principal_name) {
this.principal_name = principal_name;
}
public String getPrincipal_id_number() {
return principal_id_number;
}
public void setPrincipal_id_number(String principal_id_number) {
this.principal_id_number = principal_id_number;
}
public String getMcc_code() {
return mcc_code;
}
public void setMcc_code(String mcc_code) {
this.mcc_code = mcc_code;
}
public String getCompany_register_no() {
return company_register_no;
}
public void setCompany_register_no(String company_register_no) {
this.company_register_no = company_register_no;
}
public String getCertificat_expire_date() {
return certificat_expire_date;
}
public void setCertificat_expire_date(String certificat_expire_date) {
this.certificat_expire_date = certificat_expire_date;
}
public String getBusiness_type() {
return business_type;
}
public void setBusiness_type(String business_type) {
this.business_type = business_type;
}
}

@ -432,6 +432,14 @@ public interface ClientManager {
String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager); String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager);
String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
JSONObject queryApplicationSubMerchantById(String clientMoniker, String merchantAppId);
void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
JSONObject querySubMerchantStatus(String clientMoniker,String subMerchantId);
void registerAlipayGms(String clientMoniker, JSONObject manager); void registerAlipayGms(String clientMoniker, JSONObject manager);
void registerAlipayOnlineGms(String clientMoniker, JSONObject manager); void registerAlipayOnlineGms(String clientMoniker, JSONObject manager);

@ -13,6 +13,8 @@ import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi; import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient; import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo; import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfoInheritance;
import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper;
import au.com.royalpay.payment.core.PaymentChannelApi; import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.beans.EmptyMerchantApplication; import au.com.royalpay.payment.core.beans.EmptyMerchantApplication;
import au.com.royalpay.payment.core.beans.MerchantApplicationResult; import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
@ -357,7 +359,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private final int REFUSE_CLIENT_TEMPLID = 166108; private final int REFUSE_CLIENT_TEMPLID = 166108;
@Resource
private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper;
@PostConstruct @PostConstruct
public void init() { public void init() {
tags.add("account"); tags.add("account");
@ -535,6 +538,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (representativeInfo != null) { if (representativeInfo != null) {
client.put("representativeInfo", representativeInfo); client.put("representativeInfo", representativeInfo);
} }
JSONObject wechatMcc= paymentChannelMccGoodMapper.findWechatPayMccByClientId(client.getIntValue("client_id"));
if (wechatMcc != null) {
client.put("mc_code", wechatMcc.getIntValue("mc_code"));
}
return client; return client;
} }
@ -862,9 +869,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} catch (Exception e) { } catch (Exception e) {
logger.error("邮件列表添加成员失败", e); logger.error("邮件列表添加成员失败", e);
} }
saveWechatMcc(partner);
return partner; return partner;
} }
/**
* mccode
* @param partner
*/
private void saveWechatMcc(JSONObject partner){
JSONObject wxGoodMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(partner.getIntValue("client_id"));
if (wxGoodMcc == null || wxGoodMcc.isEmpty()) {
wxGoodMcc = new JSONObject();
wxGoodMcc.put("client_id",partner.getIntValue("client_id"));
wxGoodMcc.put("mc_code",partner.getString("mc_code"));
wxGoodMcc.put("channel","Wechat");
wxGoodMcc.put("creation_date",new Date());
wxGoodMcc.put("creation_by","System");
paymentChannelMccGoodMapper.save(wxGoodMcc);
return;
}
wxGoodMcc.put("mc_code",partner.getString("mc_code"));
paymentChannelMccGoodMapper.update(wxGoodMcc);
}
@Override @Override
@Transactional @Transactional
public void updateClientRegisterInfo(JSONObject manager, String clientMoniker, ClientRegisterInfo info) { public void updateClientRegisterInfo(JSONObject manager, String clientMoniker, ClientRegisterInfo info) {
@ -943,6 +973,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
clientConfigMapper.update(clientConfig); clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientCache(clientId); clientInfoCacheSupport.clearClientCache(clientId);
client.put("mc_code",info.getMc_code());
saveWechatMcc(client);
} }
@Override @Override
@ -5637,6 +5669,115 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return sub_merchant_id; return sub_merchant_id;
} }
/**
*
* @param clientMoniker
* @param subMerchantApply
* @param manager
* @return
*/
@Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantApply, JSONObject manager){
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject params = subMerchantApply.insertObject(client);
SubMerchantInfoInheritance subMerchantInfo = JSONObject.toJavaObject(params, SubMerchantInfoInheritance.class);
params.put("merchant_id", subMerchantApply.getMerchant_id());
params.put("client_id", client.getString("client_id"));
params.put("create_time", new Date());
params.put("operator", manager.getString("display_name"));
params.put("is_valid","1");
Element elem = wxPayClient.newSubMerchantApplication(subMerchantApply.getMerchant_id(), subMerchantInfo);
String sub_merchant_id = elem.elementText("sub_mch_id");
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
List<JSONObject> subMerchants= sysWxMerchantApplyMapper.findByClientIdAndSubMerchantId(client.getInteger("client_id"),sub_merchant_id);
if(subMerchants.size()>0){
sysWxMerchantApplyMapper.failureSubMerchantByClientIdAndSubMerchantId(client.getInteger("client_id"),sub_merchant_id);
}
sysWxMerchantApplyMapper.insertWxMerchantApply(params);
clearCacheSubMerchantIdApplices(clientMoniker);
} else {
throw new BadRequestException(elem.elementText("return_msg"));
}
return sub_merchant_id;
}
/**
* -
* @param clientMoniker
* @param merchantAppId
*/
@Override
public JSONObject queryApplicationSubMerchantById(String clientMoniker, String merchantAppId){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
JSONObject subMerchantApplyInfo = sysWxMerchantApplyMapper.findByClientIdAndSubMerchantAppId(client.getInteger("client_id"), merchantAppId);
JSONObject resultParams = NewSubMerchantIdApply.resultParams(subMerchantApplyInfo);
resultParams.put("merchant_app_id",subMerchantApplyInfo.getString("merchant_app_id"));
return resultParams;
}
/**
*
* @param clientMoniker
* @param merchantAppId
* @param subMerchantIdApply
* @param manager
*/
@Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
checkOrgPermission(manager, client);
JSONObject params = subMerchantIdApply.insertObject(client);
params.put("merchant_app_id",merchantAppId);
SubMerchantInfoInheritance subMerchantInfo = JSONObject.toJavaObject(params, SubMerchantInfoInheritance.class);
params.put("merchant_id", subMerchantIdApply.getMerchant_id());
params.put("client_id", client.getString("client_id"));
params.put("create_time", new Date());
params.put("operator", manager.getString("display_name"));
sysWxMerchantApplyMapper.updateSubMerchantInfoByMerchantAppId(params);
Element elem = wxPayClient.modfiySubMerchant(subMerchantIdApply.getMerchant_id(), subMerchantInfo);
String sub_merchant_id = elem.elementText("sub_mch_id");
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
sysWxMerchantApplyMapper.updateSubMerchantInfoByMerchantAppId(params);
clearCacheSubMerchantIdApplices(clientMoniker);
} else {
throw new BadRequestException(elem.elementText("return_msg"));
}
}
@Override
public JSONObject querySubMerchantStatus(String clientMoniker,String subMerchantId){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
Element elem = wxPayClient.querySubMerchant(client.getString("merchant_id"), subMerchantId);
JSONObject object = new JSONObject();
object.put("apply_status", elem.elementText("result_code"));
object.put("response_str", elem.asXML());
return object;
}
@Override @Override
public void registerAlipayGms(String clientMoniker, JSONObject manager) { public void registerAlipayGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -837,6 +837,28 @@ public class PartnerManageController {
return clientManager.subMerchantApplication(clientMoniker, subMerchantIdApply, manager); return clientManager.subMerchantApplication(clientMoniker, subMerchantIdApply, manager);
} }
@ManagerMapping(value = "/{clientMoniker}/new_sub_apply", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public String newSubMerchantApplication(@PathVariable String clientMoniker, @RequestBody NewSubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.newSubMerchantApplication(clientMoniker, subMerchantIdApply, manager);
}
@ManagerMapping(value = "/{clientMoniker}/get_merchant_ids/{merchantAppId}", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject querySubMerchantApplication(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("merchantAppId") String merchantAppId) {
return clientManager.queryApplicationSubMerchantById(clientMoniker, merchantAppId);
}
@ManagerMapping(value = "/{clientMoniker}/get_merchant_ids/{merchantAppId}", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void changeSubMerchantApplication(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("merchantAppId") String merchantAppId,
@RequestBody NewSubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changeApplicationSubMerchantById(clientMoniker, merchantAppId,subMerchantIdApply,manager);
}
@ManagerMapping(value = "/{clientMoniker}/get_merchant_ids/{subMerchantId}/status", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject querySubMerchantStatus(@PathVariable("clientMoniker") String clientMoniker,@PathVariable("subMerchantId") String subMerchantId){
return clientManager.querySubMerchantStatus(clientMoniker,subMerchantId);
}
@ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void registerAlipayGms(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void registerAlipayGms(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, manager); clientManager.registerAlipayGms(clientMoniker, manager);

@ -941,4 +941,15 @@
</if> </if>
</where> </where>
</select> </select>
<select id="halfYearHaveTransactionClients" resultType="com.alibaba.fastjson.JSONObject">
select c.client_moniker from pmt_orders o
left join sys_clients c on o.client_id = c.client_id
where o.create_time &gt;= #{from}
and o.create_time &lt; #{to}
and c.is_valid = 1
-- and (c.company_website is not null and c.alipayindustry is not null and c.business_structure is NOT null)
GROUP BY c.client_id
order by c.bd_user_name
</select>
</mapper> </mapper>

@ -106,58 +106,131 @@
"value": "WA" "value": "WA"
} }
]; ];
// var industryMap = [
// {
// "label": "综合商城 Integrated Store",
// "value": 336
// },
// {
// "label": "食品 Food",
// "value": 335
// },
// {
// "label": "化妆品 Cosmetics",
// "value": 334
// },
// {
// "label": "鞋包服饰 Clothes",
// "value": 327
// },
// {
// "label": "酒店行业 Hospitality industry",
// "value": 328
// },
// {
// "label": "数码电器 Electric appliances",
// "value": 332
// },
// {
// "label": "母婴 Baby and maternal products",
// "value": 333
// },
// {
// "label": "文具/办公用品 Office supplies",
// "value": 337
// },
// {
// "label": "机票行业 Airline tickets industry",
// "value": 339
// },
// {
// "label": "国际物流 International logistics",
// "value": 330
// },
// {
// "label": "教育行业 Education section",
// "value": 329
// },
// {
// "label": "其它服务行业 Other services industry",
// "value": 331
// },
// {
// "label": "其它货物贸易行业 Other goods trade industry",
// "value": 338
// }
// ];
var industryMap = [ var industryMap = [
{ {
"label": "综合商城 Integrated Store", "label": "Shoes&Garments",
"value": 336 "value": "343"
}, },
{ {
"label": "食品 Food", "label": "Comprehensive mall",
"value": 335 "value": "484"
}, },
{ {
"label": "化妆品 Cosmetics", "label": "Food",
"value": 334 "value": "485"
}, },
{ {
"label": "鞋包服饰 Clothes", "label": "Cosmetics",
"value": 327 "value": "486"
}, },
{ {
"label": "酒店行业 Hospitality industry", "label": "Maternal and infant",
"value": 328 "value": "487"
}, },
{ {
"label": "数码电器 Electric appliances", "label": "Digital appliance",
"value": 332 "value": "488"
}, },
{ {
"label": "母婴 Baby and maternal products", "label": "Logistics",
"value": 333 "value": "489"
}, },
{ {
"label": "文具/办公用品 Office supplies", "label": "Education Industry",
"value": 337 "value": "490"
}, },
{ {
"label": "机票行业 Airline tickets industry", "label": "Hotel Industry",
"value": 339 "value": "491"
}, },
{ {
"label": "国际物流 International logistics", "label": "Stationery/office supplies",
"value": 330 "value": "492"
}, },
{ {
"label": "教育行业 Education section", "label": "Air Ticket",
"value": 329 "value": "493"
}, },
{ {
"label": "其它服务行业 Other services industry", "label": "Other trade industry",
"value": 331 "value": "494"
},{
"label": "Overseas Education",
"value": "528"
},
{
"label": "Travel ticket",
"value": "529"
},
{
"label": "Car rental",
"value": "530"
},
{
"label": "International Conference",
"value": "531"
},
{
"label": "Software",
"value": "532"
}, },
{ {
"label": "其它货物贸易行业 Other goods trade industry", "label": "Medical Service",
"value": 338 "value": "533"
} }
]; ];

@ -9,6 +9,7 @@ define(['./app',
'./services/chartParser', './services/chartParser',
'./services/orderService', './services/orderService',
'./services/businessStructuresMap', './services/businessStructuresMap',
'./services/businessTypesMap',
'./services/yeepayBusinessContentMap', './services/yeepayBusinessContentMap',
'./services/yeepayIndustryMap', './services/yeepayIndustryMap',
'./services/stateMap', './services/stateMap',

@ -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;
}
}
});
});

@ -1,90 +1,163 @@
define(['../app'], function (app) { define(['../app'], function (app) {
'use strict'; 'use strict';
// var industryMap = [
// {
// "label": "鞋包服饰",
// "value": "327"
// },
// {
// "label": "机票行业",
// "value": "339"
// },
// {
// "label": "软件服务",
// "value": "356"
// },
// {
// "label": "旅游票务",
// "value": "357"
// },
// {
// "label": "国际租车",
// "value": "358"
// },
// {
// "label": "医疗服务(出国)",
// "value": "359"
// },
// {
// "label": "医疗服务(不出国)",
// "value": "360"
// },
// {
// "label": "留学教育(网络教育)",
// "value": "361"
// },
// {
// "label": "留学教育(一年及以下)",
// "value": "362"
// },
// {
// "label": "其它货物贸易行业",
// "value": "338"
// },
// {
// "label": "文具/办公用品",
// "value": "337"
// },
// {
// "label": "综合商城",
// "value": "336"
// },
// {
// "label": "酒店行业",
// "value": "328"
// },
// {
// "label": "教育行业",
// "value": "329"
// },
// {
// "label": "国际物流",
// "value": "330"
// },
// {
// "label": "数码电器",
// "value": "332"
// },
// {
// "label": "母婴",
// "value": "333"
// },
// {
// "label": "化妆品",
// "value": "334"
// },
// {
// "label": "食品",
// "value": "335"
// },
// {
// "label": "留学教育(一年以上)",
// "value": "363"
// },
// {
// "label": "其它服务行业",
// "value": "331"
// }
// ];
var industryMap = [ var industryMap = [
{ {
"label": "鞋包服饰", "label": "Shoes&Garments",
"value": "327" "value": "343"
}, },
{ {
"label": "机票行业", "label": "Comprehensive mall",
"value": "339" "value": "484"
}, },
{ {
"label": "软件服务", "label": "Food",
"value": "356" "value": "485"
}, },
{ {
"label": "旅游票务", "label": "Cosmetics",
"value": "357" "value": "486"
}, },
{ {
"label": "国际租车", "label": "Maternal and infant",
"value": "358" "value": "487"
}, },
{ {
"label": "医疗服务(出国)", "label": "Digital appliance",
"value": "359" "value": "488"
}, },
{ {
"label": "医疗服务(不出国)", "label": "Logistics",
"value": "360" "value": "489"
}, },
{ {
"label": "留学教育(网络教育)", "label": "Education Industry",
"value": "361" "value": "490"
}, },
{ {
"label": "留学教育(一年及以下)", "label": "Hotel Industry",
"value": "362" "value": "491"
}, },
{ {
"label": "其它货物贸易行业", "label": "Stationery/office supplies",
"value": "338" "value": "492"
}, },
{ {
"label": "文具/办公用品", "label": "Air Ticket",
"value": "337" "value": "493"
}, },
{ {
"label": "综合商城", "label": "Other trade industry",
"value": "336" "value": "494"
},{
"label": "Overseas Education",
"value": "528"
}, },
{ {
"label": "酒店行业", "label": "Travel ticket",
"value": "328" "value": "529"
}, },
{ {
"label": "教育行业", "label": "Car rental",
"value": "329" "value": "530"
}, },
{ {
"label": "国际物流", "label": "International Conference",
"value": "330" "value": "531"
}, },
{ {
"label": "数码电器", "label": "Software",
"value": "332" "value": "532"
}, },
{ {
"label": "母婴", "label": "Medical Service",
"value": "333" "value": "533"
},
{
"label": "化妆品",
"value": "334"
},
{
"label": "食品",
"value": "335"
},
{
"label": "留学教育(一年以上)",
"value": "363"
},
{
"label": "其它服务行业",
"value": "331"
} }
]; ];
app.factory('industryMap', function () { app.factory('industryMap', function () {

File diff suppressed because it is too large Load Diff

@ -24,7 +24,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
url: '/{clientMoniker}/edit', url: '/{clientMoniker}/edit',
params: {"commitCardPayment": false, commitCrossBorderPayment: false}, params: {"commitCardPayment": false, commitCrossBorderPayment: false},
templateUrl: '/static/payment/partner/templates/partner_edit.html', templateUrl: '/static/payment/partner/templates/partner_edit.html',
controller: 'partnerEditCtrl', controller: 'partnerEditCtrl2',
resolve: { resolve: {
partner: ['$http', '$stateParams', function ($http, $stateParams) { partner: ['$http', '$stateParams', function ($http, $stateParams) {
return $http.get('/sys/partners/' + $stateParams.clientMoniker); return $http.get('/sys/partners/' + $stateParams.clientMoniker);
@ -32,7 +32,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}) })
}]); }]);
app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'businessStructuresMap', 'upayIndustryMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, upayIndustryMap, industryMap, stateMap, sectorMap, countryMap) { app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'businessStructuresMap', 'upayIndustryMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap','wechatGoodMcc', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, upayIndustryMap, industryMap, stateMap, sectorMap, countryMap,wechatGoodMcc) {
if ($scope.partner_application) { if ($scope.partner_application) {
$scope.partner = angular.copy($scope.partner_application); $scope.partner = angular.copy($scope.partner_application);
delete $rootScope.partner_application; delete $rootScope.partner_application;
@ -152,6 +152,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}; };
$scope.pagination = {}; $scope.pagination = {};
$scope.industries = industryMap.configs(); $scope.industries = industryMap.configs();
$scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.upayIndustrys = upayIndustryMap.configs(); $scope.upayIndustrys = upayIndustryMap.configs();
$scope.states = stateMap.configs(); $scope.states = stateMap.configs();
$scope.countries = countryMap.configs(); $scope.countries = countryMap.configs();
@ -227,6 +228,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}); });
return; return;
} }
if (!$scope.partner.business_structure||$scope.partner.business_structure == '') {
alert('Please select the business structure');
return;
}
if (!$scope.partner.enable_cross_payment && !$scope.partner.enable_card_payment) { if (!$scope.partner.enable_cross_payment && !$scope.partner.enable_card_payment) {
alert("商户至少开通一种支付方式,请检查是否选择了跨境支付或卡支付!"); alert("商户至少开通一种支付方式,请检查是否选择了跨境支付或卡支付!");
return; return;
@ -436,11 +441,20 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
} }
}]); }]);
app.controller('partnerEditCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner','upayIndustryMap', app.controller('partnerEditCtrl2', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner','upayIndustryMap','wechatGoodMcc',
function ($scope, $http, $state, Upload, commonDialog, timezone, partner,upayIndustryMap) { function ($scope, $http, $state, Upload, commonDialog, timezone, partner,upayIndustryMap,wechatGoodMcc) {
$scope.upayIndustrys = upayIndustryMap.configs(); $scope.upayIndustrys = upayIndustryMap.configs();
$scope.timezones = timezone.configs(); $scope.timezones = timezone.configs();
$scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.partner = partner.data; $scope.partner = partner.data;
if(partner.data.certificat_expire_date) {
var datestr = partner.data.certificat_expire_date.replace(/-/g, '/');
$scope.partner.certificat_expire_date=new Date(datestr);
}
if($scope.partner.mc_code ){
$scope.partner.mc_code=parseInt($scope.partner.mc_code);
}
if (!$scope.partner.client_type) { if (!$scope.partner.client_type) {
$scope.partner.client_type = 'cross-border'; $scope.partner.client_type = 'cross-border';
} }

@ -55,6 +55,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.pagination = resp.data.pagination; $scope.pagination = resp.data.pagination;
}); });
}; };
$scope.linkButton = function (obj) { $scope.linkButton = function (obj) {
var partner = angular.copy(obj); var partner = angular.copy(obj);
partner.link = true; partner.link = true;
@ -153,12 +154,19 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}); });
}; };
$scope.pass = function (obj) { $scope.pass = function (partner) {
$http.get('/sys/partners/init/merchant_code').then(function (response) {
partner.client_moniker = response.data.partner_code;
console.log('partner.client_moniker',partner.client_moniker)
console.log('partner',partner)
$scope.merchantCodeChecked = true;
$scope.merchantIsValid = true;
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/partner_application_pass.html', templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
controller: 'passApplicationCtrl', controller: 'passApplicationCtrl',
resolve: { resolve: {
partner: obj partner: partner
} }
}).result.then(function () { }).result.then(function () {
commonDialog.alert({ commonDialog.alert({
@ -168,6 +176,26 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}); });
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true}); // $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
}) })
});
/*$uibModal.open({
templateUrl: '/static/payment/partner/templates/partner_application_pass.html',
controller: 'passApplicationCtrl',
resolve: {
partner: obj,
isPass:true
}
}).result.then(function () {
commonDialog.alert({
title: 'Success',
content: 'Pass Successfully ! 您成功建立了新的商户,请及时完善信息。',
type: 'success'
});
// $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true});
})*/
}; };
$scope.updateRemark = function () { $scope.updateRemark = function () {
var obj = angular.copy($scope.partner); var obj = angular.copy($scope.partner);
@ -177,6 +205,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}]); }]);
app.controller('passApplicationCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) { app.controller('passApplicationCtrl', ['$scope', '$http', '$state', 'partner', function ($scope, $http, $state, partner) {
$scope.partner = angular.copy(partner); $scope.partner = angular.copy(partner);
$scope.merchantCodeChecked = false;
$scope.merchantIsValid = false;
$scope.submit = function (form) { $scope.submit = function (form) {
if (form.$invalid) { if (form.$invalid) {
angular.forEach(form, function (item, key) { angular.forEach(form, function (item, key) {
@ -198,6 +228,28 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}); });
//$rootScope.partner_application = $scope.client; //$rootScope.partner_application = $scope.client;
}; };
$scope.initMerchantCode=function(){
$http.get('/sys/partners/init/merchant_code').then(function (response) {
$scope.partner.client_moniker = response.data.partner_code;
console.log('refresh',$scope.partner.client_moniker)
$scope.merchantCodeChecked = true;
$scope.merchantIsValid = true;
});
};
$scope.checkMerchantCodeIsValid = function (code) {
if (code.length != 4) {
$scope.merchantCodeChecked = false;
$scope.merchantIsValid = false;
return;
}
$http.get('/sys/partners/init/check_code_isvalid', {params: {clientMoniker: code}}).then(function (response) {
$scope.merchantIsValid = response.data;
$scope.merchantCodeChecked = true;
});
};
$scope.link = function (form) { $scope.link = function (form) {
if (form.$invalid) { if (form.$invalid) {
angular.forEach(form, function (item, key) { angular.forEach(form, function (item, key) {

@ -30,54 +30,128 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
{code: 2, label: 'Manager'}, {code: 2, label: 'Manager'},
{code: 3, label: 'Cashier'} {code: 3, label: 'Cashier'}
]; ];
// var wxMerchantIndustries = [
// {
// "label": "鞋包服饰|Shoes&Garments",
// "value": "343"
// },
// {
// "label": "机票行业|Air Ticket",
// "value": "493"
// },
// {
// "label": "文具/办公用品|Stationery/office supplies",
// "value": "492"
// },
// {
// "label": "酒店行业|Hotel Industry",
// "value": "491"
// },
// {
// "label": "教育行业|Education Industry",
// "value": "490"
// },
// {
// "label": "国际物流|Logistics",
// "value": "489"
// },
// {
// "label": "数码电器|Digital appliance",
// "value": "488"
// },
// {
// "label": "母婴|Maternal and infant",
// "value": "487"
// },
// {
// "label": "化妆品|Cosmetics",
// "value": "486"
// },
// {
// "label": "食品|Food",
// "value": "485"
// },
// {
// "label": "综合商城|Comprehensive mall",
// "value": "484"
// },
// {
// "label": "其它货物贸易行业|Other trade industry",
// "value": "494"
// }
// ];
var wxMerchantIndustries = [ var wxMerchantIndustries = [
{ {
"label": "鞋包服饰|Shoes&Garments", "label": "Shoes&Garments",
"value": "343" "value": "343"
}, },
{ {
"label": "机票行业|Air Ticket", "label": "Comprehensive mall",
"value": "493" "value": "484"
}, },
{ {
"label": "文具/办公用品|Stationery/office supplies", "label": "Food",
"value": "492" "value": "485"
}, },
{ {
"label": "酒店行业|Hotel Industry", "label": "Cosmetics",
"value": "491" "value": "486"
}, },
{ {
"label": "教育行业|Education Industry", "label": "Maternal and infant",
"value": "490" "value": "487"
}, },
{ {
"label": "国际物流|Logistics", "label": "Digital appliance",
"value": "489" "value": "488"
}, },
{ {
"label": "数码电器|Digital appliance", "label": "Logistics",
"value": "488" "value": "489"
}, },
{ {
"label": "母婴|Maternal and infant", "label": "Education Industry",
"value": "487" "value": "490"
}, },
{ {
"label": "化妆品|Cosmetics", "label": "Hotel Industry",
"value": "486" "value": "491"
}, },
{ {
"label": "食品|Food", "label": "Stationery/office supplies",
"value": "485" "value": "492"
}, },
{ {
"label": "综合商城|Comprehensive mall", "label": "Air Ticket",
"value": "484" "value": "493"
}, },
{ {
"label": "其它货物贸易行业|Other trade industry", "label": "Other trade industry",
"value": "494" "value": "494"
},{
"label": "Overseas Education",
"value": "528"
},
{
"label": "Travel ticket",
"value": "529"
},
{
"label": "Car rental",
"value": "530"
},
{
"label": "International Conference",
"value": "531"
},
{
"label": "Software",
"value": "532"
},
{
"label": "Medical Service",
"value": "533"
} }
]; ];
var removeClientPayDesc = function (items, key) { var removeClientPayDesc = function (items, key) {
@ -892,6 +966,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.isComplianceOfShortName = false; $scope.isComplianceOfShortName = false;
$scope.isComplianceOfBusinessStructure = false; $scope.isComplianceOfBusinessStructure = false;
$scope.cardPromotionaparams = {}; $scope.cardPromotionaparams = {};
if($scope.partner.mc_code ){
$scope.partner.mc_code=parseInt($scope.partner.mc_code);
}
var website = partner.data.company_website; var website = partner.data.company_website;
if (website != null) { if (website != null) {
if (website.indexOf('http') !== 0) { if (website.indexOf('http') !== 0) {
@ -2410,6 +2487,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
$scope.queryWechatSubMerchantIdStatus = function () {
$scope.paymentInfo.sub_merchant_id
$http.get('/sys/partners/'+$scope.paymentInfo.client_moniker+'/get_merchant_ids/'+$scope.paymentInfo.sub_merchant_id+'/status').then(function (resp) {
commonDialog.alert({
title: 'Wechat Apply Status('+resp.data.apply_status+")",
content: resp.data.response_str,
type: 'info'
})
})
}
}]); }]);
app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) { app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) {
$scope.logs = logs.data; $scope.logs = logs.data;
@ -3050,8 +3138,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}]); }]);
app.controller('partnerNewSubPartnerDialogCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', app.controller('partnerNewSubPartnerDialogCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone',
'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap', 'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap','wechatGoodMcc',
function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap) { function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, clientMoniker, industryMap, businessStructuresMap, stateMap, countryMap,wechatGoodMcc) {
if ($scope.partner_application) { if ($scope.partner_application) {
$scope.partner = angular.copy($scope.partner_application); $scope.partner = angular.copy($scope.partner_application);
delete $rootScope.partner_application; delete $rootScope.partner_application;
@ -3072,6 +3160,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.partner.client_pay_desc = []; $scope.partner.client_pay_desc = [];
$scope.merchantIsValid = false; $scope.merchantIsValid = false;
$scope.merchantCodeChecked = false; $scope.merchantCodeChecked = false;
$scope.wechatMccIndustries = wechatGoodMcc.configs();
var resetClientPayDescByTpey = function (type) { var resetClientPayDescByTpey = function (type) {
type = parseInt(type); type = parseInt(type);
if (type == 1) { if (type == 1) {
@ -3258,6 +3348,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return; return;
} }
$scope.errmsg = null; $scope.errmsg = null;
if (!$scope.partner.business_structure||$scope.partner.business_structure == '') {
alert('Please select the business structure');
return;
}
if ($scope.partner.company_name.indexOf("Migration") != -1) { if ($scope.partner.company_name.indexOf("Migration") != -1) {
alert("Company Name包含敏感词汇请检查后重新提交"); alert("Company Name包含敏感词汇请检查后重新提交");
return; return;
@ -3302,10 +3396,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return; return;
} }
} }
if (!$scope.partner.logo_url) { // if (!$scope.partner.logo_url) {
alert("Logo is necessary!"); // alert("Logo is necessary!");
return; // return;
} // }
if ($scope.partner.client_pay_type.indexOf('2') >= 0) { if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if (!$scope.partner.company_photo) { if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary'); alert('Shop Photo1 is necessary');
@ -5188,7 +5282,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]); }]);
app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) { app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) {
$scope.showMoreMerchantInfo = false; $scope.showMoreMerchantInfo = false;
$scope.hideMerchantInfo = function () { $scope.hideMerchantInfo = function () {
$scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo; $scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo;
}; };
@ -5219,6 +5312,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}); });
} }
$scope.updateSubMerchantId = function(merchant_app_id){
$uibModal.open({
templateUrl: '/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html',
controller: 'updateApplyWxSubMerchantIdCtrl',
resolve: {
merchantInfo:$scope.partner,
merchantIds:['$http', '$stateParams', function ($http) {
return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids');
}],
subMerchantInfo: ['$http', '$stateParams', function ($http) {
return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/'+merchant_app_id);
}]
}
}).result.then(function () {
$scope.loadSubMerchantInfos();
})
}
$scope.useRpaySubMerchantId = function (sub_merchant_id) { $scope.useRpaySubMerchantId = function (sub_merchant_id) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', {rpay_enterprise_id: sub_merchant_id}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', {rpay_enterprise_id: sub_merchant_id}).then(function (resp) {
commonDialog.alert({ commonDialog.alert({
@ -5243,7 +5353,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}); });
} }
$scope.applyWxSubMerchantId = function () { /*$scope.applyWxSubMerchantId = function () {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html', templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html',
controller: 'applyWxSubMerchantIdCtrl', controller: 'applyWxSubMerchantIdCtrl',
@ -5258,7 +5368,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}).result.then(function () { }).result.then(function () {
$scope.loadSubMerchantInfos(); $scope.loadSubMerchantInfos();
}) })
};*/
$scope.applyWxSubMerchantId = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html',
controller: 'newApplyWxSubMerchantIdCtrl',
resolve: {
subMerchantInfo: function () {
return $scope.partner;
},
merchantIds: ['$http', '$stateParams', function ($http) {
return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids');
}]
}
}).result.then(function () {
$scope.loadSubMerchantInfos();
})
}; };
$scope.applyMWSubMerchantId = function () { $scope.applyMWSubMerchantId = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) {
commonDialog.confirm({ commonDialog.confirm({
@ -5384,6 +5512,195 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}) })
} }
}]); }]);
app.controller('newApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog','wechatGoodMcc','businessTypesMap', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog,wechatGoodMcc,businessTypesMap) {
$scope.wxIndustries = angular.copy(wxMerchantIndustries);
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
$scope.subMerchantInfo.company_register_no=subMerchantInfo.abn?subMerchantInfo.abn:subMerchantInfo.acn;
$scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.merchantIds = merchantIds.data;
$scope.businessTypesMap=businessTypesMap.configs();
if ($scope.subMerchantInfo.client_pay_type) {
if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0&&$scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) {
$scope.subMerchantInfo.business_type='BOTH';
}
else if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0) {
$scope.subMerchantInfo.business_type='ONLINE';
}
else if ($scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) {
$scope.subMerchantInfo.business_type='OFFLINE';
}
}else{
$scope.subMerchantInfo.business_type='BOTH';
}
if($scope.subMerchantInfo.industry) {
$scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry);
}
if($scope.subMerchantInfo.mc_code) {
$scope.subMerchantInfo.mcc_code =$scope.subMerchantInfo. mc_code;
}
if(subMerchantInfo.certificat_expire_date) {
var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/');
$scope.subMerchantInfo.certificat_expire_date=new Date(datestr);
}
if($scope.subMerchantInfo.business_structure ){
$scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure == 'Company'? "ENTERPRISE":"INDIVIDUAL";
}
$scope.saveAppliy = function (form) {
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
// var merchant_type = $scope.subMerchantInfo.business_structure == 'Company'? 1:2;
var params = {
company_name : $scope.subMerchantInfo.company_name,
merchant_id : $scope.subMerchantInfo.merchant_id,
short_name : $scope.subMerchantInfo.short_name,
office_phone : $scope.subMerchantInfo.office_phone,
contact_person : $scope.subMerchantInfo.contact_person,
contact_phone : $scope.subMerchantInfo.contact_phone,
company_phone : $scope.subMerchantInfo.company_phone,
contact_email : $scope.subMerchantInfo.contact_email,
industry : $scope.subMerchantInfo.industry,
company_website : $scope.subMerchantInfo.company_website,
merchant_type: $scope.subMerchantInfo.merchant_type,
mcc_code : $scope.subMerchantInfo.mcc_code,
address: $scope.subMerchantInfo.address,
business_type:$scope.subMerchantInfo.business_type
};
if(params.business_type=='ONLINE'){
params.address=null;
}
else if(params.business_type=='OFFLINE'){
params.company_website=null;
}
if(params.merchant_type == 'ENTERPRISE'){
params.director_name = $scope.subMerchantInfo.director_name;
params.director_id_number = $scope.subMerchantInfo.director_id_number;
params.company_register_no = $scope.subMerchantInfo.company_register_no;
params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date;
if($scope.subMerchantInfo.certificat_expire_date) {
params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date)
}
}else{
params.principal_name = $scope.subMerchantInfo.principal_name;
params.principal_id_number = $scope.subMerchantInfo.principal_id_number;
}
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/new_sub_apply', params).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
if (subMerchantInfo.sub_merchant_id != null) {
commonDialog.confirm({title: 'Confirm', content: '已申请成功,是否确认使用'}).then(function () {
$http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Modify Wechat Sub Merchant ID successfully',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
})
} else {
$http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Apply Success And Modify Wechat Sub Merchant ID successfully',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
}
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
})
}
}]);
app.controller('updateApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog','wechatGoodMcc','merchantInfo', 'businessTypesMap',function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog,wechatGoodMcc,merchantInfo,businessTypesMap) {
$scope.wxIndustries = angular.copy(wxMerchantIndustries);
$scope.subMerchantInfo = angular.copy(subMerchantInfo.data);
$scope.merchantInfo = angular.copy(merchantInfo);
$scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.merchantIds = merchantIds.data;
$scope.businessTypesMap=businessTypesMap.configs();
if($scope.subMerchantInfo.business_structure ){
$scope.subMerchantInfo.merchant_type=$scope.subMerchantInfo.business_structure == 'Company'? "ENTERPRISE":"INDIVIDUAL";
}
if($scope.subMerchantInfo.industry) {
$scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry);
}
if($scope.subMerchantInfo.mcc_code ){
$scope.subMerchantInfo.mcc_code=parseInt($scope.subMerchantInfo.mcc_code);
}
if($scope.subMerchantInfo.certificat_expire_date) {
// var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/');
$scope.subMerchantInfo.certificat_expire_date=new Date($scope.subMerchantInfo.certificat_expire_date);
}
$scope.updateApply = function (form) {
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
var params = {
company_name : $scope.subMerchantInfo.company_name,
merchant_id : $scope.subMerchantInfo.merchant_id,
short_name : $scope.subMerchantInfo.short_name,
office_phone : $scope.subMerchantInfo.office_phone,
contact_person : $scope.subMerchantInfo.contact_person,
contact_phone : $scope.subMerchantInfo.contact_phone,
company_phone : $scope.subMerchantInfo.company_phone,
contact_email : $scope.subMerchantInfo.contact_email,
industry : $scope.subMerchantInfo.industry,
company_website : $scope.subMerchantInfo.company_website,
merchant_type: $scope.subMerchantInfo.merchant_type,
mcc_code : $scope.subMerchantInfo.mcc_code,
address: $scope.subMerchantInfo.address,
business_type:$scope.subMerchantInfo.business_type
};
if(params.business_type=='ONLINE'){
params.address=null;
}
else if(params.business_type=='OFFLINE'){
params.company_website=null;
}
if($scope.subMerchantInfo.merchant_type == 'ENTERPRISE'){
params.director_name = $scope.subMerchantInfo.director_name;
params.director_id_number = $scope.subMerchantInfo.director_id_number;
params.company_register_no = $scope.subMerchantInfo.company_register_no;
params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date;
if($scope.subMerchantInfo.certificat_expire_date) {
params.certificat_expire_date = $filter('dateConversionStr')($scope.subMerchantInfo.certificat_expire_date)
}
}else{
params.principal_name = $scope.subMerchantInfo.principal_name;
params.principal_id_number = $scope.subMerchantInfo.principal_id_number;
}
$http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/'+$scope.subMerchantInfo.merchant_app_id, params).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
commonDialog.confirm({title: 'Confirm', content: '微信商户进件已修改成功!'})
});
}
}]);
app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap', '$filter', 'commonDialog', 'timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap, $filter, commonDialog, timezone) { app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap', '$filter', 'commonDialog', 'timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap, $filter, commonDialog, timezone) {
$scope.subMerchantInfo = angular.copy(subMerchantInfo); $scope.subMerchantInfo = angular.copy(subMerchantInfo);
$scope.business_structures = businessStructuresMap.configs(); $scope.business_structures = businessStructuresMap.configs();
@ -6296,6 +6613,29 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return industry; return industry;
} }
}); });
//将保存的industry 和最新的分类比较,若查不到,返回空
app.filter('newWxMerchantsFilter', function () {
return function (values) {
var industry = null;
angular.forEach(wxMerchantIndustries, function (wxMerchant) {
if (wxMerchant.value == values) {
industry = wxMerchant.value;
}
});
return industry;
}
});
app.filter('newWxMerchants', function () {
return function (values) {
var industry = '';
angular.forEach(wxMerchantIndustries, function (wxMerchant) {
if (wxMerchant.value == values) {
industry = wxMerchant.label;
}
});
return industry;
}
});
app.filter('yeepayIndustry', function () { app.filter('yeepayIndustry', function () {
return function (value) { return function (value) {
switch (value + '') { switch (value + '') {
@ -6400,6 +6740,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}); });
app.filter('wechatMcc',['wechatGoodMcc', function (wechatGoodMcc) {
return function (values) {
var industry = '';
angular.forEach(wechatGoodMcc.configs(), function (wxMerchant) {
if (wxMerchant.value == values) {
industry = wxMerchant.label;
}
});
return industry;
}
}]);
app.filter('choose_merchant_id', function () { app.filter('choose_merchant_id', function () {
return function (value) { return function (value) {
switch (value + '') { switch (value + '') {
@ -6433,5 +6785,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return value + (tail || ' …'); return value + (tail || ' …');
}; };
}); });
app.filter('dateConversionStr',function () {
return function (date) {
var year = date.getFullYear(); //获取完整的年份(4位,1970-????)
var month =date.getMonth() + 1; //获取当前月份(0-11,0代表1月)
var day = date.getDate(); //获取当前日(1-31)
if (month < 10) {
month = "0" + month;
}
if (day < 10) {
day = "0" + day;
}
var dateString = year + "-" + month + "-" + day;
return dateString;
};
}
);
return app; return app;
}); });

@ -189,19 +189,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.business_structure.$invalid && partnerForm.business_structure.$dirty}">
<label class="control-label col-sm-2"
for="business-structure-input">Business Structure</label>
<div class="col-sm-8">
<select class="form-control" name="business_structure"
ng-model="partner.business_structure"
id="business-structure-input"
ng-options="structure.value as structure.label for structure in business_structures">
<option value="">Please Choose</option>
</select>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* Logo</label> <label class="control-label col-sm-2">* Logo</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -217,9 +204,79 @@
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;"> <img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;">
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.business_structure.$invalid && partnerForm.business_structure.$dirty}">
<label class="control-label col-sm-2"
for="business-structure-input">* Business Structure</label>
<div class="col-sm-8">
<select class="form-control" name="business_structure"
ng-model="partner.business_structure"
id="business-structure-input"
ng-options="structure.value as structure.label for structure in business_structures">
<option value="">Please Choose</option>
</select>
</div>
</div>
<!-- director name 法人姓名 -->
<!--<div class="form-group" ng-if="partner.business_structure == 'Company'"-->
<!--ng-class="{'has-error':partnerForm.director_name.$invalid && partnerForm.director_name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="director_name_input">Director Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.director_name" maxlength="128"-->
<!--type="text" name="director_name" id="director_name_input">-->
<!--<div ng-messages="partnerForm.director_name.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; director id number 法人身份证号&ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure == 'Company'"-->
<!--ng-class="{'has-error':partnerForm.director_id_number.$invalid && partnerForm.director_id_number.$dirty}">-->
<!--<label class="control-label col-sm-2" for="director_id_number_input">Director ID</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.director_id_number" maxlength="128"-->
<!--type="text" name="director_id_number" id="director_id_number_input">-->
<!--<div ng-messages="partnerForm.director_id_number.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; principal name 负责人姓名 &ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure != 'Company'"-->
<!--ng-class="{'has-error':partnerForm.principal_name.$invalid && partnerForm.principal_name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="principal_name_input">Principal Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.principal_name" maxlength="128"-->
<!--type="text" name="principal_name" id="principal_name_input">-->
<!--<div ng-messages="partnerForm.principal_name.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; principal id number 负责人身份证号 &ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure != 'Company'"-->
<!--ng-class="{'has-error':partnerForm.principal_id_number.$invalid && partnerForm.principal_id_number.$dirty}">-->
<!--<label class="control-label col-sm-2" for="principal_id_number_input">Principal ID Number</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.principal_id_number" maxlength="128"-->
<!--type="text" name="principal_id_number" id="principal_id_number_input">-->
<!--<div ng-messages="partnerForm.principal_id_number.$error" ng-if="partnerForm.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 class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}"
ng-if="partner.business_structure != 'Company' || partner.enable_card_payment"> ng-if="(partner.business_structure != 'Company'&&partner.business_structure != null )|| partner.enable_card_payment">
<label class="control-label col-sm-2" for="abn-input">* ABN</label> <label class="control-label col-sm-2" for="abn-input">* ABN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.abn" type="text" <input class="form-control" ng-model="partner.abn" type="text"
@ -238,11 +295,11 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}" ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}"
ng-if="partner.business_structure == 'Company' && partner.enable_cross_payment"> ng-if="(partner.business_structure == 'Company'&&partner.business_structure != null) && partner.enable_cross_payment">
<label class="control-label col-sm-2" for="acn-input">ACN</label> <label class="control-label col-sm-2" for="acn-input">* ACN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.acn" type="text" <input class="form-control" ng-model="partner.acn" type="text"
name="acn" name="acn" required
id="acn-input" maxlength="20"> id="acn-input" maxlength="20">
<div ng-messages="partnerForm.acn.$error" <div ng-messages="partnerForm.acn.$error"
ng-if="partnerForm.acn.$dirty"> ng-if="partnerForm.acn.$dirty">
@ -252,6 +309,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.business_structure == 'Company'&&partner.business_structure != null"
ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">
<!--<input class="form-control" ng-model="subMerchantInfo.company_register_date" required maxlength="50"-->
<!--type="text" name="company_register_date" id="company_register_date_input">-->
<div style="display: inline-block">
<input class="form-control" id="certificat_expire_date_input"
ng-model="partner.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>
<div ng-messages="partnerForm.certificat_expire_date.$error" ng-if="partnerForm.certificat_expire_date.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.company_phone_p.$invalid && partnerForm.company_phone_p.$dirty}"> ng-class="{'has-error':partnerForm.company_phone_p.$invalid && partnerForm.company_phone_p.$dirty}">
<label class="control-label col-sm-2" for="service-phone-p-input">* <label class="control-label col-sm-2" for="service-phone-p-input">*
@ -1210,7 +1288,7 @@
<div class="form-group" ng-if="partner.enable_cross_payment" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}"> ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input"> <label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label> *Wechat Business Category</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="industry" <select class="form-control" name="industry"
ng-model="partner.industry" ng-model="partner.industry"
@ -1225,6 +1303,24 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.wechatmcc.$invalid && partnerForm.wechatmcc.$dirty}">
<label class="control-label col-sm-2" for="wechatmcc_input">
*Wechat Merchant Category Code</label>
<div class="col-sm-8">
<select class="form-control" name="wechatmcc"
ng-model="partner.mc_code"
id="wechatmcc_input" required
ng-options="mc_code.value as mc_code.label for mc_code in wechatMccIndustries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.wechatmcc.$error"
ng-if="partnerForm.wechatmcc.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_cross_payment" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}"> ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">

@ -123,6 +123,63 @@
</select> </select>
</div> </div>
</div> </div>
<!-- director name 法人姓名 -->
<!--<div class="form-group" ng-if="partner.business_structure == 'Company'"-->
<!--ng-class="{'has-error':partnerForm.director_name.$invalid && partnerForm.director_name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="director_name_input">Director Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.director_name" maxlength="128"-->
<!--type="text" name="director_name" id="director_name_input">-->
<!--<div ng-messages="partnerForm.director_name.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; director id number 法人身份证号&ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure == 'Company'"-->
<!--ng-class="{'has-error':partnerForm.director_id_number.$invalid && partnerForm.director_id_number.$dirty}">-->
<!--<label class="control-label col-sm-2" for="director_id_number_input">Director Id</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.director_id_number" maxlength="128"-->
<!--type="text" name="director_id_number" id="director_id_number_input">-->
<!--<div ng-messages="partnerForm.director_id_number.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; principal name 负责人姓名 &ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure != 'Company'"-->
<!--ng-class="{'has-error':partnerForm.principal_name.$invalid && partnerForm.principal_name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="principal_name_input">Principal Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.principal_name" maxlength="128"-->
<!--type="text" name="principal_name" id="principal_name_input">-->
<!--<div ng-messages="partnerForm.principal_name.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; principal id number 负责人身份证号 &ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure != 'Company'"-->
<!--ng-class="{'has-error':partnerForm.principal_id_number.$invalid && partnerForm.principal_id_number.$dirty}">-->
<!--<label class="control-label col-sm-2" for="principal_id_number_input">Principal ID</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.principal_id_number" maxlength="128"-->
<!--type="text" name="principal_id_number" id="principal_id_number_input">-->
<!--<div ng-messages="partnerForm.principal_id_number.$error" ng-if="partnerForm.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 class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Logo</label> <label class="control-label col-sm-2">Logo</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -152,10 +209,10 @@
<!--</div>--> <!--</div>-->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-if="partner.business_structure != 'Company'"> ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-if="partner.business_structure != 'Company'">
<label class="control-label col-sm-2" for="abn-input">ABN</label> <label class="control-label col-sm-2" for="abn-input">* ABN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.abn" type="text" name="abn" <input class="form-control" ng-model="partner.abn" type="text" name="abn"
id="abn-input" id="abn-input" required
maxlength="20"> maxlength="20">
<div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty"> <div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 20 <p class="small text-danger" ng-message="maxlength">Less Than 20
@ -165,9 +222,9 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}" ng-if="partner.business_structure == 'Company'"> ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}" ng-if="partner.business_structure == 'Company'">
<label class="control-label col-sm-2" for="acn-input">ACN</label> <label class="control-label col-sm-2" for="acn-input">* ACN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.acn" type="text" name="acn" <input class="form-control" ng-model="partner.acn" type="text" name="acn" required
id="acn-input" maxlength="20"> id="acn-input" maxlength="20">
<div ng-messages="partnerForm.acn.$error" ng-if="partnerForm.acn.$dirty"> <div ng-messages="partnerForm.acn.$error" ng-if="partnerForm.acn.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 20 <p class="small text-danger" ng-message="maxlength">Less Than 20
@ -176,6 +233,28 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.business_structure == 'Company'"
ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">
<!--<input class="form-control" ng-model="subMerchantInfo.company_register_date" required maxlength="50"-->
<!--type="text" name="company_register_date" id="company_register_date_input">-->
<div style="display: inline-block">
<input class="form-control" id="certificat_expire_date_input"
ng-model="partner.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>
<div ng-messages="partnerForm.certificat_expire_date.$error" ng-if="partnerForm.certificat_expire_date.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<!--<div class="form-group"--> <!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.sector.$invalid && partnerForm.sector.$dirty}">--> <!--ng-class="{'has-error':partnerForm.sector.$invalid && partnerForm.sector.$dirty}">-->
<!--<label class="control-label col-sm-2" for="sector-input">* Sector</label>--> <!--<label class="control-label col-sm-2" for="sector-input">* Sector</label>-->
@ -1175,7 +1254,7 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}"> ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input"> <label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label> *Wechat Business Category</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="industry" <select class="form-control" name="industry"
ng-model="partner.industry" ng-model="partner.industry"
@ -1190,7 +1269,24 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':partnerForm.wechatmcc.$invalid && partnerForm.wechatmcc.$dirty}">
<label class="control-label col-sm-2" for="wechatmcc_input">
*Wechat Merchant Category Code</label>
<div class="col-sm-8">
<select class="form-control" name="wechatmcc"
ng-model="partner.mc_code"
id="wechatmcc_input" required
ng-options="mc_code.value as mc_code.label for mc_code in wechatMccIndustries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.wechatmcc.$error"
ng-if="partnerForm.wechatmcc.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}"> ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
@ -1198,7 +1294,7 @@
<div class="col-sm-8" > <div class="col-sm-8" >
<input class="form-control" id="alipay_category" required <input class="form-control" id="alipay_category" required
name="alipay_category" readonly name="alipay_category" readonly
ng-model="partner.alipayindustry" ng-model="partner.alipayindustry|partner_alipay_industry"
multi-level-select-popup="alipayMccCategory" multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)" on-select="onAlipayMccSelect($selected)"
chose-one-level="false"> chose-one-level="false">

@ -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>
<!--&lt;!&ndash; director name 法人姓名 &ndash;&gt;-->
<!--<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>-->
<!--&lt;!&ndash; director id number 法人身份证号&ndash;&gt;-->
<!--<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>-->
<!--&lt;!&ndash; principal name 负责人姓名 &ndash;&gt;-->
<!--<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>-->
<!--&lt;!&ndash; principal id number 负责人身份证号 &ndash;&gt;-->
<!--<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>

@ -7,13 +7,20 @@
<form name="partnerForm" novalidate> <form name="partnerForm" novalidate>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.client_moniker.$invalid && partnerForm.client_moniker.$dirty}"> ng-class="{'has-error':partnerForm.client_moniker.$invalid && partnerForm.client_moniker.$dirty}">
<label class="control-label col-sm-6" for="short-id-input">Partner Code(4 Letters or <label class="control-label col-sm-4" for="short-id-input">* Partner Code(4 Letters or
Numbers)</label> Numbers)</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input class="form-control text-uppercase" ng-model="partner.client_moniker" <input ng-if="!partner.link" class="form-control text-uppercase" ng-model="partner.client_moniker"
type="text" type="text"
name="client_moniker" name="client_moniker"
id="short-id-input" required maxlength="4" ng-pattern="/^[a-zA-Z0-9]+$/"> id="short-id-pass-input" required maxlength="4" ng-pattern="/^[a-zA-Z0-9]+$/">
<input ng-if="partner.link" class="form-control text-uppercase"
ng-model="partner.client_moniker"
type="text"
name="client_moniker"
id="short-id-input" required maxlength="4" ng-pattern="/^[a-zA-Z0-9]+$/"
ng-change="checkMerchantCodeIsValid(partner.client_moniker)">
<p class="small text-info">No further changeable!</p> <p class="small text-info">No further changeable!</p>
<div ng-messages="partnerForm.client_moniker.$error" <div ng-messages="partnerForm.client_moniker.$error"
ng-if="partnerForm.client_moniker.$dirty"> ng-if="partnerForm.client_moniker.$dirty">
@ -23,6 +30,11 @@
Numbers are allowed</p> Numbers are allowed</p>
</div> </div>
</div> </div>
<a ng-if="!partner.link" style="display: inline-block" role="button" ng-click="initMerchantCode(partner)"><i class="fa fa-refresh" title="Refreshes the partner code"></i></a>
<span ng-if="!partner.link&&merchantCodeChecked">
<i ng-if="merchantIsValid" class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none;padding-left: 20px"></i>
<i ng-if="!merchantIsValid" class="text-danger fa fa-close" style="float: none;padding-left: 20px"></i>
</span>
</div> </div>
</form> </form>
</div> </div>

@ -560,6 +560,38 @@
</p> </p>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.director_name" >
<label
class="control-label col-sm-2">Director Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.director_name"></p>
</div>
</div>
<div class="form-group" ng-if="partner.director_id_number">
<label
class="control-label col-sm-2">Director Id</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.director_id_number"></p>
</div>
</div>
<div class="form-group" ng-if="partner.principal_name">
<label
class="control-label col-sm-2">Principal Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.principal_name"></p>
</div>
</div>
<div class="form-group" ng-if="partner.principal_id_number">
<label
class="control-label col-sm-2">Principal Id</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.principal_id_number"></p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Logo</label> <label class="control-label col-sm-2">Logo</label>
<div class="col-sm-10"> <div class="col-sm-10">
@ -579,6 +611,13 @@
<p class="form-control-static" ng-bind="partner.acn"></p> <p class="form-control-static" ng-bind="partner.acn"></p>
</div> </div>
</div> </div>
<div class="form-group" >
<label class="control-label col-sm-2">Expiration Date of Registration Certificat</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.certificat_expire_date"></p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Industry</label> <label class="control-label col-sm-2">Industry</label>
@ -1297,6 +1336,16 @@
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2">Wechat Merchant Category Code</label>
<div class="col-sm-10">
<p class="form-control-static industry-p" ng-if="partner.mc_code">
{{partner.mc_code|wechat_mcc}}
&nbsp;&nbsp;&nbsp;({{partner.mc_code}})
</p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Alipay Category</label> <label class="control-label col-sm-2">Alipay Category</label>
<div class="col-sm-10"> <div class="col-sm-10">

@ -236,6 +236,62 @@
</select> </select>
</div> </div>
</div> </div>
<!-- director name 法人姓名 -->
<!--<div class="form-group" ng-if="partner.business_structure == 'Company'"-->
<!--ng-class="{'has-error':partnerForm.director_name.$invalid && partnerForm.director_name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="director_name_input">Director Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.director_name" maxlength="128"-->
<!--type="text" name="director_name" id="director_name_input">-->
<!--<div ng-messages="partnerForm.director_name.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; director id number 法人身份证号&ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure == 'Company'"-->
<!--ng-class="{'has-error':partnerForm.director_id_number.$invalid && partnerForm.director_id_number.$dirty}">-->
<!--<label class="control-label col-sm-2" for="director_id_number_input">Director Id</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.director_id_number" maxlength="128"-->
<!--type="text" name="director_id_number" id="director_id_number_input">-->
<!--<div ng-messages="partnerForm.director_id_number.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; principal name 负责人姓名 &ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure != 'Company'"-->
<!--ng-class="{'has-error':partnerForm.principal_name.$invalid && partnerForm.principal_name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="principal_name_input">Principal Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.principal_name" maxlength="128"-->
<!--type="text" name="principal_name" id="principal_name_input">-->
<!--<div ng-messages="partnerForm.principal_name.$error" ng-if="partnerForm.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>-->
<!--&lt;!&ndash; principal id number 负责人身份证号 &ndash;&gt;-->
<!--<div class="form-group" ng-if="partner.business_structure != 'Company'"-->
<!--ng-class="{'has-error':partnerForm.principal_id_number.$invalid && partnerForm.principal_id_number.$dirty}">-->
<!--<label class="control-label col-sm-2" for="principal_id_number_input">Principal ID Number</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="partner.principal_id_number" maxlength="128"-->
<!--type="text" name="principal_id_number" id="principal_id_number_input">-->
<!--<div ng-messages="partnerForm.principal_id_number.$error" ng-if="partnerForm.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 class="form-group" ng-if="!partner.parent_client_id || ('00110'|withRole)"> <div class="form-group" ng-if="!partner.parent_client_id || ('00110'|withRole)">
<label class="control-label col-sm-2">Logo</label> <label class="control-label col-sm-2">Logo</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -251,9 +307,9 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-if="partner.business_structure != 'Company'"> ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-if="partner.business_structure != 'Company'">
<label class="control-label col-sm-2" for="abn-input">ABN</label> <label class="control-label col-sm-2" for="abn-input">* ABN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.abn" type="text" name="abn" <input class="form-control" ng-model="partner.abn" type="text" name="abn" required
id="abn-input" id="abn-input"
maxlength="20"> maxlength="20">
<div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty"> <div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty">
@ -264,9 +320,9 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}" ng-if="partner.business_structure == 'Company'"> ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}" ng-if="partner.business_structure == 'Company'">
<label class="control-label col-sm-2" for="acn-input">ACN</label> <label class="control-label col-sm-2" for="acn-input">* ACN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.acn" type="text" name="acn" <input class="form-control" ng-model="partner.acn" type="text" name="acn" required
id="acn-input" maxlength="20"> id="acn-input" maxlength="20">
<div ng-messages="partnerForm.acn.$error" ng-if="partnerForm.acn.$dirty"> <div ng-messages="partnerForm.acn.$error" ng-if="partnerForm.acn.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 20 <p class="small text-danger" ng-message="maxlength">Less Than 20
@ -274,6 +330,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.business_structure == 'Company'"
ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">
<!--<input class="form-control" ng-model="subMerchantInfo.company_register_date" required maxlength="50"-->
<!--type="text" name="company_register_date" id="company_register_date_input">-->
<div style="display: inline-block">
<input class="form-control" id="certificat_expire_date_input"
ng-model="partner.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>
<div ng-messages="partnerForm.certificat_expire_date.$error" ng-if="partnerForm.certificat_expire_date.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<!--<div hidden class="form-group" ng-if="!partner.parent_client_id || ('00010'|withRole)">--> <!--<div hidden class="form-group" ng-if="!partner.parent_client_id || ('00010'|withRole)">-->
<!--<label class="control-label col-sm-2" for="sector-input">Sector</label>--> <!--<label class="control-label col-sm-2" for="sector-input">Sector</label>-->
<!--<div class="col-sm-8">--> <!--<div class="col-sm-8">-->
@ -1167,7 +1244,7 @@
<div class="form-group" ng-if="partner.enable_cross_payment" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}"> ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input"> <label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label> *Wechat Business Category</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="industry" <select class="form-control" name="industry"
ng-model="partner.industry" ng-model="partner.industry"
@ -1183,6 +1260,25 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.wechatmcc.$invalid && partnerForm.wechatmcc.$dirty}">
<label class="control-label col-sm-2" for="wechatmcc_input">
*Wechat Merchant Category Code</label>
<div class="col-sm-8">
<select class="form-control" name="wechatmcc"
ng-model="partner.mc_code"
id="wechatmcc_input" required
ng-options="mc_code.value as mc_code.label for mc_code in wechatMccIndustries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.wechatmcc.$error"
ng-if="partnerForm.wechatmcc.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_cross_payment" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}"> ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"

@ -10,9 +10,9 @@
<p ng-if="!ctrl.editSubMerchant" class="form-control-static"> <p ng-if="!ctrl.editSubMerchant" class="form-control-static">
{{paymentInfo.sub_merchant_id||'Not Configure'}} {{paymentInfo.sub_merchant_id||'Not Configure'}}
<a role="button" ng-click="ctrl.editSubMerchant=true" ng-if="'011'|withRole"><i class="fa fa-edit"></i></a> <a role="button" ng-click="ctrl.editSubMerchant=true" ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<a role="button" ng-click="queryWechatSubMerchantIdStatus()"><i class="fa fa-refresh"></i></a>
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="paymentInfo.temp_sub_merchant"></i> <i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="paymentInfo.temp_sub_merchant"></i>
&nbsp;&nbsp;<span class="small" ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.merchant_id"><b>Merchant ID</b>:{{paymentInfo.merchant_id | choose_merchant_id}}</span> &nbsp;&nbsp;<span class="small" ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.merchant_id"><b>Merchant ID</b>:{{paymentInfo.merchant_id | choose_merchant_id}}</span>
&nbsp;&nbsp;
<span class="small" <span class="small"
ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.sub_merchant_id_log"> ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.sub_merchant_id_log">
<a class="text-primary" role="button" title="modify logs" <a class="text-primary" role="button" title="modify logs"

@ -63,11 +63,11 @@
</li> </li>
<li class="list-group-item list-group-item-success"> <li class="list-group-item list-group-item-success">
Business Category Business Category
<span style="float: right">{{id_apply.business_category | wxMerchants}}</span> <span style="float: right">{{id_apply.business_category | newWxMerchants}}</span>
</li> </li>
<li class="list-group-item list-group-item-success"> <li class="list-group-item list-group-item-success">
Description Mcc Code
<span style="float: right;">{{id_apply.merchant_introduction | cut:true:20:' ...'}}</span> <span style="float: right;">{{id_apply.mcc_code | wechatMcc }}</span>
</li> </li>
<li class="list-group-item list-group-item-success"> <li class="list-group-item list-group-item-success">
Operator Operator
@ -80,6 +80,10 @@
ng-click="useSubMerchantId(id_apply.sub_merchant_id)"> ng-click="useSubMerchantId(id_apply.sub_merchant_id)">
USE USE
</button> </button>
<!--<button role="button" class="btn btn-info" title="update"-->
<!--ng-click="updateSubMerchantId(id_apply.merchant_app_id)">-->
<!--UPDATE-->
<!--</button>-->
</div> </div>
</div> </div>
</div> </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>-->
<!--&lt;!&ndash; director id number 法人身份证号&ndash;&gt;-->
<!--<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>-->
<!--&lt;!&ndash; principal name 负责人姓名 &ndash;&gt;-->
<!--<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>-->
<!--&lt;!&ndash; principal id number 负责人身份证号 &ndash;&gt;-->
<!--<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…
Cancel
Save