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 99dd87f9e..8ca50c67a 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,32 +3,53 @@ package au.com.royalpay.payment.manage.application.beans; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import org.hibernate.validator.constraints.NotEmpty; + /** * Created by yuan on 2018/5/23. */ public class ClientPreApplyBean { + @NotEmpty(message = "username can't be null") private String username; + @NotEmpty(message = "password can't be null") private String password; + @NotEmpty(message = "contact_person can't be null") private String contact_person; + @NotEmpty(message = "contact_phone can't be null") private String contact_phone; + @NotEmpty(message = "contact_email can't be null") private String contact_email; + @NotEmpty(message = "company_name can't be null") private String company_name; + @NotEmpty(message = "company_phone can't be null") private String company_phone; + @NotEmpty(message = "abn can't be null") private String abn; + @NotEmpty(message = "short_name can't be null") private String short_name; + @NotEmpty(message = "address can't be null") private String address; + @NotEmpty(message = "suburb can't be null") private String suburb; + @NotEmpty(message = "state can't be null") private String state; + @NotEmpty(message = "postcode can't be null") private String postcode; + @NotEmpty(message = "industry can't be null") private String industry; - + @NotEmpty(message = "bank_no can't be null") private String bank_no; + @NotEmpty(message = "bank_name can't be null") 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() { 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 8b5dde6d1..bd2e2d51d 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 @@ -233,6 +233,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { }else { 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")){ applyerToClient(username); diff --git a/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java b/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java index 2583ef6c7..e5fe5b512 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java @@ -67,7 +67,8 @@ public class SimpleClientApplyController { } @RequestMapping(value = "/info/bank/{bsb_no}", method = RequestMethod.GET) - public JSONObject getBankInfo(@PathVariable String bsb_no) { + public JSONObject getBankInfo(@PathVariable String bsb_no,@RequestParam String username,@RequestParam String codeKey) { + simpleClientApplyService.checkOrGenerateRegisterProcessKey(username, codeKey); return simpleClientApplyService.getBankInfo(bsb_no); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/preapply/SysClientPreMapperMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/preapply/SysClientPreMapperMapper.java index 8a268e2cd..323eb5451 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/preapply/SysClientPreMapperMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/preapply/SysClientPreMapperMapper.java @@ -1,16 +1,14 @@ package au.com.royalpay.payment.manage.mappers.preapply; -import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; -import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; -import cn.yixblog.support.mybatis.autosql.annotations.SqlType; import com.alibaba.fastjson.JSONObject; + import org.apache.ibatis.annotations.Param; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; +import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; +import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; +import cn.yixblog.support.mybatis.autosql.annotations.SqlType; -@AutoMapper(tablename = "sys_client_pre_apply", pkName = "client_pre_apply_id") +@AutoMapper(tablename = "sys_client_pre_apply", pkName = "client_pre_apply_id",pkAutoIncrement = true) public interface SysClientPreMapperMapper { @AutoSql(type = SqlType.UPDATE) void update(JSONObject data);