| | |
| | | String safeword_confirm, Integer operate, String remark) { |
| | | |
| | | if (null == operate || !Arrays.asList(0, 1, 2, 3).contains(operate)) { |
| | | throw new YamiShopBindException("操作类型不正确"); |
| | | throw new YamiShopBindException("Invalid operation type"); |
| | | } |
| | | |
| | | // 操作类型 operate: 0/修改资金密码; |
| | | if (0 == operate.intValue()) { |
| | | |
| | | if (StringUtils.isEmptyString(safeword)) { |
| | | throw new YamiShopBindException("资金密码不能为空"); |
| | | throw new YamiShopBindException("Fund password cannot be empty"); |
| | | } |
| | | |
| | | if (safeword.length() != 6 || !Strings.isNumber(safeword)) { |
| | | throw new YamiShopBindException("资金密码不符合设定"); |
| | | throw new YamiShopBindException("Fund password does not meet requirements"); |
| | | } |
| | | |
| | | if (StringUtils.isEmptyString(safeword_confirm)) { |
| | | throw new YamiShopBindException("资金密码确认不能为空"); |
| | | throw new YamiShopBindException("Fund password confirmation cannot be empty"); |
| | | } |
| | | |
| | | if (!safeword.equals(safeword_confirm)) { |
| | | throw new YamiShopBindException("两次输入的资金密码不相同"); |
| | | throw new YamiShopBindException("Fund passwords do not match"); |
| | | } |
| | | } |
| | | // // 操作类型 operate: 0/修改资金密码; |
| | | // if (0 == operate.intValue()) { |
| | | RealNameAuthRecord kyc = realNameAuthRecordService.getByUserId(partyId); |
| | | if (null == kyc || kyc.getStatus() != 2) { |
| | | throw new YamiShopBindException("实名认证尚未通过,无法重置"); |
| | | throw new YamiShopBindException("Identity verification not passed, cannot reset"); |
| | | } |
| | | // } |
| | | |
| | |
| | | apply = new UserSafewordApply(); |
| | | apply.setCreateTime(new Date()); |
| | | } else if (apply.getStatus() != 3) { |
| | | throw new YamiShopBindException("您的申请之前已提交过"); |
| | | throw new YamiShopBindException("Your application has already been submitted"); |
| | | } |
| | | |
| | | // 操作类型 operate: 0/修改资金密码; |
| | |
| | | public void examine(String id ,String content,int type) { |
| | | UserSafewordApply apply = getById(id); |
| | | if (null == apply) { |
| | | throw new YamiShopBindException("申请不存在,或请刷新重试"); |
| | | throw new YamiShopBindException("Application does not exist, please refresh and try again"); |
| | | } |
| | | RealNameAuthRecord kyc = realNameAuthRecordService.getByUserId(apply.getUserId()); |
| | | if (null == kyc || kyc.getStatus() != 2) { |
| | | throw new YamiShopBindException("认证尚未通过,无法重置"); |
| | | throw new YamiShopBindException("Verification not passed, cannot reset"); |
| | | } |
| | | // if (apply.getStatus()!=2){ |
| | | // throw new YamiShopBindException("记录已操作过了"); |
| | | // throw new YamiShopBindException("Record already processed"); |
| | | // } |
| | | apply.setApplyTime(new Date()); |
| | | if (type==1){ |
| | |
| | | break; |
| | | case 1: |
| | | // if (!user.isGoogleAuthBind()) { |
| | | // throw new YamiShopBindException("用户未绑定,无需解绑"); |
| | | // throw new YamiShopBindException("User is not bound, no need to unbind"); |
| | | // } |
| | | user.setGoogleAuthBind(false); |
| | | case 2: |