| | |
| | | public Result applyHighLevelAuth(@Valid ApplyHighLevelAuthModel model) { |
| | | User user = userCacheService.currentUser(); |
| | | if (!realNameAuthRecordService.isPass(user.getUserId())) { |
| | | throw new YamiShopBindException("实名认证未通过,无法进行高级认证"); |
| | | throw new YamiShopBindException("Real-name verification required before advanced verification"); |
| | | } |
| | | HighLevelAuthRecord highLevelAuthRecord = highLevelAuthRecordService.findByUserId(user.getUserId()); |
| | | if (highLevelAuthRecord != null) { |
| | | String msg = ""; |
| | | switch (highLevelAuthRecord.getStatus()) { |
| | | case 0: |
| | | msg = "已经提交申请,请等待审核"; |
| | | msg = "Application submitted, please wait for review"; |
| | | break; |
| | | case 1: |
| | | msg = "审核中"; |
| | | msg = "Under review"; |
| | | break; |
| | | case 2: |
| | | msg = "审核已通过"; |
| | | msg = "Already approved"; |
| | | break; |
| | | case 3: |
| | | highLevelAuthRecord.setStatus(1); |
| | |
| | | // msg = MessageFormat.format("审核未通过,原因:{0}", record.getMsg()); |
| | | break; |
| | | default: |
| | | msg = "审核状态异常请联系客服"; |
| | | msg = "Abnormal review status, please contact support"; |
| | | break; |
| | | } |
| | | if (StrUtil.isNotBlank(msg)) { |
| | |
| | | |
| | | if (StrUtil.isNotBlank(model.getWork_place())){ |
| | | if ( model.getWork_place().length()>245){ |
| | | throw new YamiShopBindException("工作地址长度超过245"); |
| | | throw new YamiShopBindException("Work address exceeds 245 characters"); |
| | | } |
| | | } |
| | | |
| | | if (StrUtil.isNotBlank(model.getHome_place())){ |
| | | if ( model.getHome_place().length()>245){ |
| | | throw new YamiShopBindException("家庭地址长度超过245"); |
| | | throw new YamiShopBindException("Home address exceeds 245 characters"); |
| | | } |
| | | } |
| | | if (StrUtil.isNotBlank(model.getRelatives_relation())){ |
| | | if ( model.getRelatives_relation().length()>32){ |
| | | throw new YamiShopBindException("亲属电话长度超过32"); |
| | | throw new YamiShopBindException("Relative phone exceeds 32 characters"); |
| | | } |
| | | } |
| | | if (StrUtil.isNotBlank(model.getRelatives_name())){ |
| | | if ( model.getRelatives_name().length()>32){ |
| | | throw new YamiShopBindException("亲属名称长度超过32"); |
| | | throw new YamiShopBindException("Relative name exceeds 32 characters"); |
| | | } |
| | | } |
| | | if (StrUtil.isNotBlank(model.getRelatives_place())){ |
| | | if ( model.getRelatives_place().length()>245){ |
| | | throw new YamiShopBindException("亲属地址长度超过245"); |
| | | throw new YamiShopBindException("Relative address exceeds 245 characters"); |
| | | } |
| | | } |
| | | |
| | | if (StrUtil.isNotBlank(model.getRelatives_phone())){ |
| | | if ( model.getRelatives_phone().length()>32){ |
| | | throw new YamiShopBindException("亲属电话长度超过32"); |
| | | throw new YamiShopBindException("Relative phone exceeds 32 characters"); |
| | | } |
| | | } |
| | | |