From ce27310c405460fed019e81b6636774a48c295e1 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 25 May 2018 14:00:58 +0800 Subject: [PATCH] update --- .../application/beans/ClientPreApplyBean.java | 9 ++- .../impls/SimpleClientApplyServiceImpl.java | 2 +- src/main/ui/merchant_application.html | 6 +- .../merchant_application.js | 58 +++++++++++++++++-- 4 files changed, 64 insertions(+), 11 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java index 8ca50c67a..f619c9860 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java @@ -3,6 +3,7 @@ package au.com.royalpay.payment.manage.application.beans; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; import org.hibernate.validator.constraints.NotEmpty; /** @@ -43,17 +44,19 @@ public class ClientPreApplyBean { private String bank_name; @NotEmpty(message = "bsb_no can't be null") private String bsb_no; - @NotEmpty(message = "clean_days can't be null") private String clean_days; @NotEmpty(message = "codeKey can't be null") private String codeKey; - - @NotEmpty(message = "agree can't be null") private boolean agree; public JSONObject insertObject() { JSONObject res = (JSONObject) JSON.toJSON(this); + res.keySet().forEach(p-> { + if (StringUtils.isEmpty(res.getString(p).trim())) { + res.remove(p); + } + }); return res; } public String getCompany_name() { diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index 8e2b943ac..908c11f54 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -230,7 +230,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { applyInfo.put("client_pre_apply_id", apply.getIntValue("client_pre_apply_id")); applyInfo.put("update_time", new Date()); sysClientPreMapperMapper.update(applyInfo); - if(applyInfo.getBoolean("agree")){ + if(applyInfo.getBooleanValue("agree")){ applyerToClient(username); } } diff --git a/src/main/ui/merchant_application.html b/src/main/ui/merchant_application.html index 8626b54c6..ee2180494 100644 --- a/src/main/ui/merchant_application.html +++ b/src/main/ui/merchant_application.html @@ -293,14 +293,14 @@
- +