he2802 3 жил өмнө
parent
commit
eb538c644a

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -158,6 +158,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
 
 
     @Override
     @Override
     public Boolean insertByAddBo(UserProfileAddBo bo) {
     public Boolean insertByAddBo(UserProfileAddBo bo) {
+        if(Validator.isNotEmpty(bo.getKeyValue())){
+            if(bo.getKeyValue().indexOf("http")!=-1){
+                throw new CustomException("图片地址错误");
+            }
+        }
         UserProfile add = BeanUtil.toBean(bo, UserProfile.class);
         UserProfile add = BeanUtil.toBean(bo, UserProfile.class);
         validEntityBeforeSave(add);
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setCreateTime(DateUtils.getNowTime());
@@ -173,6 +178,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
     public Boolean updateByEditBo(UserProfileEditBo bo) {
     public Boolean updateByEditBo(UserProfileEditBo bo) {
+        if(Validator.isNotEmpty(bo.getKeyValue())){
+            if(bo.getKeyValue().indexOf("http")!=-1){
+                throw new CustomException("图片地址错误");
+            }
+        }
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         UserProfileVo userProfileVo = this.queryById(bo.getId());
 
 
         //新增待审的资料填写
         //新增待审的资料填写