Explorar o código

修改——修改【企业用户,部门为空的判断异常】,

zhouhaijun hai 1 semana
pai
achega
5e665faf50

+ 4 - 1
src/main/java/com/bootdo/datas/service/impl/GyDataServiceImpl.java

@@ -71,7 +71,10 @@ public class GyDataServiceImpl implements GyDataService {
     public List<GyDataImportDTO> list(Map<String, Object> map) {
         UserDO currUser = ShiroUtils.getUser();
         log.info("currUser:" + currUser.toString());
-        if (currUser.getDeptId() == null || !managerValue.contains(currUser.getDeptId().toString())) {
+        if(currUser.getDeptId() == null){
+            throw new BDException("当前用户的部门id为空");
+        }
+        if (!managerValue.contains(currUser.getDeptId().toString())) {
             String province = currUser.getProvince();
             if(StringUtils.isEmpty(province)){
                 province = sysProvince;