parent
cc46f27ee0
commit
691097fd17
@ -0,0 +1,480 @@
|
||||
package au.com.royalpay.payment.manage.appclient.beans;
|
||||
|
||||
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public class AppMerchantBean {
|
||||
private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private String textType;
|
||||
private String searchText;
|
||||
private String client_moniker;
|
||||
private String state;
|
||||
private String suburb;
|
||||
private String short_name;
|
||||
private String sub_merchant_id;
|
||||
private String org_id;
|
||||
private String org_ids;
|
||||
private String bd;
|
||||
private String business_structure;
|
||||
private String industry;
|
||||
private Integer clean_day;
|
||||
private String bd_city;
|
||||
private String surcharge_start_rate;
|
||||
private String surcharge_end_rate;
|
||||
private String create_start_time;
|
||||
private String approve_start_time;
|
||||
private String create_end_time;
|
||||
private String approve_end_time;
|
||||
private String transaction_start_time;
|
||||
private String transaction_end_time;
|
||||
private boolean approving = false;
|
||||
private int page = 1;
|
||||
private int limit = 10;
|
||||
private boolean onlyMe = false;
|
||||
private boolean tempMchId = false;
|
||||
private boolean quickPass = false;
|
||||
private boolean greenChannel = false;
|
||||
private boolean greenChannelBdTodo = false;
|
||||
private boolean pass = false;
|
||||
private boolean completed_contract = false;
|
||||
private boolean apply_to_back = false;
|
||||
private boolean bd_upload_material = false;
|
||||
private boolean is_valid = false;
|
||||
private String merchant_id;
|
||||
private int status;
|
||||
|
||||
public String getClient_moniker() {
|
||||
return StringUtils.isEmpty(client_moniker) ? null : client_moniker;
|
||||
}
|
||||
|
||||
public void setClient_moniker(String client_moniker) {
|
||||
this.client_moniker = client_moniker;
|
||||
}
|
||||
|
||||
public String getShort_name() {
|
||||
return short_name;
|
||||
}
|
||||
|
||||
public void setShort_name(String short_name) {
|
||||
this.short_name = short_name;
|
||||
}
|
||||
|
||||
public String getSub_merchant_id() {
|
||||
return sub_merchant_id;
|
||||
}
|
||||
|
||||
public void setSub_merchant_id(String sub_merchant_id) {
|
||||
this.sub_merchant_id = sub_merchant_id;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public JSONObject toJsonParam() {
|
||||
JSONObject param = new JSONObject();
|
||||
if (StringUtils.isNotBlank(client_moniker)) {
|
||||
param.put("client_moniker", getClient_moniker());
|
||||
}
|
||||
if (StringUtils.isNotBlank(short_name)) {
|
||||
param.put("short_name", short_name);
|
||||
}
|
||||
if (StringUtils.isNotBlank(sub_merchant_id)) {
|
||||
param.put("sub_merchant_id", sub_merchant_id);
|
||||
}
|
||||
if (StringUtils.isNotBlank(state)) {
|
||||
param.put("state", state);
|
||||
}
|
||||
if (StringUtils.isNotBlank(suburb)) {
|
||||
param.put("suburb", suburb);
|
||||
}
|
||||
if (StringUtils.isNotBlank(searchText)) {
|
||||
param.put("search_text", searchText);
|
||||
if (StringUtils.isNotBlank(textType)) {
|
||||
param.put("text_type", textType);
|
||||
} else {
|
||||
param.put("text_type", "all");
|
||||
}
|
||||
}
|
||||
if (approving) {
|
||||
param.put("approving", true);
|
||||
}
|
||||
if (org_id != null) {
|
||||
param.put("org_id", org_id);
|
||||
}
|
||||
if (org_ids != null) {
|
||||
param.put("org_ids", org_ids);
|
||||
}
|
||||
if (StringUtils.isNotBlank(bd)) {
|
||||
param.put("bd_user", bd);
|
||||
}
|
||||
if (quickPass){
|
||||
param.put("quickPass",true);
|
||||
}
|
||||
if (greenChannel){
|
||||
param.put("greenChannel",true);
|
||||
}
|
||||
if (business_structure!=null && !business_structure.equals("")){
|
||||
param.put("business_structure",business_structure);
|
||||
}
|
||||
if (industry!=null && !industry.equals("")){
|
||||
param.put("industry",industry);
|
||||
}
|
||||
if (bd_city!=null && !bd_city.equals("")){
|
||||
param.put("bd_city",bd_city);
|
||||
}
|
||||
if (clean_day!=null){
|
||||
param.put("clean_day",clean_day);
|
||||
}
|
||||
if (surcharge_start_rate!=null) {
|
||||
param.put("surcharge_start_rate",surcharge_start_rate);
|
||||
}
|
||||
if (surcharge_end_rate!=null){
|
||||
param.put("surcharge_end_rate",surcharge_end_rate);
|
||||
}
|
||||
if (transaction_start_time != null) {
|
||||
try {
|
||||
param.put("transaction_start_time", format.parse(transaction_start_time));
|
||||
} catch (ParseException e) {
|
||||
throw new ParamInvalidException("transaction_start_time", "error.payment.valid.invalid_date_format");
|
||||
}
|
||||
}
|
||||
if (transaction_end_time != null) {
|
||||
try {
|
||||
param.put("transaction_end_time", DateUtils.addDays(format.parse(transaction_end_time), 1));
|
||||
} catch (ParseException e) {
|
||||
throw new ParamInvalidException("transaction_end_time", "error.payment.valid.invalid_date_format");
|
||||
}
|
||||
}
|
||||
if (create_start_time != null) {
|
||||
try {
|
||||
param.put("create_start_time", format.parse(create_start_time));
|
||||
} catch (ParseException e) {
|
||||
throw new ParamInvalidException("create_start_time", "error.payment.valid.invalid_date_format");
|
||||
}
|
||||
}
|
||||
if (create_end_time != null) {
|
||||
try {
|
||||
param.put("create_end_time", DateUtils.addDays(format.parse(create_end_time), 1));
|
||||
} catch (ParseException e) {
|
||||
throw new ParamInvalidException("create_end_time", "error.payment.valid.invalid_date_format");
|
||||
}
|
||||
}
|
||||
if (approve_start_time != null) {
|
||||
try {
|
||||
param.put("approve_start_time", format.parse(approve_start_time));
|
||||
} catch (ParseException e) {
|
||||
throw new ParamInvalidException("approve_start_time", "error.payment.valid.invalid_date_format");
|
||||
}
|
||||
}
|
||||
if (approve_end_time != null) {
|
||||
try {
|
||||
param.put("approve_end_time", DateUtils.addDays(format.parse(approve_end_time), 1));
|
||||
} catch (ParseException e) {
|
||||
throw new ParamInvalidException("approve_end_time", "error.payment.valid.invalid_date_format");
|
||||
}
|
||||
}
|
||||
if (greenChannelBdTodo){
|
||||
param.put("greenChannelBdTodo",true);
|
||||
}
|
||||
if (is_valid){
|
||||
param.put("is_valid",true);
|
||||
}
|
||||
if (pass){
|
||||
param.put("pass",true);
|
||||
}
|
||||
if (completed_contract){
|
||||
param.put("completed_contract",true);
|
||||
}
|
||||
if (apply_to_back){
|
||||
param.put("apply_to_back",true);
|
||||
}
|
||||
if (bd_upload_material){
|
||||
param.put("bd_upload_material",true);
|
||||
}
|
||||
if (merchant_id != null){
|
||||
param.put("merchant_id",merchant_id);
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getTextType() {
|
||||
return textType;
|
||||
}
|
||||
|
||||
public void setTextType(String textType) {
|
||||
this.textType = textType;
|
||||
}
|
||||
|
||||
public String getSearchText() {
|
||||
return searchText;
|
||||
}
|
||||
|
||||
public void setSearchText(String searchText) {
|
||||
this.searchText = searchText;
|
||||
}
|
||||
|
||||
public String getOrg_id() {
|
||||
return org_id;
|
||||
}
|
||||
|
||||
public void setOrg_id(String org_id) {
|
||||
this.org_id = org_id;
|
||||
}
|
||||
|
||||
public void setOnlyMe(boolean onlyMe) {
|
||||
this.onlyMe = onlyMe;
|
||||
}
|
||||
|
||||
public boolean getOnlyMe() {
|
||||
return onlyMe;
|
||||
}
|
||||
|
||||
public boolean isTempMchId() {
|
||||
return tempMchId;
|
||||
}
|
||||
|
||||
public void setTempMchId(boolean tempMchId) {
|
||||
this.tempMchId = tempMchId;
|
||||
}
|
||||
|
||||
public String getBusiness_structure() {
|
||||
return business_structure;
|
||||
}
|
||||
|
||||
public void setBusiness_structure(String business_structure) {
|
||||
this.business_structure = business_structure;
|
||||
}
|
||||
|
||||
public String getIndustry() {
|
||||
return industry;
|
||||
}
|
||||
|
||||
public void setIndustry(String industry) {
|
||||
this.industry = industry;
|
||||
}
|
||||
|
||||
public Integer getClean_day() {
|
||||
return clean_day;
|
||||
}
|
||||
|
||||
public void setClean_day(Integer clean_day) {
|
||||
this.clean_day = clean_day;
|
||||
}
|
||||
|
||||
public String getBd_city() {
|
||||
return bd_city;
|
||||
}
|
||||
|
||||
public void setBd_city(String bd_city) {
|
||||
this.bd_city = bd_city;
|
||||
}
|
||||
|
||||
public String getCreate_start_time() {
|
||||
return create_start_time;
|
||||
}
|
||||
|
||||
public void setCreate_start_time(String create_start_time) {
|
||||
this.create_start_time = create_start_time;
|
||||
}
|
||||
|
||||
public String getApprove_start_time() {
|
||||
return approve_start_time;
|
||||
}
|
||||
|
||||
public void setApprove_start_time(String approve_start_time) {
|
||||
this.approve_start_time = approve_start_time;
|
||||
}
|
||||
|
||||
public String getCreate_end_time() {
|
||||
return create_end_time;
|
||||
}
|
||||
|
||||
public void setCreate_end_time(String create_end_time) {
|
||||
this.create_end_time = create_end_time;
|
||||
}
|
||||
|
||||
public String getApprove_end_time() {
|
||||
return approve_end_time;
|
||||
}
|
||||
|
||||
public void setApprove_end_time(String approve_end_time) {
|
||||
this.approve_end_time = approve_end_time;
|
||||
}
|
||||
|
||||
public String getSurcharge_start_rate() {
|
||||
return surcharge_start_rate;
|
||||
}
|
||||
|
||||
public void setSurcharge_start_rate(String surcharge_start_rate) {
|
||||
this.surcharge_start_rate = surcharge_start_rate;
|
||||
}
|
||||
|
||||
public String getTransaction_start_time() {
|
||||
return transaction_start_time;
|
||||
}
|
||||
|
||||
public void setTransaction_start_time(String transaction_start_time) {
|
||||
this.transaction_start_time = transaction_start_time;
|
||||
}
|
||||
|
||||
public String getTransaction_end_time() {
|
||||
return transaction_end_time;
|
||||
}
|
||||
|
||||
public void setTransaction_end_time(String transaction_end_time) {
|
||||
this.transaction_end_time = transaction_end_time;
|
||||
}
|
||||
|
||||
public String getSurcharge_end_rate() {
|
||||
return surcharge_end_rate;
|
||||
}
|
||||
|
||||
public void setSurcharge_end_rate(String surcharge_end_rate) {
|
||||
this.surcharge_end_rate = surcharge_end_rate;
|
||||
}
|
||||
|
||||
public boolean isOnlyMe() {
|
||||
return onlyMe;
|
||||
}
|
||||
|
||||
public boolean isApproving() {
|
||||
return approving;
|
||||
}
|
||||
|
||||
public void setApproving(boolean approving) {
|
||||
this.approving = approving;
|
||||
}
|
||||
|
||||
public boolean isQuickPass() {
|
||||
return quickPass;
|
||||
}
|
||||
|
||||
public void setQuickPass(boolean quickPass) {
|
||||
this.quickPass = quickPass;
|
||||
}
|
||||
|
||||
public boolean isGreenChannel() {
|
||||
return greenChannel;
|
||||
}
|
||||
|
||||
public void setGreenChannel(boolean greenChannel) {
|
||||
this.greenChannel = greenChannel;
|
||||
}
|
||||
public void setGreenChannelAndBDtodo(boolean bDTodo){
|
||||
this.greenChannelBdTodo = bDTodo;
|
||||
}
|
||||
public void setIs_valid(boolean is_valid){
|
||||
this.is_valid=is_valid;
|
||||
}
|
||||
|
||||
public DateFormat getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public boolean isGreenChannelBdTodo() {
|
||||
return greenChannelBdTodo;
|
||||
}
|
||||
|
||||
public void setGreenChannelBdTodo(boolean greenChannelBdTodo) {
|
||||
this.greenChannelBdTodo = greenChannelBdTodo;
|
||||
}
|
||||
|
||||
public boolean isPass() {
|
||||
return pass;
|
||||
}
|
||||
|
||||
public void setPass(boolean pass) {
|
||||
this.pass = pass;
|
||||
}
|
||||
|
||||
public boolean isCompleted_contract() {
|
||||
return completed_contract;
|
||||
}
|
||||
|
||||
public void setCompleted_contract(boolean completed_contract) {
|
||||
this.completed_contract = completed_contract;
|
||||
}
|
||||
|
||||
public boolean isApply_to_back() {
|
||||
return apply_to_back;
|
||||
}
|
||||
|
||||
public void setApply_to_back(boolean apply_to_back) {
|
||||
this.apply_to_back = apply_to_back;
|
||||
}
|
||||
|
||||
public boolean isBd_upload_material() {
|
||||
return bd_upload_material;
|
||||
}
|
||||
|
||||
public void setBd_upload_material(boolean bd_upload_material) {
|
||||
this.bd_upload_material = bd_upload_material;
|
||||
}
|
||||
|
||||
public boolean isIs_valid() {
|
||||
return is_valid;
|
||||
}
|
||||
|
||||
public String getOrg_ids() {
|
||||
return org_ids;
|
||||
}
|
||||
|
||||
public void setOrg_ids(String org_ids) {
|
||||
this.org_ids = org_ids;
|
||||
}
|
||||
|
||||
public void setBd(String bd) {
|
||||
this.bd = bd;
|
||||
}
|
||||
|
||||
public String getMerchant_id() {
|
||||
return merchant_id;
|
||||
}
|
||||
|
||||
public void setMerchant_id(String merchant_id) {
|
||||
this.merchant_id = merchant_id;
|
||||
}
|
||||
|
||||
public String getSuburb() {
|
||||
return suburb;
|
||||
}
|
||||
|
||||
public void setSuburb(String suburb) {
|
||||
this.suburb = suburb;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue