# Conflicts: # src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java # src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java # src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.javamaster
commit
5e870b307a
@ -0,0 +1,399 @@
|
||||
package au.com.royalpay.payment.manage.merchants.beans;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* Created by yixian on 2016-06-29.
|
||||
*/
|
||||
public class ClientUpdateInfo {
|
||||
@JSONField(name = "client_moniker")
|
||||
@Pattern(regexp = "^[a-zA-Z0-9]{4}$", message = "Parameter error(partner code):Only letters or numbers are allowed")
|
||||
private String clientMoniker;
|
||||
@JSONField(name = "company_name")
|
||||
private String companyName;
|
||||
@JSONField(name = "short_name")
|
||||
private String shortName;
|
||||
@JSONField(name = "business_name")
|
||||
private String businessName;
|
||||
@JSONField(name = "business_structure")
|
||||
private String businessStructure;
|
||||
private String abn;
|
||||
private String acn;
|
||||
private String industry;
|
||||
@JSONField(name = "alipayindustry")
|
||||
private String alipayIndustry;
|
||||
@JSONField(name = "company_photo")
|
||||
private String companyPhoto;
|
||||
@JSONField(name = "store_photo")
|
||||
private String storePhoto;
|
||||
@JSONField(name = "company_website")
|
||||
private String companyWebsite;
|
||||
@JSONField(name = "company_phone")
|
||||
private String companyPhone;
|
||||
private String description;
|
||||
private String remark;
|
||||
private String sector;
|
||||
@JSONField(name = "logo_id")
|
||||
private String logoId;
|
||||
@JSONField(name = "contact_person")
|
||||
private String contactPerson;
|
||||
@JSONField(name = "contact_phone")
|
||||
private String contactPhone;
|
||||
@JSONField(name = "contact_email")
|
||||
private String contactEmail;
|
||||
private String address;
|
||||
private String suburb;
|
||||
private String postcode;
|
||||
private String state;
|
||||
private String country;
|
||||
@Pattern(regexp = "^((Australia/West)|(Australia/Eucla)|(Australia/North)|(Australia/South)|(Australia/Brisbane)|(Australia/Melbourne)|(Australia/LHI))$", message = "error.payment.valid.invalid_timezone")
|
||||
private String timezone;
|
||||
private String jdindustry;
|
||||
private String royalpayindustry;
|
||||
|
||||
private String referrer_id;
|
||||
private String referrer_name;
|
||||
|
||||
private String client_apply_id;
|
||||
|
||||
private String business_hours;
|
||||
private String merchant_introduction;
|
||||
private String merchant_tag;
|
||||
private String merchant_video_url;
|
||||
|
||||
public JSONObject insertObject() {
|
||||
JSONObject res = (JSONObject) JSON.toJSON(this);
|
||||
if (client_apply_id == null) {
|
||||
res.remove("client_apply_id");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public JSONObject updateObject() {
|
||||
JSONObject obj = insertObject();
|
||||
obj.remove("client_moniker");
|
||||
return obj;
|
||||
}
|
||||
|
||||
public JSONObject appClientInfo() {
|
||||
JSONObject obj = insertObject();
|
||||
List<String> keys = new ArrayList<>();
|
||||
obj.keySet().forEach(p -> {
|
||||
if (StringUtils.isEmpty(obj.getString(p))) {
|
||||
keys.add(p);
|
||||
}
|
||||
});
|
||||
keys.forEach(p->{
|
||||
obj.remove(p);
|
||||
});
|
||||
obj.remove("client_moniker");
|
||||
obj.remove("client_id");
|
||||
obj.remove("merchant_video_url");
|
||||
obj.remove("merchant_tag");
|
||||
obj.remove("merchant_introduction");
|
||||
obj.remove("business_hours");
|
||||
obj.remove("client_apply_id");
|
||||
obj.remove("referrer_id");
|
||||
obj.remove("referrer_name");
|
||||
obj.remove("jdindustry");
|
||||
obj.remove("royalpayindustry");
|
||||
obj.remove("industry");
|
||||
obj.remove("alipayIndustry");
|
||||
obj.remove("country");
|
||||
obj.remove("company_phone");
|
||||
return obj;
|
||||
}
|
||||
|
||||
public String getClientMoniker() {
|
||||
if (StringUtils.isEmpty(this.clientMoniker)) {
|
||||
return null;
|
||||
} else {
|
||||
return clientMoniker.toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
public void setClientMoniker(String clientMoniker) {
|
||||
this.clientMoniker = clientMoniker;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getAbn() {
|
||||
return abn;
|
||||
}
|
||||
|
||||
public void setAbn(String abn) {
|
||||
this.abn = abn;
|
||||
}
|
||||
|
||||
public String getAcn() {
|
||||
return acn;
|
||||
}
|
||||
|
||||
public void setAcn(String acn) {
|
||||
this.acn = acn;
|
||||
}
|
||||
|
||||
public String getIndustry() {
|
||||
return industry;
|
||||
}
|
||||
|
||||
public void setIndustry(String industry) {
|
||||
this.industry = industry;
|
||||
}
|
||||
|
||||
public String getCompanyPhoto() {
|
||||
return companyPhoto;
|
||||
}
|
||||
|
||||
public void setCompanyPhoto(String companyPhoto) {
|
||||
this.companyPhoto = companyPhoto;
|
||||
}
|
||||
|
||||
public String getStorePhoto() {
|
||||
return storePhoto;
|
||||
}
|
||||
|
||||
public void setStorePhoto(String storePhoto) {
|
||||
this.storePhoto = storePhoto;
|
||||
}
|
||||
|
||||
public String getCompanyWebsite() {
|
||||
return companyWebsite;
|
||||
}
|
||||
|
||||
public void setCompanyWebsite(String companyWebsite) {
|
||||
this.companyWebsite = companyWebsite;
|
||||
}
|
||||
|
||||
public String getCompanyPhone() {
|
||||
return companyPhone;
|
||||
}
|
||||
|
||||
public void setCompanyPhone(String companyPhone) {
|
||||
this.companyPhone = companyPhone;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getSector() {
|
||||
return sector;
|
||||
}
|
||||
|
||||
public void setSector(String sector) {
|
||||
this.sector = sector;
|
||||
}
|
||||
|
||||
public String getLogoId() {
|
||||
return logoId;
|
||||
}
|
||||
|
||||
public void setLogoId(String logoId) {
|
||||
this.logoId = logoId;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactEmail() {
|
||||
return contactEmail;
|
||||
}
|
||||
|
||||
public void setContactEmail(String contactEmail) {
|
||||
this.contactEmail = contactEmail;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getSuburb() {
|
||||
return suburb;
|
||||
}
|
||||
|
||||
public void setSuburb(String suburb) {
|
||||
this.suburb = suburb;
|
||||
}
|
||||
|
||||
public String getPostcode() {
|
||||
return postcode;
|
||||
}
|
||||
|
||||
public void setPostcode(String postcode) {
|
||||
this.postcode = postcode;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getTimezone() {
|
||||
return timezone;
|
||||
}
|
||||
|
||||
public void setTimezone(String timezone) {
|
||||
this.timezone = timezone;
|
||||
}
|
||||
|
||||
public String getClient_apply_id() {
|
||||
return client_apply_id;
|
||||
}
|
||||
|
||||
public void setClient_apply_id(String client_apply_id) {
|
||||
this.client_apply_id = client_apply_id;
|
||||
}
|
||||
|
||||
public String getBusinessStructure() {
|
||||
return businessStructure;
|
||||
}
|
||||
|
||||
public void setBusinessStructure(String businessStructure) {
|
||||
this.businessStructure = businessStructure;
|
||||
}
|
||||
|
||||
public String getReferrer_id() {
|
||||
return referrer_id;
|
||||
}
|
||||
|
||||
public void setReferrer_id(String referrer_id) {
|
||||
this.referrer_id = referrer_id;
|
||||
}
|
||||
|
||||
public String getReferrer_name() {
|
||||
return referrer_name;
|
||||
}
|
||||
|
||||
public void setReferrer_name(String referrer_name) {
|
||||
this.referrer_name = referrer_name;
|
||||
}
|
||||
|
||||
public String getAlipayIndustry() {
|
||||
return alipayIndustry;
|
||||
}
|
||||
|
||||
public void setAlipayIndustry(String alipayIndustry) {
|
||||
this.alipayIndustry = alipayIndustry;
|
||||
}
|
||||
|
||||
public String getJdindustry() {
|
||||
return jdindustry;
|
||||
}
|
||||
|
||||
public void setJdindustry(String jdindustry) {
|
||||
this.jdindustry = jdindustry;
|
||||
}
|
||||
|
||||
public String getRoyalpayindustry() {
|
||||
return royalpayindustry;
|
||||
}
|
||||
|
||||
public void setRoyalpayindustry(String royalpayindustry) {
|
||||
this.royalpayindustry = royalpayindustry;
|
||||
}
|
||||
|
||||
public String getBusiness_hours() {
|
||||
return business_hours;
|
||||
}
|
||||
|
||||
public void setBusiness_hours(String business_hours) {
|
||||
this.business_hours = business_hours;
|
||||
}
|
||||
|
||||
public String getMerchant_introduction() {
|
||||
return merchant_introduction;
|
||||
}
|
||||
|
||||
public void setMerchant_introduction(String merchant_introduction) {
|
||||
this.merchant_introduction = merchant_introduction;
|
||||
}
|
||||
|
||||
public String getMerchant_tag() {
|
||||
return merchant_tag;
|
||||
}
|
||||
|
||||
public void setMerchant_tag(String merchant_tag) {
|
||||
this.merchant_tag = merchant_tag;
|
||||
}
|
||||
|
||||
public String getMerchant_video_url() {
|
||||
return merchant_video_url;
|
||||
}
|
||||
|
||||
public void setMerchant_video_url(String merchant_video_url) {
|
||||
this.merchant_video_url = merchant_video_url;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue