diff --git a/pom.xml b/pom.xml index 85a9abf62..591b9133d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,11 +5,11 @@ au.com.royalpay.payment payment-parent - 2.2.21 + 2.2.24 4.0.0 manage - 2.3.72 + 2.3.73 UTF-8 2.4.0 diff --git a/src/db/2.3.73/update.sql b/src/db/2.3.73/update.sql new file mode 100644 index 000000000..0d192703f --- /dev/null +++ b/src/db/2.3.73/update.sql @@ -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 '注册证书过期时间'; diff --git a/src/db/modify.sql b/src/db/modify.sql index 982d51c8e..2053b4215 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -723,4 +723,51 @@ update pmt_custom_reports set report_serial=uuid(); 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)'; -INSERT INTO `royalpay`.`sys_configs`(`config_key`, `config_value`, `config_desc`) VALUES ('rick_interior_send_email', 'dll19920503@qq.com', '内部调用测试发送邮箱'); \ No newline at end of file +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 '注册证书过期时间'; diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java index 5a6b78aeb..4756f64bf 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java @@ -155,4 +155,11 @@ public interface ClientMapper { PageList listCompletedContractKycClients(JSONObject params, PageBounds pageBounds); int countKycClients(JSONObject params); + + + /** + * 半年内有交易的有效商户 + * @return + */ + List halfYearHaveTransactionClients(@Param("from") Date fromDate, @Param("to") Date toDate); } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysWxMerchantApplyMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysWxMerchantApplyMapper.java index a3c257372..08ffa592c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysWxMerchantApplyMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysWxMerchantApplyMapper.java @@ -1,13 +1,13 @@ 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.AutoSql; import com.yixsoft.support.mybatis.autosql.annotations.SqlType; import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import org.apache.ibatis.annotations.Param; - +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; import java.util.List; /** @@ -15,10 +15,27 @@ import java.util.List; */ @AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id") public interface SysWxMerchantApplyMapper { - @AutoSql(SqlType.SELECT) + + @Select("SELECT * FROM sys_wx_merchant_apply WHERE client_id = #{client_id} and is_valid = 1") List listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds); @AutoSql(SqlType.INSERT) void insertWxMerchantApply(JSONObject params); + @AutoSql(SqlType.SELECT) + JSONObject findByClientIdAndSubMerchantAppId(@Param("client_id") int clientId, @Param("merchant_app_id")String merchantAppId); + + @AutoSql(SqlType.SELECT) + List 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); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java index 1ef0b6c83..e5cea877e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java @@ -6,6 +6,7 @@ import com.alibaba.fastjson.annotation.JSONField; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Pattern; +import java.util.Date; /** * Created by yixian on 2016-06-29. @@ -129,6 +130,14 @@ public class ClientRegisterInfo { @JSONField(name = "enable_card_payment") 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() { if (industry == null) { setIndustry("331"); @@ -633,4 +642,52 @@ public class ClientRegisterInfo { public void setEnableCrossPayment(boolean 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; + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewSubMerchantIdApply.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewSubMerchantIdApply.java new file mode 100644 index 000000000..3bd387622 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/NewSubMerchantIdApply.java @@ -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; + } +} diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index d8b43d483..66661665e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -432,6 +432,14 @@ public interface ClientManager { 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 registerAlipayOnlineGms(String clientMoniker, JSONObject manager); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 9c7d68214..b07dce613 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -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.WxPayClient; 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.beans.EmptyMerchantApplication; 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; - + @Resource + private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper; @PostConstruct public void init() { tags.add("account"); @@ -535,6 +538,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (representativeInfo != null) { 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; } @@ -862,9 +869,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } catch (Exception e) { logger.error("邮件列表添加成员失败", e); } + saveWechatMcc(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 @Transactional public void updateClientRegisterInfo(JSONObject manager, String clientMoniker, ClientRegisterInfo info) { @@ -943,6 +973,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } clientConfigMapper.update(clientConfig); clientInfoCacheSupport.clearClientCache(clientId); + client.put("mc_code",info.getMc_code()); + saveWechatMcc(client); } @Override @@ -5637,6 +5669,115 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid 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 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 public void registerAlipayGms(String clientMoniker, JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index d1cbdc529..628043377 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -837,6 +837,28 @@ public class PartnerManageController { 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}) public void registerAlipayGms(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { clientManager.registerAlipayGms(clientMoniker, manager); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index df94edbe3..e75c109fc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -160,11 +160,11 @@ settle: - RPAY_SVC_CARD - RPAY_SVC_DIRECTDEBIT logging: - level: - au: - com: - royalpay: - payment: debug + level: + au: + com: + royalpay: + payment: debug diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index f312069b6..e99c35ccf 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -941,4 +941,15 @@ + + diff --git a/src/main/ui/partner_register.html b/src/main/ui/partner_register.html index c53365e79..740f391de 100644 --- a/src/main/ui/partner_register.html +++ b/src/main/ui/partner_register.html @@ -106,58 +106,131 @@ "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 = [ { - "label": "综合商城 Integrated Store", - "value": 336 + "label": "Shoes&Garments", + "value": "343" }, { - "label": "食品 Food", - "value": 335 + "label": "Comprehensive mall", + "value": "484" }, { - "label": "化妆品 Cosmetics", - "value": 334 + "label": "Food", + "value": "485" }, { - "label": "鞋包服饰 Clothes", - "value": 327 + "label": "Cosmetics", + "value": "486" }, { - "label": "酒店行业 Hospitality industry", - "value": 328 + "label": "Maternal and infant", + "value": "487" }, { - "label": "数码电器 Electric appliances", - "value": 332 + "label": "Digital appliance", + "value": "488" }, { - "label": "母婴 Baby and maternal products", - "value": 333 + "label": "Logistics", + "value": "489" }, { - "label": "文具/办公用品 Office supplies", - "value": 337 + "label": "Education Industry", + "value": "490" }, { - "label": "机票行业 Airline tickets industry", - "value": 339 + "label": "Hotel Industry", + "value": "491" }, { - "label": "国际物流 International logistics", - "value": 330 + "label": "Stationery/office supplies", + "value": "492" }, { - "label": "教育行业 Education section", - "value": 329 + "label": "Air Ticket", + "value": "493" }, { - "label": "其它服务行业 Other services industry", - "value": 331 + "label": "Other trade industry", + "value": "494" + },{ + "label": "Overseas Education", + "value": "528" }, { - "label": "其它货物贸易行业 Other goods trade industry", - "value": 338 + "label": "Travel ticket", + "value": "529" + }, + { + "label": "Car rental", + "value": "530" + }, + { + "label": "International Conference", + "value": "531" + }, + { + "label": "Software", + "value": "532" + }, + { + "label": "Medical Service", + "value": "533" } ]; diff --git a/src/main/ui/static/commons/commons.js b/src/main/ui/static/commons/commons.js index b9982e82b..fa5c8bdee 100644 --- a/src/main/ui/static/commons/commons.js +++ b/src/main/ui/static/commons/commons.js @@ -9,6 +9,7 @@ define(['./app', './services/chartParser', './services/orderService', './services/businessStructuresMap', + './services/businessTypesMap', './services/yeepayBusinessContentMap', './services/yeepayIndustryMap', './services/stateMap', diff --git a/src/main/ui/static/commons/services/businessTypesMap.js b/src/main/ui/static/commons/services/businessTypesMap.js new file mode 100644 index 000000000..0f4db5746 --- /dev/null +++ b/src/main/ui/static/commons/services/businessTypesMap.js @@ -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; + } + } + }); +}); \ No newline at end of file diff --git a/src/main/ui/static/commons/services/industryMap.js b/src/main/ui/static/commons/services/industryMap.js index 3213ca4a3..75aad7d3c 100644 --- a/src/main/ui/static/commons/services/industryMap.js +++ b/src/main/ui/static/commons/services/industryMap.js @@ -1,90 +1,163 @@ define(['../app'], function (app) { '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 = [ { - "label": "鞋包服饰", - "value": "327" + "label": "Shoes&Garments", + "value": "343" }, { - "label": "机票行业", - "value": "339" + "label": "Comprehensive mall", + "value": "484" }, { - "label": "软件服务", - "value": "356" + "label": "Food", + "value": "485" }, { - "label": "旅游票务", - "value": "357" + "label": "Cosmetics", + "value": "486" }, { - "label": "国际租车", - "value": "358" + "label": "Maternal and infant", + "value": "487" }, { - "label": "医疗服务(出国)", - "value": "359" + "label": "Digital appliance", + "value": "488" }, { - "label": "医疗服务(不出国)", - "value": "360" + "label": "Logistics", + "value": "489" }, { - "label": "留学教育(网络教育)", - "value": "361" + "label": "Education Industry", + "value": "490" }, { - "label": "留学教育(一年及以下)", - "value": "362" + "label": "Hotel Industry", + "value": "491" }, { - "label": "其它货物贸易行业", - "value": "338" + "label": "Stationery/office supplies", + "value": "492" }, { - "label": "文具/办公用品", - "value": "337" + "label": "Air Ticket", + "value": "493" }, { - "label": "综合商城", - "value": "336" + "label": "Other trade industry", + "value": "494" + },{ + "label": "Overseas Education", + "value": "528" }, { - "label": "酒店行业", - "value": "328" + "label": "Travel ticket", + "value": "529" }, { - "label": "教育行业", - "value": "329" + "label": "Car rental", + "value": "530" }, { - "label": "国际物流", - "value": "330" + "label": "International Conference", + "value": "531" }, { - "label": "数码电器", - "value": "332" + "label": "Software", + "value": "532" }, { - "label": "母婴", - "value": "333" - }, - { - "label": "化妆品", - "value": "334" - }, - { - "label": "食品", - "value": "335" - }, - { - "label": "留学教育(一年以上)", - "value": "363" - }, - { - "label": "其它服务行业", - "value": "331" + "label": "Medical Service", + "value": "533" } ]; app.factory('industryMap', function () { diff --git a/src/main/ui/static/commons/services/wechatGoodMcc.js b/src/main/ui/static/commons/services/wechatGoodMcc.js index e44b0a479..71fedb5a1 100644 --- a/src/main/ui/static/commons/services/wechatGoodMcc.js +++ b/src/main/ui/static/commons/services/wechatGoodMcc.js @@ -1,576 +1,1503 @@ define(["../app"], function (app) { "use strict"; + // var wechatGoodMcc = [ + // { + // "label": "Duty-free shops 免税店", + // "value": 5309 + // }, { + // "label": "Department stores 百货商店", + // "value": 5311 + // }, { + // "label": "Discount shops 折扣商店", + // "value": 5310 + // }, { + // "label": "Auto and home supply outlets 汽车商店、家庭用品商店", + // "value": 5531 + // }, { + // "label": "Men’s and boys’ clothing and accessory shops 男子和男童服装及用品商店", + // "value": 5611 + // }, { + // "label": "Women’s ready-to-wear shops 妇女成衣商店", + // "value": 5621 + // }, { + // "label": "Women’s accessory and speciality shops 女性用品商店", + // "value": 5631 + // }, { + // "label": "Children’s and infants’ wear shops 婴儿、儿童服装店", + // "value": 5641 + // }, { + // "label": "Family clothing shops 家庭服装商店", + // "value": 5651 + // }, { + // "label": "Sports and riding apparel shops 运动服饰商店", + // "value": 5655 + // }, { + // "label": "Shoe shops 鞋店", + // "value": 5661 + // }, { + // "label": "Furriers and fur shops 皮货店", + // "value": 5681 + // }, { + // "label": "Men’s and women’s clothing shops 成人成衣店", + // "value": 5691 + // }, { + // "label": "Miscellaneous apparel and accessory shops 各类服装及饰物店", + // "value": 5699 + // }, { + // "label": "Furniture, home furnishings and equipment shops and manufacturers, except appliances 家具、家庭摆品、家用设备零售商", + // "value": 5712 + // }, { + // "label": "Household appliance shops 家用电器商店", + // "value": 5722 + // }, { + // "label": "Jewellery, watch, clock and silverware shops 珠宝、钟表、银器店", + // "value": 5944 + // }, { + // "label": "Luggage and leather goods shops 箱包、皮具店", + // "value": 5948 + // }, { + // "label": "Precious stones and metals, watches and jewellery 宝石和金属、手表和珠宝", + // "value": 5094 + // }, { + // "label": "Variety stores 各类杂货店、便利店", + // "value": 5331 + // }, { + // "label": "Groceries and supermarkets 大型仓储式超级市场", + // "value": 5411 + // }, { + // "label": "Home supply warehouse outlets 大型仓储式家庭用品卖场", + // "value": 5200 + // }, { + // "label": "Tailors, seamstresses, mending and alterations 裁缝、修补、改衣店", + // "value": 5697 + // }, { + // "label": "Wig and toupee shops 假发商店", + // "value": 5698 + // }, { + // "label": "Floor covering services 地板商店", + // "value": 5713 + // }, { + // "label": "Drapery, window covering and upholstery shops 帏帐、窗帘、室内装潢商店", + // "value": 5714 + // }, { + // "label": "Alcoholic beverage wholesalers 酒精饮料", + // "value": 5715 + // }, { + // "label": "Fireplaces, fireplace screens and accessories shops 壁炉、壁炉防护网及配件商店", + // "value": 5718 + // }, { + // "label": "Miscellaneous home furnishing speciality shops 各种家庭装饰专营店", + // "value": 5719 + // }, { + // "label": "Electronics shops 电子设备商店", + // "value": 5732 + // }, { + // "label": "Music shops - musical instruments, pianos and sheet music 音乐商店-乐器、钢琴、乐谱", + // "value": 5733 + // }, { + // "label": "Computer software outlets 计算机软件商店", + // "value": 5734 + // }, { + // "label": "Record shops 音像制品商店", + // "value": 5735 + // }, { + // "label": "Package shops - beer, wine and liquor 瓶装酒零售店", + // "value": 5921 + // }, { + // "label": "Used merchandise and second-hand shops 旧商品店、二手商品店", + // "value": 5931 + // }, { + // "label": "Antique shop - sale, repair and restoration 古玩店-出售、维修及还原", + // "value": 5932 + // }, { + // "label": "Antique reproduction shops 古玩复制店", + // "value": 5937 + // }, { + // "label": "Bicycle shops - sales and service 自行车商店", + // "value": 5940 + // }, { + // "label": "Sporting goods shops 体育用品店", + // "value": 5941 + // }, { + // "label": "Bookshops 书店", + // "value": 5942 + // }, { + // "label": "Stationery, office and school supply shops 文具用品商店、各类办公用品商店", + // "value": 5943 + // }, { + // "label": "Hobby, toy and game shops 玩具、游戏店", + // "value": 5945 + // }, { + // "label": "Camera and photographic supply shops 照相器材商店", + // "value": 5946 + // }, { + // "label": "Gift, card, novelty and souvenir shops 礼品、卡片、装饰品、纪念品商店", + // "value": 5947 + // }, { + // "label": "Sewing, needlework, fabric and piece goods shops 纺织品及针织品零售", + // "value": 5949 + // }, { + // "label": "Glassware and crystal shops 玻璃器皿和水晶饰品店", + // "value": 5950 + // }, { + // "label": "Artist supply and craft shops 工艺美术商店", + // "value": 5970 + // }, { + // "label": "Art dealers and galleries 艺术商和画廊", + // "value": 5971 + // }, { + // "label": "Stamp and coin shops 邮票和纪念币商店", + // "value": 5972 + // }, { + // "label": "Religious goods and shops 宗教品商店", + // "value": 5973 + // }, { + // "label": "Cosmetic shops 化妆品商店", + // "value": 5977 + // }, { + // "label": "Typewriter outlets - sales, service and rentals 打字机商店-销售、服务和出租", + // "value": 5978 + // }, { + // "label": "Florists 花店", + // "value": 5992 + // }, { + // "label": "Cigar shops and stands 香烟、雪茄专卖店", + // "value": 5993 + // }, { + // "label": "Newsagents and news-stands 报亭、报摊", + // "value": 5994 + // }, { + // "label": "Pet shops, pet food and supplies 宠物商店、宠物食品及用品", + // "value": 5995 + // }, { + // "label": "Electric razor shops - sales and service 电动剃刀商店-销售和服务", + // "value": 5997 + // }, { + // "label": "Miscellaneous and speciality retail outlets 其他专门零售店", + // "value": 5999 + // }, { + // "label": "Office, photographic, photocopy and microfilm equipment 办公、影印及微缩摄影器材", + // "value": 5044 + // }, { + // "label": "Computers, computer peripheral equipment - not elsewhere classified 计算机、计算机外围设备", + // "value": 5045 + // }, { + // "label": "Piece goods, notions and other dry goods 布料、缝纫用品和其他纺织品", + // "value": 5131 + // }, { + // "label": "Books, periodicals and newspapers 书、期刊和报纸", + // "value": 5192 + // }, { + // "label": "Glass, paint and wallpaper shops 玻璃、油漆涂料、墙纸零售", + // "value": 5231 + // }, { + // "label": "Hardware shops 五金商店", + // "value": 5251 + // }, { + // "label": "Lawn and garden supplies outlets, including nurseries 草坪、花园用品商店", + // "value": 5261 + // }, { + // "label": "Freezer and locker meat provisioners 各类肉类零售商", + // "value": 5422 + // }, { + // "label": "Candy, nut and confectionery shops 糖果及坚果商店", + // "value": 5441 + // }, { + // "label": "Dairies 乳制品店、冷饮店", + // "value": 5451 + // }, { + // "label": "Bakeries 面包房、糕点商店", + // "value": 5462 + // }, { + // "label": "Miscellaneous food shops - convenience and speciality retail outlets 各类食品店及专门食品零售店", + // "value": 5499 + // }, { + // "label": "Automotive tyre outlets 汽车轮胎经销商", + // "value": 5532 + // }, { + // "label": "Automotive parts and accessories outlets 汽车零配件商店", + // "value": 5533 + // }, { + // "label": "Motorcycle shops and dealers 摩托车商店和经销商", + // "value": 5571 + // }, { + // "label": "Lodging - hotels, motels and resorts 住宿服务(旅馆、酒店、汽车旅馆、度假村等)", + // "value": 7011 + // }, { + // "label": "Time-sharing villa or holiday home 分时使用的别墅或度假用房", + // "value": 7012 + // }, { + // "label": "Sporting and recreational camps 运动和娱乐露营地", + // "value": 7032 + // }, { + // "label": "Trailer parks and camp-sites 活动房车场及露营场所", + // "value": 7033 + // }, { + // "label": "Caterers 包办伙食,宴会承包商", + // "value": 5811 + // }, { + // "label": "Eating places and restaurants 就餐场所和餐馆", + // "value": 5812 + // }, { + // "label": "Fast food restaurants 快餐店", + // "value": 5814 + // }, { + // "label": "Railroads 铁路运输", + // "value": 4011 + // }, { + // "label": "Local and suburban commuter passenger transportation, including ferries 本市和市郊通勤旅客运输(包括轮渡)", + // "value": 4111 + // }, { + // "label": "Passenger railways 铁路客运", + // "value": 4112 + // }, { + // "label": "Ambulance services 救护车服务", + // "value": 4119 + // }, { + // "label": "Taxi-cabs and limousines 出租车服务", + // "value": 4121 + // }, { + // "label": "Bus lines 公路客运", + // "value": 4131 + // }, { + // "label": "Motor freight carriers and trucking - local and long distance, moving and storage companies and local delivery 货物搬运和托运—当地和长途,移动和存储公司,以及当地递送服务", + // "value": 4214 + // }, { + // "label": "Courier services - air and ground and freight forwarders 快递服务(空运、地面运输或海运)", + // "value": 4215 + // }, { + // "label": "Steamships and cruise lines 轮船及巡游航线服务", + // "value": 4411 + // }, { + // "label": "Boat rentals and leasing 出租船只", + // "value": 4457 + // }, { + // "label": "Marinas, marine service and supplies 船舶、海运服务提供商", + // "value": 4468 + // }, { + // "label": "Airlines and air carriers 航空公司", + // "value": 4511 + // }, { + // "label": "Tolls and bridge fees 路桥通行费", + // "value": 4784 + // }, { + // "label": "Laundry, cleaning and garment services 洗衣店", + // "value": 7210 + // }, { + // "label": "Laundry services - family and commercial 洗熨服务(自助洗衣服务)", + // "value": 7211 + // }, { + // "label": "Dry cleaners 干洗店", + // "value": 7216 + // }, { + // "label": "Carpet and upholstery cleaning 室内清洁服务(地毯、沙发、家具表面的清洁服务)", + // "value": 7217 + // }, { + // "label": "Photographic studios 摄影工作室", + // "value": 7221 + // }, { + // "label": "Beauty and barber shops 美容理发店", + // "value": 7230 + // }, { + // "label": "Shoe repair shops, shoe shine parlours and hat cleaning shops 修鞋店、擦鞋店、帽子清洗店", + // "value": 7251 + // }, { + // "label": "Funeral services and crematoriums 殡葬服务", + // "value": 7261 + // }, { + // "label": "Dating and escort services 婚姻介绍及陪同服务", + // "value": 7273 + // }, { + // "label": "Advertising services 广告服务", + // "value": 7311 + // }, { + // "label": "Commercial photography, art and graphics 商业摄影、工艺、绘图服务", + // "value": 7333 + // }, { + // "label": "Quick copy, reproduction and blueprinting services 复印及绘图服务", + // "value": 7338 + // }, { + // "label": "Stenographic and secretarial support services 速记、秘书服务(包括各类办公服务)", + // "value": 7339 + // }, { + // "label": "Exterminating and disinfecting services 灭虫及消毒服务", + // "value": 7342 + // }, { + // "label": "Cleaning, maintenance and janitorial services 清洁、保养及门卫服务", + // "value": 7349 + // }, { + // "label": "Employment agencies and temporary help services 职业中介、临时工", + // "value": 7361 + // }, { + // "label": "Computer programming, data processing and integrated systems design services 计算机编程、数据处理和系统集成设计服务", + // "value": 7372 + // }, { + // "label": "Information retrieval services 信息检索服务", + // "value": 7375 + // }, { + // "label": "Detective agencies, protective agencies and security services, including armoured cars and guard dogs 侦探、保安、安全服务", + // "value": 7393 + // }, { + // "label": "Equipment, tool, furniture and appliance rentals and leasing 设备、工具、家具和电器出租", + // "value": 7394 + // }, { + // "label": "Photofinishing laboratories and photo developing 照相洗印服务", + // "value": 7395 + // }, { + // "label": "Automobile rentals 汽车出租", + // "value": 7512 + // }, { + // "label": "Truck and utility trailer rentals 卡车及拖车出租", + // "value": 7513 + // }, { + // "label": "Motor home and recreational vehicle rentals 房车和娱乐车辆出租", + // "value": 7519 + // }, { + // "label": "Parking lots and garages 停车场", + // "value": 7523 + // }, { + // "label": "Automotive body repair shops 车体维修店", + // "value": 7531 + // }, { + // "label": "Tyre retreading and repair shops 轮胎翻新、维修店", + // "value": 7534 + // }, { + // "label": "Automotive paint shops 汽车喷漆店", + // "value": 7535 + // }, { + // "label": "Automotive service shops (non-dealer) 汽车服务商店(非经销商)", + // "value": 7538 + // }, { + // "label": "Car washes 洗车", + // "value": 7542 + // }, { + // "label": "Towing services 拖车服务", + // "value": 7549 + // }, { + // "label": "Electronics repair shops 电器设备维修", + // "value": 7622 + // }, { + // "label": "Air conditioning and refrigeration repair shops 空调、制冷设备维修", + // "value": 7623 + // }, { + // "label": "Electrical and small appliance repair shops 电器设备、小家电维修", + // "value": 7629 + // }, { + // "label": "Watch, clock and jewellery repair shops 手表、钟表和首饰维修店", + // "value": 7631 + // }, { + // "label": "Furniture reupholstery, repair and refinishing 家具维修、翻新", + // "value": 7641 + // }, { + // "label": "Welding services 焊接维修服务", + // "value": 7692 + // }, { + // "label": "Miscellaneous repair shops and related services 各类维修店及相关服务", + // "value": 7699 + // }, { + // "label": "Babysitting and housekeeping services 家政服务", + // "value": 7295 + // }, { + // "label": "Clothing rentals - costumes, uniforms and formal wear 出租衣物-服装、制服和正式场合服装", + // "value": 7296 + // }, { + // "label": "Utilities - electric, gas, water and sanitary 公共事业(电力、煤气、自来水、清洁服务)", + // "value": 4900 + // }, { + // "label": "Service stations (with or without ancillary services) 加油站、服务站", + // "value": 5541 + // }, { + // "label": "Automated fuel dispensers 自助加油站", + // "value": 5542 + // }, { + // "label": "Airports, flying fields and airport terminals 机场服务", + // "value": 4582 + // }, { + // "label": "Car and truck dealers (new and used) sales, services, repairs, parts and leasing 汽车货车经销商-新旧车的销售、服务、维修、零件及出租", + // "value": 5511 + // }, { + // "label": "Car and truck dealers (used only) sales, service, repairs, parts and leasing 汽车货车经销商-专门从事旧车的销售、服务、维修、零件及出租", + // "value": 5521 + // }, { + // "label": "Embassy and consulate fees 使领馆收费", + // "value": 9400 + // }, { + // "label": " Postal Services - Government Only 国家邮政服务", + // "value": 9402 + // }, { + // "label": "Ticketing 票务", + // "value": 4733 + // }, { + // "label": "Travel agencies and tour operators 旅行社", + // "value": 4722 + // }, { + // "label": "Motion picture and video tape production and distribution 电影和录像创作、发行", + // "value": 7829 + // }, { + // "label": "Motion picture theatres 电影院", + // "value": 7832 + // }, { + // "label": "Video tape rentals 音像制品出租商店", + // "value": 7841 + // }, { + // "label": "Dance halls, studios and schools 歌舞厅", + // "value": 7911 + // }, { + // "label": "Theatrical producers (except motion pictures) and ticket agencies 戏剧制片(不含电影)、演出和票务", + // "value": 7922 + // }, { + // "label": "Billiard and pool establishments 台球、撞球场所", + // "value": 7932 + // }, { + // "label": "Bowling alleys 保龄球馆", + // "value": 7933 + // }, { + // "label": "Commercial sports, professional sports clubs, athletic fields and sports promoters 商业运动", + // "value": 7941 + // }, { + // "label": "Tourist attractions and exhibits 景点、展览", + // "value": 7991 + // }, { + // "label": "Public golf courses 公开高尔夫球赛", + // "value": 7992 + // }, { + // "label": "Video amusement game supplies 电子游戏等", + // "value": 7993 + // }, { + // "label": "Video game arcades and establishments 大型游戏机和游戏场所", + // "value": 7994 + // }, { + // "label": "Amusement parks, circuses, carnivals and fortune tellers 游乐园、马戏团、嘉年华、占卜", + // "value": 7996 + // }, { + // "label": "Membership clubs (sports, recreation, athletic), country clubs and private golf courses 会员俱乐部(体育、娱乐、运动等)、乡村俱乐部以及私人高尔夫课程班", + // "value": 7997 + // }, { + // "label": "Aquariums, seaquariums and dolphinariums 水族馆、海洋馆和海豚馆", + // "value": 7998 + // }, { + // "label": "Drinking places (alcoholic beverages) - bars, taverns, night-clubs, cocktail lounges and discothèques 饮酒场所(酒吧、酒馆、夜总会、鸡尾酒大厅、迪斯科舞厅)", + // "value": 5813 + // }, { + // "label": "Massage parlours 按摩店", + // "value": 7297 + // }, { + // "label": "Health and beauty spas 保健及美容SPA", + // "value": 7298 + // }, { + // "label": "Telecommunication equipment and telephone sales 电信设备和销售", + // "value": 4812 + // }, { + // "label": "Telecommunication services 电信服务,包括本地和长途电话、信用卡电话、磁卡电话和传真", + // "value": 4814 + // }, { + // "label": "Monthly summary telephone charges 月结电话服务", + // "value": 4815 + // }, { + // "label": "Computer network information services 计算机网络/信息服务", + // "value": 4816 + // }, { + // "label": "Cable and other pay television services 有线和其他付费电视服务", + // "value": 4899 + // }, { + // "label": "private hospital 私人医院", + // "value": 7280 + // }, { + // "label": "Doctors and physicians - not elsewhere classified 其他医疗卫生活动", + // "value": 8011 + // }, { + // "label": "Dentists and orthodontists 牙科医生", + // "value": 8021 + // }, { + // "label": "Osteopaths 正骨医生", + // "value": 8031 + // }, { + // "label": "Chiropractors 按摩医生", + // "value": 8041 + // }, { + // "label": "Optometrists and ophthalmologists 眼科医生", + // "value": 8042 + // }, { + // "label": "Opticians, optical goods and eyeglasses 光学产品、眼镜店", + // "value": 8043 + // }, { + // "label": "Podiatrists and chiropodists 手足病医生", + // "value": 8049 + // }, { + // "label": "Nursing and personal care facilities 护理和照料服务", + // "value": 8050 + // }, { + // "label": "Hospitals 公立医院", + // "value": 8062 + // }, { + // "label": "Medical and dental laboratories 医学及牙科实验室", + // "value": 8071 + // }, { + // "label": "Medical services and health practitioners - not elsewhere classified 其他医疗保健服务", + // "value": 8099 + // }, { + // "label": "Drug stores and pharmacies 药店、药房", + // "value": 5912 + // }, { + // "label": "Hearing aids - sales, service and supplies 助听器-销售、服务和用品", + // "value": 5975 + // }, { + // "label": "Orthopaedic goods and prosthetic devices 假肢店(整形外科用品、辅助设备)", + // "value": 5976 + // }, { + // "label": "Dental laboratory medical ophthalmic hospital equipment and supplies 牙科/实验室/医疗/眼科医院器材和用品", + // "value": 5047 + // }, { + // "label": "Elementary and secondary schools 中小学校(公立)", + // "value": 8211 + // }, { + // "label": "Colleges, universities, professional schools and junior colleges 普通高校(公立)", + // "value": 8220 + // }, { + // "label": "Correspondence schools 函授学校(成人教育)", + // "value": 8241 + // }, { + // "label": "Business and secretarial schools 商业和文秘学校(中等专业学校)", + // "value": 8244 + // }, { + // "label": "Trade and vocational schools 贸易和职业学校(职业技能培训)", + // "value": 8249 + // }, { + // "label": "Schools and educational services - not elsewhere classified 其他学校和教育服务", + // "value": 8299 + // }, { + // "label": "Child care services 儿童保育服务(含学前教育)", + // "value": 8351 + // } + // ]; var wechatGoodMcc = [ { - "label": "Duty-free shops 免税店", - "value": 5309 - }, { - "label": "Department stores 百货商店", - "value": 5311 - }, { - "label": "Discount shops 折扣商店", - "value": 5310 - }, { - "label": "Auto and home supply outlets 汽车商店、家庭用品商店", - "value": 5531 - }, { - "label": "Men’s and boys’ clothing and accessory shops 男子和男童服装及用品商店", - "value": 5611 - }, { - "label": "Women’s ready-to-wear shops 妇女成衣商店", - "value": 5621 - }, { - "label": "Women’s accessory and speciality shops 女性用品商店", - "value": 5631 - }, { - "label": "Children’s and infants’ wear shops 婴儿、儿童服装店", - "value": 5641 - }, { - "label": "Family clothing shops 家庭服装商店", - "value": 5651 - }, { - "label": "Sports and riding apparel shops 运动服饰商店", - "value": 5655 - }, { - "label": "Shoe shops 鞋店", - "value": 5661 - }, { - "label": "Furriers and fur shops 皮货店", - "value": 5681 - }, { - "label": "Men’s and women’s clothing shops 成人成衣店", - "value": 5691 - }, { - "label": "Miscellaneous apparel and accessory shops 各类服装及饰物店", - "value": 5699 - }, { - "label": "Furniture, home furnishings and equipment shops and manufacturers, except appliances 家具、家庭摆品、家用设备零售商", - "value": 5712 - }, { - "label": "Household appliance shops 家用电器商店", - "value": 5722 - }, { - "label": "Jewellery, watch, clock and silverware shops 珠宝、钟表、银器店", - "value": 5944 - }, { - "label": "Luggage and leather goods shops 箱包、皮具店", - "value": 5948 - }, { - "label": "Precious stones and metals, watches and jewellery 宝石和金属、手表和珠宝", - "value": 5094 - }, { - "label": "Variety stores 各类杂货店、便利店", - "value": 5331 - }, { - "label": "Groceries and supermarkets 大型仓储式超级市场", - "value": 5411 - }, { - "label": "Home supply warehouse outlets 大型仓储式家庭用品卖场", - "value": 5200 - }, { - "label": "Tailors, seamstresses, mending and alterations 裁缝、修补、改衣店", - "value": 5697 - }, { - "label": "Wig and toupee shops 假发商店", - "value": 5698 - }, { - "label": "Floor covering services 地板商店", - "value": 5713 - }, { - "label": "Drapery, window covering and upholstery shops 帏帐、窗帘、室内装潢商店", - "value": 5714 - }, { - "label": "Alcoholic beverage wholesalers 酒精饮料", - "value": 5715 - }, { - "label": "Fireplaces, fireplace screens and accessories shops 壁炉、壁炉防护网及配件商店", - "value": 5718 - }, { - "label": "Miscellaneous home furnishing speciality shops 各种家庭装饰专营店", - "value": 5719 - }, { - "label": "Electronics shops 电子设备商店", - "value": 5732 - }, { - "label": "Music shops - musical instruments, pianos and sheet music 音乐商店-乐器、钢琴、乐谱", - "value": 5733 - }, { - "label": "Computer software outlets 计算机软件商店", - "value": 5734 - }, { - "label": "Record shops 音像制品商店", - "value": 5735 - }, { - "label": "Package shops - beer, wine and liquor 瓶装酒零售店", - "value": 5921 - }, { - "label": "Used merchandise and second-hand shops 旧商品店、二手商品店", - "value": 5931 - }, { - "label": "Antique shop - sale, repair and restoration 古玩店-出售、维修及还原", - "value": 5932 - }, { - "label": "Antique reproduction shops 古玩复制店", - "value": 5937 - }, { - "label": "Bicycle shops - sales and service 自行车商店", - "value": 5940 - }, { - "label": "Sporting goods shops 体育用品店", - "value": 5941 - }, { - "label": "Bookshops 书店", - "value": 5942 - }, { - "label": "Stationery, office and school supply shops 文具用品商店、各类办公用品商店", - "value": 5943 - }, { - "label": "Hobby, toy and game shops 玩具、游戏店", - "value": 5945 - }, { - "label": "Camera and photographic supply shops 照相器材商店", - "value": 5946 - }, { - "label": "Gift, card, novelty and souvenir shops 礼品、卡片、装饰品、纪念品商店", - "value": 5947 - }, { - "label": "Sewing, needlework, fabric and piece goods shops 纺织品及针织品零售", - "value": 5949 - }, { - "label": "Glassware and crystal shops 玻璃器皿和水晶饰品店", - "value": 5950 - }, { - "label": "Artist supply and craft shops 工艺美术商店", - "value": 5970 - }, { - "label": "Art dealers and galleries 艺术商和画廊", - "value": 5971 - }, { - "label": "Stamp and coin shops 邮票和纪念币商店", - "value": 5972 - }, { - "label": "Religious goods and shops 宗教品商店", - "value": 5973 - }, { - "label": "Cosmetic shops 化妆品商店", - "value": 5977 - }, { - "label": "Typewriter outlets - sales, service and rentals 打字机商店-销售、服务和出租", - "value": 5978 - }, { - "label": "Florists 花店", - "value": 5992 - }, { - "label": "Cigar shops and stands 香烟、雪茄专卖店", - "value": 5993 - }, { - "label": "Newsagents and news-stands 报亭、报摊", - "value": 5994 - }, { - "label": "Pet shops, pet food and supplies 宠物商店、宠物食品及用品", - "value": 5995 - }, { - "label": "Electric razor shops - sales and service 电动剃刀商店-销售和服务", - "value": 5997 - }, { - "label": "Miscellaneous and speciality retail outlets 其他专门零售店", - "value": 5999 - }, { - "label": "Office, photographic, photocopy and microfilm equipment 办公、影印及微缩摄影器材", - "value": 5044 - }, { - "label": "Computers, computer peripheral equipment - not elsewhere classified 计算机、计算机外围设备", - "value": 5045 - }, { - "label": "Piece goods, notions and other dry goods 布料、缝纫用品和其他纺织品", - "value": 5131 - }, { - "label": "Books, periodicals and newspapers 书、期刊和报纸", - "value": 5192 - }, { - "label": "Glass, paint and wallpaper shops 玻璃、油漆涂料、墙纸零售", - "value": 5231 - }, { - "label": "Hardware shops 五金商店", - "value": 5251 - }, { - "label": "Lawn and garden supplies outlets, including nurseries 草坪、花园用品商店", - "value": 5261 - }, { - "label": "Freezer and locker meat provisioners 各类肉类零售商", - "value": 5422 - }, { - "label": "Candy, nut and confectionery shops 糖果及坚果商店", - "value": 5441 - }, { - "label": "Dairies 乳制品店、冷饮店", - "value": 5451 - }, { - "label": "Bakeries 面包房、糕点商店", - "value": 5462 - }, { - "label": "Miscellaneous food shops - convenience and speciality retail outlets 各类食品店及专门食品零售店", - "value": 5499 - }, { - "label": "Automotive tyre outlets 汽车轮胎经销商", - "value": 5532 - }, { - "label": "Automotive parts and accessories outlets 汽车零配件商店", - "value": 5533 - }, { - "label": "Motorcycle shops and dealers 摩托车商店和经销商", - "value": 5571 - }, { - "label": "Lodging - hotels, motels and resorts 住宿服务(旅馆、酒店、汽车旅馆、度假村等)", - "value": 7011 - }, { - "label": "Time-sharing villa or holiday home 分时使用的别墅或度假用房", - "value": 7012 - }, { - "label": "Sporting and recreational camps 运动和娱乐露营地", - "value": 7032 - }, { - "label": "Trailer parks and camp-sites 活动房车场及露营场所", - "value": 7033 - }, { - "label": "Caterers 包办伙食,宴会承包商", - "value": 5811 - }, { - "label": "Eating places and restaurants 就餐场所和餐馆", - "value": 5812 - }, { - "label": "Fast food restaurants 快餐店", - "value": 5814 - }, { - "label": "Railroads 铁路运输", - "value": 4011 - }, { - "label": "Local and suburban commuter passenger transportation, including ferries 本市和市郊通勤旅客运输(包括轮渡)", + "label": "Veterinary services", + "value": 742 + } + , + { + "label": "Landscaping and horticultural services", + "value": 780 + } + , + { + "label": "Special trade contractors — not elsewhere classified ", + "value": 1799 + } + , + { + "label": "Miscellaneous publishing and printing services", + "value": 2741 + } + , + { + "label": "Typesetting, platemaking and related services", + "value": 2791 + } + , + { + "label": "Local and suburban commuter passenger transportation, including ferries", "value": 4111 - }, { - "label": "Passenger railways 铁路客运", + } + , + { + "label": "Passenger railways", "value": 4112 - }, { - "label": "Ambulance services 救护车服务", + } + , + { + "label": "Ambulance services", "value": 4119 - }, { - "label": "Taxi-cabs and limousines 出租车服务", + } + , + { + "label": "Taxi-cabs and limousines", "value": 4121 - }, { - "label": "Bus lines 公路客运", + } + , + { + "label": "Bus lines", "value": 4131 - }, { - "label": "Motor freight carriers and trucking - local and long distance, moving and storage companies and local delivery 货物搬运和托运—当地和长途,移动和存储公司,以及当地递送服务", + } + , + { + "label": "Motor freight carriers and trucking — local and long distance, moving and storage companies and local delivery", "value": 4214 - }, { - "label": "Courier services - air and ground and freight forwarders 快递服务(空运、地面运输或海运)", + } + , + { + "label": "Courier services — air and ground and freight forwarders", "value": 4215 - }, { - "label": "Steamships and cruise lines 轮船及巡游航线服务", + } + , + { + "label": "Steamships and cruise lines", "value": 4411 - }, { - "label": "Boat rentals and leasing 出租船只", + } + , + { + "label": "Boat rentals and leasing ", "value": 4457 - }, { - "label": "Marinas, marine service and supplies 船舶、海运服务提供商", + } + , + { + "label": "Marinas, marine service and supplies", "value": 4468 - }, { - "label": "Airlines and air carriers 航空公司", + } + , + { + "label": "Airlines and air carriers", "value": 4511 - }, { - "label": "Tolls and bridge fees 路桥通行费", - "value": 4784 - }, { - "label": "Laundry, cleaning and garment services 洗衣店", - "value": 7210 - }, { - "label": "Laundry services - family and commercial 洗熨服务(自助洗衣服务)", - "value": 7211 - }, { - "label": "Dry cleaners 干洗店", - "value": 7216 - }, { - "label": "Carpet and upholstery cleaning 室内清洁服务(地毯、沙发、家具表面的清洁服务)", - "value": 7217 - }, { - "label": "Photographic studios 摄影工作室", - "value": 7221 - }, { - "label": "Beauty and barber shops 美容理发店", - "value": 7230 - }, { - "label": "Shoe repair shops, shoe shine parlours and hat cleaning shops 修鞋店、擦鞋店、帽子清洗店", - "value": 7251 - }, { - "label": "Funeral services and crematoriums 殡葬服务", - "value": 7261 - }, { - "label": "Dating and escort services 婚姻介绍及陪同服务", - "value": 7273 - }, { - "label": "Advertising services 广告服务", - "value": 7311 - }, { - "label": "Commercial photography, art and graphics 商业摄影、工艺、绘图服务", - "value": 7333 - }, { - "label": "Quick copy, reproduction and blueprinting services 复印及绘图服务", - "value": 7338 - }, { - "label": "Stenographic and secretarial support services 速记、秘书服务(包括各类办公服务)", - "value": 7339 - }, { - "label": "Exterminating and disinfecting services 灭虫及消毒服务", - "value": 7342 - }, { - "label": "Cleaning, maintenance and janitorial services 清洁、保养及门卫服务", - "value": 7349 - }, { - "label": "Employment agencies and temporary help services 职业中介、临时工", - "value": 7361 - }, { - "label": "Computer programming, data processing and integrated systems design services 计算机编程、数据处理和系统集成设计服务", - "value": 7372 - }, { - "label": "Information retrieval services 信息检索服务", - "value": 7375 - }, { - "label": "Detective agencies, protective agencies and security services, including armoured cars and guard dogs 侦探、保安、安全服务", - "value": 7393 - }, { - "label": "Equipment, tool, furniture and appliance rentals and leasing 设备、工具、家具和电器出租", - "value": 7394 - }, { - "label": "Photofinishing laboratories and photo developing 照相洗印服务", - "value": 7395 - }, { - "label": "Automobile rentals 汽车出租", - "value": 7512 - }, { - "label": "Truck and utility trailer rentals 卡车及拖车出租", - "value": 7513 - }, { - "label": "Motor home and recreational vehicle rentals 房车和娱乐车辆出租", - "value": 7519 - }, { - "label": "Parking lots and garages 停车场", - "value": 7523 - }, { - "label": "Automotive body repair shops 车体维修店", - "value": 7531 - }, { - "label": "Tyre retreading and repair shops 轮胎翻新、维修店", - "value": 7534 - }, { - "label": "Automotive paint shops 汽车喷漆店", - "value": 7535 - }, { - "label": "Automotive service shops (non-dealer) 汽车服务商店(非经销商)", - "value": 7538 - }, { - "label": "Car washes 洗车", - "value": 7542 - }, { - "label": "Towing services 拖车服务", - "value": 7549 - }, { - "label": "Electronics repair shops 电器设备维修", - "value": 7622 - }, { - "label": "Air conditioning and refrigeration repair shops 空调、制冷设备维修", - "value": 7623 - }, { - "label": "Electrical and small appliance repair shops 电器设备、小家电维修", - "value": 7629 - }, { - "label": "Watch, clock and jewellery repair shops 手表、钟表和首饰维修店", - "value": 7631 - }, { - "label": "Furniture reupholstery, repair and refinishing 家具维修、翻新", - "value": 7641 - }, { - "label": "Welding services 焊接维修服务", - "value": 7692 - }, { - "label": "Miscellaneous repair shops and related services 各类维修店及相关服务", - "value": 7699 - }, { - "label": "Babysitting and housekeeping services 家政服务", - "value": 7295 - }, { - "label": "Clothing rentals - costumes, uniforms and formal wear 出租衣物-服装、制服和正式场合服装", - "value": 7296 - }, { - "label": "Utilities - electric, gas, water and sanitary 公共事业(电力、煤气、自来水、清洁服务)", + } + , + { + "label": "Travel agencies and tour operators", + "value":4722 + } + , + { + "label": "Tolls and bridge fees", + "value":4784 + } + , + { + "label": "Transportation services — not elsewhere classified", + "value": 4789 + } + , + { + "label": "Telecommunication equipment and telephone sales", + "value":4812 + } + , + { + "label": "Telecommunication services, including local and long distance calls, credit card calls, calls through use of magnetic stripe reading tele-phones and faxes", + "value":4814 + } + , + { + "label": "Monthly summary telephone charges", + "value":4815 + } + , + { + "label": "Computer network/information services", + "value":4816 + } + , + { + "label": "Telegraph services", + "value":4821 + } + , + { + "label": "Cable and other pay television services", + "value": 4899 + } + , + { + "label": "Utilities — electric, gas, water and sanitary", "value": 4900 - }, { - "label": "Service stations (with or without ancillary services) 加油站、服务站", - "value": 5541 - }, { - "label": "Automated fuel dispensers 自助加油站", - "value": 5542 - }, { - "label": "Airports, flying fields and airport terminals 机场服务", - "value": 4582 - }, { - "label": "Car and truck dealers (new and used) sales, services, repairs, parts and leasing 汽车货车经销商-新旧车的销售、服务、维修、零件及出租", + } + , + { + "label": "Office and commercial furniture", + "value": 5021 + } + , + { + "label": "Construction materials — not elsewhere classified", + "value": 5039 + } + , + { + "label": "Office, photographic, photocopy and microfilm equipment ", + "value": 5044 + } + , + { + "label": "Computers, computer peripheral equipment — not elsewhere classified ", + "value": 5045 + } + , + { + "label": "Commercial equipment — not elsewhere classified ", + "value": 5046 + } + , + { + "label": "Dental/laboratory/medical/ophthalmic hospital equipment and supplies ", + "value": 5047 + } + , + { + "label": "Electrical parts and equipment", + "value": 5065 + } + , + { + "label": "Industrial supplies — not elsewhere classified ", + "value": 5085 + } + , + { + "label": "Precious stones and metals, watches and jewellery ", + "value": 5094 + } + , + { + "label": "Durable goods — not elsewhere classified ", + "value": 5099 + } + , + { + "label": "Stationery, office supplies and printing and writing paper ", + "value": 5111 + } + , + { + "label": "Drugs, drug proprietors ", + "value": 5122 + } + , + { + "label": "Piece goods, notions and other dry goods ", + "value": 5131 + } + , + { + "label": "Books, periodicals and newspapers ", + "value": 5192 + } + , + { + "label": "Paints, varnishes and supplies", + "value": 5198 + } + , + { + "label": "Home supply warehouse outlets", + "value": 5200 + } + , + { + "label": "Lumber and building materials outlets", + "value": 5211 + } + , + { + "label": "Glass, paint and wallpaper shops", + "value": 5231 + } + , + { + "label": "Hardware shops", + "value": 5251 + } + , + { + "label": "Lawn and garden supplies outlets, including nurseries", + "value": 5261 + } + , + { + "label": "Duty-free shops", + "value": 5309 + } + , + { + "label": "Discount shops", + "value": 5310 + } + , + { + "label": "Department stores", + "value": 5311 + } + , + { + "label": "Variety stores", + "value": 5331 + } + , + { + "label": "Miscellaneous general merchandise", + "value": 5399 + } + , + { + "label": "Groceries and supermarkets", + "value": 5411 + } + , + { + "label": "Freezer and locker meat provisioners ", + "value": 5422 + } + , + { + "label": "Candy, nut and confectionery shops ", + "value": 5441 + } + , + { + "label": "Dairies", + "value": 5451 + } + , + { + "label": "Bakeries", + "value": 5462 + } + , + { + "label": "Miscellaneous food shops — convenience and speciality retail outlets ", + "value": 5499 + } + , + { + "label": "Car and truck dealers (new and used) sales, services, repairs, parts and leasing ", "value": 5511 - }, { - "label": "Car and truck dealers (used only) sales, service, repairs, parts and leasing 汽车货车经销商-专门从事旧车的销售、服务、维修、零件及出租", - "value": 5521 - }, { - "label": "Embassy and consulate fees 使领馆收费", - "value": 9400 - }, { - "label": " Postal Services - Government Only 国家邮政服务", - "value": 9402 - }, { - "label": "Ticketing 票务", - "value": 4733 - }, { - "label": "Travel agencies and tour operators 旅行社", - "value": 4722 - }, { - "label": "Motion picture and video tape production and distribution 电影和录像创作、发行", - "value": 7829 - }, { - "label": "Motion picture theatres 电影院", - "value": 7832 - }, { - "label": "Video tape rentals 音像制品出租商店", - "value": 7841 - }, { - "label": "Dance halls, studios and schools 歌舞厅", - "value": 7911 - }, { - "label": "Theatrical producers (except motion pictures) and ticket agencies 戏剧制片(不含电影)、演出和票务", - "value": 7922 - }, { - "label": "Billiard and pool establishments 台球、撞球场所", + } + , + { + "label": "Auto and home supply outlets ", + "value": 5531 + } + , + { + "label": "Automotive tyre outlets ", + "value":5532 + } + , + { + "label": "Automotive parts and accessories outlets ", + "value":5533 + } + , + { + "label": "Service stations (with or without ancillary services)", + "value":5541 + } + , + { + "label": "Automated fuel dispensers ", + "value":5542 + } + , + { + "label": "Motorcycle shops and dealers ", + "value":5571 + } + , + { + "label": "Men’s and boys’ clothing and accessory shops ", + "value":5611 + } + , + { + "label": "Women’s ready-to-wear shops ", + "value":5621 + } + , + { + "label": "Children’s and infants’ wear shops", + "value":5641 + } + , + { + "label": "Family clothing shops", + "value":5651 + } + , + { + "label": "Sports and riding apparel shops ", + "value":5655 + } + , + { + "label": "Shoe shops ", + "value":5661 + } + , + { + "label": "Furriers and fur shops ", + "value":5681 + } + , + { + "label": "Men’s and women’s clothing shops ", + "value":5691 + } + , + { + "label": "Tailors, seamstresses, mending and alterations", + "value":5697 + } + , + { + "label": "Wig and toupee shops ", + "value":5698 + } + , + { + "label": "Miscellaneous apparel and accessory shops ", + "value":5699 + } + , + { + "label": "Miscellaneous home furnishing speciality shops ", + "value": 5719 + } + , + { + "label": "Household appliance shops ", + "value":5722 + } + , + { + "label": "Electronics shops ", + "value":5732 + } + , + { + "label": "Music shops — musical instruments, pianos and sheet music ", + "value":5733 + } + , + { + "label": "Record shops ", + "value":5735 + } + , + { + "label": "Eating places and restaurants ", + "value":5812 + } + , + { + "label": "Drinking places (alcoholic beverages) — bars, taverns, night-clubs, cocktail lounges and discothèques ", + "value":5813 + } + , + { + "label": "Fast food restaurants ", + "value":5814 + } + , + { + "label": "Digital Goods-Media: Books, Movies, Music ", + "value":5815 + } + , + { + "label": "Digital Goods: Games ", + "value":5816 + } + , + { + "label": "Digital Goods: Application (Excludes Games) ", + "value":5817 + } + , + { + "label": "Large Digital Goods Merchant ", + "value":5818 + } + , + { + "label": "Drug stores and pharmacies ", + "value":5912 + } + , + { + "label": "Package shops — beer, wine and liquor ", + "value":5921 + } + , + { + "label": "Used merchandise and second-hand shops ", + "value":5931 + } + , + { + "label": "Bicycle shops — sales and service ", + "value":5940 + } + , + { + "label": "Sporting goods shops ", + "value":5941 + } + , + { + "label": "Bookshops ", + "value":5942 + } + , + { + "label": "Stationery, office and school supply shops ", + "value":5943 + } + , + { + "label": "Jewellery, watch, clock and silverware shops ", + "value":5944 + } + , + { + "label": "Hobby, toy and game shops ", + "value":5945 + } + , + { + "label": "Camera and photographic supply shops ", + "value":5946 + } + , + { + "label": "Gift, card, novelty and souvenir shops ", + "value":5947 + } + , + { + "label": "Luggage and leather goods shops ", + "value":5948 + } + , + { + "label": "Sewing, needlework, fabric and piece goods shops ", + "value":5949 + } + , + { + "label": "Glassware and crystal shops ", + "value":5950 + } + , + { + "label": "Artist supply and craft shops ", + "value":5970 + } + , + { + "label": "Art dealers and galleries ", + "value":5971 + } + , + { + "label": "Stamp and coin shops ", + "value":5972 + } + , + { + "label": "Religious goods and shops ", + "value":5973 + } + , + { + "label": "Hearing aids — sales, service and supplies ", + "value":5975 + } + , + { + "label": "Orthopaedic goods and prosthetic devices ", + "value":5976 + } + , + { + "label": "Cosmetic shops ", + "value":5977 + } + , + { + "label": "Florists ", + "value":5992 + } + , + { + "label": "Cigar shops and stands ", + "value":5993 + } + , + { + "label": "Newsagents and news-stands ", + "value":5994 + } + , + { + "label": "Pet shops, pet food and supplies ", + "value":5995 + } + , + { + "label": "Swimming pools — sales, supplies and services ", + "value":5996 + } + , + { + "label": "Tent and awning shops ", + "value":5998 + } + , + { + "label": "Miscellaneous and speciality retail outlets ", + "value":5999 + } + , + { + "label": "#N/A", + "value":6513 + } + , + { + "label": "Lodging — hotels, motels and resorts ", + "value":7011 + } + , + { + "label": "Sporting and recreational camps ", + "value":7032 + } + , + { + "label": "Laundry, cleaning and garment services ", + "value":7210 + } + , + { + "label": "Carpet and upholstery cleaning ", + "value":7217 + } + , + { + "label": "Photographic studios ", + "value":7221 + } + , + { + "label": "Beauty and barber shops ", + "value":7230 + } + , + { + "label": "Shoe repair shops, shoe shine parlours and hat cleaning shops ", + "value":7251 + } + , + { + "label": "Tax Preparation Service ", + "value":7276 + } + , + { + "label": "Clothing rentals - costumes, uniforms and formal wear", + "value":7296 + } + , + { + "label": "Massage parlours ", + "value":7297 + } + , + { + "label": "Health and beauty spas ", + "value":7298 + } + , + { + "label": "Miscellaneous personal services — not elsewhere classified ", + "value":7299 + } + , + { + "label": "Advertising services ", + "value":7311 + } + , + { + "label": "Blueprinting and Photocopying Services ", + "value":7332 + } + , + { + "label": "Commercial photography, art and graphics ", + "value": 7333 + } + , + { + "label": "Quick copy, reproduction and blueprinting services", + "value":7338 + } + , + { + "label": "Stenographic and secretarial support services", + "value":7339 + } + , + { + "label": "Exterminating and disinfecting services ", + "value":7342 + } + , + { + "label": "Cleaning, maintenance and janitorial services ", + "value":7349 + } + , + { + "label": "Employment agencies and temporary help services ", + "value":7361 + } + , + { + "label": "Computer programming, data processing and integrated systems design services ", + "value":7372 + } + , + { + "label": "Computer maintenance and repair services — not elsewhere classified ", + "value":7379 + } + , + { + "label": "Management, consulting and public relations services ", + "value":7392 + } + , + { + "label": "Equipment, tool, furniture and appliance rentals and leasing ", + "value":7394 + } + , + { + "label": "Photofinishing laboratories and photo developing ", + "value":7395 + } + , + { + "label": "Business services — not elsewhere classified ", + "value":7399 + } + , + { + "label": "Automobile rentals ", + "value":7512 + } + , + { + "label": "Parking lots and garages ", + "value":7523 + } + , + { + "label": "Automotive service shops (non-dealer) ", + "value":7538 + } + , + { + "label": "Car washes ", + "value":7542 + } + , + { + "label": "Towing services ", + "value":7549 + } + , + { + "label": "Air conditioning and refrigeration repair shops ", + "value":7623 + } + , + { + "label": "Electrical and small appliance repair shops ", + "value":7629 + } + , + { + "label": "Watch, clock and jewellery repair shops ", + "value":7631 + } + , + { + "label": "Furniture reupholstery, repair and refinishing ", + "value":7641 + } + , + { + "label": "Welding services", + "value":7692 + } + , + { + "label": "Miscellaneous repair shops and related services ", + "value":7699 + } + , + { + "label": "Motion picture theatres ", + "value":7832 + } + , + { + "label": "Dance halls, studios and schools ", + "value":7911 + } + , + { + "label": "Theatrical producers (except motion pictures) and ticket agencies ", + "value":7922 + } + , + { + "label": "Bands, orchestras and miscellaneous entertainers — not elsewhere classified ", + "value":7929 + } + , + { + "label": "Billiard and pool establishments", "value": 7932 - }, { - "label": "Bowling alleys 保龄球馆", - "value": 7933 - }, { - "label": "Commercial sports, professional sports clubs, athletic fields and sports promoters 商业运动", - "value": 7941 - }, { - "label": "Tourist attractions and exhibits 景点、展览", - "value": 7991 - }, { - "label": "Public golf courses 公开高尔夫球赛", - "value": 7992 - }, { - "label": "Video amusement game supplies 电子游戏等", - "value": 7993 - }, { - "label": "Video game arcades and establishments 大型游戏机和游戏场所", - "value": 7994 - }, { - "label": "Amusement parks, circuses, carnivals and fortune tellers 游乐园、马戏团、嘉年华、占卜", - "value": 7996 - }, { - "label": "Membership clubs (sports, recreation, athletic), country clubs and private golf courses 会员俱乐部(体育、娱乐、运动等)、乡村俱乐部以及私人高尔夫课程班", - "value": 7997 - }, { - "label": "Aquariums, seaquariums and dolphinariums 水族馆、海洋馆和海豚馆", - "value": 7998 - }, { - "label": "Drinking places (alcoholic beverages) - bars, taverns, night-clubs, cocktail lounges and discothèques 饮酒场所(酒吧、酒馆、夜总会、鸡尾酒大厅、迪斯科舞厅)", - "value": 5813 - }, { - "label": "Massage parlours 按摩店", - "value": 7297 - }, { - "label": "Health and beauty spas 保健及美容SPA", - "value": 7298 - }, { - "label": "Telecommunication equipment and telephone sales 电信设备和销售", - "value": 4812 - }, { - "label": "Telecommunication services 电信服务,包括本地和长途电话、信用卡电话、磁卡电话和传真", - "value": 4814 - }, { - "label": "Monthly summary telephone charges 月结电话服务", - "value": 4815 - }, { - "label": "Computer network information services 计算机网络/信息服务", - "value": 4816 - }, { - "label": "Cable and other pay television services 有线和其他付费电视服务", - "value": 4899 - }, { - "label": "private hospital 私人医院", - "value": 7280 - }, { - "label": "Doctors and physicians - not elsewhere classified 其他医疗卫生活动", - "value": 8011 - }, { - "label": "Dentists and orthodontists 牙科医生", - "value": 8021 - }, { - "label": "Osteopaths 正骨医生", - "value": 8031 - }, { - "label": "Chiropractors 按摩医生", - "value": 8041 - }, { - "label": "Optometrists and ophthalmologists 眼科医生", - "value": 8042 - }, { - "label": "Opticians, optical goods and eyeglasses 光学产品、眼镜店", - "value": 8043 - }, { - "label": "Podiatrists and chiropodists 手足病医生", - "value": 8049 - }, { - "label": "Nursing and personal care facilities 护理和照料服务", - "value": 8050 - }, { - "label": "Hospitals 公立医院", - "value": 8062 - }, { - "label": "Medical and dental laboratories 医学及牙科实验室", - "value": 8071 - }, { - "label": "Medical services and health practitioners - not elsewhere classified 其他医疗保健服务", - "value": 8099 - }, { - "label": "Drug stores and pharmacies 药店、药房", - "value": 5912 - }, { - "label": "Hearing aids - sales, service and supplies 助听器-销售、服务和用品", - "value": 5975 - }, { - "label": "Orthopaedic goods and prosthetic devices 假肢店(整形外科用品、辅助设备)", - "value": 5976 - }, { - "label": "Dental laboratory medical ophthalmic hospital equipment and supplies 牙科/实验室/医疗/眼科医院器材和用品", - "value": 5047 - }, { - "label": "Elementary and secondary schools 中小学校(公立)", - "value": 8211 - }, { - "label": "Colleges, universities, professional schools and junior colleges 普通高校(公立)", - "value": 8220 - }, { - "label": "Correspondence schools 函授学校(成人教育)", - "value": 8241 - }, { - "label": "Business and secretarial schools 商业和文秘学校(中等专业学校)", - "value": 8244 - }, { - "label": "Trade and vocational schools 贸易和职业学校(职业技能培训)", - "value": 8249 - }, { - "label": "Schools and educational services - not elsewhere classified 其他学校和教育服务", - "value": 8299 - }, { - "label": "Child care services 儿童保育服务(含学前教育)", - "value": 8351 - } - ]; + } + , + { + "label": "Bowling alleys ", + "value":7933 + } + , + { + "label": "Commercial sports, professional sports clubs, athletic fields and sports promoters ", + "value":7941 + } + , + { + "label": "Tourist attractions and exhibits ", + "value":7991 + } + , + { + "label": "Public golf courses ", + "value":7992 + } + , + { + "label": "Video amusement game supplies ", + "value":7993 + } + , + { + "label": "Video game arcades and establishments ", + "value":7994 + } + , + { + "label": "Amusement parks, circuses, carnivals and fortune tellers ", + "value":7996 + } + , + { + "label": "Membership clubs (sports, recreation, athletic), country clubs and private golf courses ", + "value":7997 + } + , + { + "label": "Aquariums, seaquariums and dolphinariums ", + "value":7998 + } + , + { + "label": "Recreation services — not elsewhere classified ", + "value":7999 + } + , + { + "label": "Doctors and physicians — not elsewhere classified ", + "value":8011 + } + , + { + "label": "Dentists and orthodontists ", + "value":8021 + } + , + { + "label": "Optometrists and ophthalmologists ", + "value":8042 + } + , + { + "label": "Opticians, optical goods and eyeglasses ", + "value":8043 + } + , + { + "label": "Nursing and personal care facilities ", + "value":8050 + } + , + { + "label": "Hospitals ", + "value":8062 + } + , + { + "label": "Medical and dental laboratories ", + "value":8071 + } + , + { + "label": "Medical services and health practitioners — not elsewhere classified ", + "value":8099 + } + , + { + "label": "Elementary and secondary schools ", + "value":8211 + } + , + { + "label": "Colleges, universities, professional schools and junior colleges ", + "value":8220 + } + , + { + "label": "Correspondence schools ", + "value":8241 + } + , + { + "label": "Business and secretarial schools ", + "value":8244 + } + , + { + "label": "Trade and vocational schools ", + "value":8249 + } + , + { + "label": "Schools and educational services — not elsewhere classified ", + "value":8299 + } + , + { + "label": "Child care services ", + "value":8351 + } + , + { + "label": "Professional services — not elsewhere classified ", + "value":8999 + } + , + { + "label": "Government services — not elsewhere classified ", + "value":9399 + } + + ]; app.factory("wechatGoodMcc", function () { return { configs: function () { diff --git a/src/main/ui/static/payment/partner/add-partner.js b/src/main/ui/static/payment/partner/add-partner.js index afdac8910..b8ead9fef 100644 --- a/src/main/ui/static/payment/partner/add-partner.js +++ b/src/main/ui/static/payment/partner/add-partner.js @@ -24,7 +24,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter url: '/{clientMoniker}/edit', params: {"commitCardPayment": false, commitCrossBorderPayment: false}, templateUrl: '/static/payment/partner/templates/partner_edit.html', - controller: 'partnerEditCtrl', + controller: 'partnerEditCtrl2', resolve: { partner: ['$http', '$stateParams', function ($http, $stateParams) { 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) { $scope.partner = angular.copy($scope.partner_application); delete $rootScope.partner_application; @@ -152,6 +152,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.pagination = {}; $scope.industries = industryMap.configs(); + $scope.wechatMccIndustries = wechatGoodMcc.configs(); $scope.upayIndustrys = upayIndustryMap.configs(); $scope.states = stateMap.configs(); $scope.countries = countryMap.configs(); @@ -227,6 +228,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); 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) { alert("商户至少开通一种支付方式,请检查是否选择了跨境支付或卡支付!"); return; @@ -436,11 +441,20 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } }]); - app.controller('partnerEditCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner','upayIndustryMap', - function ($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,wechatGoodMcc) { + $scope.upayIndustrys = upayIndustryMap.configs(); $scope.timezones = timezone.configs(); + $scope.wechatMccIndustries = wechatGoodMcc.configs(); $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) { $scope.partner.client_type = 'cross-border'; } diff --git a/src/main/ui/static/payment/partner/partner-apply.js b/src/main/ui/static/payment/partner/partner-apply.js index 31fc03ec5..27d14ff23 100644 --- a/src/main/ui/static/payment/partner/partner-apply.js +++ b/src/main/ui/static/payment/partner/partner-apply.js @@ -55,6 +55,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS $scope.pagination = resp.data.pagination; }); }; + $scope.linkButton = function (obj) { var partner = angular.copy(obj); partner.link = true; @@ -153,12 +154,36 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }); }; - $scope.pass = function (obj) { - $uibModal.open({ + $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({ + templateUrl: '/static/payment/partner/templates/partner_application_pass.html', + controller: 'passApplicationCtrl', + resolve: { + partner: partner + } + }).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}); + }) + }); + + /*$uibModal.open({ templateUrl: '/static/payment/partner/templates/partner_application_pass.html', controller: 'passApplicationCtrl', resolve: { - partner: obj + partner: obj, + isPass:true } }).result.then(function () { commonDialog.alert({ @@ -167,7 +192,10 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS type: 'success' }); // $state.go('partner_application.detail', {client_apply_id: obj.client_apply_id}, {reload: true}); - }) + })*/ + + + }; $scope.updateRemark = function () { 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) { $scope.partner = angular.copy(partner); + $scope.merchantCodeChecked = false; + $scope.merchantIsValid = false; $scope.submit = function (form) { if (form.$invalid) { angular.forEach(form, function (item, key) { @@ -198,6 +228,28 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS }); //$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) { if (form.$invalid) { angular.forEach(form, function (item, key) { diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 79464cfd7..47a6c12e8 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -30,54 +30,128 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter {code: 2, label: 'Manager'}, {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 = [ { - "label": "鞋包服饰|Shoes&Garments", + "label": "Shoes&Garments", "value": "343" }, { - "label": "机票行业|Air Ticket", - "value": "493" + "label": "Comprehensive mall", + "value": "484" }, { - "label": "文具/办公用品|Stationery/office supplies", - "value": "492" + "label": "Food", + "value": "485" }, { - "label": "酒店行业|Hotel Industry", - "value": "491" + "label": "Cosmetics", + "value": "486" }, { - "label": "教育行业|Education Industry", - "value": "490" + "label": "Maternal and infant", + "value": "487" }, { - "label": "国际物流|Logistics", - "value": "489" + "label": "Digital appliance", + "value": "488" }, { - "label": "数码电器|Digital appliance", - "value": "488" + "label": "Logistics", + "value": "489" }, { - "label": "母婴|Maternal and infant", - "value": "487" + "label": "Education Industry", + "value": "490" }, { - "label": "化妆品|Cosmetics", - "value": "486" + "label": "Hotel Industry", + "value": "491" }, { - "label": "食品|Food", - "value": "485" + "label": "Stationery/office supplies", + "value": "492" }, { - "label": "综合商城|Comprehensive mall", - "value": "484" + "label": "Air Ticket", + "value": "493" }, { - "label": "其它货物贸易行业|Other trade industry", + "label": "Other trade industry", "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) { @@ -892,6 +966,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.isComplianceOfShortName = false; $scope.isComplianceOfBusinessStructure = false; $scope.cardPromotionaparams = {}; + if($scope.partner.mc_code ){ + $scope.partner.mc_code=parseInt($scope.partner.mc_code); + } var website = partner.data.company_website; if (website != null) { 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) { $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', - 'clientMoniker', 'industryMap', 'businessStructuresMap', 'stateMap', 'countryMap', - function ($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,wechatGoodMcc) { if ($scope.partner_application) { $scope.partner = angular.copy($scope.partner_application); delete $rootScope.partner_application; @@ -3072,6 +3160,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.client_pay_desc = []; $scope.merchantIsValid = false; $scope.merchantCodeChecked = false; + $scope.wechatMccIndustries = wechatGoodMcc.configs(); + var resetClientPayDescByTpey = function (type) { type = parseInt(type); if (type == 1) { @@ -3258,6 +3348,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } $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) { alert("Company Name包含敏感词汇,请检查后重新提交!"); return; @@ -3302,10 +3396,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter return; } } - if (!$scope.partner.logo_url) { - alert("Logo is necessary!"); - return; - } + // if (!$scope.partner.logo_url) { + // alert("Logo is necessary!"); + // return; + // } if ($scope.partner.client_pay_type.indexOf('2') >= 0) { if (!$scope.partner.company_photo) { 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) { $scope.showMoreMerchantInfo = false; - $scope.hideMerchantInfo = function () { $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'}) }); } + $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) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', {rpay_enterprise_id: sub_merchant_id}).then(function (resp) { commonDialog.alert({ @@ -5243,7 +5353,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }); } - $scope.applyWxSubMerchantId = function () { + /*$scope.applyWxSubMerchantId = function () { $uibModal.open({ templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html', controller: 'applyWxSubMerchantIdCtrl', @@ -5258,7 +5368,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }).result.then(function () { $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 () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) { 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) { $scope.subMerchantInfo = angular.copy(subMerchantInfo); $scope.business_structures = businessStructuresMap.configs(); @@ -6296,6 +6613,29 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter 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 () { return function (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 () { return function (value) { switch (value + '') { @@ -6433,5 +6785,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter 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; }); diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html index 20eb2c72e..1e4a08256 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -189,19 +189,6 @@ -
- -
- -
-
@@ -217,9 +204,79 @@
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ng-if="(partner.business_structure != 'Company'&&partner.business_structure != null )|| partner.enable_card_payment">
- + ng-if="(partner.business_structure == 'Company'&&partner.business_structure != null) && partner.enable_cross_payment"> +
@@ -252,6 +309,27 @@
+
+ +
+ + +
+ +
+
+

Required Field

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -152,10 +209,10 @@
- +

Less Than 20 @@ -165,9 +222,9 @@

- +
-

Less Than 20 @@ -176,6 +233,28 @@

+
+ +
+ + +
+ +
+
+

Required Field

+
+
+
+ @@ -1175,7 +1254,7 @@
+ *Wechat Business Category
+ + +
+

Required + Field

+
+
+
@@ -35,4 +47,4 @@ -
\ No newline at end of file +
diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html index 082586496..3ae25b0cf 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -560,6 +560,38 @@

+
+ + +
+

+
+
+
+ + +
+

+
+
+
+ + +
+

+
+
+
+ + +
+

+
+
@@ -579,6 +611,13 @@

+
+ + +
+

+
+
@@ -1297,6 +1336,16 @@
+
+ +
+

+ {{partner.mc_code|wechat_mcc}} +    ({{partner.mc_code}}) +

+ +
+
diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index 875507a9a..562860fa3 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -236,6 +236,62 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -251,9 +307,9 @@
- +
-
@@ -264,9 +320,9 @@
- +
-

Less Than 20 @@ -274,6 +330,27 @@

+
+ +
+ + +
+ +
+
+

Required Field

+
+
+
@@ -1167,7 +1244,7 @@
+ *Wechat Business Category
+ + +
+

Required + Field

+
+
+
+
diff --git a/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html new file mode 100644 index 000000000..e72673b61 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html @@ -0,0 +1,330 @@ +
+
+
+
+
+
Update Apply Wechat Sub Merchant
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+

More than 50

+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+

More than 50

+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+
+
+ +
+ +
+

Required Field

+
+
+ +
+ +
+ +
+ +
+

Required Field

+

Length is more than 32

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 16

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+

More than 50

+
+
+ + +
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+ + +
+ +
+ + +
+

Required Field

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ + +
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + +
+ +
+
+
+
+
diff --git a/src/test/java/au/com/royalpay/payment/manage/alipayregisty/AlipayOnlineRegistryTest.java b/src/test/java/au/com/royalpay/payment/manage/alipayregisty/AlipayOnlineRegistryTest.java new file mode 100644 index 000000000..9354c7bca --- /dev/null +++ b/src/test/java/au/com/royalpay/payment/manage/alipayregisty/AlipayOnlineRegistryTest.java @@ -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 clients = clientMapper.halfYearHaveTransactionClients(from,to); + + List 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 result = new ArrayList<>(); + List 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") : "-")); + }); + } +}