Bläddra i källkod

20221013_sun门户新增老人机构预约相关

15143018065 1 år sedan
förälder
incheckning
f271f5f545

+ 5 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrJgyyServiceImpl.java

@@ -3,6 +3,8 @@ package com.ruoyi.business.service.impl;
 import com.ruoyi.business.domain.ZwywLrJgyy;
 import com.ruoyi.business.mapper.ZwywLrJgyyMapper;
 import com.ruoyi.business.service.IZwywLrJgyyService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -56,6 +58,9 @@ public class ZwywLrJgyyServiceImpl implements IZwywLrJgyyService
     @Override
     public List<ZwywLrJgyy> selectPortalZwywLrJgyyList(ZwywLrJgyy zwywLrJgyy)
     {
+        if (StringUtils.isEmpty(zwywLrJgyy.getXm()) || StringUtils.isEmpty(zwywLrJgyy.getZjhm())) {
+            throw new ServiceException("请输入姓名和证件号码");
+        }
         return zwywLrJgyyMapper.selectPortalZwywLrJgyyList(zwywLrJgyy);
     }
 

+ 5 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrSlhgzServiceImpl.java

@@ -3,6 +3,8 @@ package com.ruoyi.business.service.impl;
 import com.ruoyi.business.domain.ZwywLrSlhgz;
 import com.ruoyi.business.mapper.ZwywLrSlhgzMapper;
 import com.ruoyi.business.service.IZwywLrSlhgzService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -55,6 +57,9 @@ public class ZwywLrSlhgzServiceImpl implements IZwywLrSlhgzService
     @Override
     public List<ZwywLrSlhgz> selectPortalZwywLrSlhgzList(ZwywLrSlhgz zwywLrSlhgz)
     {
+        if (StringUtils.isEmpty(zwywLrSlhgz.getXm()) || StringUtils.isEmpty(zwywLrSlhgz.getLxdh())) {
+            throw new ServiceException("请输入姓名和联系电话");
+        }
         return zwywLrSlhgzMapper.selectPortalZwywLrSlhgzList(zwywLrSlhgz);
     }